@gitbook/api 0.11.1 → 0.12.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,7 +965,12 @@ components:
965
965
  Document:
966
966
  oneOf:
967
967
  - $ref: "#/components/schemas/MarkdownDocument"
968
- - $ref: "#/components/schemas/JSONDocument"
968
+ - type: object
969
+ properties:
970
+ document:
971
+ $ref: "#/components/schemas/JSONDocument"
972
+ required:
973
+ - document
969
974
  - type: object
970
975
  properties: {}
971
976
  additionalProperties: false
@@ -978,29 +983,23 @@ components:
978
983
  required:
979
984
  - markdown
980
985
  JSONDocument:
981
- type: object
982
986
  properties:
983
- document:
987
+ object:
988
+ type: string
989
+ enum:
990
+ - document
991
+ data:
984
992
  type: object
985
- properties:
986
- object:
987
- type: string
988
- enum:
989
- - document
990
- data:
991
- type: object
992
- properties: {}
993
- additionalProperties: false
994
- nodes:
995
- type: array
996
- items:
997
- $ref: "#/components/schemas/DocumentBlocksTopLevels"
998
- required:
999
- - object
1000
- - data
1001
- - nodes
993
+ properties: {}
994
+ additionalProperties: false
995
+ nodes:
996
+ type: array
997
+ items:
998
+ $ref: "#/components/schemas/DocumentBlocksTopLevels"
1002
999
  required:
1003
- - document
1000
+ - object
1001
+ - data
1002
+ - nodes
1004
1003
  DocumentBlocksEssentials:
1005
1004
  oneOf:
1006
1005
  - $ref: "#/components/schemas/DocumentBlockParagraph"
@@ -1079,84 +1078,110 @@ components:
1079
1078
  - object
1080
1079
  - text
1081
1080
  - marks
1082
- DocumentTextMark:
1083
- allOf:
1084
- - type: object
1081
+ DocumentMarkBold:
1082
+ type: object
1083
+ properties:
1084
+ object:
1085
+ type: string
1086
+ enum:
1087
+ - mark
1088
+ type:
1089
+ type: string
1090
+ enum:
1091
+ - bold
1092
+ required:
1093
+ - object
1094
+ - type
1095
+ DocumentMarkItalic:
1096
+ type: object
1097
+ properties:
1098
+ object:
1099
+ type: string
1100
+ enum:
1101
+ - mark
1102
+ type:
1103
+ type: string
1104
+ enum:
1105
+ - italic
1106
+ required:
1107
+ - object
1108
+ - type
1109
+ DocumentMarkCode:
1110
+ type: object
1111
+ properties:
1112
+ object:
1113
+ type: string
1114
+ enum:
1115
+ - mark
1116
+ type:
1117
+ type: string
1118
+ enum:
1119
+ - code
1120
+ required:
1121
+ - object
1122
+ - type
1123
+ DocumentMarkStrikethrough:
1124
+ type: object
1125
+ properties:
1126
+ object:
1127
+ type: string
1128
+ enum:
1129
+ - mark
1130
+ type:
1131
+ type: string
1132
+ enum:
1133
+ - strikethrough
1134
+ required:
1135
+ - object
1136
+ - type
1137
+ DocumentMarkColor:
1138
+ type: object
1139
+ properties:
1140
+ object:
1141
+ type: string
1142
+ enum:
1143
+ - mark
1144
+ type:
1145
+ type: string
1146
+ enum:
1147
+ - color
1148
+ data:
1149
+ type: object
1085
1150
  properties:
1086
- object:
1151
+ text:
1087
1152
  type: string
1088
1153
  enum:
1089
- - mark
1154
+ - default
1155
+ - green
1156
+ - blue
1157
+ - red
1158
+ - orange
1159
+ - yellow
1160
+ - purple
1161
+ background:
1162
+ type: string
1163
+ enum:
1164
+ - default
1165
+ - green
1166
+ - blue
1167
+ - red
1168
+ - orange
1169
+ - yellow
1170
+ - purple
1090
1171
  required:
1091
- - object
1092
- - oneOf:
1093
- - type: object
1094
- properties:
1095
- type:
1096
- type: string
1097
- enum:
1098
- - bold
1099
- required:
1100
- - type
1101
- - type: object
1102
- properties:
1103
- type:
1104
- type: string
1105
- enum:
1106
- - italic
1107
- required:
1108
- - type
1109
- - type: object
1110
- properties:
1111
- type:
1112
- type: string
1113
- enum:
1114
- - code
1115
- required:
1116
- - type
1117
- - type: object
1118
- properties:
1119
- type:
1120
- type: string
1121
- enum:
1122
- - strikethrough
1123
- required:
1124
- - type
1125
- - type: object
1126
- properties:
1127
- type:
1128
- type: string
1129
- enum:
1130
- - color
1131
- data:
1132
- type: object
1133
- properties:
1134
- text:
1135
- type: string
1136
- enum:
1137
- - default
1138
- - green
1139
- - blue
1140
- - red
1141
- - orange
1142
- - yellow
1143
- - purple
1144
- background:
1145
- type: string
1146
- enum:
1147
- - default
1148
- - green
1149
- - blue
1150
- - red
1151
- - orange
1152
- - yellow
1153
- - purple
1154
- required:
1155
- - text
1156
- - background
1157
- required:
1158
- - type
1159
- - data
1172
+ - text
1173
+ - background
1174
+ required:
1175
+ - object
1176
+ - type
1177
+ - data
1178
+ DocumentTextMark:
1179
+ oneOf:
1180
+ - $ref: "#/components/schemas/DocumentMarkBold"
1181
+ - $ref: "#/components/schemas/DocumentMarkItalic"
1182
+ - $ref: "#/components/schemas/DocumentMarkCode"
1183
+ - $ref: "#/components/schemas/DocumentMarkStrikethrough"
1184
+ - $ref: "#/components/schemas/DocumentMarkColor"
1160
1185
  DocumentInlineLink:
1161
1186
  type: object
1162
1187
  properties:
@@ -1175,6 +1200,7 @@ components:
1175
1200
  items:
1176
1201
  oneOf:
1177
1202
  - $ref: "#/components/schemas/DocumentNodeText"
1203
+ - $ref: "#/components/schemas/DocumentInlineImage"
1178
1204
  data:
1179
1205
  type: object
1180
1206
  properties:
@@ -1182,6 +1208,10 @@ components:
1182
1208
  $ref: "#/components/schemas/ContentRef"
1183
1209
  required:
1184
1210
  - ref
1211
+ isVoid:
1212
+ type: boolean
1213
+ enum:
1214
+ - false
1185
1215
  required:
1186
1216
  - object
1187
1217
  - type
@@ -1354,13 +1384,29 @@ components:
1354
1384
  type: boolean
1355
1385
  enum:
1356
1386
  - true
1387
+ nodes:
1388
+ type: array
1389
+ items:
1390
+ $ref: "#/components/schemas/DocumentNodeText"
1391
+ data:
1392
+ type: object
1393
+ properties: {}
1394
+ additionalProperties: false
1357
1395
  required:
1358
1396
  - object
1359
1397
  - type
1360
1398
  - fragments
1361
1399
  - isVoid
1400
+ - nodes
1362
1401
  DocumentInlinesRich:
1363
- $ref: "#/components/schemas/DocumentInlineImage"
1402
+ oneOf:
1403
+ - $ref: "#/components/schemas/DocumentNodeText"
1404
+ - $ref: "#/components/schemas/DocumentInlineLink"
1405
+ - $ref: "#/components/schemas/DocumentInlineEmoji"
1406
+ - $ref: "#/components/schemas/DocumentInlineMath"
1407
+ - $ref: "#/components/schemas/DocumentInlineImage"
1408
+ - $ref: "#/components/schemas/DocumentInlineAnnotation"
1409
+ - $ref: "#/components/schemas/DocumentInlineMention"
1364
1410
  DocumentBlockParagraph:
1365
1411
  type: object
1366
1412
  properties:
@@ -1377,7 +1423,15 @@ components:
1377
1423
  nodes:
1378
1424
  type: array
1379
1425
  items:
1380
- $ref: "#/components/schemas/DocumentBlockHeading/properties/nodes/items"
1426
+ $ref: "#/components/schemas/DocumentInlinesRich"
1427
+ isVoid:
1428
+ type: boolean
1429
+ enum:
1430
+ - false
1431
+ data:
1432
+ type: object
1433
+ properties: {}
1434
+ additionalProperties: false
1381
1435
  required:
1382
1436
  - object
1383
1437
  - type
@@ -1400,14 +1454,7 @@ components:
1400
1454
  nodes:
1401
1455
  type: array
1402
1456
  items:
1403
- oneOf:
1404
- - $ref: "#/components/schemas/DocumentNodeText"
1405
- - $ref: "#/components/schemas/DocumentInlineLink"
1406
- - $ref: "#/components/schemas/DocumentInlineEmoji"
1407
- - $ref: "#/components/schemas/DocumentInlineMath"
1408
- - $ref: "#/components/schemas/DocumentInlineImage"
1409
- - $ref: "#/components/schemas/DocumentInlineAnnotation"
1410
- - $ref: "#/components/schemas/DocumentInlineMention"
1457
+ $ref: "#/components/schemas/DocumentInlinesRich"
1411
1458
  data:
1412
1459
  type: object
1413
1460
  properties:
@@ -1422,6 +1469,10 @@ components:
1422
1469
  type: string
1423
1470
  required:
1424
1471
  - id
1472
+ isVoid:
1473
+ type: boolean
1474
+ enum:
1475
+ - false
1425
1476
  required:
1426
1477
  - object
1427
1478
  - type
@@ -1437,7 +1488,7 @@ components:
1437
1488
  type:
1438
1489
  type: string
1439
1490
  enum:
1440
- - quote
1491
+ - blockquote
1441
1492
  key:
1442
1493
  type: string
1443
1494
  nodes:
@@ -1446,6 +1497,14 @@ components:
1446
1497
  oneOf:
1447
1498
  - $ref: "#/components/schemas/DocumentBlocksEssentials"
1448
1499
  - $ref: "#/components/schemas/DocumentBlockQuote"
1500
+ isVoid:
1501
+ type: boolean
1502
+ enum:
1503
+ - false
1504
+ data:
1505
+ type: object
1506
+ properties: {}
1507
+ additionalProperties: false
1449
1508
  required:
1450
1509
  - object
1451
1510
  - type
@@ -1479,6 +1538,10 @@ components:
1479
1538
  type: array
1480
1539
  items:
1481
1540
  $ref: "#/components/schemas/DocumentBlocksEssentials"
1541
+ isVoid:
1542
+ type: boolean
1543
+ enum:
1544
+ - false
1482
1545
  required:
1483
1546
  - object
1484
1547
  - type
@@ -1502,6 +1565,13 @@ components:
1502
1565
  items:
1503
1566
  oneOf:
1504
1567
  - $ref: "#/components/schemas/DocumentBlockListItem"
1568
+ data:
1569
+ type: object
1570
+ additionalProperties: false
1571
+ isVoid:
1572
+ type: boolean
1573
+ enum:
1574
+ - false
1505
1575
  required:
1506
1576
  - object
1507
1577
  - type
@@ -1530,6 +1600,10 @@ components:
1530
1600
  items:
1531
1601
  oneOf:
1532
1602
  - $ref: "#/components/schemas/DocumentBlockListItem"
1603
+ isVoid:
1604
+ type: boolean
1605
+ enum:
1606
+ - false
1533
1607
  required:
1534
1608
  - object
1535
1609
  - type
@@ -1553,6 +1627,14 @@ components:
1553
1627
  items:
1554
1628
  oneOf:
1555
1629
  - $ref: "#/components/schemas/DocumentBlockTaskListItem"
1630
+ isVoid:
1631
+ type: boolean
1632
+ enum:
1633
+ - false
1634
+ data:
1635
+ type: object
1636
+ properties: {}
1637
+ additionalProperties: false
1556
1638
  required:
1557
1639
  - object
1558
1640
  - type
@@ -1575,6 +1657,14 @@ components:
1575
1657
  items:
1576
1658
  oneOf:
1577
1659
  - $ref: "#/components/schemas/DocumentBlocksEssentials"
1660
+ isVoid:
1661
+ type: boolean
1662
+ enum:
1663
+ - false
1664
+ data:
1665
+ type: object
1666
+ properties: {}
1667
+ additionalProperties: false
1578
1668
  required:
1579
1669
  - object
1580
1670
  - type
@@ -1822,6 +1912,10 @@ components:
1822
1912
  type: array
1823
1913
  items:
1824
1914
  $ref: "#/components/schemas/DocumentBlockCodeLine"
1915
+ isVoid:
1916
+ type: boolean
1917
+ enum:
1918
+ - false
1825
1919
  required:
1826
1920
  - object
1827
1921
  - type
@@ -1851,6 +1945,10 @@ components:
1851
1945
  properties:
1852
1946
  highlighted:
1853
1947
  type: boolean
1948
+ isVoid:
1949
+ type: boolean
1950
+ enum:
1951
+ - false
1854
1952
  required:
1855
1953
  - object
1856
1954
  - type
@@ -1902,6 +2000,10 @@ components:
1902
2000
  type: boolean
1903
2001
  enum:
1904
2002
  - true
2003
+ data:
2004
+ type: object
2005
+ properties: {}
2006
+ additionalProperties: false
1905
2007
  fragments:
1906
2008
  type: array
1907
2009
  items:
@@ -1964,6 +2066,7 @@ components:
1964
2066
  - type
1965
2067
  - isVoid
1966
2068
  - fragments
2069
+ - data
1967
2070
  DocumentBlockTabs:
1968
2071
  type: object
1969
2072
  properties:
@@ -1981,6 +2084,14 @@ components:
1981
2084
  type: array
1982
2085
  items:
1983
2086
  $ref: "#/components/schemas/DocumentBlockTabsItem"
2087
+ isVoid:
2088
+ type: boolean
2089
+ enum:
2090
+ - false
2091
+ data:
2092
+ type: object
2093
+ properties: {}
2094
+ additionalProperties: false
1984
2095
  required:
1985
2096
  - object
1986
2097
  - type
@@ -2355,6 +2466,10 @@ components:
2355
2466
  type: string
2356
2467
  required:
2357
2468
  - id
2469
+ isVoid:
2470
+ type: boolean
2471
+ enum:
2472
+ - false
2358
2473
  required:
2359
2474
  - object
2360
2475
  - type
@@ -2456,10 +2571,15 @@ components:
2456
2571
  type: boolean
2457
2572
  enum:
2458
2573
  - true
2574
+ data:
2575
+ type: object
2576
+ properties: {}
2577
+ additionalProperties: false
2459
2578
  required:
2460
2579
  - object
2461
2580
  - type
2462
2581
  - isVoid
2582
+ - data
2463
2583
  ContentRef:
2464
2584
  oneOf:
2465
2585
  - $ref: "#/components/schemas/ContentRefFile"
@@ -2648,25 +2768,8 @@ components:
2648
2768
  items:
2649
2769
  $ref: "#/components/schemas/RevisionFile"
2650
2770
  git:
2651
- type: object
2652
2771
  description: Metadata about a potential associated git commit.
2653
- required:
2654
- - oid
2655
- - message
2656
- - createdByGitBook
2657
- properties:
2658
- oid:
2659
- type: string
2660
- description: SHA of the Git commit.
2661
- message:
2662
- type: string
2663
- description: Git commit message.
2664
- createdByGitBook:
2665
- type: boolean
2666
- description: Whether not this commit was created by GitBook, while exporting the revision.
2667
- url:
2668
- type: string
2669
- description: URL of the Git commit.
2772
+ $ref: "#/components/schemas/GitSyncCommit"
2670
2773
  urls:
2671
2774
  type: object
2672
2775
  properties:
@@ -2767,6 +2870,12 @@ components:
2767
2870
  description: Title of the page
2768
2871
  type: string
2769
2872
  maxLength: 100
2873
+ createdAt:
2874
+ description: When the page was first created. Only present if page has been edited at least once.
2875
+ $ref: "#/components/schemas/Date"
2876
+ updatedAt:
2877
+ description: When the page was last edited. Only present if page has been edited at least once.
2878
+ $ref: "#/components/schemas/Date"
2770
2879
  required:
2771
2880
  - id
2772
2881
  - title
@@ -2799,6 +2908,8 @@ components:
2799
2908
  oneOf:
2800
2909
  - $ref: "#/components/schemas/RevisionPageDocument"
2801
2910
  - $ref: "#/components/schemas/RevisionPageLink"
2911
+ git:
2912
+ $ref: "#/components/schemas/GitSyncBlob"
2802
2913
  required:
2803
2914
  - kind
2804
2915
  - type
@@ -2867,11 +2978,27 @@ components:
2867
2978
  type: string
2868
2979
  downloadURL:
2869
2980
  type: string
2981
+ size:
2982
+ type: number
2983
+ dimensions:
2984
+ type: object
2985
+ description: For images, it contains the dimensions of it.
2986
+ properties:
2987
+ width:
2988
+ type: number
2989
+ height:
2990
+ type: number
2991
+ required:
2992
+ - width
2993
+ - height
2994
+ git:
2995
+ $ref: "#/components/schemas/GitSyncBlob"
2870
2996
  required:
2871
2997
  - id
2872
2998
  - name
2873
2999
  - contentType
2874
3000
  - downloadURL
3001
+ - size
2875
3002
  ImportContentSource:
2876
3003
  type: string
2877
3004
  enum:
@@ -2927,6 +3054,40 @@ components:
2927
3054
  - running
2928
3055
  - failure
2929
3056
  - success
3057
+ GitSyncCommit:
3058
+ type: object
3059
+ properties:
3060
+ oid:
3061
+ type: string
3062
+ description: SHA for the commit
3063
+ message:
3064
+ type: string
3065
+ description: Message describing the purpose of the commit
3066
+ createdByGitBook:
3067
+ type: boolean
3068
+ description: If true, the Git commit was generated by an export from GitBook
3069
+ url:
3070
+ type: string
3071
+ description: URL of the commit in the GitSync provider
3072
+ ref:
3073
+ type: string
3074
+ description: Original name of the ref where the commit originated from
3075
+ required:
3076
+ - oid
3077
+ - message
3078
+ - createdByGitBook
3079
+ GitSyncBlob:
3080
+ type: object
3081
+ properties:
3082
+ oid:
3083
+ type: string
3084
+ description: SHA for the blob
3085
+ path:
3086
+ type: string
3087
+ description: Path of the blob in the Git tree
3088
+ required:
3089
+ - oid
3090
+ - path
2930
3091
  Organization:
2931
3092
  type: object
2932
3093
  properties: