@gitbook/api 0.15.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/spec/openapi.json CHANGED
@@ -214,6 +214,15 @@
214
214
  "type": "string"
215
215
  }
216
216
  },
217
+ "snippetId": {
218
+ "name": "snippetId",
219
+ "in": "path",
220
+ "required": true,
221
+ "description": "The unique id of a snippet",
222
+ "schema": {
223
+ "type": "string"
224
+ }
225
+ },
217
226
  "userId": {
218
227
  "name": "userId",
219
228
  "in": "path",
@@ -241,6 +250,15 @@
241
250
  "type": "string"
242
251
  }
243
252
  },
253
+ "fileId": {
254
+ "name": "fileId",
255
+ "in": "path",
256
+ "required": true,
257
+ "description": "The unique id of the file",
258
+ "schema": {
259
+ "type": "string"
260
+ }
261
+ },
244
262
  "pagePath": {
245
263
  "name": "pagePath",
246
264
  "in": "path",
@@ -4565,6 +4583,10 @@
4565
4583
  "description": {
4566
4584
  "type": "string"
4567
4585
  },
4586
+ "documentId": {
4587
+ "type": "string",
4588
+ "description": "ID of the document with the page body. If undefined, the page is empty."
4589
+ },
4568
4590
  "pages": {
4569
4591
  "type": "array",
4570
4592
  "items": {
@@ -5875,9 +5897,9 @@
5875
5897
  {
5876
5898
  "type": "string",
5877
5899
  "enum": [
5878
- "meeting",
5879
5900
  "thread",
5880
- "walkthrough"
5901
+ "walkthrough",
5902
+ "document"
5881
5903
  ]
5882
5904
  }
5883
5905
  ]
@@ -6123,6 +6145,115 @@
6123
6145
  }
6124
6146
  }
6125
6147
  },
6148
+ "Snippet": {
6149
+ "allOf": [
6150
+ {
6151
+ "$ref": "#/components/schemas/Document"
6152
+ },
6153
+ {
6154
+ "type": "object",
6155
+ "properties": {
6156
+ "id": {
6157
+ "type": "string",
6158
+ "description": "Unique identifier for the snippet"
6159
+ },
6160
+ "createdAt": {
6161
+ "type": "string",
6162
+ "format": "date-time"
6163
+ },
6164
+ "editedAt": {
6165
+ "type": "string",
6166
+ "format": "date-time",
6167
+ "description": "Timestamp of when the snippet was last edited, if it has been edited since its creation."
6168
+ },
6169
+ "title": {
6170
+ "type": "string",
6171
+ "description": "Title describing the snippet.",
6172
+ "maxLength": 100
6173
+ },
6174
+ "source": {
6175
+ "description": "The source of the snippet.",
6176
+ "type": "object",
6177
+ "properties": {
6178
+ "sourceId": {
6179
+ "type": "string",
6180
+ "description": "An ID identifying the source, unique across all sources."
6181
+ },
6182
+ "name": {
6183
+ "type": "string",
6184
+ "description": "A display name for the source."
6185
+ },
6186
+ "externalId": {
6187
+ "type": "string",
6188
+ "description": "An ID identifying the snippet in the source system, if available."
6189
+ },
6190
+ "externalUrl": {
6191
+ "description": "URL of the snippet in the source system, if available.",
6192
+ "$ref": "#/components/schemas/URL"
6193
+ }
6194
+ },
6195
+ "required": [
6196
+ "sourceId",
6197
+ "name"
6198
+ ]
6199
+ },
6200
+ "contributors": {
6201
+ "description": "An array of contributors to the snippet, which can be either users or integrations. The first contributor is the one who created the snippet.",
6202
+ "type": "array",
6203
+ "minItems": 1,
6204
+ "items": {
6205
+ "oneOf": [
6206
+ {
6207
+ "$ref": "#/components/schemas/Integration"
6208
+ },
6209
+ {
6210
+ "$ref": "#/components/schemas/User"
6211
+ }
6212
+ ]
6213
+ }
6214
+ },
6215
+ "urls": {
6216
+ "type": "object",
6217
+ "description": "URLs associated with the object",
6218
+ "properties": {
6219
+ "location": {
6220
+ "description": "URL of the snippet in the API",
6221
+ "$ref": "#/components/schemas/URL"
6222
+ },
6223
+ "app": {
6224
+ "description": "URL of the snippet in the app",
6225
+ "$ref": "#/components/schemas/URL"
6226
+ }
6227
+ },
6228
+ "required": [
6229
+ "location",
6230
+ "app"
6231
+ ]
6232
+ }
6233
+ },
6234
+ "required": [
6235
+ "id",
6236
+ "source",
6237
+ "createdAt",
6238
+ "contributors",
6239
+ "urls"
6240
+ ]
6241
+ }
6242
+ ]
6243
+ },
6244
+ "UpdateSnippetSchema": {
6245
+ "type": "object",
6246
+ "properties": {
6247
+ "title": {
6248
+ "type": "string",
6249
+ "description": "A new title for the snippet."
6250
+ },
6251
+ "body": {
6252
+ "description": "Content of the snippet.",
6253
+ "$ref": "#/components/schemas/Document"
6254
+ }
6255
+ }
6256
+ },
6126
6257
  "ContentAuditRelation": {
6127
6258
  "type": "object",
6128
6259
  "description": "Content audit relation",
@@ -6164,26 +6295,18 @@
6164
6295
  },
6165
6296
  "ContentAuditRelationType": {
6166
6297
  "description": "The type of the relation between the sources",
6167
- "oneOf": [
6168
- {
6169
- "type": "string",
6170
- "enum": [
6171
- "contradiction",
6172
- "duplicate"
6173
- ]
6174
- }
6298
+ "type": "string",
6299
+ "enum": [
6300
+ "contradiction",
6301
+ "duplicate"
6175
6302
  ]
6176
6303
  },
6177
6304
  "ContentAuditRelationStatus": {
6178
6305
  "description": "Status of the audit relation to filter on",
6179
- "oneOf": [
6180
- {
6181
- "type": "string",
6182
- "enum": [
6183
- "pending",
6184
- "rejected"
6185
- ]
6186
- }
6306
+ "type": "string",
6307
+ "enum": [
6308
+ "pending",
6309
+ "rejected"
6187
6310
  ]
6188
6311
  },
6189
6312
  "ContentAuditRelationStatusUpdate": {
@@ -7269,6 +7392,7 @@
7269
7392
  "type": "string",
7270
7393
  "enum": [
7271
7394
  "entities:write",
7395
+ "snippets:read",
7272
7396
  "capture:write",
7273
7397
  "space:views:read",
7274
7398
  "space:content:read",
@@ -12413,34 +12537,6 @@
12413
12537
  }
12414
12538
  }
12415
12539
  }
12416
- },
12417
- "ContentFilesResponse": {
12418
- "description": "OK",
12419
- "content": {
12420
- "application/json": {
12421
- "schema": {
12422
- "allOf": [
12423
- {
12424
- "$ref": "#/components/schemas/List"
12425
- },
12426
- {
12427
- "type": "object",
12428
- "required": [
12429
- "items"
12430
- ],
12431
- "properties": {
12432
- "items": {
12433
- "type": "array",
12434
- "items": {
12435
- "$ref": "#/components/schemas/RevisionFile"
12436
- }
12437
- }
12438
- }
12439
- }
12440
- ]
12441
- }
12442
- }
12443
- }
12444
12540
  }
12445
12541
  }
12446
12542
  },
@@ -13397,9 +13493,51 @@
13397
13493
  }
13398
13494
  }
13399
13495
  },
13496
+ "/spaces/{spaceId}/content/pages": {
13497
+ "get": {
13498
+ "summary": "List all pages for the main revision content of a space",
13499
+ "operationId": "listPages",
13500
+ "security": [
13501
+ {
13502
+ "user": []
13503
+ }
13504
+ ],
13505
+ "parameters": [
13506
+ {
13507
+ "$ref": "#/components/parameters/spaceId"
13508
+ }
13509
+ ],
13510
+ "responses": {
13511
+ "200": {
13512
+ "description": "OK",
13513
+ "content": {
13514
+ "application/json": {
13515
+ "schema": {
13516
+ "type": "object",
13517
+ "properties": {
13518
+ "pages": {
13519
+ "type": "array",
13520
+ "items": {
13521
+ "$ref": "#/components/schemas/RevisionPage"
13522
+ }
13523
+ }
13524
+ },
13525
+ "required": [
13526
+ "pages"
13527
+ ]
13528
+ }
13529
+ }
13530
+ }
13531
+ },
13532
+ "default": {
13533
+ "$ref": "#/components/responses/UnexpectedError"
13534
+ }
13535
+ }
13536
+ }
13537
+ },
13400
13538
  "/spaces/{spaceId}/content/files": {
13401
13539
  "get": {
13402
- "summary": "List all files for the latest primary revision content for a space",
13540
+ "summary": "List all files for the main revision content of a space",
13403
13541
  "operationId": "listFiles",
13404
13542
  "security": [
13405
13543
  {
@@ -13419,7 +13557,66 @@
13419
13557
  ],
13420
13558
  "responses": {
13421
13559
  "200": {
13422
- "$ref": "#/components/responses/ContentFilesResponse"
13560
+ "description": "OK",
13561
+ "content": {
13562
+ "application/json": {
13563
+ "schema": {
13564
+ "allOf": [
13565
+ {
13566
+ "$ref": "#/components/schemas/List"
13567
+ },
13568
+ {
13569
+ "type": "object",
13570
+ "required": [
13571
+ "items"
13572
+ ],
13573
+ "properties": {
13574
+ "items": {
13575
+ "type": "array",
13576
+ "items": {
13577
+ "$ref": "#/components/schemas/RevisionFile"
13578
+ }
13579
+ }
13580
+ }
13581
+ }
13582
+ ]
13583
+ }
13584
+ }
13585
+ }
13586
+ },
13587
+ "default": {
13588
+ "$ref": "#/components/responses/UnexpectedError"
13589
+ }
13590
+ }
13591
+ }
13592
+ },
13593
+ "/spaces/{spaceId}/content/files/{fileId}": {
13594
+ "get": {
13595
+ "summary": "Get a file by its ID in the main revision of a space",
13596
+ "operationId": "getFileById",
13597
+ "security": [
13598
+ {
13599
+ "user": []
13600
+ }
13601
+ ],
13602
+ "parameters": [
13603
+ {
13604
+ "$ref": "#/components/parameters/spaceId"
13605
+ },
13606
+ {
13607
+ "$ref": "#/components/parameters/fileId"
13608
+ }
13609
+ ],
13610
+ "responses": {
13611
+ "200": {
13612
+ "description": "OK",
13613
+ "content": {
13614
+ "application/json": {
13615
+ "schema": {
13616
+ "$ref": "#/components/schemas/RevisionFile"
13617
+ }
13618
+ }
13619
+ }
13423
13620
  },
13424
13621
  "default": {
13425
13622
  "$ref": "#/components/responses/UnexpectedError"
@@ -13560,6 +13757,46 @@
13560
13757
  }
13561
13758
  }
13562
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
+ },
13563
13800
  "/spaces/{spaceId}/change-requests": {
13564
13801
  "post": {
13565
13802
  "operationId": "createChangeRequest",
@@ -14736,10 +14973,10 @@
14736
14973
  }
14737
14974
  }
14738
14975
  },
14739
- "/spaces/{spaceId}/change-requests/{changeRequestId}/content/files": {
14976
+ "/spaces/{spaceId}/change-requests/{changeRequestId}/content/pages": {
14740
14977
  "get": {
14741
- "summary": "List all files in the latest content of the change-request",
14742
- "operationId": "listFilesInChangeRequestById",
14978
+ "summary": "List all pages in the content of a change request",
14979
+ "operationId": "listPagesInChangeRequest",
14743
14980
  "security": [
14744
14981
  {
14745
14982
  "user": []
@@ -14751,9 +14988,54 @@
14751
14988
  },
14752
14989
  {
14753
14990
  "$ref": "#/components/parameters/changeRequestId"
14754
- },
14755
- {
14756
- "$ref": "#/components/parameters/listPage"
14991
+ }
14992
+ ],
14993
+ "responses": {
14994
+ "200": {
14995
+ "description": "OK",
14996
+ "content": {
14997
+ "application/json": {
14998
+ "schema": {
14999
+ "type": "object",
15000
+ "properties": {
15001
+ "pages": {
15002
+ "type": "array",
15003
+ "items": {
15004
+ "$ref": "#/components/schemas/RevisionPage"
15005
+ }
15006
+ }
15007
+ },
15008
+ "required": [
15009
+ "pages"
15010
+ ]
15011
+ }
15012
+ }
15013
+ }
15014
+ },
15015
+ "default": {
15016
+ "$ref": "#/components/responses/UnexpectedError"
15017
+ }
15018
+ }
15019
+ }
15020
+ },
15021
+ "/spaces/{spaceId}/change-requests/{changeRequestId}/content/files": {
15022
+ "get": {
15023
+ "summary": "List all files in a change request content",
15024
+ "operationId": "listFilesInChangeRequestById",
15025
+ "security": [
15026
+ {
15027
+ "user": []
15028
+ }
15029
+ ],
15030
+ "parameters": [
15031
+ {
15032
+ "$ref": "#/components/parameters/spaceId"
15033
+ },
15034
+ {
15035
+ "$ref": "#/components/parameters/changeRequestId"
15036
+ },
15037
+ {
15038
+ "$ref": "#/components/parameters/listPage"
14757
15039
  },
14758
15040
  {
14759
15041
  "$ref": "#/components/parameters/listLimit"
@@ -14761,7 +15043,69 @@
14761
15043
  ],
14762
15044
  "responses": {
14763
15045
  "200": {
14764
- "$ref": "#/components/responses/ContentFilesResponse"
15046
+ "description": "OK",
15047
+ "content": {
15048
+ "application/json": {
15049
+ "schema": {
15050
+ "allOf": [
15051
+ {
15052
+ "$ref": "#/components/schemas/List"
15053
+ },
15054
+ {
15055
+ "type": "object",
15056
+ "required": [
15057
+ "items"
15058
+ ],
15059
+ "properties": {
15060
+ "items": {
15061
+ "type": "array",
15062
+ "items": {
15063
+ "$ref": "#/components/schemas/RevisionFile"
15064
+ }
15065
+ }
15066
+ }
15067
+ }
15068
+ ]
15069
+ }
15070
+ }
15071
+ }
15072
+ },
15073
+ "default": {
15074
+ "$ref": "#/components/responses/UnexpectedError"
15075
+ }
15076
+ }
15077
+ }
15078
+ },
15079
+ "/spaces/{spaceId}/change-requests/{changeRequestId}/content/files/{fileId}": {
15080
+ "get": {
15081
+ "summary": "Get a file by its ID in the content of a change request",
15082
+ "operationId": "getFileInChangeRequestById",
15083
+ "security": [
15084
+ {
15085
+ "user": []
15086
+ }
15087
+ ],
15088
+ "parameters": [
15089
+ {
15090
+ "$ref": "#/components/parameters/spaceId"
15091
+ },
15092
+ {
15093
+ "$ref": "#/components/parameters/changeRequestId"
15094
+ },
15095
+ {
15096
+ "$ref": "#/components/parameters/fileId"
15097
+ }
15098
+ ],
15099
+ "responses": {
15100
+ "200": {
15101
+ "description": "OK",
15102
+ "content": {
15103
+ "application/json": {
15104
+ "schema": {
15105
+ "$ref": "#/components/schemas/RevisionFile"
15106
+ }
15107
+ }
15108
+ }
14765
15109
  },
14766
15110
  "default": {
14767
15111
  "$ref": "#/components/responses/UnexpectedError"
@@ -15012,6 +15356,48 @@
15012
15356
  }
15013
15357
  }
15014
15358
  },
15359
+ "/spaces/{spaceId}/revisions/{revisionId}/pages": {
15360
+ "get": {
15361
+ "summary": "List all pages in a revision",
15362
+ "operationId": "listPagesInRevisionById",
15363
+ "security": [
15364
+ {
15365
+ "user": []
15366
+ }
15367
+ ],
15368
+ "parameters": [
15369
+ {
15370
+ "$ref": "#/components/parameters/spaceId"
15371
+ }
15372
+ ],
15373
+ "responses": {
15374
+ "200": {
15375
+ "description": "OK",
15376
+ "content": {
15377
+ "application/json": {
15378
+ "schema": {
15379
+ "type": "object",
15380
+ "properties": {
15381
+ "pages": {
15382
+ "type": "array",
15383
+ "items": {
15384
+ "$ref": "#/components/schemas/RevisionPage"
15385
+ }
15386
+ }
15387
+ },
15388
+ "required": [
15389
+ "pages"
15390
+ ]
15391
+ }
15392
+ }
15393
+ }
15394
+ },
15395
+ "default": {
15396
+ "$ref": "#/components/responses/UnexpectedError"
15397
+ }
15398
+ }
15399
+ }
15400
+ },
15015
15401
  "/spaces/{spaceId}/revisions/{revisionId}/files": {
15016
15402
  "get": {
15017
15403
  "summary": "List all files in a revision",
@@ -15037,7 +15423,69 @@
15037
15423
  ],
15038
15424
  "responses": {
15039
15425
  "200": {
15040
- "$ref": "#/components/responses/ContentFilesResponse"
15426
+ "description": "OK",
15427
+ "content": {
15428
+ "application/json": {
15429
+ "schema": {
15430
+ "allOf": [
15431
+ {
15432
+ "$ref": "#/components/schemas/List"
15433
+ },
15434
+ {
15435
+ "type": "object",
15436
+ "required": [
15437
+ "items"
15438
+ ],
15439
+ "properties": {
15440
+ "items": {
15441
+ "type": "array",
15442
+ "items": {
15443
+ "$ref": "#/components/schemas/RevisionFile"
15444
+ }
15445
+ }
15446
+ }
15447
+ }
15448
+ ]
15449
+ }
15450
+ }
15451
+ }
15452
+ },
15453
+ "default": {
15454
+ "$ref": "#/components/responses/UnexpectedError"
15455
+ }
15456
+ }
15457
+ }
15458
+ },
15459
+ "/spaces/{spaceId}/revisions/{revisionId}/files/{fileId}": {
15460
+ "get": {
15461
+ "summary": "Get a file in a revision by its ID",
15462
+ "operationId": "getFileInRevisionById",
15463
+ "security": [
15464
+ {
15465
+ "user": []
15466
+ }
15467
+ ],
15468
+ "parameters": [
15469
+ {
15470
+ "$ref": "#/components/parameters/spaceId"
15471
+ },
15472
+ {
15473
+ "$ref": "#/components/parameters/revisionId"
15474
+ },
15475
+ {
15476
+ "$ref": "#/components/parameters/fileId"
15477
+ }
15478
+ ],
15479
+ "responses": {
15480
+ "200": {
15481
+ "description": "OK",
15482
+ "content": {
15483
+ "application/json": {
15484
+ "schema": {
15485
+ "$ref": "#/components/schemas/RevisionFile"
15486
+ }
15487
+ }
15488
+ }
15041
15489
  },
15042
15490
  "default": {
15043
15491
  "$ref": "#/components/responses/UnexpectedError"
@@ -17909,6 +18357,14 @@
17909
18357
  {
17910
18358
  "$ref": "#/components/parameters/listLimit"
17911
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
+ },
17912
18368
  {
17913
18369
  "in": "query",
17914
18370
  "name": "title",
@@ -19535,6 +19991,53 @@
19535
19991
  }
19536
19992
  }
19537
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
+ },
19538
20041
  "/orgs/{organizationId}/installations": {
19539
20042
  "get": {
19540
20043
  "operationId": "listOrganizationInstallations",
@@ -19935,7 +20438,8 @@
19935
20438
  "/orgs/{organizationId}/captures": {
19936
20439
  "get": {
19937
20440
  "operationId": "listCaptures",
19938
- "summary": "List captures",
20441
+ "deprecated": true,
20442
+ "summary": "List captures. Deprecated, use listSnippets instead.",
19939
20443
  "description": "List captures in an organization, newest first.\n",
19940
20444
  "tags": [
19941
20445
  "organizations"
@@ -20078,7 +20582,8 @@
20078
20582
  "/orgs/{organizationId}/captures/{captureId}": {
20079
20583
  "get": {
20080
20584
  "operationId": "getCapture",
20081
- "summary": "Get a capture by its ID",
20585
+ "deprecated": true,
20586
+ "summary": "Get a capture by its ID. Deprecated, use getSnippet instead.",
20082
20587
  "tags": [
20083
20588
  "organizations"
20084
20589
  ],
@@ -20116,7 +20621,8 @@
20116
20621
  },
20117
20622
  "delete": {
20118
20623
  "operationId": "deleteCapture",
20119
- "summary": "Delete a capture by its ID",
20624
+ "deprecated": true,
20625
+ "summary": "Delete a capture by its ID. Deprecated, use deleteSnippet.",
20120
20626
  "tags": [
20121
20627
  "organizations"
20122
20628
  ],
@@ -20144,7 +20650,8 @@
20144
20650
  },
20145
20651
  "put": {
20146
20652
  "operationId": "updateCapture",
20147
- "summary": "Update an existing capture",
20653
+ "deprecated": true,
20654
+ "summary": "Update an existing capture. Deprecated, use updateSnippet.",
20148
20655
  "tags": [
20149
20656
  "organizations"
20150
20657
  ],
@@ -20306,10 +20813,14 @@
20306
20813
  }
20307
20814
  }
20308
20815
  },
20309
- "/orgs/{organizationId}/ask": {
20310
- "post": {
20311
- "operationId": "askInOrganization",
20312
- "summary": "Ask a question.",
20816
+ "/orgs/{organizationId}/snippets": {
20817
+ "get": {
20818
+ "operationId": "listSnippets",
20819
+ "summary": "Lists snippets.",
20820
+ "description": "List snippets in an organization, newest first.\n",
20821
+ "tags": [
20822
+ "organizations"
20823
+ ],
20313
20824
  "security": [
20314
20825
  {
20315
20826
  "user": []
@@ -20318,10 +20829,241 @@
20318
20829
  "parameters": [
20319
20830
  {
20320
20831
  "$ref": "#/components/parameters/organizationId"
20321
- }
20322
- ],
20323
- "requestBody": {
20324
- "required": true,
20832
+ },
20833
+ {
20834
+ "$ref": "#/components/parameters/pageFormat"
20835
+ },
20836
+ {
20837
+ "$ref": "#/components/parameters/listPage"
20838
+ },
20839
+ {
20840
+ "$ref": "#/components/parameters/listLimit"
20841
+ },
20842
+ {
20843
+ "name": "source",
20844
+ "in": "query",
20845
+ "description": "If specified, only snippets from the specified source will be returned.",
20846
+ "schema": {
20847
+ "type": "string"
20848
+ }
20849
+ }
20850
+ ],
20851
+ "responses": {
20852
+ "200": {
20853
+ "description": "OK",
20854
+ "content": {
20855
+ "application/json": {
20856
+ "schema": {
20857
+ "allOf": [
20858
+ {
20859
+ "$ref": "#/components/schemas/List"
20860
+ },
20861
+ {
20862
+ "type": "object",
20863
+ "required": [
20864
+ "items"
20865
+ ],
20866
+ "properties": {
20867
+ "items": {
20868
+ "type": "array",
20869
+ "items": {
20870
+ "$ref": "#/components/schemas/Snippet"
20871
+ }
20872
+ }
20873
+ }
20874
+ }
20875
+ ]
20876
+ }
20877
+ }
20878
+ }
20879
+ },
20880
+ "default": {
20881
+ "$ref": "#/components/responses/UnexpectedError"
20882
+ }
20883
+ }
20884
+ },
20885
+ "post": {
20886
+ "operationId": "createSnippet",
20887
+ "summary": "Create a new snippet",
20888
+ "tags": [
20889
+ "organizations"
20890
+ ],
20891
+ "security": [
20892
+ {
20893
+ "user": []
20894
+ }
20895
+ ],
20896
+ "parameters": [
20897
+ {
20898
+ "$ref": "#/components/parameters/organizationId"
20899
+ }
20900
+ ],
20901
+ "requestBody": {
20902
+ "content": {
20903
+ "application/json": {
20904
+ "schema": {
20905
+ "type": "object"
20906
+ }
20907
+ }
20908
+ }
20909
+ },
20910
+ "responses": {
20911
+ "201": {
20912
+ "description": "Snippet created",
20913
+ "headers": {
20914
+ "Location": {
20915
+ "description": "API URL for the newly created snippet",
20916
+ "schema": {
20917
+ "type": "string"
20918
+ }
20919
+ }
20920
+ },
20921
+ "content": {
20922
+ "application/json": {
20923
+ "schema": {
20924
+ "$ref": "#/components/schemas/Snippet"
20925
+ }
20926
+ }
20927
+ }
20928
+ },
20929
+ "default": {
20930
+ "$ref": "#/components/responses/UnexpectedError"
20931
+ }
20932
+ }
20933
+ }
20934
+ },
20935
+ "/orgs/{organizationId}/snippets/{snippetId}": {
20936
+ "get": {
20937
+ "operationId": "getSnippet",
20938
+ "summary": "Get a snippet by its ID",
20939
+ "tags": [
20940
+ "organizations"
20941
+ ],
20942
+ "security": [
20943
+ {
20944
+ "user": []
20945
+ }
20946
+ ],
20947
+ "parameters": [
20948
+ {
20949
+ "$ref": "#/components/parameters/organizationId"
20950
+ },
20951
+ {
20952
+ "$ref": "#/components/parameters/snippetId"
20953
+ },
20954
+ {
20955
+ "$ref": "#/components/parameters/pageFormat"
20956
+ }
20957
+ ],
20958
+ "responses": {
20959
+ "200": {
20960
+ "description": "OK",
20961
+ "content": {
20962
+ "application/json": {
20963
+ "schema": {
20964
+ "$ref": "#/components/schemas/Snippet"
20965
+ }
20966
+ }
20967
+ }
20968
+ },
20969
+ "default": {
20970
+ "$ref": "#/components/responses/UnexpectedError"
20971
+ }
20972
+ }
20973
+ },
20974
+ "delete": {
20975
+ "operationId": "deleteSnippet",
20976
+ "summary": "Delete a snippet by its ID.",
20977
+ "tags": [
20978
+ "organizations"
20979
+ ],
20980
+ "security": [
20981
+ {
20982
+ "user": []
20983
+ }
20984
+ ],
20985
+ "parameters": [
20986
+ {
20987
+ "$ref": "#/components/parameters/organizationId"
20988
+ },
20989
+ {
20990
+ "$ref": "#/components/parameters/snippetId"
20991
+ }
20992
+ ],
20993
+ "responses": {
20994
+ "200": {
20995
+ "description": "OK"
20996
+ },
20997
+ "default": {
20998
+ "$ref": "#/components/responses/UnexpectedError"
20999
+ }
21000
+ }
21001
+ },
21002
+ "put": {
21003
+ "operationId": "updateSnippet",
21004
+ "summary": "Update an existing snippet.",
21005
+ "tags": [
21006
+ "organizations"
21007
+ ],
21008
+ "security": [
21009
+ {
21010
+ "user": []
21011
+ }
21012
+ ],
21013
+ "parameters": [
21014
+ {
21015
+ "$ref": "#/components/parameters/organizationId"
21016
+ },
21017
+ {
21018
+ "$ref": "#/components/parameters/snippetId"
21019
+ },
21020
+ {
21021
+ "$ref": "#/components/parameters/ifUnmodifiedSince"
21022
+ }
21023
+ ],
21024
+ "requestBody": {
21025
+ "required": true,
21026
+ "content": {
21027
+ "application/json": {
21028
+ "schema": {
21029
+ "$ref": "#/components/schemas/UpdateSnippetSchema"
21030
+ }
21031
+ }
21032
+ }
21033
+ },
21034
+ "responses": {
21035
+ "200": {
21036
+ "description": "OK",
21037
+ "content": {
21038
+ "application/json": {
21039
+ "schema": {
21040
+ "$ref": "#/components/schemas/Snippet"
21041
+ }
21042
+ }
21043
+ }
21044
+ },
21045
+ "default": {
21046
+ "$ref": "#/components/responses/UnexpectedError"
21047
+ }
21048
+ }
21049
+ }
21050
+ },
21051
+ "/orgs/{organizationId}/ask": {
21052
+ "post": {
21053
+ "operationId": "askInOrganization",
21054
+ "summary": "Ask a question.",
21055
+ "security": [
21056
+ {
21057
+ "user": []
21058
+ }
21059
+ ],
21060
+ "parameters": [
21061
+ {
21062
+ "$ref": "#/components/parameters/organizationId"
21063
+ }
21064
+ ],
21065
+ "requestBody": {
21066
+ "required": true,
20325
21067
  "content": {
20326
21068
  "application/json": {
20327
21069
  "schema": {
@@ -20381,9 +21123,46 @@
20381
21123
  "required": false,
20382
21124
  "description": "Status of the audit relation to filter on",
20383
21125
  "schema": {
20384
- "$ref": "#/components/schemas/ContentAuditRelationStatus",
20385
- "default": [
20386
- "pending"
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
+ }
20387
21166
  ]
20388
21167
  }
20389
21168
  }
@@ -20480,6 +21259,56 @@
20480
21259
  }
20481
21260
  }
20482
21261
  },
21262
+ "/orgs/{organizationId}/insights/audit-sources/{sourceId}/content": {
21263
+ "get": {
21264
+ "operationId": "getContentAuditSourceContentById",
21265
+ "summary": "Get the content of an audit source",
21266
+ "tags": [
21267
+ "organizations"
21268
+ ],
21269
+ "security": [
21270
+ {
21271
+ "user": []
21272
+ }
21273
+ ],
21274
+ "parameters": [
21275
+ {
21276
+ "$ref": "#/components/parameters/organizationId"
21277
+ },
21278
+ {
21279
+ "name": "sourceId",
21280
+ "in": "path",
21281
+ "required": true,
21282
+ "description": "The id of the content audit source",
21283
+ "schema": {
21284
+ "type": "string"
21285
+ }
21286
+ },
21287
+ {
21288
+ "$ref": "#/components/parameters/pageFormat"
21289
+ }
21290
+ ],
21291
+ "responses": {
21292
+ "200": {
21293
+ "description": "OK",
21294
+ "content": {
21295
+ "application/json": {
21296
+ "schema": {
21297
+ "$ref": "#/components/schemas/Document"
21298
+ }
21299
+ }
21300
+ }
21301
+ },
21302
+ "404": {
21303
+ "description": "No matching content source found for given ID",
21304
+ "$ref": "#/components/responses/NotFoundError"
21305
+ },
21306
+ "default": {
21307
+ "$ref": "#/components/responses/UnexpectedError"
21308
+ }
21309
+ }
21310
+ }
21311
+ },
20483
21312
  "/internal/hive/token": {
20484
21313
  "post": {
20485
21314
  "operationId": "generateHiveAccessToken",