@gitbook/api 0.120.0 → 0.121.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
@@ -17,6 +17,7 @@ security:
17
17
  - user: []
18
18
  - user-internal: []
19
19
  - user-staff: []
20
+ - user-internal-or-staff: []
20
21
  - integration: []
21
22
  - integration-installation: []
22
23
  tags:
@@ -1798,6 +1799,24 @@ paths:
1798
1799
  description: Optionally, update the subject of the change request when requesting reviewers.
1799
1800
  required:
1800
1801
  - users
1802
+ "/spaces/{spaceId}/change-requests/{changeRequestId}/requested-reviewers/{userId}":
1803
+ delete:
1804
+ operationId: removeRequestedReviewerFromChangeRequest
1805
+ summary: Remove a reviewer from a change request
1806
+ tags:
1807
+ - change-request-reviewers
1808
+ security:
1809
+ - user: []
1810
+ parameters:
1811
+ - $ref: "#/components/parameters/spaceId"
1812
+ - $ref: "#/components/parameters/changeRequestId"
1813
+ - $ref: "#/components/parameters/userId"
1814
+ responses:
1815
+ "205":
1816
+ description: The reviewer has been removed from the change request
1817
+ "404":
1818
+ description: The reviewer could not be found
1819
+ $ref: "#/components/responses/NotFoundError"
1801
1820
  "/spaces/{spaceId}/change-requests/{changeRequestId}/links":
1802
1821
  get:
1803
1822
  operationId: listChangeRequestLinks
@@ -3522,6 +3541,7 @@ paths:
3522
3541
  - $ref: "#/components/parameters/integrationSearchContentSources"
3523
3542
  - $ref: "#/components/parameters/integrationSearchOwner"
3524
3543
  - $ref: "#/components/parameters/integrationSearchScope"
3544
+ - $ref: "#/components/parameters/integrationSearchTarget"
3525
3545
  responses:
3526
3546
  "200":
3527
3547
  description: Paginated list of integrations
@@ -5161,6 +5181,7 @@ paths:
5161
5181
  - $ref: "#/components/parameters/integrationSearchContentSources"
5162
5182
  - $ref: "#/components/parameters/integrationSearchOwner"
5163
5183
  - $ref: "#/components/parameters/integrationSearchScope"
5184
+ - $ref: "#/components/parameters/integrationSearchTarget"
5164
5185
  responses:
5165
5186
  "200":
5166
5187
  description: List of integrations.
@@ -6930,6 +6951,47 @@ paths:
6930
6951
  "404":
6931
6952
  description: No matching site found
6932
6953
  $ref: "#/components/responses/NotFoundError"
6954
+ "/orgs/{organizationId}/sites/{siteId}/structure/sort":
6955
+ patch:
6956
+ operationId: sortSiteStructure
6957
+ summary: Move a site space, site section or site section group to a new position in the site structure.
6958
+ tags:
6959
+ - sites
6960
+ security:
6961
+ - user: []
6962
+ parameters:
6963
+ - $ref: "#/components/parameters/organizationId"
6964
+ - $ref: "#/components/parameters/siteId"
6965
+ requestBody:
6966
+ content:
6967
+ application/json:
6968
+ schema:
6969
+ type: object
6970
+ properties:
6971
+ item:
6972
+ description: pointer to the item (site space, site section or site section group) being moved.
6973
+ $ref: "#/components/schemas/SiteStructureItemPointer"
6974
+ position:
6975
+ description: The position to move the item to. When not provided the item is moved to the end of the site structure.
6976
+ $ref: "#/components/schemas/SiteStructureItemMovePosition"
6977
+ required:
6978
+ - item
6979
+ - position
6980
+ responses:
6981
+ "200":
6982
+ description: Item successfully moved
6983
+ content:
6984
+ application/json:
6985
+ schema:
6986
+ $ref: "#/components/schemas/SiteStructureItem"
6987
+ "400":
6988
+ description: Invalid move position provided
6989
+ $ref: "#/components/responses/BadRequestError"
6990
+ "404":
6991
+ description: No matching item found
6992
+ $ref: "#/components/responses/NotFoundError"
6993
+ default:
6994
+ $ref: "#/components/responses/UnexpectedError"
6933
6995
  "/orgs/{organizationId}/sites/{siteId}/publishing/auth":
6934
6996
  get:
6935
6997
  operationId: getSitePublishingAuthById
@@ -7400,9 +7462,19 @@ paths:
7400
7462
  type: string
7401
7463
  description: ID of the space to be added to the section as a site space variant
7402
7464
  title:
7403
- type: string
7404
- description: Title of the section
7405
- maxLength: 64
7465
+ oneOf:
7466
+ - $ref: "#/components/schemas/SiteSectionTitle"
7467
+ - type: string
7468
+ nullable: true
7469
+ enum:
7470
+ - null
7471
+ icon:
7472
+ oneOf:
7473
+ - $ref: "#/components/schemas/Icon"
7474
+ - type: string
7475
+ nullable: true
7476
+ enum:
7477
+ - null
7406
7478
  required:
7407
7479
  - spaceId
7408
7480
  responses:
@@ -7693,6 +7765,9 @@ paths:
7693
7765
  nullable: true
7694
7766
  enum:
7695
7767
  - null
7768
+ spaceId:
7769
+ type: string
7770
+ description: The content that this site space points to. If not set, the space will remain unchanged.
7696
7771
  responses:
7697
7772
  "200":
7698
7773
  description: OK
@@ -8101,7 +8176,8 @@ paths:
8101
8176
  "/orgs/{organizationId}/sites/{siteId}/section-groups/{siteSectionGroupId}/move":
8102
8177
  post:
8103
8178
  operationId: moveSiteSectionGroup
8104
- summary: Move a site section group to a new position
8179
+ deprecated: true
8180
+ summary: Move a site section group to a new position. (Deprecated) use sortSiteStructure instead.
8105
8181
  tags:
8106
8182
  - site-section-groups
8107
8183
  security:
@@ -8135,7 +8211,8 @@ paths:
8135
8211
  "/orgs/{organizationId}/sites/{siteId}/sections/{siteSectionId}/move":
8136
8212
  post:
8137
8213
  operationId: moveSiteSection
8138
- summary: Move a site section to a new position
8214
+ deprecated: true
8215
+ summary: Move a site section to a new position. (Deprecated) use sortSiteStructure instead.
8139
8216
  tags:
8140
8217
  - site-sections
8141
8218
  security:
@@ -8169,7 +8246,8 @@ paths:
8169
8246
  "/orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}/move":
8170
8247
  post:
8171
8248
  operationId: moveSiteSpace
8172
- summary: Move a site space to a new position
8249
+ deprecated: true
8250
+ summary: Move a site space to a new position. (Deprecated) use sortSiteStructure instead.
8173
8251
  tags:
8174
8252
  - site-spaces
8175
8253
  security:
@@ -8542,7 +8620,7 @@ paths:
8542
8620
  tags:
8543
8621
  - custom-hostnames
8544
8622
  security:
8545
- - user-internal: []
8623
+ - user-internal-or-staff: []
8546
8624
  parameters:
8547
8625
  - $ref: "#/components/parameters/hostname"
8548
8626
  responses:
@@ -8889,6 +8967,9 @@ components:
8889
8967
  user-staff:
8890
8968
  type: http
8891
8969
  scheme: bearer
8970
+ user-internal-or-staff:
8971
+ type: http
8972
+ scheme: bearer
8892
8973
  integration:
8893
8974
  type: http
8894
8975
  scheme: bearer
@@ -9127,6 +9208,12 @@ components:
9127
9208
  description: Filter the integrations by scope
9128
9209
  schema:
9129
9210
  $ref: "#/components/schemas/IntegrationScope"
9211
+ integrationSearchTarget:
9212
+ name: target
9213
+ in: query
9214
+ description: Filter the integrations by target
9215
+ schema:
9216
+ $ref: "#/components/schemas/IntegrationTarget"
9130
9217
  integrationName:
9131
9218
  name: integrationName
9132
9219
  in: path
@@ -9312,20 +9399,6 @@ components:
9312
9399
  schema:
9313
9400
  type: string
9314
9401
  required: true
9315
- visitorId:
9316
- name: visitorId
9317
- in: path
9318
- required: true
9319
- description: The id of the visitor
9320
- schema:
9321
- type: string
9322
- ifUnmodifiedSince:
9323
- in: header
9324
- name: If-Unmodified-Since
9325
- description: If provided, the operation will be rejected if the underlying resource has been modified since the date provided in the header.
9326
- schema:
9327
- type: string
9328
- format: date-time
9329
9402
  pageFormat:
9330
9403
  $ref: "#/components/parameters/documentFormat"
9331
9404
  commentStatus:
@@ -10516,6 +10589,35 @@ components:
10516
10589
  - type
10517
10590
  - data
10518
10591
  - isVoid
10592
+ DocumentInlineIcon:
10593
+ type: object
10594
+ properties:
10595
+ object:
10596
+ type: string
10597
+ enum:
10598
+ - inline
10599
+ type:
10600
+ type: string
10601
+ enum:
10602
+ - icon
10603
+ key:
10604
+ type: string
10605
+ data:
10606
+ type: object
10607
+ properties:
10608
+ icon:
10609
+ type: string
10610
+ required:
10611
+ - icon
10612
+ isVoid:
10613
+ type: boolean
10614
+ enum:
10615
+ - true
10616
+ required:
10617
+ - object
10618
+ - type
10619
+ - data
10620
+ - isVoid
10519
10621
  DocumentInlineExpression:
10520
10622
  type: object
10521
10623
  properties:
@@ -10609,6 +10711,7 @@ components:
10609
10711
  oneOf:
10610
10712
  - $ref: "#/components/schemas/DocumentInlineLink"
10611
10713
  - $ref: "#/components/schemas/DocumentInlineEmoji"
10714
+ - $ref: "#/components/schemas/DocumentInlineIcon"
10612
10715
  - $ref: "#/components/schemas/DocumentInlineExpression"
10613
10716
  - $ref: "#/components/schemas/DocumentInlineMath"
10614
10717
  - $ref: "#/components/schemas/DocumentInlineImage"
@@ -10738,6 +10841,7 @@ components:
10738
10841
  oneOf:
10739
10842
  - $ref: "#/components/schemas/DocumentText"
10740
10843
  - $ref: "#/components/schemas/DocumentInlineAnnotation"
10844
+ - $ref: "#/components/schemas/DocumentInlineExpression"
10741
10845
  data:
10742
10846
  type: object
10743
10847
  properties:
@@ -16340,6 +16444,37 @@ components:
16340
16444
  enum:
16341
16445
  - excluded
16342
16446
  - included
16447
+ SiteFeatureKey:
16448
+ type: string
16449
+ description: The site feature identifier
16450
+ enum:
16451
+ - sites-adaptive-content
16452
+ - sites-advanced-customization
16453
+ - sites-advanced-insights
16454
+ - sites-ads
16455
+ - sites-ai-search
16456
+ - sites-api-playground
16457
+ - sites-basic-customization
16458
+ - sites-custom-domain
16459
+ - sites-custom-fonts
16460
+ - sites-custom-subdirectory
16461
+ - sites-full-text-search
16462
+ - sites-multivariant-site
16463
+ - sites-no-custom-domain
16464
+ - sites-page-feedback
16465
+ - sites-page-traffic-insights
16466
+ - sites-pdf-export
16467
+ - sites-preview-deployments
16468
+ - sites-public-visibility
16469
+ - sites-redirects
16470
+ - sites-search-insights
16471
+ - sites-sections
16472
+ - sites-seo
16473
+ - sites-share-links
16474
+ - sites-unlisted-visibility
16475
+ - sites-user-contribution
16476
+ - sites-visitor-authentication
16477
+ - sites-visitors
16343
16478
  SiteCustomizationFeature:
16344
16479
  type: string
16345
16480
  description: A list of all premium customizations.
@@ -16353,57 +16488,25 @@ components:
16353
16488
  - footer-copyright
16354
16489
  - semantic-colors
16355
16490
  SiteFeature:
16356
- oneOf:
16357
- - type: object
16358
- description: A site feature and the plan it is available on.
16359
- properties:
16360
- id:
16361
- description: The feature identifier, matching the feature table keys in the pricing definition
16362
- type: string
16363
- enum:
16364
- - sites-sections
16365
- - sites-visitor-authentication
16366
- - sites-adaptive-content
16367
- - sites-redirects
16368
- - sites-custom-domain
16369
- - sites-ai-search
16370
- - sites-pdf-export
16371
- - sites-page-feedback
16372
- - sites-unlisted-visibility
16373
- - sites-share-links
16374
- - sites-custom-fonts
16375
- plan:
16376
- $ref: "#/components/schemas/SiteType"
16377
- frozen:
16378
- description: A frozen feature is still enabled but cannot be changed or modified.
16379
- type: boolean
16380
- required:
16381
- - id
16382
- - plan
16383
- - frozen
16384
- - type: object
16385
- description: The advanced customizations feature, carrying also which individual customization are used
16386
- properties:
16387
- id:
16388
- description: The feature identifier, always set to `sites-advanced-customization`
16389
- type: string
16390
- enum:
16391
- - sites-advanced-customization
16392
- plan:
16393
- $ref: "#/components/schemas/SiteType"
16394
- frozen:
16395
- description: A frozen feature is still enabled but cannot be changed or modified.
16396
- type: boolean
16397
- customizations:
16398
- description: A list of the actual advanced customizations used
16399
- type: array
16400
- items:
16401
- $ref: "#/components/schemas/SiteCustomizationFeature"
16402
- required:
16403
- - id
16404
- - plan
16405
- - frozen
16406
- - customizations
16491
+ type: object
16492
+ description: A site feature and the plan it is available on.
16493
+ properties:
16494
+ id:
16495
+ $ref: "#/components/schemas/SiteFeatureKey"
16496
+ plan:
16497
+ $ref: "#/components/schemas/SiteType"
16498
+ frozen:
16499
+ description: A frozen feature is still enabled but cannot be changed or modified.
16500
+ type: boolean
16501
+ customizations:
16502
+ description: A list of the actual advanced customizations used (only applicable for sites-advanced-customization)
16503
+ type: array
16504
+ items:
16505
+ $ref: "#/components/schemas/SiteCustomizationFeature"
16506
+ required:
16507
+ - id
16508
+ - plan
16509
+ - frozen
16407
16510
  Site:
16408
16511
  type: object
16409
16512
  properties:
@@ -19837,6 +19940,50 @@ components:
19837
19940
  - id
19838
19941
  - createdAt
19839
19942
  - urls
19943
+ SiteStructureItemPointer:
19944
+ type: object
19945
+ properties:
19946
+ type:
19947
+ type: string
19948
+ enum:
19949
+ - site-space
19950
+ - site-section
19951
+ - site-section-group
19952
+ id:
19953
+ type: string
19954
+ description: Unique identifier for the site structure item (site space, site section or site section group).
19955
+ required:
19956
+ - type
19957
+ - id
19958
+ SiteStructureItemMovePosition:
19959
+ type: object
19960
+ description: Position at which to move the site structure item (site space, site section or site section group).
19961
+ properties:
19962
+ before:
19963
+ $ref: "#/components/schemas/SiteStructureItemPointer"
19964
+ after:
19965
+ $ref: "#/components/schemas/SiteStructureItemPointer"
19966
+ SiteStructureItem:
19967
+ title: Site Structure Item
19968
+ type: object
19969
+ description: |
19970
+ A site structure item can be a site space, a site section or a site section group.
19971
+ It is used to represent the structure of a site.
19972
+ oneOf:
19973
+ - $ref: "#/components/schemas/SiteSpace"
19974
+ - $ref: "#/components/schemas/SiteSection"
19975
+ - $ref: "#/components/schemas/SiteSectionGroup"
19976
+ SiteUpgradeReason:
19977
+ type: string
19978
+ description: The reason or feature that triggered the site upgrade
19979
+ oneOf:
19980
+ - $ref: "#/components/schemas/SiteFeatureKey"
19981
+ - type: string
19982
+ enum:
19983
+ - settings
19984
+ - publish-downgrade
19985
+ - from-billing-modal
19986
+ - payment-failed-modal
19840
19987
  SitePublishingAuth:
19841
19988
  allOf:
19842
19989
  - oneOf:
@@ -22637,46 +22784,11 @@ components:
22637
22784
  type: string
22638
22785
  format: uri
22639
22786
  description: A fallback URL that will be used if authentication fails.
22640
- TriggerContentIndexingContext:
22641
- type: object
22642
- description: The context to send when triggering a content indexing.
22643
- properties:
22644
- spaceId:
22645
- type: string
22646
- description: The unique identifier of the Space to index.
22647
- force:
22648
- type: boolean
22649
- description: Whether to force a complete re-indexing of the Space.
22650
- required:
22651
- - spaceId
22652
- - force
22653
22787
  GitBookUsers:
22654
22788
  type: string
22655
22789
  description: Predefined GitBook user identifiers
22656
22790
  enum:
22657
22791
  - gitbook:agent
22658
- ContentPublishingAuth:
22659
- type: object
22660
- properties:
22661
- object:
22662
- type: string
22663
- description: Type of Object, always equals to "publishing-auth"
22664
- enum:
22665
- - publishing-auth
22666
- id:
22667
- type: string
22668
- description: Unique identifier for the content.
22669
- privateKey:
22670
- type: string
22671
- description: Private key used to sign JWT tokens.
22672
- fallbackURL:
22673
- type: string
22674
- format: uri
22675
- description: URL to redirect to when the visitor auth secret is invalid.
22676
- required:
22677
- - object
22678
- - id
22679
- - privateKey
22680
22792
  ComputedContentSource:
22681
22793
  oneOf:
22682
22794
  - $ref: "#/components/schemas/ComputedContentSourceDocument"
@@ -22897,17 +23009,6 @@ components:
22897
23009
  - completedTasks
22898
23010
  - startedAt
22899
23011
  - updatedAt
22900
- OrganizationTransferResponse:
22901
- type: object
22902
- required:
22903
- - collection
22904
- properties:
22905
- collection:
22906
- type: string
22907
- description: The unique id of the collection created in the target organization containing the content of the source organization.
22908
- newSourceHostname:
22909
- type: string
22910
- description: The new hostname if the source organization needed to change hostname.
22911
23012
  IntegrationEnvironmentSpaceInstallation:
22912
23013
  allOf:
22913
23014
  - $ref: "#/components/schemas/IntegrationContentInstallationBase"
@@ -24158,161 +24259,6 @@ components:
24158
24259
  - $ref: "#/components/schemas/APIChannelMutationData"
24159
24260
  discriminator:
24160
24261
  propertyName: channel
24161
- VariableName:
24162
- type: string
24163
- pattern: ^[a-z_\-0-9]+$
24164
- minLength: 1
24165
- maxLength: 50
24166
- CustomizationSettings:
24167
- type: object
24168
- properties:
24169
- inherit:
24170
- type: boolean
24171
- description: Inherit customization settings from the parent collection.
24172
- title:
24173
- type: string
24174
- description: Title to use for the published content. If not defined, it'll fallback to the content title.
24175
- styling:
24176
- type: object
24177
- properties:
24178
- primaryColor:
24179
- $ref: "#/components/schemas/CustomizationThemedColor"
24180
- corners:
24181
- $ref: "#/components/schemas/CustomizationCorners"
24182
- font:
24183
- $ref: "#/components/schemas/CustomizationDefaultFont"
24184
- background:
24185
- $ref: "#/components/schemas/CustomizationBackground"
24186
- required:
24187
- - primaryColor
24188
- - corners
24189
- - font
24190
- internationalization:
24191
- type: object
24192
- properties:
24193
- locale:
24194
- $ref: "#/components/schemas/CustomizationLocale"
24195
- required:
24196
- - locale
24197
- favicon:
24198
- $ref: "#/components/schemas/CustomizationFavicon"
24199
- header:
24200
- type: object
24201
- properties:
24202
- preset:
24203
- $ref: "#/components/schemas/CustomizationHeaderPreset"
24204
- logo:
24205
- $ref: "#/components/schemas/CustomizationThemedURL"
24206
- backgroundColor:
24207
- $ref: "#/components/schemas/CustomizationThemedColor"
24208
- linkColor:
24209
- $ref: "#/components/schemas/CustomizationThemedColor"
24210
- links:
24211
- type: array
24212
- items:
24213
- $ref: "#/components/schemas/CustomizationHeaderItem"
24214
- required:
24215
- - preset
24216
- - links
24217
- footer:
24218
- type: object
24219
- properties:
24220
- logo:
24221
- $ref: "#/components/schemas/CustomizationThemedURL"
24222
- groups:
24223
- type: array
24224
- items:
24225
- $ref: "#/components/schemas/CustomizationFooterGroup"
24226
- copyright:
24227
- type: string
24228
- maxLength: 300
24229
- required:
24230
- - groups
24231
- themes:
24232
- type: object
24233
- properties:
24234
- default:
24235
- $ref: "#/components/schemas/CustomizationThemeMode"
24236
- toggeable:
24237
- description: Should the reader be able to switch between dark and light mode
24238
- type: boolean
24239
- required:
24240
- - default
24241
- - toggeable
24242
- pdf:
24243
- type: object
24244
- properties:
24245
- enabled:
24246
- type: boolean
24247
- description: If true, PDF export is enabled for the published content.
24248
- required:
24249
- - enabled
24250
- feedback:
24251
- type: object
24252
- properties:
24253
- enabled:
24254
- type: boolean
24255
- description: If true, feedback gathering is enabled
24256
- required:
24257
- - enabled
24258
- aiSearch:
24259
- type: object
24260
- properties:
24261
- enabled:
24262
- type: boolean
24263
- description: If true, AI search is enabled
24264
- required:
24265
- - enabled
24266
- git:
24267
- type: object
24268
- properties:
24269
- showEditLink:
24270
- type: boolean
24271
- description: Whether the public content should show a link to edit the content on the git provider set up in the GitSync
24272
- required:
24273
- - showEditLink
24274
- pagination:
24275
- type: object
24276
- properties:
24277
- enabled:
24278
- type: boolean
24279
- description: Whether the pagination navigation should be displayed on pages.
24280
- required:
24281
- - enabled
24282
- trademark:
24283
- type: object
24284
- properties:
24285
- enabled:
24286
- type: boolean
24287
- description: Whether the GitBook trademark ("Powered by GitBook") should be visible
24288
- required:
24289
- - enabled
24290
- privacyPolicy:
24291
- type: object
24292
- properties:
24293
- url:
24294
- $ref: "#/components/schemas/URL"
24295
- socialPreview:
24296
- type: object
24297
- properties:
24298
- url:
24299
- $ref: "#/components/schemas/URL"
24300
- required:
24301
- - inherit
24302
- - styling
24303
- - internationalization
24304
- - favicon
24305
- - header
24306
- - footer
24307
- - themes
24308
- - pdf
24309
- - feedback
24310
- - aiSearch
24311
- - trademark
24312
- - pagination
24313
- - git
24314
- - privacyPolicy
24315
- - socialPreview
24316
24262
  SiteAdsStatus:
24317
24263
  type: string
24318
24264
  description: The status of ads on the site