@gitbook/api 0.178.0 → 0.179.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
@@ -5223,6 +5223,18 @@ paths:
5223
5223
  schema:
5224
5224
  type: string
5225
5225
  description: If defined, only change requests with a requested reviewer for this user will be returned.
5226
+ - name: site
5227
+ in: query
5228
+ required: false
5229
+ schema:
5230
+ type: string
5231
+ description: If defined, only change requests linked to this site will be returned.
5232
+ - name: space
5233
+ in: query
5234
+ required: false
5235
+ schema:
5236
+ type: string
5237
+ description: If defined, only change requests from this space will be returned.
5226
5238
  - name: topic
5227
5239
  in: query
5228
5240
  required: false
@@ -7781,6 +7793,8 @@ paths:
7781
7793
  type: string
7782
7794
  scope:
7783
7795
  $ref: "#/components/schemas/SiteSearchScope"
7796
+ session:
7797
+ $ref: "#/components/schemas/SiteInsightsSession"
7784
7798
  responses:
7785
7799
  "200":
7786
7800
  description: OK
@@ -10710,6 +10724,209 @@ paths:
10710
10724
  "404":
10711
10725
  description: No content found for the URL.
10712
10726
  $ref: "#/components/responses/NotFoundError"
10727
+ /git/installations:
10728
+ post:
10729
+ operationId: installGitSyncProviderOnTarget
10730
+ summary: Install a Git Sync provider on a target
10731
+ tags:
10732
+ - git
10733
+ security:
10734
+ - user: []
10735
+ requestBody:
10736
+ required: true
10737
+ content:
10738
+ application/json:
10739
+ schema:
10740
+ type: object
10741
+ properties:
10742
+ provider:
10743
+ $ref: "#/components/schemas/GitSyncInstallationProvider"
10744
+ target:
10745
+ $ref: "#/components/schemas/GitSyncInstallationTarget"
10746
+ required:
10747
+ - provider
10748
+ - target
10749
+ responses:
10750
+ "201":
10751
+ description: Git Sync installation was created successfully
10752
+ content:
10753
+ application/json:
10754
+ schema:
10755
+ $ref: "#/components/schemas/GitSyncInstallation"
10756
+ "404":
10757
+ $ref: "#/components/responses/NotFoundError"
10758
+ "409":
10759
+ $ref: "#/components/responses/ConflictError"
10760
+ "/git/installations/{installationId}":
10761
+ patch:
10762
+ operationId: updateGitSyncInstallationById
10763
+ summary: Update a Git Sync installation configuration
10764
+ tags:
10765
+ - git
10766
+ security:
10767
+ - user: []
10768
+ parameters:
10769
+ - $ref: "#/components/parameters/installationId"
10770
+ requestBody:
10771
+ required: true
10772
+ content:
10773
+ application/json:
10774
+ schema:
10775
+ $ref: "#/components/schemas/GitSyncInstallationSetup"
10776
+ responses:
10777
+ "200":
10778
+ description: Git Sync installation was updated successfully
10779
+ content:
10780
+ application/json:
10781
+ schema:
10782
+ $ref: "#/components/schemas/GitSyncInstallation"
10783
+ "401":
10784
+ $ref: "#/components/responses/UnauthorizedError"
10785
+ "404":
10786
+ $ref: "#/components/responses/NotFoundError"
10787
+ "409":
10788
+ $ref: "#/components/responses/ConflictError"
10789
+ delete:
10790
+ operationId: uninstallGitSyncInstallation
10791
+ summary: Uninstall a Git Sync installation
10792
+ tags:
10793
+ - git
10794
+ security:
10795
+ - user: []
10796
+ parameters:
10797
+ - $ref: "#/components/parameters/installationId"
10798
+ responses:
10799
+ "205":
10800
+ description: Git Sync installation was removed successfully
10801
+ "404":
10802
+ $ref: "#/components/responses/NotFoundError"
10803
+ "/git/installations/{installationId}/github/repos":
10804
+ get:
10805
+ operationId: listGitHubRepositoriesForGitSyncInstallation
10806
+ summary: List GitHub repositories available for a Git Sync installation
10807
+ tags:
10808
+ - git
10809
+ security:
10810
+ - user: []
10811
+ parameters:
10812
+ - $ref: "#/components/parameters/installationId"
10813
+ responses:
10814
+ "200":
10815
+ description: GitHub repositories available for the Git Sync installation
10816
+ content:
10817
+ application/json:
10818
+ schema:
10819
+ type: object
10820
+ properties:
10821
+ items:
10822
+ type: array
10823
+ items:
10824
+ $ref: "#/components/schemas/GitSyncGitHubRepository"
10825
+ required:
10826
+ - items
10827
+ "401":
10828
+ $ref: "#/components/responses/UnauthorizedError"
10829
+ "404":
10830
+ $ref: "#/components/responses/NotFoundError"
10831
+ "/git/installations/{installationId}/github/repos/{accountName}/{repositoryName}/branches":
10832
+ get:
10833
+ operationId: listGitHubRepoBranchesForGitSyncInstallation
10834
+ summary: List GitHub repository branches available for a Git Sync installation
10835
+ tags:
10836
+ - git
10837
+ security:
10838
+ - user: []
10839
+ parameters:
10840
+ - $ref: "#/components/parameters/installationId"
10841
+ - name: accountName
10842
+ in: path
10843
+ required: true
10844
+ schema:
10845
+ type: string
10846
+ - name: repositoryName
10847
+ in: path
10848
+ required: true
10849
+ schema:
10850
+ type: string
10851
+ responses:
10852
+ "200":
10853
+ description: GitHub branches available for the selected repository
10854
+ content:
10855
+ application/json:
10856
+ schema:
10857
+ type: object
10858
+ properties:
10859
+ items:
10860
+ type: array
10861
+ items:
10862
+ $ref: "#/components/schemas/GitSyncBranch"
10863
+ required:
10864
+ - items
10865
+ "401":
10866
+ $ref: "#/components/responses/UnauthorizedError"
10867
+ "404":
10868
+ $ref: "#/components/responses/NotFoundError"
10869
+ "/git/installations/{installationId}/gitlab/projects":
10870
+ get:
10871
+ operationId: listGitLabProjectsForGitSyncInstallation
10872
+ summary: List GitLab projects available for a Git Sync installation
10873
+ tags:
10874
+ - git
10875
+ security:
10876
+ - user: []
10877
+ parameters:
10878
+ - $ref: "#/components/parameters/installationId"
10879
+ responses:
10880
+ "200":
10881
+ description: GitLab projects available for the Git Sync installation
10882
+ content:
10883
+ application/json:
10884
+ schema:
10885
+ type: object
10886
+ properties:
10887
+ items:
10888
+ type: array
10889
+ items:
10890
+ $ref: "#/components/schemas/GitSyncGitLabProject"
10891
+ required:
10892
+ - items
10893
+ "401":
10894
+ $ref: "#/components/responses/UnauthorizedError"
10895
+ "404":
10896
+ $ref: "#/components/responses/NotFoundError"
10897
+ "/git/installations/{installationId}/gitlab/projects/{projectId}/branches":
10898
+ get:
10899
+ operationId: listGitLabProjectBranchesForGitSyncInstallation
10900
+ summary: List GitLab project branches available for a Git Sync installation
10901
+ tags:
10902
+ - git
10903
+ security:
10904
+ - user: []
10905
+ parameters:
10906
+ - $ref: "#/components/parameters/installationId"
10907
+ - name: projectId
10908
+ in: path
10909
+ required: true
10910
+ schema:
10911
+ type: number
10912
+ responses:
10913
+ "200":
10914
+ description: GitLab branches available for the selected project
10915
+ content:
10916
+ application/json:
10917
+ schema:
10918
+ type: object
10919
+ properties:
10920
+ items:
10921
+ type: array
10922
+ items:
10923
+ $ref: "#/components/schemas/GitSyncBranch"
10924
+ required:
10925
+ - items
10926
+ "401":
10927
+ $ref: "#/components/responses/UnauthorizedError"
10928
+ "404":
10929
+ $ref: "#/components/responses/NotFoundError"
10713
10930
  components:
10714
10931
  securitySchemes:
10715
10932
  user:
@@ -11538,6 +11755,7 @@ components:
11538
11755
  - ru
11539
11756
  - ja
11540
11757
  - zh
11758
+ - zh-tw
11541
11759
  - yue
11542
11760
  - ko
11543
11761
  - ar
@@ -12307,6 +12525,8 @@ components:
12307
12525
  - type
12308
12526
  DocumentTextColor:
12309
12527
  type: string
12528
+ description: |
12529
+ Allowed color tokens for color marks (text and background; background reuses this enum). Named colors are fixed palette keys. `$*` tokens are semantic: resolved from the published sites customization when rendering; authors may still persist them in content when valid.
12310
12530
  enum:
12311
12531
  - default
12312
12532
  - green
@@ -12315,11 +12535,15 @@ components:
12315
12535
  - orange
12316
12536
  - yellow
12317
12537
  - purple
12538
+ - pink
12539
+ - violet
12540
+ - cyan
12318
12541
  - $primary
12319
12542
  - $info
12320
12543
  - $success
12321
12544
  - $warning
12322
12545
  - $danger
12546
+ - $tint
12323
12547
  DocumentMarkColor:
12324
12548
  type: object
12325
12549
  properties:
@@ -15855,11 +16079,15 @@ components:
15855
16079
  description: Virtual revision, computed from a source revision
15856
16080
  enum:
15857
16081
  - computed
16082
+ sourceRevision:
16083
+ type: string
16084
+ description: ID of the non-computed revision used to compute this revision.
15858
16085
  mergedFrom:
15859
16086
  description: The change request the source revision was merged from, when the computed revision is derived from a merge revision.
15860
16087
  $ref: "#/components/schemas/ChangeRequest"
15861
16088
  required:
15862
16089
  - type
16090
+ - sourceRevision
15863
16091
  Revision:
15864
16092
  oneOf:
15865
16093
  - $ref: "#/components/schemas/RevisionTypeEdits"
@@ -23207,6 +23435,19 @@ components:
23207
23435
  - title
23208
23436
  - score
23209
23437
  - url
23438
+ SiteInsightsSession:
23439
+ type: object
23440
+ description: Identifiers for a GitBook site session, used for analytics and adaptive content.
23441
+ properties:
23442
+ visitorId:
23443
+ type: string
23444
+ description: GitBook's unique identifier of the visitor.
23445
+ sessionId:
23446
+ type: string
23447
+ description: GitBook's unique identifier of the visitor's session.
23448
+ required:
23449
+ - visitorId
23450
+ - sessionId
23210
23451
  ContextRecordType:
23211
23452
  type: string
23212
23453
  enum:
@@ -24088,19 +24329,6 @@ components:
24088
24329
  - low
24089
24330
  - medium
24090
24331
  - high
24091
- SiteInsightsSession:
24092
- type: object
24093
- description: Identifiers for a GitBook site session, used for analytics and adaptive content.
24094
- properties:
24095
- visitorId:
24096
- type: string
24097
- description: GitBook's unique identifier of the visitor.
24098
- sessionId:
24099
- type: string
24100
- description: GitBook's unique identifier of the visitor's session.
24101
- required:
24102
- - visitorId
24103
- - sessionId
24104
24332
  SiteCoreChannelType:
24105
24333
  type: string
24106
24334
  enum:
@@ -25144,6 +25372,27 @@ components:
25144
25372
  required:
25145
25373
  - spaceId
25146
25374
  - pageId
25375
+ selection:
25376
+ type: object
25377
+ description: Range of the current selection in a document.
25378
+ properties:
25379
+ anchorKey:
25380
+ oneOf:
25381
+ - type: string
25382
+ - type: "null"
25383
+ anchorOffset:
25384
+ type: integer
25385
+ focusKey:
25386
+ oneOf:
25387
+ - type: string
25388
+ - type: "null"
25389
+ focusOffset:
25390
+ type: integer
25391
+ required:
25392
+ - anchorKey
25393
+ - anchorOffset
25394
+ - focusKey
25395
+ - focusOffset
25147
25396
  AIMessageInput:
25148
25397
  type: object
25149
25398
  description: Input version of an AI message.
@@ -27678,6 +27927,24 @@ components:
27678
27927
  type: string
27679
27928
  required:
27680
27929
  - contents
27930
+ SignedURL:
27931
+ type: object
27932
+ properties:
27933
+ object:
27934
+ type: string
27935
+ description: The kind of signed URL
27936
+ enum:
27937
+ - signed-url
27938
+ url:
27939
+ $ref: "#/components/schemas/URL"
27940
+ description: Signed URL that can be opened by the browser
27941
+ expiresAt:
27942
+ $ref: "#/components/schemas/Timestamp"
27943
+ description: Expiration time of the signed URL
27944
+ required:
27945
+ - object
27946
+ - url
27947
+ - expiresAt
27681
27948
  PurgeCDNCacheContext:
27682
27949
  type: object
27683
27950
  description: The context to send when purging the CDN Cache
@@ -28046,6 +28313,185 @@ components:
28046
28313
  description: JWT token generated for a authenticated access session.
28047
28314
  unsignedClaims:
28048
28315
  $ref: "#/components/schemas/PlainObject"
28316
+ GitSyncInstallationProvider:
28317
+ type: string
28318
+ description: The provider of the Git Sync installation.
28319
+ enum:
28320
+ - github
28321
+ - gitlab
28322
+ GitSyncInstallationTarget:
28323
+ type: object
28324
+ description: Resource targeted by a Git Sync installation. Currently only spaces are supported.
28325
+ properties:
28326
+ spaceId:
28327
+ type: string
28328
+ description: Unique identifier of the space targeted by the Git Sync installation.
28329
+ required:
28330
+ - spaceId
28331
+ GitSyncInstallationPriority:
28332
+ type: string
28333
+ description: Which side should be treated as the source of truth when Git Sync is configured.
28334
+ enum:
28335
+ - git
28336
+ - gitbook
28337
+ GitSyncInstallationSetupCommon:
28338
+ type: object
28339
+ description: Common setup fields for a Git Sync installation.
28340
+ properties:
28341
+ projectDirectory:
28342
+ type: string
28343
+ description: Optional directory used when syncing a monorepo subdirectory.
28344
+ commitMessageTemplate:
28345
+ type: string
28346
+ description: Optional template used when generating commit messages.
28347
+ previewExternalBranches:
28348
+ type: boolean
28349
+ default: false
28350
+ description: Whether previews should be generated from branches outside the configured branch.
28351
+ priority:
28352
+ $ref: "#/components/schemas/GitSyncInstallationPriority"
28353
+ GitSyncInstallationSetupGitHub:
28354
+ allOf:
28355
+ - $ref: "#/components/schemas/GitSyncInstallationSetupCommon"
28356
+ - type: object
28357
+ description: GitHub provider configuration for a Git Sync installation.
28358
+ properties:
28359
+ provider:
28360
+ type: string
28361
+ enum:
28362
+ - github
28363
+ providerConfiguration:
28364
+ type: object
28365
+ description: GitHub specific configuration for the Git Sync installation.
28366
+ properties:
28367
+ repositoryId:
28368
+ type: number
28369
+ description: GitHub repository identifier.
28370
+ branch:
28371
+ type: string
28372
+ description: GitHub repository branch.
28373
+ required:
28374
+ - provider
28375
+ - providerConfiguration
28376
+ GitSyncInstallationSetupGitLab:
28377
+ allOf:
28378
+ - $ref: "#/components/schemas/GitSyncInstallationSetupCommon"
28379
+ - type: object
28380
+ description: GitLab provider configuration for a Git Sync installation.
28381
+ properties:
28382
+ provider:
28383
+ type: string
28384
+ enum:
28385
+ - gitlab
28386
+ providerConfiguration:
28387
+ type: object
28388
+ description: GitLab specific configuration for the Git Sync installation.
28389
+ properties:
28390
+ projectId:
28391
+ type: number
28392
+ description: GitLab project identifier.
28393
+ accessToken:
28394
+ type: string
28395
+ description: GitLab access token with appropriate scopes for repository access.
28396
+ customInstanceURL:
28397
+ type: string
28398
+ description: Custom GitLab instance URL, if using a self-hosted GitLab.
28399
+ branch:
28400
+ type: string
28401
+ description: GitLab repository branch.
28402
+ required:
28403
+ - provider
28404
+ - providerConfiguration
28405
+ GitSyncInstallationSetup:
28406
+ description: Provider-specific setup payload for a Git Sync installation.
28407
+ oneOf:
28408
+ - $ref: "#/components/schemas/GitSyncInstallationSetupGitHub"
28409
+ - $ref: "#/components/schemas/GitSyncInstallationSetupGitLab"
28410
+ discriminator:
28411
+ propertyName: provider
28412
+ GitSyncInstallation:
28413
+ allOf:
28414
+ - $ref: "#/components/schemas/GitSyncInstallationSetup"
28415
+ - type: object
28416
+ properties:
28417
+ object:
28418
+ type: string
28419
+ enum:
28420
+ - git-sync-installation
28421
+ id:
28422
+ type: string
28423
+ description: Unique identifier of the Git Sync installation.
28424
+ target:
28425
+ $ref: "#/components/schemas/GitSyncInstallationTarget"
28426
+ createdAt:
28427
+ $ref: "#/components/schemas/Timestamp"
28428
+ createdBy:
28429
+ type: string
28430
+ description: Identifier of the user who created the installation.
28431
+ updatedAt:
28432
+ $ref: "#/components/schemas/Timestamp"
28433
+ required:
28434
+ - object
28435
+ - id
28436
+ - target
28437
+ - createdAt
28438
+ - createdBy
28439
+ - updatedAt
28440
+ GitSyncGitHubRepository:
28441
+ type: object
28442
+ description: GitHub repository that can be selected for Git Sync.
28443
+ properties:
28444
+ id:
28445
+ type: number
28446
+ accountName:
28447
+ type: string
28448
+ repositoryName:
28449
+ type: string
28450
+ fullName:
28451
+ type: string
28452
+ defaultBranch:
28453
+ type:
28454
+ - string
28455
+ - "null"
28456
+ required:
28457
+ - id
28458
+ - accountName
28459
+ - repositoryName
28460
+ - fullName
28461
+ - defaultBranch
28462
+ GitSyncBranch:
28463
+ type: object
28464
+ description: Branch that can be used for Git Sync.
28465
+ properties:
28466
+ name:
28467
+ type: string
28468
+ ref:
28469
+ type: string
28470
+ required:
28471
+ - name
28472
+ - ref
28473
+ GitSyncGitLabProject:
28474
+ type: object
28475
+ description: GitLab project that can be selected for Git Sync.
28476
+ properties:
28477
+ id:
28478
+ type: number
28479
+ accountName:
28480
+ type: string
28481
+ repositoryName:
28482
+ type: string
28483
+ fullName:
28484
+ type: string
28485
+ defaultBranch:
28486
+ type:
28487
+ - string
28488
+ - "null"
28489
+ required:
28490
+ - id
28491
+ - accountName
28492
+ - repositoryName
28493
+ - fullName
28494
+ - defaultBranch
28049
28495
  SHA256:
28050
28496
  type: string
28051
28497
  minLength: 64
@@ -30168,3 +30614,25 @@ components:
30168
30614
  application/json:
30169
30615
  schema:
30170
30616
  $ref: "#/components/schemas/Error"
30617
+ UnauthorizedError:
30618
+ description: Unauthorized
30619
+ content:
30620
+ application/json:
30621
+ schema:
30622
+ type: object
30623
+ required:
30624
+ - error
30625
+ properties:
30626
+ error:
30627
+ type: object
30628
+ properties:
30629
+ code:
30630
+ type: integer
30631
+ format: int32
30632
+ enum:
30633
+ - 401
30634
+ message:
30635
+ type: string
30636
+ required:
30637
+ - code
30638
+ - message