@gitbook/api 0.12.0 → 0.13.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
@@ -241,6 +241,9 @@ components:
241
241
  URL:
242
242
  type: string
243
243
  format: uri
244
+ Color:
245
+ type: string
246
+ pattern: ^#(?:[0-9a-fA-F]{3}){1,2}$
244
247
  Date:
245
248
  type: string
246
249
  format: date
@@ -2962,11 +2965,14 @@ components:
2962
2965
  type: string
2963
2966
  enum:
2964
2967
  - link
2968
+ target:
2969
+ $ref: "#/components/schemas/ContentRef"
2965
2970
  href:
2966
2971
  type: string
2967
2972
  required:
2968
2973
  - kind
2969
2974
  - type
2975
+ - target
2970
2976
  RevisionFile:
2971
2977
  type: object
2972
2978
  properties:
@@ -4155,7 +4161,7 @@ components:
4155
4161
  type: string
4156
4162
  description: Title of the collection
4157
4163
  minLength: 0
4158
- maxLength: 100
4164
+ maxLength: 50
4159
4165
  path:
4160
4166
  type: string
4161
4167
  description: Path in the published URL
@@ -4165,17 +4171,38 @@ components:
4165
4171
  type: string
4166
4172
  enum:
4167
4173
  - variants
4168
- primarySpace:
4174
+ organization:
4169
4175
  type: string
4170
- description: ID of the primary space for this collection
4176
+ description: ID of the organization owning this collection
4177
+ parent:
4178
+ type: string
4179
+ description: ID of the parent collection, if any
4171
4180
  collection:
4172
4181
  type: string
4182
+ deprecated: true
4173
4183
  description: ID of the parent collection, if any
4184
+ urls:
4185
+ type: object
4186
+ description: URLs associated with the object
4187
+ properties:
4188
+ location:
4189
+ type: string
4190
+ description: URL of the collection in the API
4191
+ format: uri
4192
+ app:
4193
+ type: string
4194
+ description: URL of the collection in the application
4195
+ format: uri
4196
+ required:
4197
+ - app
4198
+ - location
4174
4199
  required:
4175
4200
  - object
4176
4201
  - id
4177
4202
  - title
4203
+ - organization
4178
4204
  - visibility
4205
+ - urls
4179
4206
  Integration:
4180
4207
  type: object
4181
4208
  properties:
@@ -5668,6 +5695,75 @@ components:
5668
5695
  required:
5669
5696
  - authURL
5670
5697
  - impersonatorId
5698
+ UserPermissions:
5699
+ type: object
5700
+ description: All the permissions of a user
5701
+ properties:
5702
+ updatedAt:
5703
+ $ref: "#/components/schemas/Date"
5704
+ searchKey:
5705
+ type: string
5706
+ organizations:
5707
+ type: object
5708
+ additionalProperties:
5709
+ type: object
5710
+ description: The organizations permissions of a user
5711
+ properties:
5712
+ role:
5713
+ $ref: "#/components/schemas/MemberRoleOrGuest"
5714
+ teams:
5715
+ type: object
5716
+ additionalProperties:
5717
+ type: object
5718
+ description: The teams permissions of a user
5719
+ properties:
5720
+ role:
5721
+ $ref: "#/components/schemas/TeamMemberRole"
5722
+ required:
5723
+ - role
5724
+ required:
5725
+ - role
5726
+ disabled:
5727
+ type: boolean
5728
+ required:
5729
+ - role
5730
+ - teams
5731
+ collections:
5732
+ type: object
5733
+ additionalProperties:
5734
+ type: object
5735
+ description: The collections permissions of a user
5736
+ properties:
5737
+ organization:
5738
+ type: string
5739
+ level:
5740
+ $ref: "#/components/schemas/MemberRoleOrGuest"
5741
+ collection:
5742
+ type: string
5743
+ required:
5744
+ - organization
5745
+ - level
5746
+ spaces:
5747
+ type: object
5748
+ additionalProperties:
5749
+ type: object
5750
+ description: The spaces permissions of a user
5751
+ properties:
5752
+ organization:
5753
+ type: string
5754
+ level:
5755
+ $ref: "#/components/schemas/MemberRoleOrGuest"
5756
+ collection:
5757
+ type: string
5758
+ required:
5759
+ - organization
5760
+ - level
5761
+ required:
5762
+ - updatedAt
5763
+ - searchKey
5764
+ - organizations
5765
+ - collections
5766
+ - spaces
5671
5767
  UserRiskEvaluation:
5672
5768
  type: object
5673
5769
  description: The GitBook User risk evaluation.
@@ -6617,6 +6713,7 @@ components:
6617
6713
  - $ref: "#/components/schemas/SpaceInfoChannel"
6618
6714
  - $ref: "#/components/schemas/SpaceGitInfoChannel"
6619
6715
  - $ref: "#/components/schemas/SpacePublishingAuthChannel"
6716
+ - $ref: "#/components/schemas/SpacePublishingCustomizationChannel"
6620
6717
  - $ref: "#/components/schemas/SpaceEntitiesChannel"
6621
6718
  - $ref: "#/components/schemas/SpaceCustomFieldsChannel"
6622
6719
  - $ref: "#/components/schemas/BackofficeUserInfoChannel"
@@ -6625,6 +6722,7 @@ components:
6625
6722
  - $ref: "#/components/schemas/UserAPITokensChannel"
6626
6723
  - $ref: "#/components/schemas/UserProfileChannel"
6627
6724
  - $ref: "#/components/schemas/ChangeRequestReviewsChannel"
6725
+ - $ref: "#/components/schemas/CollectionPublishingCustomizationChannel"
6628
6726
  - $ref: "#/components/schemas/OrganizationMembersChannel"
6629
6727
  - $ref: "#/components/schemas/OrganizationMemberChannel"
6630
6728
  - $ref: "#/components/schemas/OrganizationTeamsChannel"
@@ -6632,6 +6730,7 @@ components:
6632
6730
  - $ref: "#/components/schemas/OrganizationTeamMembersChannel"
6633
6731
  - $ref: "#/components/schemas/OrganizationTeamMemberChannel"
6634
6732
  - $ref: "#/components/schemas/OrganizationSpacesChannel"
6733
+ - $ref: "#/components/schemas/OrganizationCollectionsChannel"
6635
6734
  - $ref: "#/components/schemas/OrganizationEntitiesChannel"
6636
6735
  - $ref: "#/components/schemas/OrganizationSchemasChannel"
6637
6736
  - $ref: "#/components/schemas/OrganizationCapturesChannel"
@@ -6743,6 +6842,18 @@ components:
6743
6842
  required:
6744
6843
  - channel
6745
6844
  - space
6845
+ SpacePublishingCustomizationChannel:
6846
+ type: object
6847
+ properties:
6848
+ channel:
6849
+ type: string
6850
+ enum:
6851
+ - space-publishing-customization
6852
+ space:
6853
+ type: string
6854
+ required:
6855
+ - channel
6856
+ - space
6746
6857
  SpaceEntitiesChannel:
6747
6858
  type: object
6748
6859
  properties:
@@ -6815,6 +6926,18 @@ components:
6815
6926
  required:
6816
6927
  - channel
6817
6928
  - user
6929
+ CollectionPublishingCustomizationChannel:
6930
+ type: object
6931
+ properties:
6932
+ channel:
6933
+ type: string
6934
+ enum:
6935
+ - collection-publishing-customization
6936
+ collection:
6937
+ type: string
6938
+ required:
6939
+ - channel
6940
+ - collection
6818
6941
  ChangeRequestReviewsChannel:
6819
6942
  type: object
6820
6943
  properties:
@@ -6941,6 +7064,19 @@ components:
6941
7064
  required:
6942
7065
  - channel
6943
7066
  - organization
7067
+ OrganizationCollectionsChannel:
7068
+ type: object
7069
+ description: Subscription channel for changes in collections in an organization.
7070
+ properties:
7071
+ channel:
7072
+ type: string
7073
+ enum:
7074
+ - organization-collections
7075
+ organization:
7076
+ type: string
7077
+ required:
7078
+ - channel
7079
+ - organization
6944
7080
  OrganizationEntitiesChannel:
6945
7081
  type: object
6946
7082
  description: Subscription channel for entities in an organization.
@@ -7176,6 +7312,281 @@ components:
7176
7312
  CustomFieldPlaceholder:
7177
7313
  type: string
7178
7314
  maxLength: 100
7315
+ CustomizationSettings:
7316
+ type: object
7317
+ properties:
7318
+ inherit:
7319
+ type: boolean
7320
+ description: Inherit customization settings from the parent collection.
7321
+ title:
7322
+ type: string
7323
+ description: Title to use for the published content. If not defined, it'll fallback to the content title.
7324
+ styling:
7325
+ type: object
7326
+ properties:
7327
+ primaryColor:
7328
+ $ref: "#/components/schemas/CustomizationThemedColor"
7329
+ corners:
7330
+ $ref: "#/components/schemas/CustomizationCorners"
7331
+ font:
7332
+ $ref: "#/components/schemas/CustomizationFont"
7333
+ required:
7334
+ - primaryColor
7335
+ - corners
7336
+ - font
7337
+ internationalization:
7338
+ type: object
7339
+ properties:
7340
+ locale:
7341
+ $ref: "#/components/schemas/CustomizationLocale"
7342
+ inherit:
7343
+ type: boolean
7344
+ description: Inherit locale from the parent collection.
7345
+ required:
7346
+ - locale
7347
+ - inherit
7348
+ favicon:
7349
+ oneOf:
7350
+ - type: object
7351
+ properties:
7352
+ icon:
7353
+ $ref: "#/components/schemas/CustomizationThemedURL"
7354
+ required:
7355
+ - icon
7356
+ - type: object
7357
+ properties:
7358
+ emoji:
7359
+ $ref: "#/components/schemas/Emoji"
7360
+ required:
7361
+ - emoji
7362
+ - type: object
7363
+ properties: {}
7364
+ additionalProperties: false
7365
+ header:
7366
+ type: object
7367
+ properties:
7368
+ preset:
7369
+ $ref: "#/components/schemas/CustomizationHeaderPreset"
7370
+ logo:
7371
+ $ref: "#/components/schemas/CustomizationThemedURL"
7372
+ backgroundColor:
7373
+ $ref: "#/components/schemas/CustomizationThemedColor"
7374
+ linkColor:
7375
+ $ref: "#/components/schemas/CustomizationThemedColor"
7376
+ links:
7377
+ type: array
7378
+ items:
7379
+ $ref: "#/components/schemas/CustomizationHeaderLink"
7380
+ required:
7381
+ - preset
7382
+ - links
7383
+ footer:
7384
+ type: object
7385
+ properties:
7386
+ logo:
7387
+ $ref: "#/components/schemas/CustomizationThemedURL"
7388
+ groups:
7389
+ type: array
7390
+ items:
7391
+ $ref: "#/components/schemas/CustomizationFooterGroup"
7392
+ copyright:
7393
+ type: string
7394
+ maxLength: 300
7395
+ required:
7396
+ - groups
7397
+ themes:
7398
+ type: object
7399
+ properties:
7400
+ default:
7401
+ $ref: "#/components/schemas/CustomizationThemeMode"
7402
+ toggeable:
7403
+ description: Should the reader be able to switch between dark and light mode
7404
+ type: boolean
7405
+ required:
7406
+ - default
7407
+ - toggeable
7408
+ pdf:
7409
+ type: object
7410
+ properties:
7411
+ enabled:
7412
+ type: boolean
7413
+ description: If true, PDF export is enabled for the published content.
7414
+ required:
7415
+ - enabled
7416
+ feedback:
7417
+ type: object
7418
+ properties:
7419
+ enabled:
7420
+ type: boolean
7421
+ description: If true, feedback gathering is enabled
7422
+ required:
7423
+ - enabled
7424
+ aiSearch:
7425
+ type: object
7426
+ properties:
7427
+ enabled:
7428
+ type: boolean
7429
+ description: If true, AI search is enabled
7430
+ required:
7431
+ - enabled
7432
+ git:
7433
+ type: object
7434
+ properties:
7435
+ showEditLink:
7436
+ type: boolean
7437
+ description: Whether the public content should show a link to edit the content on the git provider set up in the GitSync
7438
+ required:
7439
+ - showEditLink
7440
+ pagination:
7441
+ type: object
7442
+ properties:
7443
+ enabled:
7444
+ type: boolean
7445
+ description: Whether the pagination navigation should be displayed on pages.
7446
+ required:
7447
+ - enabled
7448
+ trademark:
7449
+ type: object
7450
+ properties:
7451
+ enabled:
7452
+ type: boolean
7453
+ description: Whether the GitBook trademark ("Powered by GitBook") should be visible
7454
+ required:
7455
+ - enabled
7456
+ privacyPolicy:
7457
+ type: object
7458
+ properties:
7459
+ url:
7460
+ $ref: "#/components/schemas/URL"
7461
+ socialPreview:
7462
+ type: object
7463
+ properties:
7464
+ url:
7465
+ $ref: "#/components/schemas/URL"
7466
+ required:
7467
+ - inherit
7468
+ - styling
7469
+ - internationalization
7470
+ - favicon
7471
+ - header
7472
+ - footer
7473
+ - themes
7474
+ - pdf
7475
+ - feedback
7476
+ - aiSearch
7477
+ - trademark
7478
+ - pagination
7479
+ - git
7480
+ - privacyPolicy
7481
+ - socialPreview
7482
+ CustomizationCollectionSettings:
7483
+ allOf:
7484
+ - $ref: "#/components/schemas/CustomizationSettings"
7485
+ - type: object
7486
+ properties:
7487
+ collection:
7488
+ type: object
7489
+ properties:
7490
+ defaultSpace:
7491
+ type: string
7492
+ description: ID of the space used by default in the collection
7493
+ required:
7494
+ - collection
7495
+ CustomizationLocale:
7496
+ type: string
7497
+ description: Language for the UI element
7498
+ enum:
7499
+ - en
7500
+ - fr
7501
+ - es
7502
+ - zh
7503
+ - ja
7504
+ CustomizationFont:
7505
+ type: string
7506
+ enum:
7507
+ - Inter
7508
+ - Roboto
7509
+ - RobotoSlab
7510
+ - OpenSans
7511
+ - SourceSansPro
7512
+ - Lato
7513
+ - Ubuntu
7514
+ - Raleway
7515
+ - Merriweather
7516
+ - Overpass
7517
+ - NotoSans
7518
+ - IBMPlexSerif
7519
+ - Poppins
7520
+ - FiraSans
7521
+ CustomizationHeaderPreset:
7522
+ type: string
7523
+ enum:
7524
+ - default
7525
+ - bold
7526
+ - contrast
7527
+ - custom
7528
+ - none
7529
+ CustomizationThemeMode:
7530
+ type: string
7531
+ enum:
7532
+ - light
7533
+ - dark
7534
+ CustomizationHeaderLink:
7535
+ allOf:
7536
+ - $ref: "#/components/schemas/CustomizationContentLink"
7537
+ - type: object
7538
+ properties:
7539
+ links:
7540
+ type: array
7541
+ items:
7542
+ $ref: "#/components/schemas/CustomizationContentLink"
7543
+ CustomizationContentLink:
7544
+ type: object
7545
+ properties:
7546
+ title:
7547
+ type: string
7548
+ to:
7549
+ $ref: "#/components/schemas/ContentRef"
7550
+ required:
7551
+ - title
7552
+ - to
7553
+ CustomizationFooterGroup:
7554
+ type: object
7555
+ properties:
7556
+ title:
7557
+ type: string
7558
+ links:
7559
+ type: array
7560
+ items:
7561
+ $ref: "#/components/schemas/CustomizationContentLink"
7562
+ required:
7563
+ - title
7564
+ - links
7565
+ CustomizationCorners:
7566
+ type: string
7567
+ enum:
7568
+ - straight
7569
+ - rounded
7570
+ CustomizationThemedURL:
7571
+ type: object
7572
+ properties:
7573
+ light:
7574
+ $ref: "#/components/schemas/URL"
7575
+ dark:
7576
+ $ref: "#/components/schemas/URL"
7577
+ required:
7578
+ - light
7579
+ - dark
7580
+ CustomizationThemedColor:
7581
+ type: object
7582
+ properties:
7583
+ light:
7584
+ $ref: "#/components/schemas/Color"
7585
+ dark:
7586
+ $ref: "#/components/schemas/Color"
7587
+ required:
7588
+ - light
7589
+ - dark
7179
7590
  responses:
7180
7591
  UnexpectedError:
7181
7592
  description: Unexpected Error
@@ -8953,6 +9364,53 @@ paths:
8953
9364
  $ref: "#/components/schemas/UserContentPermission"
8954
9365
  default:
8955
9366
  $ref: "#/components/responses/UnexpectedError"
9367
+ "/spaces/{spaceId}/publishing/customization":
9368
+ get:
9369
+ operationId: getSpacePublishingCustomizationById
9370
+ summary: Get the publishing customization configuration for a space.
9371
+ tags:
9372
+ - spaces
9373
+ security:
9374
+ - user: []
9375
+ parameters:
9376
+ - $ref: "#/components/parameters/spaceId"
9377
+ responses:
9378
+ "200":
9379
+ description: OK
9380
+ content:
9381
+ application/json:
9382
+ schema:
9383
+ $ref: "#/components/schemas/CustomizationSettings"
9384
+ "400":
9385
+ $ref: "#/components/responses/BadRequestError"
9386
+ default:
9387
+ $ref: "#/components/responses/UnexpectedError"
9388
+ put:
9389
+ operationId: updateSpacePublishingCustomizationById
9390
+ summary: Update the publishing customization configuration for a space.
9391
+ tags:
9392
+ - spaces
9393
+ security:
9394
+ - user: []
9395
+ parameters:
9396
+ - $ref: "#/components/parameters/spaceId"
9397
+ requestBody:
9398
+ required: true
9399
+ content:
9400
+ application/json:
9401
+ schema:
9402
+ $ref: "#/components/schemas/CustomizationSettings"
9403
+ responses:
9404
+ "200":
9405
+ description: OK
9406
+ content:
9407
+ application/json:
9408
+ schema:
9409
+ $ref: "#/components/schemas/CustomizationSettings"
9410
+ "400":
9411
+ $ref: "#/components/responses/BadRequestError"
9412
+ default:
9413
+ $ref: "#/components/responses/UnexpectedError"
8956
9414
  "/spaces/{spaceId}/publishing/auth":
8957
9415
  get:
8958
9416
  operationId: getSpacePublishingAuthById
@@ -9217,6 +9675,53 @@ paths:
9217
9675
  $ref: "#/components/responses/BadRequestError"
9218
9676
  default:
9219
9677
  $ref: "#/components/responses/UnexpectedError"
9678
+ "/collections/{collectionId}/publishing/customization":
9679
+ get:
9680
+ operationId: getCollectionPublishingCustomizationById
9681
+ summary: Get the publishing customization configuration for a collection.
9682
+ tags:
9683
+ - collections
9684
+ security:
9685
+ - user: []
9686
+ parameters:
9687
+ - $ref: "#/components/parameters/collectionId"
9688
+ responses:
9689
+ "200":
9690
+ description: OK
9691
+ content:
9692
+ application/json:
9693
+ schema:
9694
+ $ref: "#/components/schemas/CustomizationCollectionSettings"
9695
+ "400":
9696
+ $ref: "#/components/responses/BadRequestError"
9697
+ default:
9698
+ $ref: "#/components/responses/UnexpectedError"
9699
+ put:
9700
+ operationId: updateCollectionPublishingCustomizationById
9701
+ summary: Update the publishing customization configuration for a collection.
9702
+ tags:
9703
+ - collections
9704
+ security:
9705
+ - user: []
9706
+ parameters:
9707
+ - $ref: "#/components/parameters/collectionId"
9708
+ requestBody:
9709
+ required: true
9710
+ content:
9711
+ application/json:
9712
+ schema:
9713
+ $ref: "#/components/schemas/CustomizationCollectionSettings"
9714
+ responses:
9715
+ "200":
9716
+ description: OK
9717
+ content:
9718
+ application/json:
9719
+ schema:
9720
+ $ref: "#/components/schemas/CustomizationCollectionSettings"
9721
+ "400":
9722
+ $ref: "#/components/responses/BadRequestError"
9723
+ default:
9724
+ $ref: "#/components/responses/UnexpectedError"
9220
9725
  /integrations:
9221
9726
  get:
9222
9727
  operationId: listIntegrations
@@ -10743,6 +11248,41 @@ paths:
10743
11248
  $ref: "#/components/schemas/Collection"
10744
11249
  default:
10745
11250
  $ref: "#/components/responses/UnexpectedError"
11251
+ post:
11252
+ operationId: createCollection
11253
+ summary: Create an organization collection
11254
+ tags:
11255
+ - collections
11256
+ security:
11257
+ - user: []
11258
+ parameters:
11259
+ - $ref: "#/components/parameters/organizationId"
11260
+ requestBody:
11261
+ content:
11262
+ application/json:
11263
+ schema:
11264
+ type: object
11265
+ properties:
11266
+ title:
11267
+ type: string
11268
+ maxLength: 50
11269
+ parent:
11270
+ type: string
11271
+ description: ID of a parent collection
11272
+ responses:
11273
+ "201":
11274
+ description: Collection created
11275
+ headers:
11276
+ Location:
11277
+ description: API URL for the newly created collection
11278
+ schema:
11279
+ type: string
11280
+ content:
11281
+ application/json:
11282
+ schema:
11283
+ $ref: "#/components/schemas/Collection"
11284
+ default:
11285
+ $ref: "#/components/responses/UnexpectedError"
10746
11286
  "/orgs/{organizationId}/dsync":
10747
11287
  post:
10748
11288
  operationId: setupDirectorySync