@gitbook/api 0.14.0 → 0.16.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
@@ -151,6 +151,13 @@ components:
151
151
  description: The unique id of a capture
152
152
  schema:
153
153
  type: string
154
+ snippetId:
155
+ name: snippetId
156
+ in: path
157
+ required: true
158
+ description: The unique id of a snippet
159
+ schema:
160
+ type: string
154
161
  userId:
155
162
  name: userId
156
163
  in: path
@@ -172,6 +179,13 @@ components:
172
179
  description: The unique id of the page
173
180
  schema:
174
181
  type: string
182
+ fileId:
183
+ name: fileId
184
+ in: path
185
+ required: true
186
+ description: The unique id of the file
187
+ schema:
188
+ type: string
175
189
  pagePath:
176
190
  name: pagePath
177
191
  in: path
@@ -965,6 +979,47 @@ components:
965
979
  - postedAt
966
980
  - reactions
967
981
  - urls
982
+ PublishedContentLookup:
983
+ oneOf:
984
+ - type: object
985
+ properties:
986
+ target:
987
+ type: string
988
+ description: Type of target for the redirect
989
+ enum:
990
+ - application
991
+ - content
992
+ - external
993
+ redirect:
994
+ $ref: "#/components/schemas/URL"
995
+ required:
996
+ - target
997
+ - redirect
998
+ - type: object
999
+ properties:
1000
+ space:
1001
+ type: string
1002
+ description: ID of the space matching.
1003
+ changeRequest:
1004
+ type: string
1005
+ description: Identifier of the change request being previewed in this URL.
1006
+ revision:
1007
+ type: string
1008
+ description: Identifier of the revision being previewed in this URL.
1009
+ pathname:
1010
+ type: string
1011
+ description: Path of the content relative to the space
1012
+ basePath:
1013
+ type: string
1014
+ description: Prefix of the path in the URL dedicated to the space
1015
+ apiToken:
1016
+ type: string
1017
+ description: Short-lived API token to fetch content related to the space in the context of the URL.
1018
+ required:
1019
+ - space
1020
+ - pathname
1021
+ - basePath
1022
+ - apiToken
968
1023
  Document:
969
1024
  oneOf:
970
1025
  - $ref: "#/components/schemas/MarkdownDocument"
@@ -1765,19 +1820,9 @@ components:
1765
1820
  - $ref: "#/components/schemas/ContentRefURL"
1766
1821
  - $ref: "#/components/schemas/ContentRefFile"
1767
1822
  width:
1768
- oneOf:
1769
- - type: number
1770
- - type: object
1771
- properties:
1772
- unit:
1773
- type: string
1774
- value:
1775
- type: number
1776
- required:
1777
- - unit
1778
- - value
1823
+ $ref: "#/components/schemas/DocumentBlockImageDimension"
1779
1824
  height:
1780
- $ref: "#/components/schemas/DocumentBlockImage/properties/data/properties/width"
1825
+ $ref: "#/components/schemas/DocumentBlockImageDimension"
1781
1826
  alt:
1782
1827
  type: string
1783
1828
  required:
@@ -1810,6 +1855,18 @@ components:
1810
1855
  - data
1811
1856
  - fragments
1812
1857
  - isVoid
1858
+ DocumentBlockImageDimension:
1859
+ oneOf:
1860
+ - type: number
1861
+ - type: object
1862
+ properties:
1863
+ unit:
1864
+ type: string
1865
+ value:
1866
+ type: number
1867
+ required:
1868
+ - unit
1869
+ - value
1813
1870
  DocumentBlockFile:
1814
1871
  type: object
1815
1872
  properties:
@@ -2644,11 +2701,11 @@ components:
2644
2701
  page:
2645
2702
  type: string
2646
2703
  space:
2704
+ description: ID of the space the page is in. The page is considered as in the current space if none is provided.
2647
2705
  type: string
2648
2706
  required:
2649
2707
  - kind
2650
2708
  - page
2651
- - space
2652
2709
  ContentRefAnchor:
2653
2710
  type: object
2654
2711
  properties:
@@ -2659,8 +2716,10 @@ components:
2659
2716
  anchor:
2660
2717
  type: string
2661
2718
  space:
2719
+ description: ID of the space the page is in. The page is considered as in the current space if none is provided.
2662
2720
  type: string
2663
2721
  page:
2722
+ description: ID of the page the anchor is in. The anchor is considered as in the current page if none is provided.
2664
2723
  type: string
2665
2724
  required:
2666
2725
  - kind
@@ -2937,6 +2996,17 @@ components:
2937
2996
  - slug
2938
2997
  - path
2939
2998
  - pages
2999
+ RevisionPageDocumentCover:
3000
+ type: object
3001
+ properties:
3002
+ ref:
3003
+ description: Content reference pointing to the source image.
3004
+ $ref: "#/components/schemas/ContentRefFile"
3005
+ yPos:
3006
+ description: Vertical position of the cover image.
3007
+ type: number
3008
+ required:
3009
+ - yPos
2940
3010
  RevisionPageGroup:
2941
3011
  allOf:
2942
3012
  - $ref: "#/components/schemas/RevisionPageBase"
@@ -2969,6 +3039,46 @@ components:
2969
3039
  - slug
2970
3040
  - path
2971
3041
  - pages
3042
+ RevisionPageLayout:
3043
+ oneOf:
3044
+ - $ref: "#/components/schemas/RevisionPageLayoutPreset"
3045
+ - $ref: "#/components/schemas/RevisionPageLayoutOptions"
3046
+ RevisionPageLayoutOptions:
3047
+ type: object
3048
+ properties:
3049
+ cover:
3050
+ type: boolean
3051
+ description: Should the cover be visible?
3052
+ coverSize:
3053
+ $ref: "#/components/schemas/RevisionPageLayoutOptionsCoverSize"
3054
+ title:
3055
+ type: boolean
3056
+ description: Should the title be visible?
3057
+ description:
3058
+ type: boolean
3059
+ description: Should the description be visible?
3060
+ tableOfContents:
3061
+ type: boolean
3062
+ description: Should the table of contents be visible?
3063
+ outline:
3064
+ type: boolean
3065
+ description: Should the outline be visible?
3066
+ pagination:
3067
+ type: boolean
3068
+ description: Should the pagination be visible?
3069
+ RevisionPageLayoutOptionsCoverSize:
3070
+ type: string
3071
+ description: Size of the cover image.
3072
+ enum:
3073
+ - hero
3074
+ - full
3075
+ RevisionPageLayoutPreset:
3076
+ type: string
3077
+ description: The core layout presets for a page.
3078
+ enum:
3079
+ - docs
3080
+ - editorial
3081
+ - landing
2972
3082
  RevisionPageLink:
2973
3083
  allOf:
2974
3084
  - $ref: "#/components/schemas/RevisionPageBase"
@@ -2991,6 +3101,12 @@ components:
2991
3101
  - kind
2992
3102
  - type
2993
3103
  - target
3104
+ RevisionPageType:
3105
+ type: string
3106
+ enum:
3107
+ - document
3108
+ - group
3109
+ - link
2994
3110
  RevisionFile:
2995
3111
  type: object
2996
3112
  properties:
@@ -3023,6 +3139,16 @@ components:
3023
3139
  - contentType
3024
3140
  - downloadURL
3025
3141
  - size
3142
+ RevisionFileImageDimensions:
3143
+ type: object
3144
+ properties:
3145
+ height:
3146
+ type: number
3147
+ width:
3148
+ type: number
3149
+ required:
3150
+ - height
3151
+ - width
3026
3152
  ImportContentSource:
3027
3153
  type: string
3028
3154
  enum:
@@ -3038,6 +3164,293 @@ components:
3038
3164
  - quip
3039
3165
  - google-docs
3040
3166
  - open-api
3167
+ ChangeAttributeContentReference:
3168
+ type: object
3169
+ properties:
3170
+ before:
3171
+ $ref: "#/components/schemas/ContentRef"
3172
+ after:
3173
+ $ref: "#/components/schemas/ContentRef"
3174
+ ChangeAttributeCustomFields:
3175
+ type: object
3176
+ properties:
3177
+ before:
3178
+ type: object
3179
+ additionalProperties:
3180
+ type: object
3181
+ properties:
3182
+ value:
3183
+ $ref: "#/components/schemas/CustomFieldValue"
3184
+ required:
3185
+ - value
3186
+ after:
3187
+ type: object
3188
+ additionalProperties:
3189
+ type: object
3190
+ properties:
3191
+ value:
3192
+ $ref: "#/components/schemas/CustomFieldValue"
3193
+ required:
3194
+ - value
3195
+ ChangeAttributeNumber:
3196
+ type: object
3197
+ properties:
3198
+ before:
3199
+ type: number
3200
+ after:
3201
+ type: number
3202
+ ChangeAttributeRevisionFileImageDimensions:
3203
+ type: object
3204
+ properties:
3205
+ before:
3206
+ $ref: "#/components/schemas/RevisionFileImageDimensions"
3207
+ after:
3208
+ $ref: "#/components/schemas/RevisionFileImageDimensions"
3209
+ ChangeAttributeRevisionPageDocumentCover:
3210
+ type: object
3211
+ properties:
3212
+ before:
3213
+ $ref: "#/components/schemas/RevisionPageDocumentCover"
3214
+ after:
3215
+ $ref: "#/components/schemas/RevisionPageDocumentCover"
3216
+ ChangeAttributeRevisionPageLayout:
3217
+ type: object
3218
+ properties:
3219
+ before:
3220
+ $ref: "#/components/schemas/RevisionPageLayout"
3221
+ after:
3222
+ $ref: "#/components/schemas/RevisionPageLayout"
3223
+ ChangeAttributeString:
3224
+ type: object
3225
+ properties:
3226
+ before:
3227
+ type: string
3228
+ after:
3229
+ type: string
3230
+ ChangedRevisionFile:
3231
+ type: object
3232
+ properties:
3233
+ id:
3234
+ type: string
3235
+ name:
3236
+ type: string
3237
+ contentType:
3238
+ type: string
3239
+ downloadURL:
3240
+ type: string
3241
+ required:
3242
+ - id
3243
+ - name
3244
+ - contentType
3245
+ - downloadURL
3246
+ ChangedRevisionPage:
3247
+ type: object
3248
+ properties:
3249
+ id:
3250
+ type: string
3251
+ type:
3252
+ $ref: "#/components/schemas/RevisionPageType"
3253
+ title:
3254
+ type: string
3255
+ path:
3256
+ type: string
3257
+ required:
3258
+ - id
3259
+ - type
3260
+ - title
3261
+ RevisionFileChangeAttributes:
3262
+ type: object
3263
+ minProperties: 1
3264
+ properties:
3265
+ name:
3266
+ $ref: "#/components/schemas/ChangeAttributeString"
3267
+ downloadURL:
3268
+ $ref: "#/components/schemas/ChangeAttributeString"
3269
+ size:
3270
+ $ref: "#/components/schemas/ChangeAttributeNumber"
3271
+ contentType:
3272
+ $ref: "#/components/schemas/ChangeAttributeString"
3273
+ dimensions:
3274
+ $ref: "#/components/schemas/ChangeAttributeRevisionFileImageDimensions"
3275
+ RevisionPageDocumentChangeAttributes:
3276
+ type: object
3277
+ minProperties: 1
3278
+ properties:
3279
+ title:
3280
+ $ref: "#/components/schemas/ChangeAttributeString"
3281
+ description:
3282
+ $ref: "#/components/schemas/ChangeAttributeString"
3283
+ slug:
3284
+ $ref: "#/components/schemas/ChangeAttributeString"
3285
+ document:
3286
+ $ref: "#/components/schemas/ChangeAttributeString"
3287
+ cover:
3288
+ $ref: "#/components/schemas/ChangeAttributeRevisionPageDocumentCover"
3289
+ emoji:
3290
+ $ref: "#/components/schemas/ChangeAttributeString"
3291
+ layout:
3292
+ $ref: "#/components/schemas/ChangeAttributeRevisionPageLayout"
3293
+ customFields:
3294
+ $ref: "#/components/schemas/ChangeAttributeCustomFields"
3295
+ RevisionPageGroupChangeAttributes:
3296
+ type: object
3297
+ minProperties: 1
3298
+ properties:
3299
+ title:
3300
+ $ref: "#/components/schemas/ChangeAttributeString"
3301
+ emoji:
3302
+ $ref: "#/components/schemas/ChangeAttributeString"
3303
+ slug:
3304
+ $ref: "#/components/schemas/ChangeAttributeString"
3305
+ customFields:
3306
+ $ref: "#/components/schemas/ChangeAttributeCustomFields"
3307
+ RevisionPageLinkChangeAttributes:
3308
+ type: object
3309
+ minProperties: 1
3310
+ properties:
3311
+ title:
3312
+ $ref: "#/components/schemas/ChangeAttributeString"
3313
+ emoji:
3314
+ $ref: "#/components/schemas/ChangeAttributeString"
3315
+ target:
3316
+ $ref: "#/components/schemas/ChangeAttributeContentReference"
3317
+ customFields:
3318
+ $ref: "#/components/schemas/ChangeAttributeCustomFields"
3319
+ RevisionSemanticChange:
3320
+ oneOf:
3321
+ - $ref: "#/components/schemas/RevisionSemanticChangePageCreated"
3322
+ - $ref: "#/components/schemas/RevisionSemanticChangePageEdited"
3323
+ - $ref: "#/components/schemas/RevisionSemanticChangePageDeleted"
3324
+ - $ref: "#/components/schemas/RevisionSemanticChangePageMoved"
3325
+ - $ref: "#/components/schemas/RevisionSemanticChangeFileCreated"
3326
+ - $ref: "#/components/schemas/RevisionSemanticChangeFileEdited"
3327
+ - $ref: "#/components/schemas/RevisionSemanticChangeFileDeleted"
3328
+ - $ref: "#/components/schemas/RevisionSemanticChangeCustomFieldsEdited"
3329
+ RevisionSemanticChangeCustomFieldsEdited:
3330
+ type: object
3331
+ properties:
3332
+ type:
3333
+ type: string
3334
+ enum:
3335
+ - custom_fields_edited
3336
+ customFields:
3337
+ $ref: "#/components/schemas/ChangeAttributeCustomFields"
3338
+ required:
3339
+ - type
3340
+ - customFields
3341
+ RevisionSemanticChangeFileCreated:
3342
+ type: object
3343
+ properties:
3344
+ type:
3345
+ type: string
3346
+ enum:
3347
+ - file_created
3348
+ file:
3349
+ $ref: "#/components/schemas/ChangedRevisionFile"
3350
+ required:
3351
+ - type
3352
+ - file
3353
+ RevisionSemanticChangeFileDeleted:
3354
+ type: object
3355
+ properties:
3356
+ type:
3357
+ type: string
3358
+ enum:
3359
+ - file_deleted
3360
+ file:
3361
+ $ref: "#/components/schemas/ChangedRevisionFile"
3362
+ required:
3363
+ - type
3364
+ - file
3365
+ RevisionSemanticChangeFileEdited:
3366
+ type: object
3367
+ properties:
3368
+ type:
3369
+ type: string
3370
+ enum:
3371
+ - file_edited
3372
+ file:
3373
+ $ref: "#/components/schemas/ChangedRevisionFile"
3374
+ attributes:
3375
+ $ref: "#/components/schemas/RevisionFileChangeAttributes"
3376
+ required:
3377
+ - type
3378
+ - file
3379
+ - attributes
3380
+ RevisionSemanticChangePageCreated:
3381
+ type: object
3382
+ properties:
3383
+ type:
3384
+ type: string
3385
+ enum:
3386
+ - page_created
3387
+ page:
3388
+ $ref: "#/components/schemas/ChangedRevisionPage"
3389
+ required:
3390
+ - type
3391
+ - page
3392
+ RevisionSemanticChangePageDeleted:
3393
+ type: object
3394
+ properties:
3395
+ type:
3396
+ type: string
3397
+ enum:
3398
+ - page_deleted
3399
+ page:
3400
+ $ref: "#/components/schemas/ChangedRevisionPage"
3401
+ required:
3402
+ - type
3403
+ - page
3404
+ RevisionSemanticChangePageEdited:
3405
+ type: object
3406
+ properties:
3407
+ type:
3408
+ type: string
3409
+ enum:
3410
+ - page_edited
3411
+ page:
3412
+ $ref: "#/components/schemas/ChangedRevisionPage"
3413
+ attributes:
3414
+ oneOf:
3415
+ - $ref: "#/components/schemas/RevisionPageDocumentChangeAttributes"
3416
+ - $ref: "#/components/schemas/RevisionPageGroupChangeAttributes"
3417
+ - $ref: "#/components/schemas/RevisionPageLinkChangeAttributes"
3418
+ required:
3419
+ - type
3420
+ - page
3421
+ - attributes
3422
+ RevisionSemanticChangePageMoved:
3423
+ type: object
3424
+ properties:
3425
+ type:
3426
+ type: string
3427
+ enum:
3428
+ - page_moved
3429
+ page:
3430
+ $ref: "#/components/schemas/ChangedRevisionPage"
3431
+ parent:
3432
+ type: object
3433
+ properties:
3434
+ before:
3435
+ $ref: "#/components/schemas/ChangedRevisionPage"
3436
+ after:
3437
+ $ref: "#/components/schemas/ChangedRevisionPage"
3438
+ required:
3439
+ - type
3440
+ - page
3441
+ - parent
3442
+ RevisionSemanticChangeType:
3443
+ type: string
3444
+ description: The type of semantic change.
3445
+ enum:
3446
+ - page_created
3447
+ - page_edited
3448
+ - page_deleted
3449
+ - page_moved
3450
+ - file_created
3451
+ - file_edited
3452
+ - file_deleted
3453
+ - custom_fields_edited
3041
3454
  GitSyncState:
3042
3455
  type: object
3043
3456
  properties:
@@ -3461,9 +3874,9 @@ components:
3461
3874
  oneOf:
3462
3875
  - type: string
3463
3876
  enum:
3464
- - meeting
3465
3877
  - thread
3466
3878
  - walkthrough
3879
+ - document
3467
3880
  BaseCaptureEvent:
3468
3881
  type: object
3469
3882
  properties:
@@ -3608,28 +4021,174 @@ components:
3608
4021
  body:
3609
4022
  description: Content of the capture.
3610
4023
  $ref: "#/components/schemas/Document"
3611
- ChangeRequest:
3612
- type: object
3613
- properties:
3614
- object:
3615
- type: string
3616
- description: Type of Object, always equals to "change-request"
3617
- enum:
3618
- - change-request
3619
- id:
3620
- type: string
3621
- description: Unique identifier for the change request
3622
- number:
3623
- type: number
3624
- description: Incremental identifier of the change request
3625
- status:
3626
- $ref: "#/components/schemas/ChangeRequestStatus"
3627
- subject:
3628
- type: string
3629
- description: Subject of the change request
3630
- minLength: 0
3631
- maxLength: 100
3632
- createdBy:
4024
+ Snippet:
4025
+ allOf:
4026
+ - $ref: "#/components/schemas/Document"
4027
+ - type: object
4028
+ properties:
4029
+ id:
4030
+ type: string
4031
+ description: Unique identifier for the snippet
4032
+ createdAt:
4033
+ type: string
4034
+ format: date-time
4035
+ editedAt:
4036
+ type: string
4037
+ format: date-time
4038
+ description: Timestamp of when the snippet was last edited, if it has been edited since its creation.
4039
+ title:
4040
+ type: string
4041
+ description: Title describing the snippet.
4042
+ maxLength: 100
4043
+ source:
4044
+ description: The source of the snippet.
4045
+ type: object
4046
+ properties:
4047
+ sourceId:
4048
+ type: string
4049
+ description: An ID identifying the source, unique across all sources.
4050
+ name:
4051
+ type: string
4052
+ description: A display name for the source.
4053
+ externalId:
4054
+ type: string
4055
+ description: An ID identifying the snippet in the source system, if available.
4056
+ externalUrl:
4057
+ description: URL of the snippet in the source system, if available.
4058
+ $ref: "#/components/schemas/URL"
4059
+ required:
4060
+ - sourceId
4061
+ - name
4062
+ contributors:
4063
+ description: An array of contributors to the snippet, which can be either users or integrations. The first contributor is the one who created the snippet.
4064
+ type: array
4065
+ minItems: 1
4066
+ items:
4067
+ oneOf:
4068
+ - $ref: "#/components/schemas/Integration"
4069
+ - $ref: "#/components/schemas/User"
4070
+ urls:
4071
+ type: object
4072
+ description: URLs associated with the object
4073
+ properties:
4074
+ location:
4075
+ description: URL of the snippet in the API
4076
+ $ref: "#/components/schemas/URL"
4077
+ app:
4078
+ description: URL of the snippet in the app
4079
+ $ref: "#/components/schemas/URL"
4080
+ required:
4081
+ - location
4082
+ - app
4083
+ required:
4084
+ - id
4085
+ - source
4086
+ - createdAt
4087
+ - contributors
4088
+ - urls
4089
+ UpdateSnippetSchema:
4090
+ type: object
4091
+ properties:
4092
+ title:
4093
+ type: string
4094
+ description: A new title for the snippet.
4095
+ body:
4096
+ description: Content of the snippet.
4097
+ $ref: "#/components/schemas/Document"
4098
+ ContentAuditRelation:
4099
+ type: object
4100
+ description: Content audit relation
4101
+ properties:
4102
+ id:
4103
+ type: string
4104
+ sources:
4105
+ description: The sources that are related
4106
+ type: array
4107
+ items:
4108
+ $ref: "#/components/schemas/ContentAuditSource"
4109
+ type:
4110
+ description: The type of the relation between the sources
4111
+ $ref: "#/components/schemas/ContentAuditRelationType"
4112
+ reason:
4113
+ type: string
4114
+ description: A human readable description of the reason for the relation
4115
+ status:
4116
+ description: The status of the relation
4117
+ $ref: "#/components/schemas/ContentAuditRelationStatus"
4118
+ createdAt:
4119
+ description: The date at which the relation was created
4120
+ $ref: "#/components/schemas/Date"
4121
+ required:
4122
+ - id
4123
+ - sources
4124
+ - type
4125
+ - status
4126
+ - createdAt
4127
+ ContentAuditRelationType:
4128
+ description: The type of the relation between the sources
4129
+ oneOf:
4130
+ - type: string
4131
+ enum:
4132
+ - contradiction
4133
+ - duplicate
4134
+ ContentAuditRelationStatus:
4135
+ description: Status of the audit relation to filter on
4136
+ oneOf:
4137
+ - type: string
4138
+ enum:
4139
+ - pending
4140
+ - rejected
4141
+ ContentAuditRelationStatusUpdate:
4142
+ type: object
4143
+ properties:
4144
+ status:
4145
+ $ref: "#/components/schemas/ContentAuditRelationStatus"
4146
+ required:
4147
+ - status
4148
+ ContentAuditSource:
4149
+ oneOf:
4150
+ - $ref: "#/components/schemas/ContentAuditSourceSection"
4151
+ ContentAuditSourceSection:
4152
+ type: object
4153
+ description: A GitBook section source
4154
+ properties:
4155
+ id:
4156
+ type: string
4157
+ type:
4158
+ type: string
4159
+ enum:
4160
+ - section
4161
+ space:
4162
+ $ref: "#/components/schemas/Space"
4163
+ page:
4164
+ $ref: "#/components/schemas/RevisionPageDocument"
4165
+ required:
4166
+ - id
4167
+ - type
4168
+ - space
4169
+ - page
4170
+ ChangeRequest:
4171
+ type: object
4172
+ properties:
4173
+ object:
4174
+ type: string
4175
+ description: Type of Object, always equals to "change-request"
4176
+ enum:
4177
+ - change-request
4178
+ id:
4179
+ type: string
4180
+ description: Unique identifier for the change request
4181
+ number:
4182
+ type: number
4183
+ description: Incremental identifier of the change request
4184
+ status:
4185
+ $ref: "#/components/schemas/ChangeRequestStatus"
4186
+ subject:
4187
+ type: string
4188
+ description: Subject of the change request
4189
+ minLength: 0
4190
+ maxLength: 100
4191
+ createdBy:
3633
4192
  $ref: "#/components/schemas/User"
3634
4193
  createdAt:
3635
4194
  $ref: "#/components/schemas/Date"
@@ -4142,28 +4701,33 @@ components:
4142
4701
  - score
4143
4702
  - total
4144
4703
  - rating
4704
+ - ponderedScore
4145
4705
  - bad
4146
4706
  - ok
4147
4707
  - good
4148
4708
  properties:
4149
4709
  score:
4150
4710
  type: number
4151
- description: Score between 0 and 4.
4711
+ description: Score based on each rating (+1 for 'good', -0.5 for 'ok', -2 for 'bad').
4152
4712
  total:
4153
4713
  type: number
4714
+ description: Total number of ratings done by end users.
4154
4715
  rating:
4155
4716
  type: string
4156
- enum:
4157
- - unknown
4158
- - bad
4159
- - ok
4160
- - good
4717
+ deprecated: true
4718
+ description: Summary of the rating based on the score ('good', 'ok', or 'bad')
4719
+ ponderedScore:
4720
+ type: number
4721
+ description: Score multiplied by the number of ratings to give more importance to highly rated content.
4161
4722
  bad:
4162
4723
  type: number
4724
+ description: Number of 'bad' ratings.
4163
4725
  ok:
4164
4726
  type: number
4727
+ description: Number of 'ok' ratings.
4165
4728
  good:
4166
4729
  type: number
4730
+ description: Number of 'good' ratings.
4167
4731
  Collection:
4168
4732
  type: object
4169
4733
  properties:
@@ -4341,6 +4905,7 @@ components:
4341
4905
  type: string
4342
4906
  enum:
4343
4907
  - entities:write
4908
+ - snippets:read
4344
4909
  - capture:write
4345
4910
  - space:views:read
4346
4911
  - space:content:read
@@ -6752,6 +7317,7 @@ components:
6752
7317
  - $ref: "#/components/schemas/OrganizationEntitiesChannel"
6753
7318
  - $ref: "#/components/schemas/OrganizationSchemasChannel"
6754
7319
  - $ref: "#/components/schemas/OrganizationCapturesChannel"
7320
+ - $ref: "#/components/schemas/OrganizationContentAuditsChannel"
6755
7321
  - $ref: "#/components/schemas/OrganizationIntegrationsChannel"
6756
7322
  - $ref: "#/components/schemas/OrganizationInstallationsChannel"
6757
7323
  - type: object
@@ -7136,6 +7702,18 @@ components:
7136
7702
  required:
7137
7703
  - channel
7138
7704
  - organization
7705
+ OrganizationContentAuditsChannel:
7706
+ type: object
7707
+ properties:
7708
+ channel:
7709
+ type: string
7710
+ enum:
7711
+ - organization-content-audits
7712
+ organization:
7713
+ type: string
7714
+ required:
7715
+ - channel
7716
+ - organization
7139
7717
  OrganizationIntegrationsChannel:
7140
7718
  type: object
7141
7719
  properties:
@@ -7656,21 +8234,6 @@ components:
7656
8234
  required:
7657
8235
  - code
7658
8236
  - message
7659
- ContentFilesResponse:
7660
- description: OK
7661
- content:
7662
- application/json:
7663
- schema:
7664
- allOf:
7665
- - $ref: "#/components/schemas/List"
7666
- - type: object
7667
- required:
7668
- - items
7669
- properties:
7670
- items:
7671
- type: array
7672
- items:
7673
- $ref: "#/components/schemas/RevisionFile"
7674
8237
  paths:
7675
8238
  /:
7676
8239
  get:
@@ -8224,9 +8787,31 @@ paths:
8224
8787
  application/json:
8225
8788
  schema:
8226
8789
  $ref: "#/components/schemas/RequestImportContent"
8790
+ "/spaces/{spaceId}/content/pages":
8791
+ get:
8792
+ summary: List all pages for the main revision content of a space
8793
+ operationId: listPages
8794
+ security:
8795
+ - user: []
8796
+ parameters:
8797
+ - $ref: "#/components/parameters/spaceId"
8798
+ responses:
8799
+ "200":
8800
+ description: OK
8801
+ content:
8802
+ application/json:
8803
+ schema:
8804
+ type: object
8805
+ properties:
8806
+ pages:
8807
+ type: array
8808
+ items:
8809
+ $ref: "#/components/schemas/RevisionPage"
8810
+ default:
8811
+ $ref: "#/components/responses/UnexpectedError"
8227
8812
  "/spaces/{spaceId}/content/files":
8228
8813
  get:
8229
- summary: List all files for the latest primary revision content for a space
8814
+ summary: List all files for the main revision content of a space
8230
8815
  operationId: listFiles
8231
8816
  security:
8232
8817
  - user: []
@@ -8236,7 +8821,38 @@ paths:
8236
8821
  - $ref: "#/components/parameters/listLimit"
8237
8822
  responses:
8238
8823
  "200":
8239
- $ref: "#/components/responses/ContentFilesResponse"
8824
+ description: OK
8825
+ content:
8826
+ application/json:
8827
+ schema:
8828
+ allOf:
8829
+ - $ref: "#/components/schemas/List"
8830
+ - type: object
8831
+ required:
8832
+ - items
8833
+ properties:
8834
+ items:
8835
+ type: array
8836
+ items:
8837
+ $ref: "#/components/schemas/RevisionFile"
8838
+ default:
8839
+ $ref: "#/components/responses/UnexpectedError"
8840
+ "/spaces/{spaceId}/content/files/{fileId}":
8841
+ get:
8842
+ summary: Get a file by its ID in the main revision of a space
8843
+ operationId: getFileById
8844
+ security:
8845
+ - user: []
8846
+ parameters:
8847
+ - $ref: "#/components/parameters/spaceId"
8848
+ - $ref: "#/components/parameters/fileId"
8849
+ responses:
8850
+ "200":
8851
+ description: OK
8852
+ content:
8853
+ application/json:
8854
+ schema:
8855
+ $ref: "#/components/schemas/RevisionFile"
8240
8856
  default:
8241
8857
  $ref: "#/components/responses/UnexpectedError"
8242
8858
  "/spaces/{spaceId}/content/page/{pageId}":
@@ -8944,9 +9560,32 @@ paths:
8944
9560
  application/json:
8945
9561
  schema:
8946
9562
  $ref: "#/components/schemas/RequestImportContent"
9563
+ "/spaces/{spaceId}/change-requests/{changeRequestId}/content/pages":
9564
+ get:
9565
+ summary: List all pages in the content of a change request
9566
+ operationId: listPagesInChangeRequest
9567
+ security:
9568
+ - user: []
9569
+ parameters:
9570
+ - $ref: "#/components/parameters/spaceId"
9571
+ - $ref: "#/components/parameters/changeRequestId"
9572
+ responses:
9573
+ "200":
9574
+ description: OK
9575
+ content:
9576
+ application/json:
9577
+ schema:
9578
+ type: object
9579
+ properties:
9580
+ pages:
9581
+ type: array
9582
+ items:
9583
+ $ref: "#/components/schemas/RevisionPage"
9584
+ default:
9585
+ $ref: "#/components/responses/UnexpectedError"
8947
9586
  "/spaces/{spaceId}/change-requests/{changeRequestId}/content/files":
8948
9587
  get:
8949
- summary: List all files in the latest content of the change-request
9588
+ summary: List all files in a change request content
8950
9589
  operationId: listFilesInChangeRequestById
8951
9590
  security:
8952
9591
  - user: []
@@ -8957,7 +9596,39 @@ paths:
8957
9596
  - $ref: "#/components/parameters/listLimit"
8958
9597
  responses:
8959
9598
  "200":
8960
- $ref: "#/components/responses/ContentFilesResponse"
9599
+ description: OK
9600
+ content:
9601
+ application/json:
9602
+ schema:
9603
+ allOf:
9604
+ - $ref: "#/components/schemas/List"
9605
+ - type: object
9606
+ required:
9607
+ - items
9608
+ properties:
9609
+ items:
9610
+ type: array
9611
+ items:
9612
+ $ref: "#/components/schemas/RevisionFile"
9613
+ default:
9614
+ $ref: "#/components/responses/UnexpectedError"
9615
+ "/spaces/{spaceId}/change-requests/{changeRequestId}/content/files/{fileId}":
9616
+ get:
9617
+ summary: Get a file by its ID in the content of a change request
9618
+ operationId: getFileInChangeRequestById
9619
+ security:
9620
+ - user: []
9621
+ parameters:
9622
+ - $ref: "#/components/parameters/spaceId"
9623
+ - $ref: "#/components/parameters/changeRequestId"
9624
+ - $ref: "#/components/parameters/fileId"
9625
+ responses:
9626
+ "200":
9627
+ description: OK
9628
+ content:
9629
+ application/json:
9630
+ schema:
9631
+ $ref: "#/components/schemas/RevisionFile"
8961
9632
  default:
8962
9633
  $ref: "#/components/responses/UnexpectedError"
8963
9634
  "/spaces/{spaceId}/change-requests/{changeRequestId}/content/page/{pageId}":
@@ -9050,6 +9721,68 @@ paths:
9050
9721
  $ref: "#/components/schemas/Revision"
9051
9722
  default:
9052
9723
  $ref: "#/components/responses/UnexpectedError"
9724
+ "/spaces/{spaceId}/revisions/{revisionId}/changes":
9725
+ get:
9726
+ summary: Return the semantic changes between a revision and its parent.
9727
+ operationId: getRevisionSemanticChanges
9728
+ security:
9729
+ - user: []
9730
+ parameters:
9731
+ - $ref: "#/components/parameters/spaceId"
9732
+ - $ref: "#/components/parameters/revisionId"
9733
+ - name: limit
9734
+ in: query
9735
+ description: Limit the number of changes returned
9736
+ schema:
9737
+ type: number
9738
+ default: 10
9739
+ - name: metadata
9740
+ in: query
9741
+ description: Whether to include changes to metadata, such as git information and custom fields
9742
+ schema:
9743
+ type: boolean
9744
+ default: true
9745
+ responses:
9746
+ "200":
9747
+ description: OK
9748
+ content:
9749
+ application/json:
9750
+ schema:
9751
+ type: object
9752
+ properties:
9753
+ changes:
9754
+ type: array
9755
+ items:
9756
+ $ref: "#/components/schemas/RevisionSemanticChange"
9757
+ more:
9758
+ type: number
9759
+ description: How many changes were omitted because above the result limit
9760
+ required:
9761
+ - changes
9762
+ default:
9763
+ $ref: "#/components/responses/UnexpectedError"
9764
+ "/spaces/{spaceId}/revisions/{revisionId}/pages":
9765
+ get:
9766
+ summary: List all pages in a revision
9767
+ operationId: listPagesInRevisionById
9768
+ security:
9769
+ - user: []
9770
+ parameters:
9771
+ - $ref: "#/components/parameters/spaceId"
9772
+ responses:
9773
+ "200":
9774
+ description: OK
9775
+ content:
9776
+ application/json:
9777
+ schema:
9778
+ type: object
9779
+ properties:
9780
+ pages:
9781
+ type: array
9782
+ items:
9783
+ $ref: "#/components/schemas/RevisionPage"
9784
+ default:
9785
+ $ref: "#/components/responses/UnexpectedError"
9053
9786
  "/spaces/{spaceId}/revisions/{revisionId}/files":
9054
9787
  get:
9055
9788
  summary: List all files in a revision
@@ -9063,7 +9796,39 @@ paths:
9063
9796
  - $ref: "#/components/parameters/listLimit"
9064
9797
  responses:
9065
9798
  "200":
9066
- $ref: "#/components/responses/ContentFilesResponse"
9799
+ description: OK
9800
+ content:
9801
+ application/json:
9802
+ schema:
9803
+ allOf:
9804
+ - $ref: "#/components/schemas/List"
9805
+ - type: object
9806
+ required:
9807
+ - items
9808
+ properties:
9809
+ items:
9810
+ type: array
9811
+ items:
9812
+ $ref: "#/components/schemas/RevisionFile"
9813
+ default:
9814
+ $ref: "#/components/responses/UnexpectedError"
9815
+ "/spaces/{spaceId}/revisions/{revisionId}/files/{fileId}":
9816
+ get:
9817
+ summary: Get a file in a revision by its ID
9818
+ operationId: getFileInRevisionById
9819
+ security:
9820
+ - user: []
9821
+ parameters:
9822
+ - $ref: "#/components/parameters/spaceId"
9823
+ - $ref: "#/components/parameters/revisionId"
9824
+ - $ref: "#/components/parameters/fileId"
9825
+ responses:
9826
+ "200":
9827
+ description: OK
9828
+ content:
9829
+ application/json:
9830
+ schema:
9831
+ $ref: "#/components/schemas/RevisionFile"
9067
9832
  default:
9068
9833
  $ref: "#/components/responses/UnexpectedError"
9069
9834
  "/spaces/{spaceId}/revisions/{revisionId}/page/{pageId}":
@@ -11831,7 +12596,8 @@ paths:
11831
12596
  "/orgs/{organizationId}/captures":
11832
12597
  get:
11833
12598
  operationId: listCaptures
11834
- summary: List captures
12599
+ deprecated: true
12600
+ summary: List captures. Deprecated, use listSnippets instead.
11835
12601
  description: |
11836
12602
  List captures in an organization, newest first.
11837
12603
  tags:
@@ -11914,7 +12680,8 @@ paths:
11914
12680
  "/orgs/{organizationId}/captures/{captureId}":
11915
12681
  get:
11916
12682
  operationId: getCapture
11917
- summary: Get a capture by its ID
12683
+ deprecated: true
12684
+ summary: Get a capture by its ID. Deprecated, use getSnippet instead.
11918
12685
  tags:
11919
12686
  - organizations
11920
12687
  security:
@@ -11934,7 +12701,8 @@ paths:
11934
12701
  $ref: "#/components/responses/UnexpectedError"
11935
12702
  delete:
11936
12703
  operationId: deleteCapture
11937
- summary: Delete a capture by its ID
12704
+ deprecated: true
12705
+ summary: Delete a capture by its ID. Deprecated, use deleteSnippet.
11938
12706
  tags:
11939
12707
  - organizations
11940
12708
  security:
@@ -11949,7 +12717,8 @@ paths:
11949
12717
  $ref: "#/components/responses/UnexpectedError"
11950
12718
  put:
11951
12719
  operationId: updateCapture
11952
- summary: Update an existing capture
12720
+ deprecated: true
12721
+ summary: Update an existing capture. Deprecated, use updateSnippet.
11953
12722
  tags:
11954
12723
  - organizations
11955
12724
  security:
@@ -12038,6 +12807,134 @@ paths:
12038
12807
  - capture
12039
12808
  default:
12040
12809
  $ref: "#/components/responses/UnexpectedError"
12810
+ "/orgs/{organizationId}/snippets":
12811
+ get:
12812
+ operationId: listSnippets
12813
+ summary: Lists snippets.
12814
+ description: |
12815
+ List snippets in an organization, newest first.
12816
+ tags:
12817
+ - organizations
12818
+ security:
12819
+ - user: []
12820
+ parameters:
12821
+ - $ref: "#/components/parameters/organizationId"
12822
+ - $ref: "#/components/parameters/pageFormat"
12823
+ - $ref: "#/components/parameters/listPage"
12824
+ - $ref: "#/components/parameters/listLimit"
12825
+ - name: source
12826
+ in: query
12827
+ description: If specified, only snippets from the specified source will be returned.
12828
+ schema:
12829
+ type: string
12830
+ responses:
12831
+ "200":
12832
+ description: OK
12833
+ content:
12834
+ application/json:
12835
+ schema:
12836
+ allOf:
12837
+ - $ref: "#/components/schemas/List"
12838
+ - type: object
12839
+ required:
12840
+ - items
12841
+ properties:
12842
+ items:
12843
+ type: array
12844
+ items:
12845
+ $ref: "#/components/schemas/Snippet"
12846
+ default:
12847
+ $ref: "#/components/responses/UnexpectedError"
12848
+ post:
12849
+ operationId: createSnippet
12850
+ summary: Create a new snippet
12851
+ tags:
12852
+ - organizations
12853
+ security:
12854
+ - user: []
12855
+ parameters:
12856
+ - $ref: "#/components/parameters/organizationId"
12857
+ requestBody:
12858
+ content:
12859
+ application/json:
12860
+ schema:
12861
+ type: object
12862
+ responses:
12863
+ "201":
12864
+ description: Snippet created
12865
+ headers:
12866
+ Location:
12867
+ description: API URL for the newly created snippet
12868
+ schema:
12869
+ type: string
12870
+ content:
12871
+ application/json:
12872
+ schema:
12873
+ $ref: "#/components/schemas/Snippet"
12874
+ default:
12875
+ $ref: "#/components/responses/UnexpectedError"
12876
+ "/orgs/{organizationId}/snippets/{snippetId}":
12877
+ get:
12878
+ operationId: getSnippet
12879
+ summary: Get a snippet by its ID
12880
+ tags:
12881
+ - organizations
12882
+ security:
12883
+ - user: []
12884
+ parameters:
12885
+ - $ref: "#/components/parameters/organizationId"
12886
+ - $ref: "#/components/parameters/snippetId"
12887
+ - $ref: "#/components/parameters/pageFormat"
12888
+ responses:
12889
+ "200":
12890
+ description: OK
12891
+ content:
12892
+ application/json:
12893
+ schema:
12894
+ $ref: "#/components/schemas/Snippet"
12895
+ default:
12896
+ $ref: "#/components/responses/UnexpectedError"
12897
+ delete:
12898
+ operationId: deleteSnippet
12899
+ summary: Delete a snippet by its ID.
12900
+ tags:
12901
+ - organizations
12902
+ security:
12903
+ - user: []
12904
+ parameters:
12905
+ - $ref: "#/components/parameters/organizationId"
12906
+ - $ref: "#/components/parameters/snippetId"
12907
+ responses:
12908
+ "200":
12909
+ description: OK
12910
+ default:
12911
+ $ref: "#/components/responses/UnexpectedError"
12912
+ put:
12913
+ operationId: updateSnippet
12914
+ summary: Update an existing snippet.
12915
+ tags:
12916
+ - organizations
12917
+ security:
12918
+ - user: []
12919
+ parameters:
12920
+ - $ref: "#/components/parameters/organizationId"
12921
+ - $ref: "#/components/parameters/snippetId"
12922
+ - $ref: "#/components/parameters/ifUnmodifiedSince"
12923
+ requestBody:
12924
+ required: true
12925
+ content:
12926
+ application/json:
12927
+ schema:
12928
+ $ref: "#/components/schemas/UpdateSnippetSchema"
12929
+ responses:
12930
+ "200":
12931
+ description: OK
12932
+ content:
12933
+ application/json:
12934
+ schema:
12935
+ $ref: "#/components/schemas/Snippet"
12936
+ default:
12937
+ $ref: "#/components/responses/UnexpectedError"
12041
12938
  "/orgs/{organizationId}/ask":
12042
12939
  post:
12043
12940
  operationId: askInOrganization
@@ -12064,6 +12961,108 @@ paths:
12064
12961
  $ref: "#/components/schemas/SearchAIAnswer"
12065
12962
  default:
12066
12963
  $ref: "#/components/responses/UnexpectedError"
12964
+ "/orgs/{organizationId}/insights/audit-relations":
12965
+ get:
12966
+ operationId: listContentAuditRelations
12967
+ summary: List the content relations for in a given organization.
12968
+ tags:
12969
+ - ai
12970
+ - spaces
12971
+ security:
12972
+ - user: []
12973
+ parameters:
12974
+ - $ref: "#/components/parameters/organizationId"
12975
+ - $ref: "#/components/parameters/listPage"
12976
+ - $ref: "#/components/parameters/listLimit"
12977
+ - name: status
12978
+ in: query
12979
+ required: false
12980
+ description: Status of the audit relation to filter on
12981
+ schema:
12982
+ $ref: "#/components/schemas/ContentAuditRelationStatus"
12983
+ default:
12984
+ - pending
12985
+ responses:
12986
+ "200":
12987
+ description: Content audit relations
12988
+ content:
12989
+ application/json:
12990
+ schema:
12991
+ allOf:
12992
+ - $ref: "#/components/schemas/List"
12993
+ - type: object
12994
+ required:
12995
+ - items
12996
+ properties:
12997
+ items:
12998
+ type: array
12999
+ items:
13000
+ $ref: "#/components/schemas/ContentAuditRelation"
13001
+ default:
13002
+ $ref: "#/components/responses/UnexpectedError"
13003
+ "/orgs/{organizationId}/insights/audit-relations/{relationId}":
13004
+ patch:
13005
+ operationId: updateContentAuditRelationStatusById
13006
+ summary: Update an audit relation status
13007
+ tags:
13008
+ - organizations
13009
+ security:
13010
+ - user: []
13011
+ parameters:
13012
+ - $ref: "#/components/parameters/organizationId"
13013
+ - name: relationId
13014
+ in: path
13015
+ required: true
13016
+ description: The id of the content audit relation
13017
+ schema:
13018
+ type: string
13019
+ requestBody:
13020
+ required: true
13021
+ content:
13022
+ application/json:
13023
+ schema:
13024
+ $ref: "#/components/schemas/ContentAuditRelationStatusUpdate"
13025
+ responses:
13026
+ "200":
13027
+ description: OK
13028
+ content:
13029
+ application/json:
13030
+ schema:
13031
+ $ref: "#/components/schemas/ContentAuditRelation"
13032
+ "404":
13033
+ description: No matching content relation found for given ID
13034
+ $ref: "#/components/responses/NotFoundError"
13035
+ default:
13036
+ $ref: "#/components/responses/UnexpectedError"
13037
+ "/orgs/{organizationId}/insights/audit-sources/{sourceId}/content":
13038
+ get:
13039
+ operationId: getContentAuditSourceContentById
13040
+ summary: Get the content of an audit source
13041
+ tags:
13042
+ - organizations
13043
+ security:
13044
+ - user: []
13045
+ parameters:
13046
+ - $ref: "#/components/parameters/organizationId"
13047
+ - name: sourceId
13048
+ in: path
13049
+ required: true
13050
+ description: The id of the content audit source
13051
+ schema:
13052
+ type: string
13053
+ - $ref: "#/components/parameters/pageFormat"
13054
+ responses:
13055
+ "200":
13056
+ description: OK
13057
+ content:
13058
+ application/json:
13059
+ schema:
13060
+ $ref: "#/components/schemas/Document"
13061
+ "404":
13062
+ description: No matching content source found for given ID
13063
+ $ref: "#/components/responses/NotFoundError"
13064
+ default:
13065
+ $ref: "#/components/responses/UnexpectedError"
12067
13066
  /internal/hive/token:
12068
13067
  post:
12069
13068
  operationId: generateHiveAccessToken
@@ -12159,3 +13158,31 @@ paths:
12159
13158
  $ref: "#/components/schemas/Embed"
12160
13159
  default:
12161
13160
  $ref: "#/components/responses/UnexpectedError"
13161
+ /urls/published:
13162
+ get:
13163
+ operationId: getPublishedContentByUrl
13164
+ summary: Resolve a URL of a published content.
13165
+ tags:
13166
+ - urls
13167
+ parameters:
13168
+ - name: url
13169
+ in: query
13170
+ required: true
13171
+ description: URL to resolve
13172
+ schema:
13173
+ $ref: "#/components/schemas/URL"
13174
+ - name: visitorAuthToken
13175
+ in: query
13176
+ required: false
13177
+ description: JWT token generated for a visitor auth session
13178
+ schema:
13179
+ type: string
13180
+ responses:
13181
+ "200":
13182
+ description: OK
13183
+ content:
13184
+ application/json:
13185
+ schema:
13186
+ $ref: "#/components/schemas/PublishedContentLookup"
13187
+ default:
13188
+ $ref: "#/components/responses/UnexpectedError"