@gitbook/api 0.18.0 → 0.19.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 +37 -0
- package/dist/index.cjs +16 -0
- package/dist/index.js +16 -0
- package/package.json +1 -1
- package/spec/openapi.json +127 -7
- package/spec/openapi.yaml +79 -6
package/dist/client.d.ts
CHANGED
|
@@ -403,6 +403,13 @@ export declare type PublishedContentLookup = {
|
|
|
403
403
|
basePath: string;
|
|
404
404
|
apiToken: string;
|
|
405
405
|
};
|
|
406
|
+
/**
|
|
407
|
+
* Drawing generated from a prompt
|
|
408
|
+
*/
|
|
409
|
+
export interface GeneratedDrawing {
|
|
410
|
+
/** Mermaid diagram generated */
|
|
411
|
+
mermaid?: string;
|
|
412
|
+
}
|
|
406
413
|
export declare type Document = MarkdownDocument | {
|
|
407
414
|
document: JSONDocument;
|
|
408
415
|
} | object;
|
|
@@ -987,6 +994,7 @@ export declare type RevisionPageDocument = RevisionPageBase & Document & {
|
|
|
987
994
|
pages: (RevisionPageDocument | RevisionPageLink)[];
|
|
988
995
|
git?: GitSyncBlob;
|
|
989
996
|
layout: RevisionPageLayoutOptions;
|
|
997
|
+
cover?: RevisionPageDocumentCover;
|
|
990
998
|
};
|
|
991
999
|
export interface RevisionPageDocumentCover {
|
|
992
1000
|
/** Content reference pointing to the source image. */
|
|
@@ -2751,6 +2759,7 @@ export interface ContentKitTextInput {
|
|
|
2751
2759
|
/** Text that appears in the form control when it has no value set */
|
|
2752
2760
|
placeholder?: string;
|
|
2753
2761
|
multiline?: boolean;
|
|
2762
|
+
inputType?: 'text' | 'password';
|
|
2754
2763
|
}
|
|
2755
2764
|
/**
|
|
2756
2765
|
* Low level text element.
|
|
@@ -4474,6 +4483,19 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4474
4483
|
* @secure
|
|
4475
4484
|
*/
|
|
4476
4485
|
updateSpaceCustomFields: (spaceId: string, data: UpdateCustomFieldValues, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
4486
|
+
/**
|
|
4487
|
+
* No description
|
|
4488
|
+
*
|
|
4489
|
+
* @tags spaces
|
|
4490
|
+
* @name GenerateDrawing
|
|
4491
|
+
* @summary Generate a drawing from text.
|
|
4492
|
+
* @request POST:/spaces/{spaceId}/drawings
|
|
4493
|
+
* @secure
|
|
4494
|
+
*/
|
|
4495
|
+
generateDrawing: (spaceId: string, data: {
|
|
4496
|
+
text: string;
|
|
4497
|
+
context?: string;
|
|
4498
|
+
}, params?: RequestParams) => Promise<HttpResponse<GeneratedDrawing, Error>>;
|
|
4477
4499
|
};
|
|
4478
4500
|
collections: {
|
|
4479
4501
|
/**
|
|
@@ -5785,6 +5807,21 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5785
5807
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
5786
5808
|
items: ContentAuditRelation[];
|
|
5787
5809
|
}, Error>>;
|
|
5810
|
+
/**
|
|
5811
|
+
* No description
|
|
5812
|
+
*
|
|
5813
|
+
* @tags organizations
|
|
5814
|
+
* @name GetContentAuditRelationById
|
|
5815
|
+
* @summary Get an audit relation by ID
|
|
5816
|
+
* @request GET:/orgs/{organizationId}/insights/audit-relations/{relationId}
|
|
5817
|
+
* @secure
|
|
5818
|
+
*/
|
|
5819
|
+
getContentAuditRelationById: (organizationId: string, relationId: string, params?: RequestParams) => Promise<HttpResponse<ContentAuditRelation, Error | {
|
|
5820
|
+
error: {
|
|
5821
|
+
code: 404;
|
|
5822
|
+
message: string;
|
|
5823
|
+
};
|
|
5824
|
+
}>>;
|
|
5788
5825
|
/**
|
|
5789
5826
|
* No description
|
|
5790
5827
|
*
|
package/dist/index.cjs
CHANGED
|
@@ -1174,6 +1174,15 @@ var Api = class extends HttpClient {
|
|
|
1174
1174
|
secure: true,
|
|
1175
1175
|
type: "application/json" /* Json */,
|
|
1176
1176
|
...params
|
|
1177
|
+
}),
|
|
1178
|
+
generateDrawing: (spaceId, data, params = {}) => this.request({
|
|
1179
|
+
path: `/spaces/${spaceId}/drawings`,
|
|
1180
|
+
method: "POST",
|
|
1181
|
+
body: data,
|
|
1182
|
+
secure: true,
|
|
1183
|
+
type: "application/json" /* Json */,
|
|
1184
|
+
format: "json",
|
|
1185
|
+
...params
|
|
1177
1186
|
})
|
|
1178
1187
|
};
|
|
1179
1188
|
this.collections = {
|
|
@@ -1932,6 +1941,13 @@ var Api = class extends HttpClient {
|
|
|
1932
1941
|
format: "json",
|
|
1933
1942
|
...params
|
|
1934
1943
|
}),
|
|
1944
|
+
getContentAuditRelationById: (organizationId, relationId, params = {}) => this.request({
|
|
1945
|
+
path: `/orgs/${organizationId}/insights/audit-relations/${relationId}`,
|
|
1946
|
+
method: "GET",
|
|
1947
|
+
secure: true,
|
|
1948
|
+
format: "json",
|
|
1949
|
+
...params
|
|
1950
|
+
}),
|
|
1935
1951
|
updateContentAuditRelationStatusById: (organizationId, relationId, data, params = {}) => this.request({
|
|
1936
1952
|
path: `/orgs/${organizationId}/insights/audit-relations/${relationId}`,
|
|
1937
1953
|
method: "PATCH",
|
package/dist/index.js
CHANGED
|
@@ -1106,6 +1106,15 @@ var Api = class extends HttpClient {
|
|
|
1106
1106
|
secure: true,
|
|
1107
1107
|
type: "application/json" /* Json */,
|
|
1108
1108
|
...params
|
|
1109
|
+
}),
|
|
1110
|
+
generateDrawing: (spaceId, data, params = {}) => this.request({
|
|
1111
|
+
path: `/spaces/${spaceId}/drawings`,
|
|
1112
|
+
method: "POST",
|
|
1113
|
+
body: data,
|
|
1114
|
+
secure: true,
|
|
1115
|
+
type: "application/json" /* Json */,
|
|
1116
|
+
format: "json",
|
|
1117
|
+
...params
|
|
1109
1118
|
})
|
|
1110
1119
|
};
|
|
1111
1120
|
this.collections = {
|
|
@@ -1864,6 +1873,13 @@ var Api = class extends HttpClient {
|
|
|
1864
1873
|
format: "json",
|
|
1865
1874
|
...params
|
|
1866
1875
|
}),
|
|
1876
|
+
getContentAuditRelationById: (organizationId, relationId, params = {}) => this.request({
|
|
1877
|
+
path: `/orgs/${organizationId}/insights/audit-relations/${relationId}`,
|
|
1878
|
+
method: "GET",
|
|
1879
|
+
secure: true,
|
|
1880
|
+
format: "json",
|
|
1881
|
+
...params
|
|
1882
|
+
}),
|
|
1867
1883
|
updateContentAuditRelationStatusById: (organizationId, relationId, data, params = {}) => this.request({
|
|
1868
1884
|
path: `/orgs/${organizationId}/insights/audit-relations/${relationId}`,
|
|
1869
1885
|
method: "PATCH",
|
package/package.json
CHANGED
package/spec/openapi.json
CHANGED
|
@@ -286,6 +286,15 @@
|
|
|
286
286
|
"$ref": "#/components/schemas/EntityType"
|
|
287
287
|
}
|
|
288
288
|
},
|
|
289
|
+
"relationId": {
|
|
290
|
+
"name": "relationId",
|
|
291
|
+
"in": "path",
|
|
292
|
+
"required": true,
|
|
293
|
+
"description": "The id of the content audit relation",
|
|
294
|
+
"schema": {
|
|
295
|
+
"type": "string"
|
|
296
|
+
}
|
|
297
|
+
},
|
|
289
298
|
"backofficeHostname": {
|
|
290
299
|
"name": "hostname",
|
|
291
300
|
"in": "path",
|
|
@@ -1444,6 +1453,16 @@
|
|
|
1444
1453
|
}
|
|
1445
1454
|
]
|
|
1446
1455
|
},
|
|
1456
|
+
"GeneratedDrawing": {
|
|
1457
|
+
"type": "object",
|
|
1458
|
+
"description": "Drawing generated from a prompt",
|
|
1459
|
+
"properties": {
|
|
1460
|
+
"mermaid": {
|
|
1461
|
+
"description": "Mermaid diagram generated",
|
|
1462
|
+
"type": "string"
|
|
1463
|
+
}
|
|
1464
|
+
}
|
|
1465
|
+
},
|
|
1447
1466
|
"Document": {
|
|
1448
1467
|
"oneOf": [
|
|
1449
1468
|
{
|
|
@@ -4605,6 +4624,9 @@
|
|
|
4605
4624
|
},
|
|
4606
4625
|
"layout": {
|
|
4607
4626
|
"$ref": "#/components/schemas/RevisionPageLayoutOptions"
|
|
4627
|
+
},
|
|
4628
|
+
"cover": {
|
|
4629
|
+
"$ref": "#/components/schemas/RevisionPageDocumentCover"
|
|
4608
4630
|
}
|
|
4609
4631
|
},
|
|
4610
4632
|
"required": [
|
|
@@ -9992,6 +10014,14 @@
|
|
|
9992
10014
|
},
|
|
9993
10015
|
"multiline": {
|
|
9994
10016
|
"type": "boolean"
|
|
10017
|
+
},
|
|
10018
|
+
"inputType": {
|
|
10019
|
+
"type": "string",
|
|
10020
|
+
"enum": [
|
|
10021
|
+
"text",
|
|
10022
|
+
"password"
|
|
10023
|
+
],
|
|
10024
|
+
"default": "text"
|
|
9995
10025
|
}
|
|
9996
10026
|
},
|
|
9997
10027
|
"required": [
|
|
@@ -16411,6 +16441,63 @@
|
|
|
16411
16441
|
}
|
|
16412
16442
|
}
|
|
16413
16443
|
},
|
|
16444
|
+
"/spaces/{spaceId}/drawings": {
|
|
16445
|
+
"post": {
|
|
16446
|
+
"operationId": "generateDrawing",
|
|
16447
|
+
"summary": "Generate a drawing from text.",
|
|
16448
|
+
"tags": [
|
|
16449
|
+
"spaces"
|
|
16450
|
+
],
|
|
16451
|
+
"security": [
|
|
16452
|
+
{
|
|
16453
|
+
"user-internal": []
|
|
16454
|
+
}
|
|
16455
|
+
],
|
|
16456
|
+
"parameters": [
|
|
16457
|
+
{
|
|
16458
|
+
"$ref": "#/components/parameters/spaceId"
|
|
16459
|
+
}
|
|
16460
|
+
],
|
|
16461
|
+
"requestBody": {
|
|
16462
|
+
"required": true,
|
|
16463
|
+
"content": {
|
|
16464
|
+
"application/json": {
|
|
16465
|
+
"schema": {
|
|
16466
|
+
"type": "object",
|
|
16467
|
+
"properties": {
|
|
16468
|
+
"text": {
|
|
16469
|
+
"type": "string",
|
|
16470
|
+
"description": "Instruction to describe the drawing."
|
|
16471
|
+
},
|
|
16472
|
+
"context": {
|
|
16473
|
+
"type": "string",
|
|
16474
|
+
"description": "Text context to provide for the generation."
|
|
16475
|
+
}
|
|
16476
|
+
},
|
|
16477
|
+
"required": [
|
|
16478
|
+
"text"
|
|
16479
|
+
]
|
|
16480
|
+
}
|
|
16481
|
+
}
|
|
16482
|
+
}
|
|
16483
|
+
},
|
|
16484
|
+
"responses": {
|
|
16485
|
+
"200": {
|
|
16486
|
+
"description": "Generated drawing",
|
|
16487
|
+
"content": {
|
|
16488
|
+
"application/json": {
|
|
16489
|
+
"schema": {
|
|
16490
|
+
"$ref": "#/components/schemas/GeneratedDrawing"
|
|
16491
|
+
}
|
|
16492
|
+
}
|
|
16493
|
+
}
|
|
16494
|
+
},
|
|
16495
|
+
"default": {
|
|
16496
|
+
"$ref": "#/components/responses/UnexpectedError"
|
|
16497
|
+
}
|
|
16498
|
+
}
|
|
16499
|
+
}
|
|
16500
|
+
},
|
|
16414
16501
|
"/collections/{collectionId}": {
|
|
16415
16502
|
"get": {
|
|
16416
16503
|
"operationId": "getCollectionById",
|
|
@@ -21284,6 +21371,45 @@
|
|
|
21284
21371
|
}
|
|
21285
21372
|
},
|
|
21286
21373
|
"/orgs/{organizationId}/insights/audit-relations/{relationId}": {
|
|
21374
|
+
"get": {
|
|
21375
|
+
"operationId": "getContentAuditRelationById",
|
|
21376
|
+
"summary": "Get an audit relation by ID",
|
|
21377
|
+
"tags": [
|
|
21378
|
+
"organizations"
|
|
21379
|
+
],
|
|
21380
|
+
"security": [
|
|
21381
|
+
{
|
|
21382
|
+
"user": []
|
|
21383
|
+
}
|
|
21384
|
+
],
|
|
21385
|
+
"parameters": [
|
|
21386
|
+
{
|
|
21387
|
+
"$ref": "#/components/parameters/organizationId"
|
|
21388
|
+
},
|
|
21389
|
+
{
|
|
21390
|
+
"$ref": "#/components/parameters/relationId"
|
|
21391
|
+
}
|
|
21392
|
+
],
|
|
21393
|
+
"responses": {
|
|
21394
|
+
"200": {
|
|
21395
|
+
"description": "OK",
|
|
21396
|
+
"content": {
|
|
21397
|
+
"application/json": {
|
|
21398
|
+
"schema": {
|
|
21399
|
+
"$ref": "#/components/schemas/ContentAuditRelation"
|
|
21400
|
+
}
|
|
21401
|
+
}
|
|
21402
|
+
}
|
|
21403
|
+
},
|
|
21404
|
+
"404": {
|
|
21405
|
+
"description": "No matching content relation found for given ID",
|
|
21406
|
+
"$ref": "#/components/responses/NotFoundError"
|
|
21407
|
+
},
|
|
21408
|
+
"default": {
|
|
21409
|
+
"$ref": "#/components/responses/UnexpectedError"
|
|
21410
|
+
}
|
|
21411
|
+
}
|
|
21412
|
+
},
|
|
21287
21413
|
"patch": {
|
|
21288
21414
|
"operationId": "updateContentAuditRelationStatusById",
|
|
21289
21415
|
"summary": "Update an audit relation status",
|
|
@@ -21300,13 +21426,7 @@
|
|
|
21300
21426
|
"$ref": "#/components/parameters/organizationId"
|
|
21301
21427
|
},
|
|
21302
21428
|
{
|
|
21303
|
-
"
|
|
21304
|
-
"in": "path",
|
|
21305
|
-
"required": true,
|
|
21306
|
-
"description": "The id of the content audit relation",
|
|
21307
|
-
"schema": {
|
|
21308
|
-
"type": "string"
|
|
21309
|
-
}
|
|
21429
|
+
"$ref": "#/components/parameters/relationId"
|
|
21310
21430
|
}
|
|
21311
21431
|
],
|
|
21312
21432
|
"requestBody": {
|
package/spec/openapi.yaml
CHANGED
|
@@ -207,6 +207,13 @@ components:
|
|
|
207
207
|
description: Type of the entity
|
|
208
208
|
schema:
|
|
209
209
|
$ref: "#/components/schemas/EntityType"
|
|
210
|
+
relationId:
|
|
211
|
+
name: relationId
|
|
212
|
+
in: path
|
|
213
|
+
required: true
|
|
214
|
+
description: The id of the content audit relation
|
|
215
|
+
schema:
|
|
216
|
+
type: string
|
|
210
217
|
backofficeHostname:
|
|
211
218
|
name: hostname
|
|
212
219
|
in: path
|
|
@@ -1020,6 +1027,13 @@ components:
|
|
|
1020
1027
|
- pathname
|
|
1021
1028
|
- basePath
|
|
1022
1029
|
- apiToken
|
|
1030
|
+
GeneratedDrawing:
|
|
1031
|
+
type: object
|
|
1032
|
+
description: Drawing generated from a prompt
|
|
1033
|
+
properties:
|
|
1034
|
+
mermaid:
|
|
1035
|
+
description: Mermaid diagram generated
|
|
1036
|
+
type: string
|
|
1023
1037
|
Document:
|
|
1024
1038
|
oneOf:
|
|
1025
1039
|
- $ref: "#/components/schemas/MarkdownDocument"
|
|
@@ -2995,6 +3009,8 @@ components:
|
|
|
2995
3009
|
$ref: "#/components/schemas/GitSyncBlob"
|
|
2996
3010
|
layout:
|
|
2997
3011
|
$ref: "#/components/schemas/RevisionPageLayoutOptions"
|
|
3012
|
+
cover:
|
|
3013
|
+
$ref: "#/components/schemas/RevisionPageDocumentCover"
|
|
2998
3014
|
required:
|
|
2999
3015
|
- kind
|
|
3000
3016
|
- type
|
|
@@ -6623,6 +6639,12 @@ components:
|
|
|
6623
6639
|
type: string
|
|
6624
6640
|
multiline:
|
|
6625
6641
|
type: boolean
|
|
6642
|
+
inputType:
|
|
6643
|
+
type: string
|
|
6644
|
+
enum:
|
|
6645
|
+
- text
|
|
6646
|
+
- password
|
|
6647
|
+
default: text
|
|
6626
6648
|
required:
|
|
6627
6649
|
- type
|
|
6628
6650
|
- state
|
|
@@ -10361,6 +10383,40 @@ paths:
|
|
|
10361
10383
|
description: Custom fields updated
|
|
10362
10384
|
default:
|
|
10363
10385
|
$ref: "#/components/responses/UnexpectedError"
|
|
10386
|
+
"/spaces/{spaceId}/drawings":
|
|
10387
|
+
post:
|
|
10388
|
+
operationId: generateDrawing
|
|
10389
|
+
summary: Generate a drawing from text.
|
|
10390
|
+
tags:
|
|
10391
|
+
- spaces
|
|
10392
|
+
security:
|
|
10393
|
+
- user-internal: []
|
|
10394
|
+
parameters:
|
|
10395
|
+
- $ref: "#/components/parameters/spaceId"
|
|
10396
|
+
requestBody:
|
|
10397
|
+
required: true
|
|
10398
|
+
content:
|
|
10399
|
+
application/json:
|
|
10400
|
+
schema:
|
|
10401
|
+
type: object
|
|
10402
|
+
properties:
|
|
10403
|
+
text:
|
|
10404
|
+
type: string
|
|
10405
|
+
description: Instruction to describe the drawing.
|
|
10406
|
+
context:
|
|
10407
|
+
type: string
|
|
10408
|
+
description: Text context to provide for the generation.
|
|
10409
|
+
required:
|
|
10410
|
+
- text
|
|
10411
|
+
responses:
|
|
10412
|
+
"200":
|
|
10413
|
+
description: Generated drawing
|
|
10414
|
+
content:
|
|
10415
|
+
application/json:
|
|
10416
|
+
schema:
|
|
10417
|
+
$ref: "#/components/schemas/GeneratedDrawing"
|
|
10418
|
+
default:
|
|
10419
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
10364
10420
|
"/collections/{collectionId}":
|
|
10365
10421
|
get:
|
|
10366
10422
|
operationId: getCollectionById
|
|
@@ -13133,6 +13189,28 @@ paths:
|
|
|
13133
13189
|
default:
|
|
13134
13190
|
$ref: "#/components/responses/UnexpectedError"
|
|
13135
13191
|
"/orgs/{organizationId}/insights/audit-relations/{relationId}":
|
|
13192
|
+
get:
|
|
13193
|
+
operationId: getContentAuditRelationById
|
|
13194
|
+
summary: Get an audit relation by ID
|
|
13195
|
+
tags:
|
|
13196
|
+
- organizations
|
|
13197
|
+
security:
|
|
13198
|
+
- user: []
|
|
13199
|
+
parameters:
|
|
13200
|
+
- $ref: "#/components/parameters/organizationId"
|
|
13201
|
+
- $ref: "#/components/parameters/relationId"
|
|
13202
|
+
responses:
|
|
13203
|
+
"200":
|
|
13204
|
+
description: OK
|
|
13205
|
+
content:
|
|
13206
|
+
application/json:
|
|
13207
|
+
schema:
|
|
13208
|
+
$ref: "#/components/schemas/ContentAuditRelation"
|
|
13209
|
+
"404":
|
|
13210
|
+
description: No matching content relation found for given ID
|
|
13211
|
+
$ref: "#/components/responses/NotFoundError"
|
|
13212
|
+
default:
|
|
13213
|
+
$ref: "#/components/responses/UnexpectedError"
|
|
13136
13214
|
patch:
|
|
13137
13215
|
operationId: updateContentAuditRelationStatusById
|
|
13138
13216
|
summary: Update an audit relation status
|
|
@@ -13142,12 +13220,7 @@ paths:
|
|
|
13142
13220
|
- user: []
|
|
13143
13221
|
parameters:
|
|
13144
13222
|
- $ref: "#/components/parameters/organizationId"
|
|
13145
|
-
-
|
|
13146
|
-
in: path
|
|
13147
|
-
required: true
|
|
13148
|
-
description: The id of the content audit relation
|
|
13149
|
-
schema:
|
|
13150
|
-
type: string
|
|
13223
|
+
- $ref: "#/components/parameters/relationId"
|
|
13151
13224
|
requestBody:
|
|
13152
13225
|
required: true
|
|
13153
13226
|
content:
|