@gitbook/api 0.13.0 → 0.15.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.yaml CHANGED
@@ -965,6 +965,47 @@ components:
965
965
  - postedAt
966
966
  - reactions
967
967
  - urls
968
+ PublishedContentLookup:
969
+ oneOf:
970
+ - type: object
971
+ properties:
972
+ target:
973
+ type: string
974
+ description: Type of target for the redirect
975
+ enum:
976
+ - application
977
+ - content
978
+ - external
979
+ redirect:
980
+ $ref: "#/components/schemas/URL"
981
+ required:
982
+ - target
983
+ - redirect
984
+ - type: object
985
+ properties:
986
+ space:
987
+ type: string
988
+ description: ID of the space matching.
989
+ changeRequest:
990
+ type: string
991
+ description: Identifier of the change request being previewed in this URL.
992
+ revision:
993
+ type: string
994
+ description: Identifier of the revision being previewed in this URL.
995
+ pathname:
996
+ type: string
997
+ description: Path of the content relative to the space
998
+ basePath:
999
+ type: string
1000
+ description: Prefix of the path in the URL dedicated to the space
1001
+ apiToken:
1002
+ type: string
1003
+ description: Short-lived API token to fetch content related to the space in the context of the URL.
1004
+ required:
1005
+ - space
1006
+ - pathname
1007
+ - basePath
1008
+ - apiToken
968
1009
  Document:
969
1010
  oneOf:
970
1011
  - $ref: "#/components/schemas/MarkdownDocument"
@@ -1003,32 +1044,41 @@ components:
1003
1044
  - object
1004
1045
  - data
1005
1046
  - nodes
1006
- DocumentBlocksEssentials:
1047
+ DocumentBlock:
1007
1048
  oneOf:
1008
1049
  - $ref: "#/components/schemas/DocumentBlockParagraph"
1009
1050
  - $ref: "#/components/schemas/DocumentBlockHeading"
1010
1051
  - $ref: "#/components/schemas/DocumentBlockListOrdered"
1011
1052
  - $ref: "#/components/schemas/DocumentBlockListUnordered"
1012
1053
  - $ref: "#/components/schemas/DocumentBlockListTasks"
1054
+ - $ref: "#/components/schemas/DocumentBlockListItem"
1013
1055
  - $ref: "#/components/schemas/DocumentBlockDivider"
1014
- DocumentBlocksTopLevels:
1015
- oneOf:
1016
- - $ref: "#/components/schemas/DocumentBlocksEssentials"
1017
1056
  - $ref: "#/components/schemas/DocumentBlockQuote"
1018
1057
  - $ref: "#/components/schemas/DocumentBlockHint"
1019
1058
  - $ref: "#/components/schemas/DocumentBlockImages"
1059
+ - $ref: "#/components/schemas/DocumentBlockImage"
1020
1060
  - $ref: "#/components/schemas/DocumentBlockFile"
1021
1061
  - $ref: "#/components/schemas/DocumentBlockDrawing"
1022
1062
  - $ref: "#/components/schemas/DocumentBlockEmbed"
1023
1063
  - $ref: "#/components/schemas/DocumentBlockCode"
1064
+ - $ref: "#/components/schemas/DocumentBlockCodeLine"
1024
1065
  - $ref: "#/components/schemas/DocumentBlockMath"
1025
1066
  - $ref: "#/components/schemas/DocumentBlockExpandable"
1026
1067
  - $ref: "#/components/schemas/DocumentBlockTabs"
1068
+ - $ref: "#/components/schemas/DocumentBlockTabsItem"
1027
1069
  - $ref: "#/components/schemas/DocumentBlockTable"
1028
1070
  - $ref: "#/components/schemas/DocumentBlockSwagger"
1029
1071
  - $ref: "#/components/schemas/DocumentBlockContentRef"
1030
1072
  - $ref: "#/components/schemas/DocumentBlockIntegration"
1031
- DocumentNodeText:
1073
+ DocumentInline:
1074
+ oneOf:
1075
+ - $ref: "#/components/schemas/DocumentInlineLink"
1076
+ - $ref: "#/components/schemas/DocumentInlineEmoji"
1077
+ - $ref: "#/components/schemas/DocumentInlineMath"
1078
+ - $ref: "#/components/schemas/DocumentInlineImage"
1079
+ - $ref: "#/components/schemas/DocumentInlineAnnotation"
1080
+ - $ref: "#/components/schemas/DocumentInlineMention"
1081
+ DocumentText:
1032
1082
  type: object
1033
1083
  properties:
1034
1084
  object:
@@ -1044,7 +1094,7 @@ components:
1044
1094
  required:
1045
1095
  - object
1046
1096
  - leaves
1047
- DocumentNodeFragment:
1097
+ DocumentFragment:
1048
1098
  type: object
1049
1099
  properties:
1050
1100
  object:
@@ -1064,6 +1114,31 @@ components:
1064
1114
  required:
1065
1115
  - object
1066
1116
  - nodes
1117
+ DocumentBlocksEssentials:
1118
+ oneOf:
1119
+ - $ref: "#/components/schemas/DocumentBlockParagraph"
1120
+ - $ref: "#/components/schemas/DocumentBlockHeading"
1121
+ - $ref: "#/components/schemas/DocumentBlockListOrdered"
1122
+ - $ref: "#/components/schemas/DocumentBlockListUnordered"
1123
+ - $ref: "#/components/schemas/DocumentBlockListTasks"
1124
+ - $ref: "#/components/schemas/DocumentBlockDivider"
1125
+ DocumentBlocksTopLevels:
1126
+ oneOf:
1127
+ - $ref: "#/components/schemas/DocumentBlocksEssentials"
1128
+ - $ref: "#/components/schemas/DocumentBlockQuote"
1129
+ - $ref: "#/components/schemas/DocumentBlockHint"
1130
+ - $ref: "#/components/schemas/DocumentBlockImages"
1131
+ - $ref: "#/components/schemas/DocumentBlockFile"
1132
+ - $ref: "#/components/schemas/DocumentBlockDrawing"
1133
+ - $ref: "#/components/schemas/DocumentBlockEmbed"
1134
+ - $ref: "#/components/schemas/DocumentBlockCode"
1135
+ - $ref: "#/components/schemas/DocumentBlockMath"
1136
+ - $ref: "#/components/schemas/DocumentBlockExpandable"
1137
+ - $ref: "#/components/schemas/DocumentBlockTabs"
1138
+ - $ref: "#/components/schemas/DocumentBlockTable"
1139
+ - $ref: "#/components/schemas/DocumentBlockSwagger"
1140
+ - $ref: "#/components/schemas/DocumentBlockContentRef"
1141
+ - $ref: "#/components/schemas/DocumentBlockIntegration"
1067
1142
  DocumentTextLeaf:
1068
1143
  type: object
1069
1144
  properties:
@@ -1202,7 +1277,7 @@ components:
1202
1277
  type: array
1203
1278
  items:
1204
1279
  oneOf:
1205
- - $ref: "#/components/schemas/DocumentNodeText"
1280
+ - $ref: "#/components/schemas/DocumentText"
1206
1281
  - $ref: "#/components/schemas/DocumentInlineImage"
1207
1282
  data:
1208
1283
  type: object
@@ -1366,7 +1441,7 @@ components:
1366
1441
  type: array
1367
1442
  items:
1368
1443
  allOf:
1369
- - $ref: "#/components/schemas/DocumentNodeFragment"
1444
+ - $ref: "#/components/schemas/DocumentFragment"
1370
1445
  - type: object
1371
1446
  properties:
1372
1447
  type:
@@ -1386,11 +1461,11 @@ components:
1386
1461
  isVoid:
1387
1462
  type: boolean
1388
1463
  enum:
1389
- - true
1464
+ - false
1390
1465
  nodes:
1391
1466
  type: array
1392
1467
  items:
1393
- $ref: "#/components/schemas/DocumentNodeText"
1468
+ $ref: "#/components/schemas/DocumentText"
1394
1469
  data:
1395
1470
  type: object
1396
1471
  properties: {}
@@ -1401,15 +1476,6 @@ components:
1401
1476
  - fragments
1402
1477
  - isVoid
1403
1478
  - nodes
1404
- DocumentInlinesRich:
1405
- oneOf:
1406
- - $ref: "#/components/schemas/DocumentNodeText"
1407
- - $ref: "#/components/schemas/DocumentInlineLink"
1408
- - $ref: "#/components/schemas/DocumentInlineEmoji"
1409
- - $ref: "#/components/schemas/DocumentInlineMath"
1410
- - $ref: "#/components/schemas/DocumentInlineImage"
1411
- - $ref: "#/components/schemas/DocumentInlineAnnotation"
1412
- - $ref: "#/components/schemas/DocumentInlineMention"
1413
1479
  DocumentBlockParagraph:
1414
1480
  type: object
1415
1481
  properties:
@@ -1426,7 +1492,9 @@ components:
1426
1492
  nodes:
1427
1493
  type: array
1428
1494
  items:
1429
- $ref: "#/components/schemas/DocumentInlinesRich"
1495
+ oneOf:
1496
+ - $ref: "#/components/schemas/DocumentInline"
1497
+ - $ref: "#/components/schemas/DocumentText"
1430
1498
  isVoid:
1431
1499
  type: boolean
1432
1500
  enum:
@@ -1457,7 +1525,9 @@ components:
1457
1525
  nodes:
1458
1526
  type: array
1459
1527
  items:
1460
- $ref: "#/components/schemas/DocumentInlinesRich"
1528
+ oneOf:
1529
+ - $ref: "#/components/schemas/DocumentInline"
1530
+ - $ref: "#/components/schemas/DocumentText"
1461
1531
  data:
1462
1532
  type: object
1463
1533
  properties:
@@ -1629,7 +1699,7 @@ components:
1629
1699
  type: array
1630
1700
  items:
1631
1701
  oneOf:
1632
- - $ref: "#/components/schemas/DocumentBlockTaskListItem"
1702
+ - $ref: "#/components/schemas/DocumentBlockListItem"
1633
1703
  isVoid:
1634
1704
  type: boolean
1635
1705
  enum:
@@ -1666,26 +1736,13 @@ components:
1666
1736
  - false
1667
1737
  data:
1668
1738
  type: object
1669
- properties: {}
1670
- additionalProperties: false
1739
+ properties:
1740
+ checked:
1741
+ type: boolean
1671
1742
  required:
1672
1743
  - object
1673
1744
  - type
1674
1745
  - nodes
1675
- DocumentBlockTaskListItem:
1676
- allOf:
1677
- - $ref: "#/components/schemas/DocumentBlockListItem"
1678
- - type: object
1679
- properties:
1680
- data:
1681
- type: object
1682
- properties:
1683
- checked:
1684
- type: boolean
1685
- required:
1686
- - checked
1687
- required:
1688
- - data
1689
1746
  DocumentBlockImages:
1690
1747
  type: object
1691
1748
  properties:
@@ -1749,26 +1806,18 @@ components:
1749
1806
  - $ref: "#/components/schemas/ContentRefURL"
1750
1807
  - $ref: "#/components/schemas/ContentRefFile"
1751
1808
  width:
1752
- oneOf:
1753
- - type: number
1754
- - type: object
1755
- properties:
1756
- unit:
1757
- type: string
1758
- value:
1759
- type: number
1760
- required:
1761
- - unit
1762
- - value
1809
+ $ref: "#/components/schemas/DocumentBlockImageDimension"
1763
1810
  height:
1764
- $ref: "#/components/schemas/DocumentBlockImage/properties/data/properties/width"
1811
+ $ref: "#/components/schemas/DocumentBlockImageDimension"
1812
+ alt:
1813
+ type: string
1765
1814
  required:
1766
1815
  - ref
1767
1816
  fragments:
1768
1817
  type: array
1769
1818
  items:
1770
1819
  allOf:
1771
- - $ref: "#/components/schemas/DocumentNodeFragment"
1820
+ - $ref: "#/components/schemas/DocumentFragment"
1772
1821
  - type: object
1773
1822
  properties:
1774
1823
  type:
@@ -1792,6 +1841,18 @@ components:
1792
1841
  - data
1793
1842
  - fragments
1794
1843
  - isVoid
1844
+ DocumentBlockImageDimension:
1845
+ oneOf:
1846
+ - type: number
1847
+ - type: object
1848
+ properties:
1849
+ unit:
1850
+ type: string
1851
+ value:
1852
+ type: number
1853
+ required:
1854
+ - unit
1855
+ - value
1795
1856
  DocumentBlockFile:
1796
1857
  type: object
1797
1858
  properties:
@@ -1941,7 +2002,7 @@ components:
1941
2002
  type: array
1942
2003
  items:
1943
2004
  oneOf:
1944
- - $ref: "#/components/schemas/DocumentNodeText"
2005
+ - $ref: "#/components/schemas/DocumentText"
1945
2006
  - $ref: "#/components/schemas/DocumentInlineAnnotation"
1946
2007
  data:
1947
2008
  type: object
@@ -2012,7 +2073,7 @@ components:
2012
2073
  items:
2013
2074
  oneOf:
2014
2075
  - allOf:
2015
- - $ref: "#/components/schemas/DocumentNodeFragment"
2076
+ - $ref: "#/components/schemas/DocumentFragment"
2016
2077
  - type: object
2017
2078
  properties:
2018
2079
  fragment:
@@ -2034,7 +2095,7 @@ components:
2034
2095
  - fragment
2035
2096
  - type
2036
2097
  - allOf:
2037
- - $ref: "#/components/schemas/DocumentNodeFragment"
2098
+ - $ref: "#/components/schemas/DocumentFragment"
2038
2099
  - type: object
2039
2100
  properties:
2040
2101
  fragment:
@@ -2190,7 +2251,7 @@ components:
2190
2251
  fragments:
2191
2252
  type: array
2192
2253
  items:
2193
- $ref: "#/components/schemas/DocumentNodeFragment"
2254
+ $ref: "#/components/schemas/DocumentFragment"
2194
2255
  required:
2195
2256
  - object
2196
2257
  - type
@@ -2626,11 +2687,11 @@ components:
2626
2687
  page:
2627
2688
  type: string
2628
2689
  space:
2690
+ description: ID of the space the page is in. The page is considered as in the current space if none is provided.
2629
2691
  type: string
2630
2692
  required:
2631
2693
  - kind
2632
2694
  - page
2633
- - space
2634
2695
  ContentRefAnchor:
2635
2696
  type: object
2636
2697
  properties:
@@ -2641,8 +2702,10 @@ components:
2641
2702
  anchor:
2642
2703
  type: string
2643
2704
  space:
2705
+ description: ID of the space the page is in. The page is considered as in the current space if none is provided.
2644
2706
  type: string
2645
2707
  page:
2708
+ description: ID of the page the anchor is in. The anchor is considered as in the current page if none is provided.
2646
2709
  type: string
2647
2710
  required:
2648
2711
  - kind
@@ -2919,6 +2982,17 @@ components:
2919
2982
  - slug
2920
2983
  - path
2921
2984
  - pages
2985
+ RevisionPageDocumentCover:
2986
+ type: object
2987
+ properties:
2988
+ ref:
2989
+ description: Content reference pointing to the source image.
2990
+ $ref: "#/components/schemas/ContentRefFile"
2991
+ yPos:
2992
+ description: Vertical position of the cover image.
2993
+ type: number
2994
+ required:
2995
+ - yPos
2922
2996
  RevisionPageGroup:
2923
2997
  allOf:
2924
2998
  - $ref: "#/components/schemas/RevisionPageBase"
@@ -2951,6 +3025,46 @@ components:
2951
3025
  - slug
2952
3026
  - path
2953
3027
  - pages
3028
+ RevisionPageLayout:
3029
+ oneOf:
3030
+ - $ref: "#/components/schemas/RevisionPageLayoutPreset"
3031
+ - $ref: "#/components/schemas/RevisionPageLayoutOptions"
3032
+ RevisionPageLayoutOptions:
3033
+ type: object
3034
+ properties:
3035
+ cover:
3036
+ type: boolean
3037
+ description: Should the cover be visible?
3038
+ coverSize:
3039
+ $ref: "#/components/schemas/RevisionPageLayoutOptionsCoverSize"
3040
+ title:
3041
+ type: boolean
3042
+ description: Should the title be visible?
3043
+ description:
3044
+ type: boolean
3045
+ description: Should the description be visible?
3046
+ tableOfContents:
3047
+ type: boolean
3048
+ description: Should the table of contents be visible?
3049
+ outline:
3050
+ type: boolean
3051
+ description: Should the outline be visible?
3052
+ pagination:
3053
+ type: boolean
3054
+ description: Should the pagination be visible?
3055
+ RevisionPageLayoutOptionsCoverSize:
3056
+ type: string
3057
+ description: Size of the cover image.
3058
+ enum:
3059
+ - hero
3060
+ - full
3061
+ RevisionPageLayoutPreset:
3062
+ type: string
3063
+ description: The core layout presets for a page.
3064
+ enum:
3065
+ - docs
3066
+ - editorial
3067
+ - landing
2954
3068
  RevisionPageLink:
2955
3069
  allOf:
2956
3070
  - $ref: "#/components/schemas/RevisionPageBase"
@@ -2973,6 +3087,12 @@ components:
2973
3087
  - kind
2974
3088
  - type
2975
3089
  - target
3090
+ RevisionPageType:
3091
+ type: string
3092
+ enum:
3093
+ - document
3094
+ - group
3095
+ - link
2976
3096
  RevisionFile:
2977
3097
  type: object
2978
3098
  properties:
@@ -3005,6 +3125,16 @@ components:
3005
3125
  - contentType
3006
3126
  - downloadURL
3007
3127
  - size
3128
+ RevisionFileImageDimensions:
3129
+ type: object
3130
+ properties:
3131
+ height:
3132
+ type: number
3133
+ width:
3134
+ type: number
3135
+ required:
3136
+ - height
3137
+ - width
3008
3138
  ImportContentSource:
3009
3139
  type: string
3010
3140
  enum:
@@ -3020,6 +3150,293 @@ components:
3020
3150
  - quip
3021
3151
  - google-docs
3022
3152
  - open-api
3153
+ ChangeAttributeContentReference:
3154
+ type: object
3155
+ properties:
3156
+ before:
3157
+ $ref: "#/components/schemas/ContentRef"
3158
+ after:
3159
+ $ref: "#/components/schemas/ContentRef"
3160
+ ChangeAttributeCustomFields:
3161
+ type: object
3162
+ properties:
3163
+ before:
3164
+ type: object
3165
+ additionalProperties:
3166
+ type: object
3167
+ properties:
3168
+ value:
3169
+ $ref: "#/components/schemas/CustomFieldValue"
3170
+ required:
3171
+ - value
3172
+ after:
3173
+ type: object
3174
+ additionalProperties:
3175
+ type: object
3176
+ properties:
3177
+ value:
3178
+ $ref: "#/components/schemas/CustomFieldValue"
3179
+ required:
3180
+ - value
3181
+ ChangeAttributeNumber:
3182
+ type: object
3183
+ properties:
3184
+ before:
3185
+ type: number
3186
+ after:
3187
+ type: number
3188
+ ChangeAttributeRevisionFileImageDimensions:
3189
+ type: object
3190
+ properties:
3191
+ before:
3192
+ $ref: "#/components/schemas/RevisionFileImageDimensions"
3193
+ after:
3194
+ $ref: "#/components/schemas/RevisionFileImageDimensions"
3195
+ ChangeAttributeRevisionPageDocumentCover:
3196
+ type: object
3197
+ properties:
3198
+ before:
3199
+ $ref: "#/components/schemas/RevisionPageDocumentCover"
3200
+ after:
3201
+ $ref: "#/components/schemas/RevisionPageDocumentCover"
3202
+ ChangeAttributeRevisionPageLayout:
3203
+ type: object
3204
+ properties:
3205
+ before:
3206
+ $ref: "#/components/schemas/RevisionPageLayout"
3207
+ after:
3208
+ $ref: "#/components/schemas/RevisionPageLayout"
3209
+ ChangeAttributeString:
3210
+ type: object
3211
+ properties:
3212
+ before:
3213
+ type: string
3214
+ after:
3215
+ type: string
3216
+ ChangedRevisionFile:
3217
+ type: object
3218
+ properties:
3219
+ id:
3220
+ type: string
3221
+ name:
3222
+ type: string
3223
+ contentType:
3224
+ type: string
3225
+ downloadURL:
3226
+ type: string
3227
+ required:
3228
+ - id
3229
+ - name
3230
+ - contentType
3231
+ - downloadURL
3232
+ ChangedRevisionPage:
3233
+ type: object
3234
+ properties:
3235
+ id:
3236
+ type: string
3237
+ type:
3238
+ $ref: "#/components/schemas/RevisionPageType"
3239
+ title:
3240
+ type: string
3241
+ path:
3242
+ type: string
3243
+ required:
3244
+ - id
3245
+ - type
3246
+ - title
3247
+ RevisionFileChangeAttributes:
3248
+ type: object
3249
+ minProperties: 1
3250
+ properties:
3251
+ name:
3252
+ $ref: "#/components/schemas/ChangeAttributeString"
3253
+ downloadURL:
3254
+ $ref: "#/components/schemas/ChangeAttributeString"
3255
+ size:
3256
+ $ref: "#/components/schemas/ChangeAttributeNumber"
3257
+ contentType:
3258
+ $ref: "#/components/schemas/ChangeAttributeString"
3259
+ dimensions:
3260
+ $ref: "#/components/schemas/ChangeAttributeRevisionFileImageDimensions"
3261
+ RevisionPageDocumentChangeAttributes:
3262
+ type: object
3263
+ minProperties: 1
3264
+ properties:
3265
+ title:
3266
+ $ref: "#/components/schemas/ChangeAttributeString"
3267
+ description:
3268
+ $ref: "#/components/schemas/ChangeAttributeString"
3269
+ slug:
3270
+ $ref: "#/components/schemas/ChangeAttributeString"
3271
+ document:
3272
+ $ref: "#/components/schemas/ChangeAttributeString"
3273
+ cover:
3274
+ $ref: "#/components/schemas/ChangeAttributeRevisionPageDocumentCover"
3275
+ emoji:
3276
+ $ref: "#/components/schemas/ChangeAttributeString"
3277
+ layout:
3278
+ $ref: "#/components/schemas/ChangeAttributeRevisionPageLayout"
3279
+ customFields:
3280
+ $ref: "#/components/schemas/ChangeAttributeCustomFields"
3281
+ RevisionPageGroupChangeAttributes:
3282
+ type: object
3283
+ minProperties: 1
3284
+ properties:
3285
+ title:
3286
+ $ref: "#/components/schemas/ChangeAttributeString"
3287
+ emoji:
3288
+ $ref: "#/components/schemas/ChangeAttributeString"
3289
+ slug:
3290
+ $ref: "#/components/schemas/ChangeAttributeString"
3291
+ customFields:
3292
+ $ref: "#/components/schemas/ChangeAttributeCustomFields"
3293
+ RevisionPageLinkChangeAttributes:
3294
+ type: object
3295
+ minProperties: 1
3296
+ properties:
3297
+ title:
3298
+ $ref: "#/components/schemas/ChangeAttributeString"
3299
+ emoji:
3300
+ $ref: "#/components/schemas/ChangeAttributeString"
3301
+ target:
3302
+ $ref: "#/components/schemas/ChangeAttributeContentReference"
3303
+ customFields:
3304
+ $ref: "#/components/schemas/ChangeAttributeCustomFields"
3305
+ RevisionSemanticChange:
3306
+ oneOf:
3307
+ - $ref: "#/components/schemas/RevisionSemanticChangePageCreated"
3308
+ - $ref: "#/components/schemas/RevisionSemanticChangePageEdited"
3309
+ - $ref: "#/components/schemas/RevisionSemanticChangePageDeleted"
3310
+ - $ref: "#/components/schemas/RevisionSemanticChangePageMoved"
3311
+ - $ref: "#/components/schemas/RevisionSemanticChangeFileCreated"
3312
+ - $ref: "#/components/schemas/RevisionSemanticChangeFileEdited"
3313
+ - $ref: "#/components/schemas/RevisionSemanticChangeFileDeleted"
3314
+ - $ref: "#/components/schemas/RevisionSemanticChangeCustomFieldsEdited"
3315
+ RevisionSemanticChangeCustomFieldsEdited:
3316
+ type: object
3317
+ properties:
3318
+ type:
3319
+ type: string
3320
+ enum:
3321
+ - custom_fields_edited
3322
+ customFields:
3323
+ $ref: "#/components/schemas/ChangeAttributeCustomFields"
3324
+ required:
3325
+ - type
3326
+ - customFields
3327
+ RevisionSemanticChangeFileCreated:
3328
+ type: object
3329
+ properties:
3330
+ type:
3331
+ type: string
3332
+ enum:
3333
+ - file_created
3334
+ file:
3335
+ $ref: "#/components/schemas/ChangedRevisionFile"
3336
+ required:
3337
+ - type
3338
+ - file
3339
+ RevisionSemanticChangeFileDeleted:
3340
+ type: object
3341
+ properties:
3342
+ type:
3343
+ type: string
3344
+ enum:
3345
+ - file_deleted
3346
+ file:
3347
+ $ref: "#/components/schemas/ChangedRevisionFile"
3348
+ required:
3349
+ - type
3350
+ - file
3351
+ RevisionSemanticChangeFileEdited:
3352
+ type: object
3353
+ properties:
3354
+ type:
3355
+ type: string
3356
+ enum:
3357
+ - file_edited
3358
+ file:
3359
+ $ref: "#/components/schemas/ChangedRevisionFile"
3360
+ attributes:
3361
+ $ref: "#/components/schemas/RevisionFileChangeAttributes"
3362
+ required:
3363
+ - type
3364
+ - file
3365
+ - attributes
3366
+ RevisionSemanticChangePageCreated:
3367
+ type: object
3368
+ properties:
3369
+ type:
3370
+ type: string
3371
+ enum:
3372
+ - page_created
3373
+ page:
3374
+ $ref: "#/components/schemas/ChangedRevisionPage"
3375
+ required:
3376
+ - type
3377
+ - page
3378
+ RevisionSemanticChangePageDeleted:
3379
+ type: object
3380
+ properties:
3381
+ type:
3382
+ type: string
3383
+ enum:
3384
+ - page_deleted
3385
+ page:
3386
+ $ref: "#/components/schemas/ChangedRevisionPage"
3387
+ required:
3388
+ - type
3389
+ - page
3390
+ RevisionSemanticChangePageEdited:
3391
+ type: object
3392
+ properties:
3393
+ type:
3394
+ type: string
3395
+ enum:
3396
+ - page_edited
3397
+ page:
3398
+ $ref: "#/components/schemas/ChangedRevisionPage"
3399
+ attributes:
3400
+ oneOf:
3401
+ - $ref: "#/components/schemas/RevisionPageDocumentChangeAttributes"
3402
+ - $ref: "#/components/schemas/RevisionPageGroupChangeAttributes"
3403
+ - $ref: "#/components/schemas/RevisionPageLinkChangeAttributes"
3404
+ required:
3405
+ - type
3406
+ - page
3407
+ - attributes
3408
+ RevisionSemanticChangePageMoved:
3409
+ type: object
3410
+ properties:
3411
+ type:
3412
+ type: string
3413
+ enum:
3414
+ - page_moved
3415
+ page:
3416
+ $ref: "#/components/schemas/ChangedRevisionPage"
3417
+ parent:
3418
+ type: object
3419
+ properties:
3420
+ before:
3421
+ $ref: "#/components/schemas/ChangedRevisionPage"
3422
+ after:
3423
+ $ref: "#/components/schemas/ChangedRevisionPage"
3424
+ required:
3425
+ - type
3426
+ - page
3427
+ - parent
3428
+ RevisionSemanticChangeType:
3429
+ type: string
3430
+ description: The type of semantic change.
3431
+ enum:
3432
+ - page_created
3433
+ - page_edited
3434
+ - page_deleted
3435
+ - page_moved
3436
+ - file_created
3437
+ - file_edited
3438
+ - file_deleted
3439
+ - custom_fields_edited
3023
3440
  GitSyncState:
3024
3441
  type: object
3025
3442
  properties:
@@ -3590,6 +4007,78 @@ components:
3590
4007
  body:
3591
4008
  description: Content of the capture.
3592
4009
  $ref: "#/components/schemas/Document"
4010
+ ContentAuditRelation:
4011
+ type: object
4012
+ description: Content audit relation
4013
+ properties:
4014
+ id:
4015
+ type: string
4016
+ sources:
4017
+ description: The sources that are related
4018
+ type: array
4019
+ items:
4020
+ $ref: "#/components/schemas/ContentAuditSource"
4021
+ type:
4022
+ description: The type of the relation between the sources
4023
+ $ref: "#/components/schemas/ContentAuditRelationType"
4024
+ reason:
4025
+ type: string
4026
+ description: A human readable description of the reason for the relation
4027
+ status:
4028
+ description: The status of the relation
4029
+ $ref: "#/components/schemas/ContentAuditRelationStatus"
4030
+ createdAt:
4031
+ description: The date at which the relation was created
4032
+ $ref: "#/components/schemas/Date"
4033
+ required:
4034
+ - id
4035
+ - sources
4036
+ - type
4037
+ - status
4038
+ - createdAt
4039
+ ContentAuditRelationType:
4040
+ description: The type of the relation between the sources
4041
+ oneOf:
4042
+ - type: string
4043
+ enum:
4044
+ - contradiction
4045
+ - duplicate
4046
+ ContentAuditRelationStatus:
4047
+ description: Status of the audit relation to filter on
4048
+ oneOf:
4049
+ - type: string
4050
+ enum:
4051
+ - pending
4052
+ - rejected
4053
+ ContentAuditRelationStatusUpdate:
4054
+ type: object
4055
+ properties:
4056
+ status:
4057
+ $ref: "#/components/schemas/ContentAuditRelationStatus"
4058
+ required:
4059
+ - status
4060
+ ContentAuditSource:
4061
+ oneOf:
4062
+ - $ref: "#/components/schemas/ContentAuditSourceSection"
4063
+ ContentAuditSourceSection:
4064
+ type: object
4065
+ description: A GitBook section source
4066
+ properties:
4067
+ id:
4068
+ type: string
4069
+ type:
4070
+ type: string
4071
+ enum:
4072
+ - section
4073
+ space:
4074
+ $ref: "#/components/schemas/Space"
4075
+ page:
4076
+ $ref: "#/components/schemas/RevisionPageDocument"
4077
+ required:
4078
+ - id
4079
+ - type
4080
+ - space
4081
+ - page
3593
4082
  ChangeRequest:
3594
4083
  type: object
3595
4084
  properties:
@@ -4124,28 +4613,33 @@ components:
4124
4613
  - score
4125
4614
  - total
4126
4615
  - rating
4616
+ - ponderedScore
4127
4617
  - bad
4128
4618
  - ok
4129
4619
  - good
4130
4620
  properties:
4131
4621
  score:
4132
4622
  type: number
4133
- description: Score between 0 and 4.
4623
+ description: Score based on each rating (+1 for 'good', -0.5 for 'ok', -2 for 'bad').
4134
4624
  total:
4135
4625
  type: number
4626
+ description: Total number of ratings done by end users.
4136
4627
  rating:
4137
4628
  type: string
4138
- enum:
4139
- - unknown
4140
- - bad
4141
- - ok
4142
- - good
4629
+ deprecated: true
4630
+ description: Summary of the rating based on the score ('good', 'ok', or 'bad')
4631
+ ponderedScore:
4632
+ type: number
4633
+ description: Score multiplied by the number of ratings to give more importance to highly rated content.
4143
4634
  bad:
4144
4635
  type: number
4636
+ description: Number of 'bad' ratings.
4145
4637
  ok:
4146
4638
  type: number
4639
+ description: Number of 'ok' ratings.
4147
4640
  good:
4148
4641
  type: number
4642
+ description: Number of 'good' ratings.
4149
4643
  Collection:
4150
4644
  type: object
4151
4645
  properties:
@@ -6734,6 +7228,7 @@ components:
6734
7228
  - $ref: "#/components/schemas/OrganizationEntitiesChannel"
6735
7229
  - $ref: "#/components/schemas/OrganizationSchemasChannel"
6736
7230
  - $ref: "#/components/schemas/OrganizationCapturesChannel"
7231
+ - $ref: "#/components/schemas/OrganizationContentAuditsChannel"
6737
7232
  - $ref: "#/components/schemas/OrganizationIntegrationsChannel"
6738
7233
  - $ref: "#/components/schemas/OrganizationInstallationsChannel"
6739
7234
  - type: object
@@ -7118,6 +7613,18 @@ components:
7118
7613
  required:
7119
7614
  - channel
7120
7615
  - organization
7616
+ OrganizationContentAuditsChannel:
7617
+ type: object
7618
+ properties:
7619
+ channel:
7620
+ type: string
7621
+ enum:
7622
+ - organization-content-audits
7623
+ organization:
7624
+ type: string
7625
+ required:
7626
+ - channel
7627
+ - organization
7121
7628
  OrganizationIntegrationsChannel:
7122
7629
  type: object
7123
7630
  properties:
@@ -9032,6 +9539,46 @@ paths:
9032
9539
  $ref: "#/components/schemas/Revision"
9033
9540
  default:
9034
9541
  $ref: "#/components/responses/UnexpectedError"
9542
+ "/spaces/{spaceId}/revisions/{revisionId}/changes":
9543
+ get:
9544
+ summary: Return the semantic changes between a revision and its parent.
9545
+ operationId: getRevisionSemanticChanges
9546
+ security:
9547
+ - user: []
9548
+ parameters:
9549
+ - $ref: "#/components/parameters/spaceId"
9550
+ - $ref: "#/components/parameters/revisionId"
9551
+ - name: limit
9552
+ in: query
9553
+ description: Limit the number of changes returned
9554
+ schema:
9555
+ type: number
9556
+ default: 10
9557
+ - name: metadata
9558
+ in: query
9559
+ description: Whether to include changes to metadata, such as git information and custom fields
9560
+ schema:
9561
+ type: boolean
9562
+ default: true
9563
+ responses:
9564
+ "200":
9565
+ description: OK
9566
+ content:
9567
+ application/json:
9568
+ schema:
9569
+ type: object
9570
+ properties:
9571
+ changes:
9572
+ type: array
9573
+ items:
9574
+ $ref: "#/components/schemas/RevisionSemanticChange"
9575
+ more:
9576
+ type: number
9577
+ description: How many changes were omitted because above the result limit
9578
+ required:
9579
+ - changes
9580
+ default:
9581
+ $ref: "#/components/responses/UnexpectedError"
9035
9582
  "/spaces/{spaceId}/revisions/{revisionId}/files":
9036
9583
  get:
9037
9584
  summary: List all files in a revision
@@ -12046,6 +12593,79 @@ paths:
12046
12593
  $ref: "#/components/schemas/SearchAIAnswer"
12047
12594
  default:
12048
12595
  $ref: "#/components/responses/UnexpectedError"
12596
+ "/orgs/{organizationId}/insights/audit-relations":
12597
+ get:
12598
+ operationId: listContentAuditRelations
12599
+ summary: List the content relations for in a given organization.
12600
+ tags:
12601
+ - ai
12602
+ - spaces
12603
+ security:
12604
+ - user: []
12605
+ parameters:
12606
+ - $ref: "#/components/parameters/organizationId"
12607
+ - $ref: "#/components/parameters/listPage"
12608
+ - $ref: "#/components/parameters/listLimit"
12609
+ - name: status
12610
+ in: query
12611
+ required: false
12612
+ description: Status of the audit relation to filter on
12613
+ schema:
12614
+ $ref: "#/components/schemas/ContentAuditRelationStatus"
12615
+ default:
12616
+ - pending
12617
+ responses:
12618
+ "200":
12619
+ description: Content audit relations
12620
+ content:
12621
+ application/json:
12622
+ schema:
12623
+ allOf:
12624
+ - $ref: "#/components/schemas/List"
12625
+ - type: object
12626
+ required:
12627
+ - items
12628
+ properties:
12629
+ items:
12630
+ type: array
12631
+ items:
12632
+ $ref: "#/components/schemas/ContentAuditRelation"
12633
+ default:
12634
+ $ref: "#/components/responses/UnexpectedError"
12635
+ "/orgs/{organizationId}/insights/audit-relations/{relationId}":
12636
+ patch:
12637
+ operationId: updateContentAuditRelationStatusById
12638
+ summary: Update an audit relation status
12639
+ tags:
12640
+ - organizations
12641
+ security:
12642
+ - user: []
12643
+ parameters:
12644
+ - $ref: "#/components/parameters/organizationId"
12645
+ - name: relationId
12646
+ in: path
12647
+ required: true
12648
+ description: The id of the content audit relation
12649
+ schema:
12650
+ type: string
12651
+ requestBody:
12652
+ required: true
12653
+ content:
12654
+ application/json:
12655
+ schema:
12656
+ $ref: "#/components/schemas/ContentAuditRelationStatusUpdate"
12657
+ responses:
12658
+ "200":
12659
+ description: OK
12660
+ content:
12661
+ application/json:
12662
+ schema:
12663
+ $ref: "#/components/schemas/ContentAuditRelation"
12664
+ "404":
12665
+ description: No matching content relation found for given ID
12666
+ $ref: "#/components/responses/NotFoundError"
12667
+ default:
12668
+ $ref: "#/components/responses/UnexpectedError"
12049
12669
  /internal/hive/token:
12050
12670
  post:
12051
12671
  operationId: generateHiveAccessToken
@@ -12141,3 +12761,31 @@ paths:
12141
12761
  $ref: "#/components/schemas/Embed"
12142
12762
  default:
12143
12763
  $ref: "#/components/responses/UnexpectedError"
12764
+ /urls/published:
12765
+ get:
12766
+ operationId: getPublishedContentByUrl
12767
+ summary: Resolve a URL of a published content.
12768
+ tags:
12769
+ - urls
12770
+ parameters:
12771
+ - name: url
12772
+ in: query
12773
+ required: true
12774
+ description: URL to resolve
12775
+ schema:
12776
+ $ref: "#/components/schemas/URL"
12777
+ - name: visitorAuthToken
12778
+ in: query
12779
+ required: false
12780
+ description: JWT token generated for a visitor auth session
12781
+ schema:
12782
+ type: string
12783
+ responses:
12784
+ "200":
12785
+ description: OK
12786
+ content:
12787
+ application/json:
12788
+ schema:
12789
+ $ref: "#/components/schemas/PublishedContentLookup"
12790
+ default:
12791
+ $ref: "#/components/responses/UnexpectedError"