@gitbook/api 0.14.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.json CHANGED
@@ -1366,6 +1366,66 @@
1366
1366
  "urls"
1367
1367
  ]
1368
1368
  },
1369
+ "PublishedContentLookup": {
1370
+ "oneOf": [
1371
+ {
1372
+ "type": "object",
1373
+ "properties": {
1374
+ "target": {
1375
+ "type": "string",
1376
+ "description": "Type of target for the redirect",
1377
+ "enum": [
1378
+ "application",
1379
+ "content",
1380
+ "external"
1381
+ ]
1382
+ },
1383
+ "redirect": {
1384
+ "$ref": "#/components/schemas/URL"
1385
+ }
1386
+ },
1387
+ "required": [
1388
+ "target",
1389
+ "redirect"
1390
+ ]
1391
+ },
1392
+ {
1393
+ "type": "object",
1394
+ "properties": {
1395
+ "space": {
1396
+ "type": "string",
1397
+ "description": "ID of the space matching."
1398
+ },
1399
+ "changeRequest": {
1400
+ "type": "string",
1401
+ "description": "Identifier of the change request being previewed in this URL."
1402
+ },
1403
+ "revision": {
1404
+ "type": "string",
1405
+ "description": "Identifier of the revision being previewed in this URL."
1406
+ },
1407
+ "pathname": {
1408
+ "type": "string",
1409
+ "description": "Path of the content relative to the space"
1410
+ },
1411
+ "basePath": {
1412
+ "type": "string",
1413
+ "description": "Prefix of the path in the URL dedicated to the space"
1414
+ },
1415
+ "apiToken": {
1416
+ "type": "string",
1417
+ "description": "Short-lived API token to fetch content related to the space in the context of the URL."
1418
+ }
1419
+ },
1420
+ "required": [
1421
+ "space",
1422
+ "pathname",
1423
+ "basePath",
1424
+ "apiToken"
1425
+ ]
1426
+ }
1427
+ ]
1428
+ },
1369
1429
  "Document": {
1370
1430
  "oneOf": [
1371
1431
  {
@@ -2680,29 +2740,10 @@
2680
2740
  ]
2681
2741
  },
2682
2742
  "width": {
2683
- "oneOf": [
2684
- {
2685
- "type": "number"
2686
- },
2687
- {
2688
- "type": "object",
2689
- "properties": {
2690
- "unit": {
2691
- "type": "string"
2692
- },
2693
- "value": {
2694
- "type": "number"
2695
- }
2696
- },
2697
- "required": [
2698
- "unit",
2699
- "value"
2700
- ]
2701
- }
2702
- ]
2743
+ "$ref": "#/components/schemas/DocumentBlockImageDimension"
2703
2744
  },
2704
2745
  "height": {
2705
- "$ref": "#/components/schemas/DocumentBlockImage/properties/data/properties/width"
2746
+ "$ref": "#/components/schemas/DocumentBlockImageDimension"
2706
2747
  },
2707
2748
  "alt": {
2708
2749
  "type": "string"
@@ -2758,6 +2799,28 @@
2758
2799
  "isVoid"
2759
2800
  ]
2760
2801
  },
2802
+ "DocumentBlockImageDimension": {
2803
+ "oneOf": [
2804
+ {
2805
+ "type": "number"
2806
+ },
2807
+ {
2808
+ "type": "object",
2809
+ "properties": {
2810
+ "unit": {
2811
+ "type": "string"
2812
+ },
2813
+ "value": {
2814
+ "type": "number"
2815
+ }
2816
+ },
2817
+ "required": [
2818
+ "unit",
2819
+ "value"
2820
+ ]
2821
+ }
2822
+ ]
2823
+ },
2761
2824
  "DocumentBlockFile": {
2762
2825
  "type": "object",
2763
2826
  "properties": {
@@ -4072,13 +4135,13 @@
4072
4135
  "type": "string"
4073
4136
  },
4074
4137
  "space": {
4138
+ "description": "ID of the space the page is in. The page is considered as in the current space if none is provided.",
4075
4139
  "type": "string"
4076
4140
  }
4077
4141
  },
4078
4142
  "required": [
4079
4143
  "kind",
4080
- "page",
4081
- "space"
4144
+ "page"
4082
4145
  ]
4083
4146
  },
4084
4147
  "ContentRefAnchor": {
@@ -4094,9 +4157,11 @@
4094
4157
  "type": "string"
4095
4158
  },
4096
4159
  "space": {
4160
+ "description": "ID of the space the page is in. The page is considered as in the current space if none is provided.",
4097
4161
  "type": "string"
4098
4162
  },
4099
4163
  "page": {
4164
+ "description": "ID of the page the anchor is in. The anchor is considered as in the current page if none is provided.",
4100
4165
  "type": "string"
4101
4166
  }
4102
4167
  },
@@ -4527,6 +4592,22 @@
4527
4592
  }
4528
4593
  ]
4529
4594
  },
4595
+ "RevisionPageDocumentCover": {
4596
+ "type": "object",
4597
+ "properties": {
4598
+ "ref": {
4599
+ "description": "Content reference pointing to the source image.",
4600
+ "$ref": "#/components/schemas/ContentRefFile"
4601
+ },
4602
+ "yPos": {
4603
+ "description": "Vertical position of the cover image.",
4604
+ "type": "number"
4605
+ }
4606
+ },
4607
+ "required": [
4608
+ "yPos"
4609
+ ]
4610
+ },
4530
4611
  "RevisionPageGroup": {
4531
4612
  "allOf": [
4532
4613
  {
@@ -4580,6 +4661,65 @@
4580
4661
  }
4581
4662
  ]
4582
4663
  },
4664
+ "RevisionPageLayout": {
4665
+ "oneOf": [
4666
+ {
4667
+ "$ref": "#/components/schemas/RevisionPageLayoutPreset"
4668
+ },
4669
+ {
4670
+ "$ref": "#/components/schemas/RevisionPageLayoutOptions"
4671
+ }
4672
+ ]
4673
+ },
4674
+ "RevisionPageLayoutOptions": {
4675
+ "type": "object",
4676
+ "properties": {
4677
+ "cover": {
4678
+ "type": "boolean",
4679
+ "description": "Should the cover be visible?"
4680
+ },
4681
+ "coverSize": {
4682
+ "$ref": "#/components/schemas/RevisionPageLayoutOptionsCoverSize"
4683
+ },
4684
+ "title": {
4685
+ "type": "boolean",
4686
+ "description": "Should the title be visible?"
4687
+ },
4688
+ "description": {
4689
+ "type": "boolean",
4690
+ "description": "Should the description be visible?"
4691
+ },
4692
+ "tableOfContents": {
4693
+ "type": "boolean",
4694
+ "description": "Should the table of contents be visible?"
4695
+ },
4696
+ "outline": {
4697
+ "type": "boolean",
4698
+ "description": "Should the outline be visible?"
4699
+ },
4700
+ "pagination": {
4701
+ "type": "boolean",
4702
+ "description": "Should the pagination be visible?"
4703
+ }
4704
+ }
4705
+ },
4706
+ "RevisionPageLayoutOptionsCoverSize": {
4707
+ "type": "string",
4708
+ "description": "Size of the cover image.",
4709
+ "enum": [
4710
+ "hero",
4711
+ "full"
4712
+ ]
4713
+ },
4714
+ "RevisionPageLayoutPreset": {
4715
+ "type": "string",
4716
+ "description": "The core layout presets for a page.",
4717
+ "enum": [
4718
+ "docs",
4719
+ "editorial",
4720
+ "landing"
4721
+ ]
4722
+ },
4583
4723
  "RevisionPageLink": {
4584
4724
  "allOf": [
4585
4725
  {
@@ -4616,6 +4756,14 @@
4616
4756
  }
4617
4757
  ]
4618
4758
  },
4759
+ "RevisionPageType": {
4760
+ "type": "string",
4761
+ "enum": [
4762
+ "document",
4763
+ "group",
4764
+ "link"
4765
+ ]
4766
+ },
4619
4767
  "RevisionFile": {
4620
4768
  "type": "object",
4621
4769
  "properties": {
@@ -4662,6 +4810,21 @@
4662
4810
  "size"
4663
4811
  ]
4664
4812
  },
4813
+ "RevisionFileImageDimensions": {
4814
+ "type": "object",
4815
+ "properties": {
4816
+ "height": {
4817
+ "type": "number"
4818
+ },
4819
+ "width": {
4820
+ "type": "number"
4821
+ }
4822
+ },
4823
+ "required": [
4824
+ "height",
4825
+ "width"
4826
+ ]
4827
+ },
4665
4828
  "ImportContentSource": {
4666
4829
  "type": "string",
4667
4830
  "enum": [
@@ -4679,117 +4842,564 @@
4679
4842
  "open-api"
4680
4843
  ]
4681
4844
  },
4682
- "GitSyncState": {
4845
+ "ChangeAttributeContentReference": {
4683
4846
  "type": "object",
4684
4847
  "properties": {
4685
- "installationProvider": {
4686
- "type": "string",
4687
- "description": "The provider of the Git Sync installation."
4688
- },
4689
- "operation": {
4690
- "$ref": "#/components/schemas/GitSyncOperation"
4691
- },
4692
- "url": {
4693
- "type": "string",
4694
- "description": "The URL to the repository tree, used when rendering public content."
4848
+ "before": {
4849
+ "$ref": "#/components/schemas/ContentRef"
4695
4850
  },
4696
- "updatedAt": {
4697
- "description": "When the Git provider details were last updated",
4698
- "$ref": "#/components/schemas/Date"
4851
+ "after": {
4852
+ "$ref": "#/components/schemas/ContentRef"
4699
4853
  }
4700
4854
  }
4701
4855
  },
4702
- "GitSyncOperation": {
4856
+ "ChangeAttributeCustomFields": {
4703
4857
  "type": "object",
4704
4858
  "properties": {
4705
- "state": {
4706
- "$ref": "#/components/schemas/GitSyncOperationState"
4707
- },
4708
- "startedAt": {
4709
- "$ref": "#/components/schemas/Date"
4710
- },
4711
- "completedAt": {
4712
- "description": "Date when the operation was successful (when state is `success`)",
4713
- "$ref": "#/components/schemas/Date"
4859
+ "before": {
4860
+ "type": "object",
4861
+ "additionalProperties": {
4862
+ "type": "object",
4863
+ "properties": {
4864
+ "value": {
4865
+ "$ref": "#/components/schemas/CustomFieldValue"
4866
+ }
4867
+ },
4868
+ "required": [
4869
+ "value"
4870
+ ]
4871
+ }
4714
4872
  },
4715
- "error": {
4716
- "type": "string",
4717
- "description": "Error details, defined if state is `failure`."
4873
+ "after": {
4874
+ "type": "object",
4875
+ "additionalProperties": {
4876
+ "type": "object",
4877
+ "properties": {
4878
+ "value": {
4879
+ "$ref": "#/components/schemas/CustomFieldValue"
4880
+ }
4881
+ },
4882
+ "required": [
4883
+ "value"
4884
+ ]
4885
+ }
4718
4886
  }
4719
- },
4720
- "required": [
4721
- "state",
4722
- "startedAt"
4723
- ]
4724
- },
4725
- "GitSyncOperationState": {
4726
- "type": "string",
4727
- "description": "* `running`: The operation is still running\n* `failure`: The operation failed\n* `success`: The operation was successful\n",
4728
- "enum": [
4729
- "running",
4730
- "failure",
4731
- "success"
4732
- ]
4887
+ }
4733
4888
  },
4734
- "GitSyncCommit": {
4889
+ "ChangeAttributeNumber": {
4735
4890
  "type": "object",
4736
4891
  "properties": {
4737
- "oid": {
4738
- "type": "string",
4739
- "description": "SHA for the commit"
4740
- },
4741
- "message": {
4742
- "type": "string",
4743
- "description": "Message describing the purpose of the commit"
4744
- },
4745
- "createdByGitBook": {
4746
- "type": "boolean",
4747
- "description": "If true, the Git commit was generated by an export from GitBook"
4892
+ "before": {
4893
+ "type": "number"
4748
4894
  },
4749
- "url": {
4750
- "type": "string",
4751
- "description": "URL of the commit in the GitSync provider"
4895
+ "after": {
4896
+ "type": "number"
4897
+ }
4898
+ }
4899
+ },
4900
+ "ChangeAttributeRevisionFileImageDimensions": {
4901
+ "type": "object",
4902
+ "properties": {
4903
+ "before": {
4904
+ "$ref": "#/components/schemas/RevisionFileImageDimensions"
4752
4905
  },
4753
- "ref": {
4754
- "type": "string",
4755
- "description": "Original name of the ref where the commit originated from"
4906
+ "after": {
4907
+ "$ref": "#/components/schemas/RevisionFileImageDimensions"
4756
4908
  }
4757
- },
4758
- "required": [
4759
- "oid",
4760
- "message",
4761
- "createdByGitBook"
4762
- ]
4909
+ }
4763
4910
  },
4764
- "GitSyncBlob": {
4911
+ "ChangeAttributeRevisionPageDocumentCover": {
4765
4912
  "type": "object",
4766
4913
  "properties": {
4767
- "oid": {
4768
- "type": "string",
4769
- "description": "SHA for the blob"
4914
+ "before": {
4915
+ "$ref": "#/components/schemas/RevisionPageDocumentCover"
4770
4916
  },
4771
- "path": {
4772
- "type": "string",
4773
- "description": "Path of the blob in the Git tree"
4917
+ "after": {
4918
+ "$ref": "#/components/schemas/RevisionPageDocumentCover"
4774
4919
  }
4775
- },
4776
- "required": [
4777
- "oid",
4778
- "path"
4779
- ]
4920
+ }
4780
4921
  },
4781
- "Organization": {
4922
+ "ChangeAttributeRevisionPageLayout": {
4782
4923
  "type": "object",
4783
4924
  "properties": {
4784
- "object": {
4785
- "type": "string",
4786
- "description": "Type of Object, always equals to \"organization\"",
4787
- "enum": [
4788
- "organization"
4789
- ]
4925
+ "before": {
4926
+ "$ref": "#/components/schemas/RevisionPageLayout"
4790
4927
  },
4791
- "id": {
4792
- "type": "string",
4928
+ "after": {
4929
+ "$ref": "#/components/schemas/RevisionPageLayout"
4930
+ }
4931
+ }
4932
+ },
4933
+ "ChangeAttributeString": {
4934
+ "type": "object",
4935
+ "properties": {
4936
+ "before": {
4937
+ "type": "string"
4938
+ },
4939
+ "after": {
4940
+ "type": "string"
4941
+ }
4942
+ }
4943
+ },
4944
+ "ChangedRevisionFile": {
4945
+ "type": "object",
4946
+ "properties": {
4947
+ "id": {
4948
+ "type": "string"
4949
+ },
4950
+ "name": {
4951
+ "type": "string"
4952
+ },
4953
+ "contentType": {
4954
+ "type": "string"
4955
+ },
4956
+ "downloadURL": {
4957
+ "type": "string"
4958
+ }
4959
+ },
4960
+ "required": [
4961
+ "id",
4962
+ "name",
4963
+ "contentType",
4964
+ "downloadURL"
4965
+ ]
4966
+ },
4967
+ "ChangedRevisionPage": {
4968
+ "type": "object",
4969
+ "properties": {
4970
+ "id": {
4971
+ "type": "string"
4972
+ },
4973
+ "type": {
4974
+ "$ref": "#/components/schemas/RevisionPageType"
4975
+ },
4976
+ "title": {
4977
+ "type": "string"
4978
+ },
4979
+ "path": {
4980
+ "type": "string"
4981
+ }
4982
+ },
4983
+ "required": [
4984
+ "id",
4985
+ "type",
4986
+ "title"
4987
+ ]
4988
+ },
4989
+ "RevisionFileChangeAttributes": {
4990
+ "type": "object",
4991
+ "minProperties": 1,
4992
+ "properties": {
4993
+ "name": {
4994
+ "$ref": "#/components/schemas/ChangeAttributeString"
4995
+ },
4996
+ "downloadURL": {
4997
+ "$ref": "#/components/schemas/ChangeAttributeString"
4998
+ },
4999
+ "size": {
5000
+ "$ref": "#/components/schemas/ChangeAttributeNumber"
5001
+ },
5002
+ "contentType": {
5003
+ "$ref": "#/components/schemas/ChangeAttributeString"
5004
+ },
5005
+ "dimensions": {
5006
+ "$ref": "#/components/schemas/ChangeAttributeRevisionFileImageDimensions"
5007
+ }
5008
+ }
5009
+ },
5010
+ "RevisionPageDocumentChangeAttributes": {
5011
+ "type": "object",
5012
+ "minProperties": 1,
5013
+ "properties": {
5014
+ "title": {
5015
+ "$ref": "#/components/schemas/ChangeAttributeString"
5016
+ },
5017
+ "description": {
5018
+ "$ref": "#/components/schemas/ChangeAttributeString"
5019
+ },
5020
+ "slug": {
5021
+ "$ref": "#/components/schemas/ChangeAttributeString"
5022
+ },
5023
+ "document": {
5024
+ "$ref": "#/components/schemas/ChangeAttributeString"
5025
+ },
5026
+ "cover": {
5027
+ "$ref": "#/components/schemas/ChangeAttributeRevisionPageDocumentCover"
5028
+ },
5029
+ "emoji": {
5030
+ "$ref": "#/components/schemas/ChangeAttributeString"
5031
+ },
5032
+ "layout": {
5033
+ "$ref": "#/components/schemas/ChangeAttributeRevisionPageLayout"
5034
+ },
5035
+ "customFields": {
5036
+ "$ref": "#/components/schemas/ChangeAttributeCustomFields"
5037
+ }
5038
+ }
5039
+ },
5040
+ "RevisionPageGroupChangeAttributes": {
5041
+ "type": "object",
5042
+ "minProperties": 1,
5043
+ "properties": {
5044
+ "title": {
5045
+ "$ref": "#/components/schemas/ChangeAttributeString"
5046
+ },
5047
+ "emoji": {
5048
+ "$ref": "#/components/schemas/ChangeAttributeString"
5049
+ },
5050
+ "slug": {
5051
+ "$ref": "#/components/schemas/ChangeAttributeString"
5052
+ },
5053
+ "customFields": {
5054
+ "$ref": "#/components/schemas/ChangeAttributeCustomFields"
5055
+ }
5056
+ }
5057
+ },
5058
+ "RevisionPageLinkChangeAttributes": {
5059
+ "type": "object",
5060
+ "minProperties": 1,
5061
+ "properties": {
5062
+ "title": {
5063
+ "$ref": "#/components/schemas/ChangeAttributeString"
5064
+ },
5065
+ "emoji": {
5066
+ "$ref": "#/components/schemas/ChangeAttributeString"
5067
+ },
5068
+ "target": {
5069
+ "$ref": "#/components/schemas/ChangeAttributeContentReference"
5070
+ },
5071
+ "customFields": {
5072
+ "$ref": "#/components/schemas/ChangeAttributeCustomFields"
5073
+ }
5074
+ }
5075
+ },
5076
+ "RevisionSemanticChange": {
5077
+ "oneOf": [
5078
+ {
5079
+ "$ref": "#/components/schemas/RevisionSemanticChangePageCreated"
5080
+ },
5081
+ {
5082
+ "$ref": "#/components/schemas/RevisionSemanticChangePageEdited"
5083
+ },
5084
+ {
5085
+ "$ref": "#/components/schemas/RevisionSemanticChangePageDeleted"
5086
+ },
5087
+ {
5088
+ "$ref": "#/components/schemas/RevisionSemanticChangePageMoved"
5089
+ },
5090
+ {
5091
+ "$ref": "#/components/schemas/RevisionSemanticChangeFileCreated"
5092
+ },
5093
+ {
5094
+ "$ref": "#/components/schemas/RevisionSemanticChangeFileEdited"
5095
+ },
5096
+ {
5097
+ "$ref": "#/components/schemas/RevisionSemanticChangeFileDeleted"
5098
+ },
5099
+ {
5100
+ "$ref": "#/components/schemas/RevisionSemanticChangeCustomFieldsEdited"
5101
+ }
5102
+ ]
5103
+ },
5104
+ "RevisionSemanticChangeCustomFieldsEdited": {
5105
+ "type": "object",
5106
+ "properties": {
5107
+ "type": {
5108
+ "type": "string",
5109
+ "enum": [
5110
+ "custom_fields_edited"
5111
+ ]
5112
+ },
5113
+ "customFields": {
5114
+ "$ref": "#/components/schemas/ChangeAttributeCustomFields"
5115
+ }
5116
+ },
5117
+ "required": [
5118
+ "type",
5119
+ "customFields"
5120
+ ]
5121
+ },
5122
+ "RevisionSemanticChangeFileCreated": {
5123
+ "type": "object",
5124
+ "properties": {
5125
+ "type": {
5126
+ "type": "string",
5127
+ "enum": [
5128
+ "file_created"
5129
+ ]
5130
+ },
5131
+ "file": {
5132
+ "$ref": "#/components/schemas/ChangedRevisionFile"
5133
+ }
5134
+ },
5135
+ "required": [
5136
+ "type",
5137
+ "file"
5138
+ ]
5139
+ },
5140
+ "RevisionSemanticChangeFileDeleted": {
5141
+ "type": "object",
5142
+ "properties": {
5143
+ "type": {
5144
+ "type": "string",
5145
+ "enum": [
5146
+ "file_deleted"
5147
+ ]
5148
+ },
5149
+ "file": {
5150
+ "$ref": "#/components/schemas/ChangedRevisionFile"
5151
+ }
5152
+ },
5153
+ "required": [
5154
+ "type",
5155
+ "file"
5156
+ ]
5157
+ },
5158
+ "RevisionSemanticChangeFileEdited": {
5159
+ "type": "object",
5160
+ "properties": {
5161
+ "type": {
5162
+ "type": "string",
5163
+ "enum": [
5164
+ "file_edited"
5165
+ ]
5166
+ },
5167
+ "file": {
5168
+ "$ref": "#/components/schemas/ChangedRevisionFile"
5169
+ },
5170
+ "attributes": {
5171
+ "$ref": "#/components/schemas/RevisionFileChangeAttributes"
5172
+ }
5173
+ },
5174
+ "required": [
5175
+ "type",
5176
+ "file",
5177
+ "attributes"
5178
+ ]
5179
+ },
5180
+ "RevisionSemanticChangePageCreated": {
5181
+ "type": "object",
5182
+ "properties": {
5183
+ "type": {
5184
+ "type": "string",
5185
+ "enum": [
5186
+ "page_created"
5187
+ ]
5188
+ },
5189
+ "page": {
5190
+ "$ref": "#/components/schemas/ChangedRevisionPage"
5191
+ }
5192
+ },
5193
+ "required": [
5194
+ "type",
5195
+ "page"
5196
+ ]
5197
+ },
5198
+ "RevisionSemanticChangePageDeleted": {
5199
+ "type": "object",
5200
+ "properties": {
5201
+ "type": {
5202
+ "type": "string",
5203
+ "enum": [
5204
+ "page_deleted"
5205
+ ]
5206
+ },
5207
+ "page": {
5208
+ "$ref": "#/components/schemas/ChangedRevisionPage"
5209
+ }
5210
+ },
5211
+ "required": [
5212
+ "type",
5213
+ "page"
5214
+ ]
5215
+ },
5216
+ "RevisionSemanticChangePageEdited": {
5217
+ "type": "object",
5218
+ "properties": {
5219
+ "type": {
5220
+ "type": "string",
5221
+ "enum": [
5222
+ "page_edited"
5223
+ ]
5224
+ },
5225
+ "page": {
5226
+ "$ref": "#/components/schemas/ChangedRevisionPage"
5227
+ },
5228
+ "attributes": {
5229
+ "oneOf": [
5230
+ {
5231
+ "$ref": "#/components/schemas/RevisionPageDocumentChangeAttributes"
5232
+ },
5233
+ {
5234
+ "$ref": "#/components/schemas/RevisionPageGroupChangeAttributes"
5235
+ },
5236
+ {
5237
+ "$ref": "#/components/schemas/RevisionPageLinkChangeAttributes"
5238
+ }
5239
+ ]
5240
+ }
5241
+ },
5242
+ "required": [
5243
+ "type",
5244
+ "page",
5245
+ "attributes"
5246
+ ]
5247
+ },
5248
+ "RevisionSemanticChangePageMoved": {
5249
+ "type": "object",
5250
+ "properties": {
5251
+ "type": {
5252
+ "type": "string",
5253
+ "enum": [
5254
+ "page_moved"
5255
+ ]
5256
+ },
5257
+ "page": {
5258
+ "$ref": "#/components/schemas/ChangedRevisionPage"
5259
+ },
5260
+ "parent": {
5261
+ "type": "object",
5262
+ "properties": {
5263
+ "before": {
5264
+ "$ref": "#/components/schemas/ChangedRevisionPage"
5265
+ },
5266
+ "after": {
5267
+ "$ref": "#/components/schemas/ChangedRevisionPage"
5268
+ }
5269
+ }
5270
+ }
5271
+ },
5272
+ "required": [
5273
+ "type",
5274
+ "page",
5275
+ "parent"
5276
+ ]
5277
+ },
5278
+ "RevisionSemanticChangeType": {
5279
+ "type": "string",
5280
+ "description": "The type of semantic change.",
5281
+ "enum": [
5282
+ "page_created",
5283
+ "page_edited",
5284
+ "page_deleted",
5285
+ "page_moved",
5286
+ "file_created",
5287
+ "file_edited",
5288
+ "file_deleted",
5289
+ "custom_fields_edited"
5290
+ ]
5291
+ },
5292
+ "GitSyncState": {
5293
+ "type": "object",
5294
+ "properties": {
5295
+ "installationProvider": {
5296
+ "type": "string",
5297
+ "description": "The provider of the Git Sync installation."
5298
+ },
5299
+ "operation": {
5300
+ "$ref": "#/components/schemas/GitSyncOperation"
5301
+ },
5302
+ "url": {
5303
+ "type": "string",
5304
+ "description": "The URL to the repository tree, used when rendering public content."
5305
+ },
5306
+ "updatedAt": {
5307
+ "description": "When the Git provider details were last updated",
5308
+ "$ref": "#/components/schemas/Date"
5309
+ }
5310
+ }
5311
+ },
5312
+ "GitSyncOperation": {
5313
+ "type": "object",
5314
+ "properties": {
5315
+ "state": {
5316
+ "$ref": "#/components/schemas/GitSyncOperationState"
5317
+ },
5318
+ "startedAt": {
5319
+ "$ref": "#/components/schemas/Date"
5320
+ },
5321
+ "completedAt": {
5322
+ "description": "Date when the operation was successful (when state is `success`)",
5323
+ "$ref": "#/components/schemas/Date"
5324
+ },
5325
+ "error": {
5326
+ "type": "string",
5327
+ "description": "Error details, defined if state is `failure`."
5328
+ }
5329
+ },
5330
+ "required": [
5331
+ "state",
5332
+ "startedAt"
5333
+ ]
5334
+ },
5335
+ "GitSyncOperationState": {
5336
+ "type": "string",
5337
+ "description": "* `running`: The operation is still running\n* `failure`: The operation failed\n* `success`: The operation was successful\n",
5338
+ "enum": [
5339
+ "running",
5340
+ "failure",
5341
+ "success"
5342
+ ]
5343
+ },
5344
+ "GitSyncCommit": {
5345
+ "type": "object",
5346
+ "properties": {
5347
+ "oid": {
5348
+ "type": "string",
5349
+ "description": "SHA for the commit"
5350
+ },
5351
+ "message": {
5352
+ "type": "string",
5353
+ "description": "Message describing the purpose of the commit"
5354
+ },
5355
+ "createdByGitBook": {
5356
+ "type": "boolean",
5357
+ "description": "If true, the Git commit was generated by an export from GitBook"
5358
+ },
5359
+ "url": {
5360
+ "type": "string",
5361
+ "description": "URL of the commit in the GitSync provider"
5362
+ },
5363
+ "ref": {
5364
+ "type": "string",
5365
+ "description": "Original name of the ref where the commit originated from"
5366
+ }
5367
+ },
5368
+ "required": [
5369
+ "oid",
5370
+ "message",
5371
+ "createdByGitBook"
5372
+ ]
5373
+ },
5374
+ "GitSyncBlob": {
5375
+ "type": "object",
5376
+ "properties": {
5377
+ "oid": {
5378
+ "type": "string",
5379
+ "description": "SHA for the blob"
5380
+ },
5381
+ "path": {
5382
+ "type": "string",
5383
+ "description": "Path of the blob in the Git tree"
5384
+ }
5385
+ },
5386
+ "required": [
5387
+ "oid",
5388
+ "path"
5389
+ ]
5390
+ },
5391
+ "Organization": {
5392
+ "type": "object",
5393
+ "properties": {
5394
+ "object": {
5395
+ "type": "string",
5396
+ "description": "Type of Object, always equals to \"organization\"",
5397
+ "enum": [
5398
+ "organization"
5399
+ ]
5400
+ },
5401
+ "id": {
5402
+ "type": "string",
4793
5403
  "description": "Unique identifier for the organization"
4794
5404
  },
4795
5405
  "title": {
@@ -5500,18 +6110,126 @@
5500
6110
  }
5501
6111
  ]
5502
6112
  },
5503
- "UpdateCaptureSchema": {
6113
+ "UpdateCaptureSchema": {
6114
+ "type": "object",
6115
+ "properties": {
6116
+ "title": {
6117
+ "type": "string",
6118
+ "description": "A new title for the capture."
6119
+ },
6120
+ "body": {
6121
+ "description": "Content of the capture.",
6122
+ "$ref": "#/components/schemas/Document"
6123
+ }
6124
+ }
6125
+ },
6126
+ "ContentAuditRelation": {
6127
+ "type": "object",
6128
+ "description": "Content audit relation",
6129
+ "properties": {
6130
+ "id": {
6131
+ "type": "string"
6132
+ },
6133
+ "sources": {
6134
+ "description": "The sources that are related",
6135
+ "type": "array",
6136
+ "items": {
6137
+ "$ref": "#/components/schemas/ContentAuditSource"
6138
+ }
6139
+ },
6140
+ "type": {
6141
+ "description": "The type of the relation between the sources",
6142
+ "$ref": "#/components/schemas/ContentAuditRelationType"
6143
+ },
6144
+ "reason": {
6145
+ "type": "string",
6146
+ "description": "A human readable description of the reason for the relation"
6147
+ },
6148
+ "status": {
6149
+ "description": "The status of the relation",
6150
+ "$ref": "#/components/schemas/ContentAuditRelationStatus"
6151
+ },
6152
+ "createdAt": {
6153
+ "description": "The date at which the relation was created",
6154
+ "$ref": "#/components/schemas/Date"
6155
+ }
6156
+ },
6157
+ "required": [
6158
+ "id",
6159
+ "sources",
6160
+ "type",
6161
+ "status",
6162
+ "createdAt"
6163
+ ]
6164
+ },
6165
+ "ContentAuditRelationType": {
6166
+ "description": "The type of the relation between the sources",
6167
+ "oneOf": [
6168
+ {
6169
+ "type": "string",
6170
+ "enum": [
6171
+ "contradiction",
6172
+ "duplicate"
6173
+ ]
6174
+ }
6175
+ ]
6176
+ },
6177
+ "ContentAuditRelationStatus": {
6178
+ "description": "Status of the audit relation to filter on",
6179
+ "oneOf": [
6180
+ {
6181
+ "type": "string",
6182
+ "enum": [
6183
+ "pending",
6184
+ "rejected"
6185
+ ]
6186
+ }
6187
+ ]
6188
+ },
6189
+ "ContentAuditRelationStatusUpdate": {
6190
+ "type": "object",
6191
+ "properties": {
6192
+ "status": {
6193
+ "$ref": "#/components/schemas/ContentAuditRelationStatus"
6194
+ }
6195
+ },
6196
+ "required": [
6197
+ "status"
6198
+ ]
6199
+ },
6200
+ "ContentAuditSource": {
6201
+ "oneOf": [
6202
+ {
6203
+ "$ref": "#/components/schemas/ContentAuditSourceSection"
6204
+ }
6205
+ ]
6206
+ },
6207
+ "ContentAuditSourceSection": {
5504
6208
  "type": "object",
6209
+ "description": "A GitBook section source",
5505
6210
  "properties": {
5506
- "title": {
6211
+ "id": {
6212
+ "type": "string"
6213
+ },
6214
+ "type": {
5507
6215
  "type": "string",
5508
- "description": "A new title for the capture."
6216
+ "enum": [
6217
+ "section"
6218
+ ]
5509
6219
  },
5510
- "body": {
5511
- "description": "Content of the capture.",
5512
- "$ref": "#/components/schemas/Document"
6220
+ "space": {
6221
+ "$ref": "#/components/schemas/Space"
6222
+ },
6223
+ "page": {
6224
+ "$ref": "#/components/schemas/RevisionPageDocument"
5513
6225
  }
5514
- }
6226
+ },
6227
+ "required": [
6228
+ "id",
6229
+ "type",
6230
+ "space",
6231
+ "page"
6232
+ ]
5515
6233
  },
5516
6234
  "ChangeRequest": {
5517
6235
  "type": "object",
@@ -6277,6 +6995,7 @@
6277
6995
  "score",
6278
6996
  "total",
6279
6997
  "rating",
6998
+ "ponderedScore",
6280
6999
  "bad",
6281
7000
  "ok",
6282
7001
  "good"
@@ -6284,28 +7003,32 @@
6284
7003
  "properties": {
6285
7004
  "score": {
6286
7005
  "type": "number",
6287
- "description": "Score between 0 and 4."
7006
+ "description": "Score based on each rating (+1 for 'good', -0.5 for 'ok', -2 for 'bad')."
6288
7007
  },
6289
7008
  "total": {
6290
- "type": "number"
7009
+ "type": "number",
7010
+ "description": "Total number of ratings done by end users."
6291
7011
  },
6292
7012
  "rating": {
6293
7013
  "type": "string",
6294
- "enum": [
6295
- "unknown",
6296
- "bad",
6297
- "ok",
6298
- "good"
6299
- ]
7014
+ "deprecated": true,
7015
+ "description": "Summary of the rating based on the score ('good', 'ok', or 'bad')"
7016
+ },
7017
+ "ponderedScore": {
7018
+ "type": "number",
7019
+ "description": "Score multiplied by the number of ratings to give more importance to highly rated content."
6300
7020
  },
6301
7021
  "bad": {
6302
- "type": "number"
7022
+ "type": "number",
7023
+ "description": "Number of 'bad' ratings."
6303
7024
  },
6304
7025
  "ok": {
6305
- "type": "number"
7026
+ "type": "number",
7027
+ "description": "Number of 'ok' ratings."
6306
7028
  },
6307
7029
  "good": {
6308
- "type": "number"
7030
+ "type": "number",
7031
+ "description": "Number of 'good' ratings."
6309
7032
  }
6310
7033
  }
6311
7034
  }
@@ -10314,6 +11037,9 @@
10314
11037
  {
10315
11038
  "$ref": "#/components/schemas/OrganizationCapturesChannel"
10316
11039
  },
11040
+ {
11041
+ "$ref": "#/components/schemas/OrganizationContentAuditsChannel"
11042
+ },
10317
11043
  {
10318
11044
  "$ref": "#/components/schemas/OrganizationIntegrationsChannel"
10319
11045
  },
@@ -10900,6 +11626,24 @@
10900
11626
  "organization"
10901
11627
  ]
10902
11628
  },
11629
+ "OrganizationContentAuditsChannel": {
11630
+ "type": "object",
11631
+ "properties": {
11632
+ "channel": {
11633
+ "type": "string",
11634
+ "enum": [
11635
+ "organization-content-audits"
11636
+ ]
11637
+ },
11638
+ "organization": {
11639
+ "type": "string"
11640
+ }
11641
+ },
11642
+ "required": [
11643
+ "channel",
11644
+ "organization"
11645
+ ]
11646
+ },
10903
11647
  "OrganizationIntegrationsChannel": {
10904
11648
  "type": "object",
10905
11649
  "properties": {
@@ -14201,6 +14945,73 @@
14201
14945
  }
14202
14946
  }
14203
14947
  },
14948
+ "/spaces/{spaceId}/revisions/{revisionId}/changes": {
14949
+ "get": {
14950
+ "summary": "Return the semantic changes between a revision and its parent.",
14951
+ "operationId": "getRevisionSemanticChanges",
14952
+ "security": [
14953
+ {
14954
+ "user": []
14955
+ }
14956
+ ],
14957
+ "parameters": [
14958
+ {
14959
+ "$ref": "#/components/parameters/spaceId"
14960
+ },
14961
+ {
14962
+ "$ref": "#/components/parameters/revisionId"
14963
+ },
14964
+ {
14965
+ "name": "limit",
14966
+ "in": "query",
14967
+ "description": "Limit the number of changes returned",
14968
+ "schema": {
14969
+ "type": "number",
14970
+ "default": 10
14971
+ }
14972
+ },
14973
+ {
14974
+ "name": "metadata",
14975
+ "in": "query",
14976
+ "description": "Whether to include changes to metadata, such as git information and custom fields",
14977
+ "schema": {
14978
+ "type": "boolean",
14979
+ "default": true
14980
+ }
14981
+ }
14982
+ ],
14983
+ "responses": {
14984
+ "200": {
14985
+ "description": "OK",
14986
+ "content": {
14987
+ "application/json": {
14988
+ "schema": {
14989
+ "type": "object",
14990
+ "properties": {
14991
+ "changes": {
14992
+ "type": "array",
14993
+ "items": {
14994
+ "$ref": "#/components/schemas/RevisionSemanticChange"
14995
+ }
14996
+ },
14997
+ "more": {
14998
+ "type": "number",
14999
+ "description": "How many changes were omitted because above the result limit"
15000
+ }
15001
+ },
15002
+ "required": [
15003
+ "changes"
15004
+ ]
15005
+ }
15006
+ }
15007
+ }
15008
+ },
15009
+ "default": {
15010
+ "$ref": "#/components/responses/UnexpectedError"
15011
+ }
15012
+ }
15013
+ }
15014
+ },
14204
15015
  "/spaces/{spaceId}/revisions/{revisionId}/files": {
14205
15016
  "get": {
14206
15017
  "summary": "List all files in a revision",
@@ -19541,6 +20352,134 @@
19541
20352
  }
19542
20353
  }
19543
20354
  },
20355
+ "/orgs/{organizationId}/insights/audit-relations": {
20356
+ "get": {
20357
+ "operationId": "listContentAuditRelations",
20358
+ "summary": "List the content relations for in a given organization.",
20359
+ "tags": [
20360
+ "ai",
20361
+ "spaces"
20362
+ ],
20363
+ "security": [
20364
+ {
20365
+ "user": []
20366
+ }
20367
+ ],
20368
+ "parameters": [
20369
+ {
20370
+ "$ref": "#/components/parameters/organizationId"
20371
+ },
20372
+ {
20373
+ "$ref": "#/components/parameters/listPage"
20374
+ },
20375
+ {
20376
+ "$ref": "#/components/parameters/listLimit"
20377
+ },
20378
+ {
20379
+ "name": "status",
20380
+ "in": "query",
20381
+ "required": false,
20382
+ "description": "Status of the audit relation to filter on",
20383
+ "schema": {
20384
+ "$ref": "#/components/schemas/ContentAuditRelationStatus",
20385
+ "default": [
20386
+ "pending"
20387
+ ]
20388
+ }
20389
+ }
20390
+ ],
20391
+ "responses": {
20392
+ "200": {
20393
+ "description": "Content audit relations",
20394
+ "content": {
20395
+ "application/json": {
20396
+ "schema": {
20397
+ "allOf": [
20398
+ {
20399
+ "$ref": "#/components/schemas/List"
20400
+ },
20401
+ {
20402
+ "type": "object",
20403
+ "required": [
20404
+ "items"
20405
+ ],
20406
+ "properties": {
20407
+ "items": {
20408
+ "type": "array",
20409
+ "items": {
20410
+ "$ref": "#/components/schemas/ContentAuditRelation"
20411
+ }
20412
+ }
20413
+ }
20414
+ }
20415
+ ]
20416
+ }
20417
+ }
20418
+ }
20419
+ },
20420
+ "default": {
20421
+ "$ref": "#/components/responses/UnexpectedError"
20422
+ }
20423
+ }
20424
+ }
20425
+ },
20426
+ "/orgs/{organizationId}/insights/audit-relations/{relationId}": {
20427
+ "patch": {
20428
+ "operationId": "updateContentAuditRelationStatusById",
20429
+ "summary": "Update an audit relation status",
20430
+ "tags": [
20431
+ "organizations"
20432
+ ],
20433
+ "security": [
20434
+ {
20435
+ "user": []
20436
+ }
20437
+ ],
20438
+ "parameters": [
20439
+ {
20440
+ "$ref": "#/components/parameters/organizationId"
20441
+ },
20442
+ {
20443
+ "name": "relationId",
20444
+ "in": "path",
20445
+ "required": true,
20446
+ "description": "The id of the content audit relation",
20447
+ "schema": {
20448
+ "type": "string"
20449
+ }
20450
+ }
20451
+ ],
20452
+ "requestBody": {
20453
+ "required": true,
20454
+ "content": {
20455
+ "application/json": {
20456
+ "schema": {
20457
+ "$ref": "#/components/schemas/ContentAuditRelationStatusUpdate"
20458
+ }
20459
+ }
20460
+ }
20461
+ },
20462
+ "responses": {
20463
+ "200": {
20464
+ "description": "OK",
20465
+ "content": {
20466
+ "application/json": {
20467
+ "schema": {
20468
+ "$ref": "#/components/schemas/ContentAuditRelation"
20469
+ }
20470
+ }
20471
+ }
20472
+ },
20473
+ "404": {
20474
+ "description": "No matching content relation found for given ID",
20475
+ "$ref": "#/components/responses/NotFoundError"
20476
+ },
20477
+ "default": {
20478
+ "$ref": "#/components/responses/UnexpectedError"
20479
+ }
20480
+ }
20481
+ }
20482
+ },
19544
20483
  "/internal/hive/token": {
19545
20484
  "post": {
19546
20485
  "operationId": "generateHiveAccessToken",
@@ -19701,6 +20640,50 @@
19701
20640
  }
19702
20641
  }
19703
20642
  }
20643
+ },
20644
+ "/urls/published": {
20645
+ "get": {
20646
+ "operationId": "getPublishedContentByUrl",
20647
+ "summary": "Resolve a URL of a published content.",
20648
+ "tags": [
20649
+ "urls"
20650
+ ],
20651
+ "parameters": [
20652
+ {
20653
+ "name": "url",
20654
+ "in": "query",
20655
+ "required": true,
20656
+ "description": "URL to resolve",
20657
+ "schema": {
20658
+ "$ref": "#/components/schemas/URL"
20659
+ }
20660
+ },
20661
+ {
20662
+ "name": "visitorAuthToken",
20663
+ "in": "query",
20664
+ "required": false,
20665
+ "description": "JWT token generated for a visitor auth session",
20666
+ "schema": {
20667
+ "type": "string"
20668
+ }
20669
+ }
20670
+ ],
20671
+ "responses": {
20672
+ "200": {
20673
+ "description": "OK",
20674
+ "content": {
20675
+ "application/json": {
20676
+ "schema": {
20677
+ "$ref": "#/components/schemas/PublishedContentLookup"
20678
+ }
20679
+ }
20680
+ }
20681
+ },
20682
+ "default": {
20683
+ "$ref": "#/components/responses/UnexpectedError"
20684
+ }
20685
+ }
20686
+ }
19704
20687
  }
19705
20688
  }
19706
20689
  }