@gitbook/api 0.27.0 → 0.28.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
@@ -1162,6 +1162,7 @@
1162
1162
  "oneOf": [
1163
1163
  {
1164
1164
  "type": "object",
1165
+ "title": "Link",
1165
1166
  "properties": {
1166
1167
  "type": {
1167
1168
  "type": "string",
@@ -1176,6 +1177,7 @@
1176
1177
  },
1177
1178
  {
1178
1179
  "type": "object",
1180
+ "title": "HTML",
1179
1181
  "properties": {
1180
1182
  "type": {
1181
1183
  "type": "string",
@@ -1333,6 +1335,7 @@
1333
1335
  "oneOf": [
1334
1336
  {
1335
1337
  "type": "object",
1338
+ "title": "Resolved",
1336
1339
  "properties": {
1337
1340
  "status": {
1338
1341
  "description": "Status of the comment.",
@@ -1358,6 +1361,7 @@
1358
1361
  },
1359
1362
  {
1360
1363
  "type": "object",
1364
+ "title": "Open",
1361
1365
  "properties": {
1362
1366
  "status": {
1363
1367
  "description": "Status of the comment.",
@@ -1434,6 +1438,7 @@
1434
1438
  "oneOf": [
1435
1439
  {
1436
1440
  "type": "object",
1441
+ "title": "Redirect",
1437
1442
  "properties": {
1438
1443
  "target": {
1439
1444
  "type": "string",
@@ -1455,6 +1460,7 @@
1455
1460
  },
1456
1461
  {
1457
1462
  "type": "object",
1463
+ "title": "Content",
1458
1464
  "properties": {
1459
1465
  "space": {
1460
1466
  "type": "string",
@@ -1490,13 +1496,79 @@
1490
1496
  }
1491
1497
  ]
1492
1498
  },
1499
+ "SpacePointer": {
1500
+ "type": "object",
1501
+ "properties": {
1502
+ "type": {
1503
+ "type": "string",
1504
+ "enum": [
1505
+ "space"
1506
+ ]
1507
+ },
1508
+ "space": {
1509
+ "type": "string",
1510
+ "description": "Unique identifier for the space"
1511
+ }
1512
+ },
1513
+ "required": [
1514
+ "type",
1515
+ "space"
1516
+ ]
1517
+ },
1518
+ "CollectionPointer": {
1519
+ "type": "object",
1520
+ "properties": {
1521
+ "type": {
1522
+ "type": "string",
1523
+ "enum": [
1524
+ "collection"
1525
+ ]
1526
+ },
1527
+ "collection": {
1528
+ "type": "string",
1529
+ "description": "Unique identifier for the collection"
1530
+ }
1531
+ },
1532
+ "required": [
1533
+ "type",
1534
+ "collection"
1535
+ ]
1536
+ },
1537
+ "ContentPosition": {
1538
+ "type": "object",
1539
+ "description": "Position at which to insert an item",
1540
+ "properties": {
1541
+ "before": {
1542
+ "oneOf": [
1543
+ {
1544
+ "$ref": "#/components/schemas/SpacePointer"
1545
+ },
1546
+ {
1547
+ "$ref": "#/components/schemas/CollectionPointer"
1548
+ }
1549
+ ]
1550
+ },
1551
+ "after": {
1552
+ "oneOf": [
1553
+ {
1554
+ "$ref": "#/components/schemas/SpacePointer"
1555
+ },
1556
+ {
1557
+ "$ref": "#/components/schemas/CollectionPointer"
1558
+ }
1559
+ ]
1560
+ }
1561
+ }
1562
+ },
1493
1563
  "Document": {
1494
1564
  "oneOf": [
1495
1565
  {
1496
- "$ref": "#/components/schemas/MarkdownDocument"
1566
+ "$ref": "#/components/schemas/MarkdownDocument",
1567
+ "title": "Markdown"
1497
1568
  },
1498
1569
  {
1499
1570
  "type": "object",
1571
+ "title": "JSON Document",
1500
1572
  "properties": {
1501
1573
  "document": {
1502
1574
  "$ref": "#/components/schemas/JSONDocument"
@@ -1508,6 +1580,7 @@
1508
1580
  },
1509
1581
  {
1510
1582
  "type": "object",
1583
+ "title": "Empty",
1511
1584
  "properties": {},
1512
1585
  "additionalProperties": false
1513
1586
  }
@@ -1526,6 +1599,7 @@
1526
1599
  ]
1527
1600
  },
1528
1601
  "JSONDocument": {
1602
+ "type": "object",
1529
1603
  "properties": {
1530
1604
  "object": {
1531
1605
  "type": "string",
@@ -1535,8 +1609,13 @@
1535
1609
  },
1536
1610
  "data": {
1537
1611
  "type": "object",
1538
- "properties": {},
1539
- "additionalProperties": false
1612
+ "properties": {
1613
+ "schemaVersion": {
1614
+ "description": "The schema version of the document. If undefined, the document is considered to be of the latest schema version.",
1615
+ "type": "integer"
1616
+ }
1617
+ },
1618
+ "additionalProperties": true
1540
1619
  },
1541
1620
  "nodes": {
1542
1621
  "type": "array",
@@ -4398,6 +4477,7 @@
4398
4477
  "oneOf": [
4399
4478
  {
4400
4479
  "type": "object",
4480
+ "title": "Custom",
4401
4481
  "properties": {
4402
4482
  "backend": {
4403
4483
  "type": "string",
@@ -4413,6 +4493,7 @@
4413
4493
  },
4414
4494
  {
4415
4495
  "type": "object",
4496
+ "title": "Integration",
4416
4497
  "properties": {
4417
4498
  "backend": {
4418
4499
  "type": "string",
@@ -5602,6 +5683,12 @@
5602
5683
  "communityType": {
5603
5684
  "$ref": "#/components/schemas/OrganizationCommunityType"
5604
5685
  },
5686
+ "defaultRole": {
5687
+ "$ref": "#/components/schemas/MemberRoleOrGuest"
5688
+ },
5689
+ "defaultContent": {
5690
+ "$ref": "#/components/schemas/OrganizationDefaultContent"
5691
+ },
5605
5692
  "urls": {
5606
5693
  "type": "object",
5607
5694
  "description": "URLs associated with the object",
@@ -5890,6 +5977,17 @@
5890
5977
  "team"
5891
5978
  ]
5892
5979
  },
5980
+ "OrganizationDefaultContent": {
5981
+ "description": "The default content for the organization",
5982
+ "oneOf": [
5983
+ {
5984
+ "$ref": "#/components/schemas/SpacePointer"
5985
+ },
5986
+ {
5987
+ "$ref": "#/components/schemas/CollectionPointer"
5988
+ }
5989
+ ]
5990
+ },
5893
5991
  "Capture": {
5894
5992
  "type": "object",
5895
5993
  "properties": {
@@ -7014,9 +7112,13 @@
7014
7112
  ]
7015
7113
  },
7016
7114
  {
7115
+ "discriminator": {
7116
+ "propertyName": "type"
7117
+ },
7017
7118
  "oneOf": [
7018
7119
  {
7019
7120
  "type": "object",
7121
+ "title": "Page",
7020
7122
  "properties": {
7021
7123
  "type": {
7022
7124
  "type": "string",
@@ -7050,6 +7152,7 @@
7050
7152
  },
7051
7153
  {
7052
7154
  "type": "object",
7155
+ "title": "Entity",
7053
7156
  "properties": {
7054
7157
  "type": {
7055
7158
  "type": "string",
@@ -7077,6 +7180,7 @@
7077
7180
  },
7078
7181
  {
7079
7182
  "type": "object",
7183
+ "title": "Snippet",
7080
7184
  "properties": {
7081
7185
  "type": {
7082
7186
  "type": "string",
@@ -7238,15 +7342,11 @@
7238
7342
  "description": "Page entry in the content analytics.",
7239
7343
  "required": [
7240
7344
  "page",
7241
- "title",
7242
7345
  "pageViews"
7243
7346
  ],
7244
7347
  "properties": {
7245
7348
  "page": {
7246
- "type": "string"
7247
- },
7248
- "title": {
7249
- "type": "string"
7349
+ "$ref": "#/components/schemas/RevisionPageDocument"
7250
7350
  },
7251
7351
  "pageViews": {
7252
7352
  "type": "number"
@@ -8070,7 +8170,28 @@
8070
8170
  },
8071
8171
  "signingSecret": {
8072
8172
  "type": "string",
8073
- "description": "Secret that can be used to verify the authenticity of incoming HTTP requests to the integration."
8173
+ "description": "Secret that can be used to verify the authenticity of incoming HTTP requests to the integration.",
8174
+ "deprecated": true
8175
+ },
8176
+ "signingSecrets": {
8177
+ "type": "object",
8178
+ "properties": {
8179
+ "integration": {
8180
+ "type": "string",
8181
+ "description": "Secret that can be used to verify the authenticity of incoming HTTP requests to the integration."
8182
+ },
8183
+ "installation": {
8184
+ "type": "string",
8185
+ "description": "Secret that can be used to verify the authenticity of incoming HTTP requests to the installation."
8186
+ },
8187
+ "spaceInstallation": {
8188
+ "type": "string",
8189
+ "description": "Secret that can be used to verify the authenticity of incoming HTTP requests to the space installation."
8190
+ }
8191
+ },
8192
+ "required": [
8193
+ "integration"
8194
+ ]
8074
8195
  },
8075
8196
  "apiEndpoint": {
8076
8197
  "type": "string",
@@ -8097,6 +8218,7 @@
8097
8218
  "apiEndpoint",
8098
8219
  "apiTokens",
8099
8220
  "integration",
8221
+ "signingSecrets",
8100
8222
  "secrets"
8101
8223
  ]
8102
8224
  },
@@ -12807,18 +12929,42 @@
12807
12929
  }
12808
12930
  },
12809
12931
  "responses": {
12810
- "UnexpectedError": {
12811
- "description": "Unexpected Error",
12932
+ "BadRequestError": {
12933
+ "description": "Bad Request",
12812
12934
  "content": {
12813
12935
  "application/json": {
12814
12936
  "schema": {
12815
- "$ref": "#/components/schemas/Error"
12937
+ "type": "object",
12938
+ "required": [
12939
+ "error"
12940
+ ],
12941
+ "properties": {
12942
+ "error": {
12943
+ "type": "object",
12944
+ "properties": {
12945
+ "code": {
12946
+ "type": "integer",
12947
+ "format": "int32",
12948
+ "enum": [
12949
+ 400
12950
+ ]
12951
+ },
12952
+ "message": {
12953
+ "type": "string"
12954
+ }
12955
+ },
12956
+ "required": [
12957
+ "code",
12958
+ "message"
12959
+ ]
12960
+ }
12961
+ }
12816
12962
  }
12817
12963
  }
12818
12964
  }
12819
12965
  },
12820
- "BadRequestError": {
12821
- "description": "Bad Request",
12966
+ "ConflictError": {
12967
+ "description": "Conflict",
12822
12968
  "content": {
12823
12969
  "application/json": {
12824
12970
  "schema": {
@@ -12834,7 +12980,7 @@
12834
12980
  "type": "integer",
12835
12981
  "format": "int32",
12836
12982
  "enum": [
12837
- 400
12983
+ 409
12838
12984
  ]
12839
12985
  },
12840
12986
  "message": {
@@ -12884,6 +13030,16 @@
12884
13030
  }
12885
13031
  }
12886
13032
  }
13033
+ },
13034
+ "UnexpectedError": {
13035
+ "description": "Unexpected Error",
13036
+ "content": {
13037
+ "application/json": {
13038
+ "schema": {
13039
+ "$ref": "#/components/schemas/Error"
13040
+ }
13041
+ }
13042
+ }
12887
13043
  }
12888
13044
  }
12889
13045
  },
@@ -13259,6 +13415,7 @@
13259
13415
  "oneOf": [
13260
13416
  {
13261
13417
  "type": "object",
13418
+ "title": "Emoji",
13262
13419
  "properties": {
13263
13420
  "emoji": {
13264
13421
  "$ref": "#/components/schemas/Emoji"
@@ -13270,6 +13427,7 @@
13270
13427
  },
13271
13428
  {
13272
13429
  "type": "object",
13430
+ "title": "Icon",
13273
13431
  "properties": {
13274
13432
  "icon": {
13275
13433
  "$ref": "#/components/schemas/URL"
@@ -13281,6 +13439,7 @@
13281
13439
  },
13282
13440
  {
13283
13441
  "type": "object",
13442
+ "title": "Remove icon or emoji",
13284
13443
  "properties": {
13285
13444
  "emoji": {
13286
13445
  "type": "string",
@@ -13452,6 +13611,135 @@
13452
13611
  }
13453
13612
  }
13454
13613
  },
13614
+ "/spaces/{spaceId}/move": {
13615
+ "post": {
13616
+ "operationId": "moveSpace",
13617
+ "summary": "Move a space to a new position.",
13618
+ "tags": [
13619
+ "spaces"
13620
+ ],
13621
+ "security": [
13622
+ {
13623
+ "user": []
13624
+ }
13625
+ ],
13626
+ "parameters": [
13627
+ {
13628
+ "$ref": "#/components/parameters/spaceId"
13629
+ }
13630
+ ],
13631
+ "requestBody": {
13632
+ "required": true,
13633
+ "content": {
13634
+ "application/json": {
13635
+ "schema": {
13636
+ "type": "object",
13637
+ "minProperties": 1,
13638
+ "properties": {
13639
+ "parent": {
13640
+ "description": "The unique id of the parent collection",
13641
+ "type": "string",
13642
+ "nullable": true
13643
+ },
13644
+ "position": {
13645
+ "description": "Where to move the space. By default, it will be moved at the end.",
13646
+ "$ref": "#/components/schemas/ContentPosition"
13647
+ }
13648
+ }
13649
+ }
13650
+ }
13651
+ }
13652
+ },
13653
+ "responses": {
13654
+ "200": {
13655
+ "description": "Space moved",
13656
+ "content": {
13657
+ "application/json": {
13658
+ "schema": {
13659
+ "$ref": "#/components/schemas/Space"
13660
+ }
13661
+ }
13662
+ }
13663
+ },
13664
+ "400": {
13665
+ "description": "Invalid position space or collection provided",
13666
+ "$ref": "#/components/responses/BadRequestError"
13667
+ },
13668
+ "404": {
13669
+ "description": "No matching Space found for given ID",
13670
+ "$ref": "#/components/responses/NotFoundError"
13671
+ },
13672
+ "409": {
13673
+ "description": "Operation would not result in any update",
13674
+ "$ref": "#/components/responses/ConflictError"
13675
+ },
13676
+ "default": {
13677
+ "$ref": "#/components/responses/UnexpectedError"
13678
+ }
13679
+ }
13680
+ }
13681
+ },
13682
+ "/spaces/{spaceId}/transfer": {
13683
+ "post": {
13684
+ "operationId": "transferSpace",
13685
+ "summary": "Transfer a space to another organization, collection or both.",
13686
+ "tags": [
13687
+ "spaces"
13688
+ ],
13689
+ "security": [
13690
+ {
13691
+ "user": []
13692
+ }
13693
+ ],
13694
+ "parameters": [
13695
+ {
13696
+ "$ref": "#/components/parameters/spaceId"
13697
+ }
13698
+ ],
13699
+ "requestBody": {
13700
+ "required": true,
13701
+ "content": {
13702
+ "application/json": {
13703
+ "schema": {
13704
+ "type": "object",
13705
+ "properties": {
13706
+ "organization": {
13707
+ "type": "string",
13708
+ "description": "The unique id of the target organization"
13709
+ }
13710
+ },
13711
+ "required": [
13712
+ "organization"
13713
+ ]
13714
+ }
13715
+ }
13716
+ }
13717
+ },
13718
+ "responses": {
13719
+ "200": {
13720
+ "description": "Space transferred",
13721
+ "content": {
13722
+ "application/json": {
13723
+ "schema": {
13724
+ "$ref": "#/components/schemas/Space"
13725
+ }
13726
+ }
13727
+ }
13728
+ },
13729
+ "404": {
13730
+ "description": "No matching Space found for given ID",
13731
+ "$ref": "#/components/responses/NotFoundError"
13732
+ },
13733
+ "409": {
13734
+ "description": "Transfer would not result in any update",
13735
+ "$ref": "#/components/responses/ConflictError"
13736
+ },
13737
+ "default": {
13738
+ "$ref": "#/components/responses/UnexpectedError"
13739
+ }
13740
+ }
13741
+ }
13742
+ },
13455
13743
  "/spaces/{spaceId}/search": {
13456
13744
  "get": {
13457
13745
  "operationId": "searchSpaceContent",
@@ -17237,6 +17525,135 @@
17237
17525
  }
17238
17526
  }
17239
17527
  },
17528
+ "/collections/{collectionId}/move": {
17529
+ "post": {
17530
+ "operationId": "moveCollection",
17531
+ "summary": "Move a collection to a new position.",
17532
+ "tags": [
17533
+ "collections"
17534
+ ],
17535
+ "security": [
17536
+ {
17537
+ "user": []
17538
+ }
17539
+ ],
17540
+ "parameters": [
17541
+ {
17542
+ "$ref": "#/components/parameters/collectionId"
17543
+ }
17544
+ ],
17545
+ "requestBody": {
17546
+ "required": true,
17547
+ "content": {
17548
+ "application/json": {
17549
+ "schema": {
17550
+ "type": "object",
17551
+ "minProperties": 1,
17552
+ "properties": {
17553
+ "parent": {
17554
+ "description": "The unique id of the parent collection",
17555
+ "type": "string",
17556
+ "nullable": true
17557
+ },
17558
+ "position": {
17559
+ "description": "Where to move the collection. By default, it will be moved at the end.",
17560
+ "$ref": "#/components/schemas/ContentPosition"
17561
+ }
17562
+ }
17563
+ }
17564
+ }
17565
+ }
17566
+ },
17567
+ "responses": {
17568
+ "200": {
17569
+ "description": "Collection moved",
17570
+ "content": {
17571
+ "application/json": {
17572
+ "schema": {
17573
+ "$ref": "#/components/schemas/Collection"
17574
+ }
17575
+ }
17576
+ }
17577
+ },
17578
+ "400": {
17579
+ "description": "Invalid position space or collection provided",
17580
+ "$ref": "#/components/responses/BadRequestError"
17581
+ },
17582
+ "404": {
17583
+ "description": "No matching Collection found for given ID",
17584
+ "$ref": "#/components/responses/NotFoundError"
17585
+ },
17586
+ "409": {
17587
+ "description": "Operation would not result in any update",
17588
+ "$ref": "#/components/responses/ConflictError"
17589
+ },
17590
+ "default": {
17591
+ "$ref": "#/components/responses/UnexpectedError"
17592
+ }
17593
+ }
17594
+ }
17595
+ },
17596
+ "/collections/{collectionId}/transfer": {
17597
+ "post": {
17598
+ "operationId": "transferCollection",
17599
+ "summary": "Transfer a collection to another organization.",
17600
+ "tags": [
17601
+ "collections"
17602
+ ],
17603
+ "security": [
17604
+ {
17605
+ "user": []
17606
+ }
17607
+ ],
17608
+ "parameters": [
17609
+ {
17610
+ "$ref": "#/components/parameters/collectionId"
17611
+ }
17612
+ ],
17613
+ "requestBody": {
17614
+ "required": true,
17615
+ "content": {
17616
+ "application/json": {
17617
+ "schema": {
17618
+ "type": "object",
17619
+ "properties": {
17620
+ "organization": {
17621
+ "type": "string",
17622
+ "description": "The unique id of the target organization"
17623
+ }
17624
+ },
17625
+ "required": [
17626
+ "organization"
17627
+ ]
17628
+ }
17629
+ }
17630
+ }
17631
+ },
17632
+ "responses": {
17633
+ "200": {
17634
+ "description": "Collection transferred",
17635
+ "content": {
17636
+ "application/json": {
17637
+ "schema": {
17638
+ "$ref": "#/components/schemas/Collection"
17639
+ }
17640
+ }
17641
+ }
17642
+ },
17643
+ "404": {
17644
+ "description": "No matching Collection found for given ID",
17645
+ "$ref": "#/components/responses/NotFoundError"
17646
+ },
17647
+ "409": {
17648
+ "description": "Transfer would not result in any update",
17649
+ "$ref": "#/components/responses/ConflictError"
17650
+ },
17651
+ "default": {
17652
+ "$ref": "#/components/responses/UnexpectedError"
17653
+ }
17654
+ }
17655
+ }
17656
+ },
17240
17657
  "/collections/{collectionId}/permissions/aggregate": {
17241
17658
  "get": {
17242
17659
  "operationId": "listPermissionsAggregateInCollection",
@@ -18690,6 +19107,77 @@
18690
19107
  "$ref": "#/components/responses/UnexpectedError"
18691
19108
  }
18692
19109
  }
19110
+ },
19111
+ "patch": {
19112
+ "operationId": "updateOrganizationById",
19113
+ "summary": "Update an organization by its ID",
19114
+ "tags": [
19115
+ "organizations"
19116
+ ],
19117
+ "security": [
19118
+ {
19119
+ "user": []
19120
+ }
19121
+ ],
19122
+ "parameters": [
19123
+ {
19124
+ "$ref": "#/components/parameters/organizationId"
19125
+ }
19126
+ ],
19127
+ "requestBody": {
19128
+ "required": true,
19129
+ "content": {
19130
+ "application/json": {
19131
+ "schema": {
19132
+ "type": "object",
19133
+ "properties": {
19134
+ "title": {
19135
+ "$ref": "#/components/schemas/OrganizationTitle"
19136
+ },
19137
+ "emailDomains": {
19138
+ "$ref": "#/components/schemas/OrganizationEmailDomains"
19139
+ },
19140
+ "defaultRole": {
19141
+ "$ref": "#/components/schemas/MemberRoleOrGuest"
19142
+ },
19143
+ "defaultContent": {
19144
+ "oneOf": [
19145
+ {
19146
+ "$ref": "#/components/schemas/OrganizationDefaultContent"
19147
+ },
19148
+ {
19149
+ "type": "string",
19150
+ "nullable": true,
19151
+ "enum": [
19152
+ null
19153
+ ]
19154
+ }
19155
+ ]
19156
+ }
19157
+ }
19158
+ }
19159
+ }
19160
+ }
19161
+ },
19162
+ "responses": {
19163
+ "200": {
19164
+ "description": "The organization has been updated",
19165
+ "content": {
19166
+ "application/json": {
19167
+ "schema": {
19168
+ "$ref": "#/components/schemas/Organization"
19169
+ }
19170
+ }
19171
+ }
19172
+ },
19173
+ "400": {
19174
+ "description": "Invalid default content space or collection provided",
19175
+ "$ref": "#/components/responses/BadRequestError"
19176
+ },
19177
+ "default": {
19178
+ "$ref": "#/components/responses/UnexpectedError"
19179
+ }
19180
+ }
18693
19181
  }
18694
19182
  },
18695
19183
  "/orgs/{organizationId}/members": {