@gitbook/api 0.178.0 → 0.180.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
@@ -1256,6 +1256,7 @@ paths:
1256
1256
  - $ref: "#/components/parameters/spaceId"
1257
1257
  - $ref: "#/components/parameters/pageId"
1258
1258
  - $ref: "#/components/parameters/documentFormat"
1259
+ - $ref: "#/components/parameters/documentMarkdownRefsFormat"
1259
1260
  - $ref: "#/components/parameters/documentEvaluated"
1260
1261
  - $ref: "#/components/parameters/documentDereferenced"
1261
1262
  - $ref: "#/components/parameters/revisionMetadata"
@@ -1364,6 +1365,7 @@ paths:
1364
1365
  - $ref: "#/components/parameters/spaceId"
1365
1366
  - $ref: "#/components/parameters/pagePath"
1366
1367
  - $ref: "#/components/parameters/documentFormat"
1368
+ - $ref: "#/components/parameters/documentMarkdownRefsFormat"
1367
1369
  - $ref: "#/components/parameters/documentEvaluated"
1368
1370
  - $ref: "#/components/parameters/documentDereferenced"
1369
1371
  - $ref: "#/components/parameters/revisionMetadata"
@@ -2364,6 +2366,7 @@ paths:
2364
2366
  - $ref: "#/components/parameters/changeRequestId"
2365
2367
  - $ref: "#/components/parameters/pageId"
2366
2368
  - $ref: "#/components/parameters/documentFormat"
2369
+ - $ref: "#/components/parameters/documentMarkdownRefsFormat"
2367
2370
  - $ref: "#/components/parameters/documentEvaluated"
2368
2371
  - $ref: "#/components/parameters/documentDereferenced"
2369
2372
  - $ref: "#/components/parameters/revisionMetadata"
@@ -2680,6 +2683,7 @@ paths:
2680
2683
  - $ref: "#/components/parameters/revisionId"
2681
2684
  - $ref: "#/components/parameters/pageId"
2682
2685
  - $ref: "#/components/parameters/documentFormat"
2686
+ - $ref: "#/components/parameters/documentMarkdownRefsFormat"
2683
2687
  - $ref: "#/components/parameters/documentEvaluated"
2684
2688
  - $ref: "#/components/parameters/documentDereferenced"
2685
2689
  - $ref: "#/components/parameters/revisionMetadata"
@@ -2725,6 +2729,7 @@ paths:
2725
2729
  - $ref: "#/components/parameters/revisionId"
2726
2730
  - $ref: "#/components/parameters/pagePath"
2727
2731
  - $ref: "#/components/parameters/documentFormat"
2732
+ - $ref: "#/components/parameters/documentMarkdownRefsFormat"
2728
2733
  - $ref: "#/components/parameters/documentEvaluated"
2729
2734
  - $ref: "#/components/parameters/documentDereferenced"
2730
2735
  - $ref: "#/components/parameters/revisionMetadata"
@@ -2770,6 +2775,7 @@ paths:
2770
2775
  - $ref: "#/components/parameters/changeRequestId"
2771
2776
  - $ref: "#/components/parameters/pagePath"
2772
2777
  - $ref: "#/components/parameters/documentFormat"
2778
+ - $ref: "#/components/parameters/documentMarkdownRefsFormat"
2773
2779
  - $ref: "#/components/parameters/documentEvaluated"
2774
2780
  - $ref: "#/components/parameters/documentDereferenced"
2775
2781
  - $ref: "#/components/parameters/revisionMetadata"
@@ -5223,6 +5229,18 @@ paths:
5223
5229
  schema:
5224
5230
  type: string
5225
5231
  description: If defined, only change requests with a requested reviewer for this user will be returned.
5232
+ - name: site
5233
+ in: query
5234
+ required: false
5235
+ schema:
5236
+ type: string
5237
+ description: If defined, only change requests linked to this site will be returned.
5238
+ - name: space
5239
+ in: query
5240
+ required: false
5241
+ schema:
5242
+ type: string
5243
+ description: If defined, only change requests from this space will be returned.
5226
5244
  - name: topic
5227
5245
  in: query
5228
5246
  required: false
@@ -7781,6 +7799,8 @@ paths:
7781
7799
  type: string
7782
7800
  scope:
7783
7801
  $ref: "#/components/schemas/SiteSearchScope"
7802
+ session:
7803
+ $ref: "#/components/schemas/SiteInsightsSession"
7784
7804
  responses:
7785
7805
  "200":
7786
7806
  description: OK
@@ -10710,6 +10730,229 @@ paths:
10710
10730
  "404":
10711
10731
  description: No content found for the URL.
10712
10732
  $ref: "#/components/responses/NotFoundError"
10733
+ /git/installations:
10734
+ post:
10735
+ operationId: installGitSyncProviderOnTarget
10736
+ summary: Install a Git Sync provider on a target
10737
+ tags:
10738
+ - git
10739
+ security:
10740
+ - user: []
10741
+ requestBody:
10742
+ required: true
10743
+ content:
10744
+ application/json:
10745
+ schema:
10746
+ type: object
10747
+ properties:
10748
+ provider:
10749
+ $ref: "#/components/schemas/GitSyncInstallationProvider"
10750
+ target:
10751
+ $ref: "#/components/schemas/GitSyncInstallationTarget"
10752
+ required:
10753
+ - provider
10754
+ - target
10755
+ responses:
10756
+ "201":
10757
+ description: Git Sync installation was created successfully
10758
+ content:
10759
+ application/json:
10760
+ schema:
10761
+ $ref: "#/components/schemas/GitSyncInstallation"
10762
+ "404":
10763
+ $ref: "#/components/responses/NotFoundError"
10764
+ "409":
10765
+ $ref: "#/components/responses/ConflictError"
10766
+ "/git/installations/{installationId}":
10767
+ get:
10768
+ operationId: getGitSyncInstallationById
10769
+ summary: Get a Git Sync installation
10770
+ tags:
10771
+ - git
10772
+ security:
10773
+ - user: []
10774
+ parameters:
10775
+ - $ref: "#/components/parameters/installationId"
10776
+ responses:
10777
+ "200":
10778
+ description: Git Sync installation was found 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
+ patch:
10788
+ operationId: updateGitSyncInstallationById
10789
+ summary: Update a Git Sync installation configuration
10790
+ tags:
10791
+ - git
10792
+ security:
10793
+ - user: []
10794
+ parameters:
10795
+ - $ref: "#/components/parameters/installationId"
10796
+ requestBody:
10797
+ required: true
10798
+ content:
10799
+ application/json:
10800
+ schema:
10801
+ $ref: "#/components/schemas/GitSyncInstallationSetup"
10802
+ responses:
10803
+ "200":
10804
+ description: Git Sync installation was updated successfully
10805
+ content:
10806
+ application/json:
10807
+ schema:
10808
+ $ref: "#/components/schemas/GitSyncInstallation"
10809
+ "401":
10810
+ $ref: "#/components/responses/UnauthorizedError"
10811
+ "404":
10812
+ $ref: "#/components/responses/NotFoundError"
10813
+ "409":
10814
+ $ref: "#/components/responses/ConflictError"
10815
+ delete:
10816
+ operationId: uninstallGitSyncInstallation
10817
+ summary: Uninstall a Git Sync installation
10818
+ tags:
10819
+ - git
10820
+ security:
10821
+ - user: []
10822
+ parameters:
10823
+ - $ref: "#/components/parameters/installationId"
10824
+ responses:
10825
+ "205":
10826
+ description: Git Sync installation was removed successfully
10827
+ "404":
10828
+ $ref: "#/components/responses/NotFoundError"
10829
+ "/git/installations/{installationId}/github/repos":
10830
+ get:
10831
+ operationId: listGitHubRepositoriesForGitSyncInstallation
10832
+ summary: List GitHub repositories available for a Git Sync installation
10833
+ tags:
10834
+ - git
10835
+ security:
10836
+ - user: []
10837
+ parameters:
10838
+ - $ref: "#/components/parameters/installationId"
10839
+ responses:
10840
+ "200":
10841
+ description: GitHub repositories available for the Git Sync installation
10842
+ content:
10843
+ application/json:
10844
+ schema:
10845
+ type: object
10846
+ properties:
10847
+ items:
10848
+ type: array
10849
+ items:
10850
+ $ref: "#/components/schemas/GitSyncGitHubRepository"
10851
+ required:
10852
+ - items
10853
+ "401":
10854
+ $ref: "#/components/responses/UnauthorizedError"
10855
+ "404":
10856
+ $ref: "#/components/responses/NotFoundError"
10857
+ "/git/installations/{installationId}/github/repos/{accountName}/{repositoryName}/branches":
10858
+ get:
10859
+ operationId: listGitHubRepoBranchesForGitSyncInstallation
10860
+ summary: List GitHub repository branches available for a Git Sync installation
10861
+ tags:
10862
+ - git
10863
+ security:
10864
+ - user: []
10865
+ parameters:
10866
+ - $ref: "#/components/parameters/installationId"
10867
+ - name: accountName
10868
+ in: path
10869
+ required: true
10870
+ schema:
10871
+ type: string
10872
+ - name: repositoryName
10873
+ in: path
10874
+ required: true
10875
+ schema:
10876
+ type: string
10877
+ responses:
10878
+ "200":
10879
+ description: GitHub branches available for the selected repository
10880
+ content:
10881
+ application/json:
10882
+ schema:
10883
+ type: object
10884
+ properties:
10885
+ items:
10886
+ type: array
10887
+ items:
10888
+ $ref: "#/components/schemas/GitSyncBranch"
10889
+ required:
10890
+ - items
10891
+ "401":
10892
+ $ref: "#/components/responses/UnauthorizedError"
10893
+ "404":
10894
+ $ref: "#/components/responses/NotFoundError"
10895
+ "/git/installations/{installationId}/gitlab/projects":
10896
+ get:
10897
+ operationId: listGitLabProjectsForGitSyncInstallation
10898
+ summary: List GitLab projects available for a Git Sync installation
10899
+ tags:
10900
+ - git
10901
+ security:
10902
+ - user: []
10903
+ parameters:
10904
+ - $ref: "#/components/parameters/installationId"
10905
+ responses:
10906
+ "200":
10907
+ description: GitLab projects available for the Git Sync installation
10908
+ content:
10909
+ application/json:
10910
+ schema:
10911
+ type: object
10912
+ properties:
10913
+ items:
10914
+ type: array
10915
+ items:
10916
+ $ref: "#/components/schemas/GitSyncGitLabProject"
10917
+ required:
10918
+ - items
10919
+ "401":
10920
+ $ref: "#/components/responses/UnauthorizedError"
10921
+ "404":
10922
+ $ref: "#/components/responses/NotFoundError"
10923
+ "/git/installations/{installationId}/gitlab/projects/{projectId}/branches":
10924
+ get:
10925
+ operationId: listGitLabProjectBranchesForGitSyncInstallation
10926
+ summary: List GitLab project branches available for a Git Sync installation
10927
+ tags:
10928
+ - git
10929
+ security:
10930
+ - user: []
10931
+ parameters:
10932
+ - $ref: "#/components/parameters/installationId"
10933
+ - name: projectId
10934
+ in: path
10935
+ required: true
10936
+ schema:
10937
+ type: number
10938
+ responses:
10939
+ "200":
10940
+ description: GitLab branches available for the selected project
10941
+ content:
10942
+ application/json:
10943
+ schema:
10944
+ type: object
10945
+ properties:
10946
+ items:
10947
+ type: array
10948
+ items:
10949
+ $ref: "#/components/schemas/GitSyncBranch"
10950
+ required:
10951
+ - items
10952
+ "401":
10953
+ $ref: "#/components/responses/UnauthorizedError"
10954
+ "404":
10955
+ $ref: "#/components/responses/NotFoundError"
10713
10956
  components:
10714
10957
  securitySchemes:
10715
10958
  user:
@@ -10816,6 +11059,20 @@ components:
10816
11059
  enum:
10817
11060
  - document
10818
11061
  - markdown
11062
+ documentMarkdownRefsFormat:
11063
+ name: format.markdown.refs
11064
+ in: query
11065
+ description: |
11066
+ Controls how content references are formatted in markdown output. Ignored unless `format=markdown`.
11067
+
11068
+ - `relative`: Format page references as relative links from the current page. Other references might not be handled.
11069
+ - `stable`: Format content references as stable idempotent refs containing their identifiers.
11070
+ schema:
11071
+ type: string
11072
+ default: relative
11073
+ enum:
11074
+ - relative
11075
+ - stable
10819
11076
  documentEvaluated:
10820
11077
  name: evaluated
10821
11078
  in: query
@@ -11538,6 +11795,7 @@ components:
11538
11795
  - ru
11539
11796
  - ja
11540
11797
  - zh
11798
+ - zh-tw
11541
11799
  - yue
11542
11800
  - ko
11543
11801
  - ar
@@ -11566,6 +11824,12 @@ components:
11566
11824
  - lv
11567
11825
  - et
11568
11826
  - sl
11827
+ GitSyncInstallationStatus:
11828
+ type: string
11829
+ enum:
11830
+ - unauthenticated
11831
+ - active
11832
+ - pending
11569
11833
  GitSyncProvider:
11570
11834
  type: string
11571
11835
  description: The provider of the Git Sync installation.
@@ -11579,11 +11843,17 @@ components:
11579
11843
  repoName:
11580
11844
  type: string
11581
11845
  description: Repository name.
11846
+ installationStatus:
11847
+ $ref: "#/components/schemas/GitSyncInstallationStatus"
11582
11848
  installationProvider:
11583
11849
  $ref: "#/components/schemas/GitSyncProvider"
11584
11850
  integration:
11585
11851
  type: string
11852
+ deprecated: true
11586
11853
  description: The integration name providing the Git Sync.
11854
+ installationId:
11855
+ type: string
11856
+ description: The ID of the Git Sync installation.
11587
11857
  url:
11588
11858
  type: string
11589
11859
  description: The URL to the repository tree, used when rendering public content.
@@ -12307,6 +12577,8 @@ components:
12307
12577
  - type
12308
12578
  DocumentTextColor:
12309
12579
  type: string
12580
+ description: |
12581
+ 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
12582
  enum:
12311
12583
  - default
12312
12584
  - green
@@ -12315,11 +12587,15 @@ components:
12315
12587
  - orange
12316
12588
  - yellow
12317
12589
  - purple
12590
+ - pink
12591
+ - violet
12592
+ - cyan
12318
12593
  - $primary
12319
12594
  - $info
12320
12595
  - $success
12321
12596
  - $warning
12322
12597
  - $danger
12598
+ - $tint
12323
12599
  DocumentMarkColor:
12324
12600
  type: object
12325
12601
  properties:
@@ -15855,11 +16131,15 @@ components:
15855
16131
  description: Virtual revision, computed from a source revision
15856
16132
  enum:
15857
16133
  - computed
16134
+ sourceRevision:
16135
+ type: string
16136
+ description: ID of the non-computed revision used to compute this revision.
15858
16137
  mergedFrom:
15859
16138
  description: The change request the source revision was merged from, when the computed revision is derived from a merge revision.
15860
16139
  $ref: "#/components/schemas/ChangeRequest"
15861
16140
  required:
15862
16141
  - type
16142
+ - sourceRevision
15863
16143
  Revision:
15864
16144
  oneOf:
15865
16145
  - $ref: "#/components/schemas/RevisionTypeEdits"
@@ -21984,6 +22264,9 @@ components:
21984
22264
  - completed
21985
22265
  - failed
21986
22266
  - cancelled
22267
+ reason:
22268
+ description: Reason for the import failure when `status` is `failed`.
22269
+ type: string
21987
22270
  pages:
21988
22271
  description: Pages included in the import
21989
22272
  type: array
@@ -23207,6 +23490,19 @@ components:
23207
23490
  - title
23208
23491
  - score
23209
23492
  - url
23493
+ SiteInsightsSession:
23494
+ type: object
23495
+ description: Identifiers for a GitBook site session, used for analytics and adaptive content.
23496
+ properties:
23497
+ visitorId:
23498
+ type: string
23499
+ description: GitBook's unique identifier of the visitor.
23500
+ sessionId:
23501
+ type: string
23502
+ description: GitBook's unique identifier of the visitor's session.
23503
+ required:
23504
+ - visitorId
23505
+ - sessionId
23210
23506
  ContextRecordType:
23211
23507
  type: string
23212
23508
  enum:
@@ -24088,19 +24384,6 @@ components:
24088
24384
  - low
24089
24385
  - medium
24090
24386
  - 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
24387
  SiteCoreChannelType:
24105
24388
  type: string
24106
24389
  enum:
@@ -24422,11 +24705,15 @@ components:
24422
24705
  spaceId:
24423
24706
  type: string
24424
24707
  description: The ID of the space being edited.
24708
+ baseRevisionId:
24709
+ type: string
24710
+ description: The base revision ID used to compare the page change in the current conversation.
24425
24711
  page:
24426
24712
  $ref: "#/components/schemas/ChangedRevisionPage"
24427
24713
  required:
24428
24714
  - tool
24429
24715
  - spaceId
24716
+ - baseRevisionId
24430
24717
  - page
24431
24718
  AIToolCallCreatePage:
24432
24719
  type: object
@@ -24438,11 +24725,15 @@ components:
24438
24725
  spaceId:
24439
24726
  type: string
24440
24727
  description: The ID of the space being edited.
24728
+ baseRevisionId:
24729
+ type: string
24730
+ description: The base revision ID used to compare the page change in the current conversation.
24441
24731
  page:
24442
24732
  $ref: "#/components/schemas/ChangedRevisionPage"
24443
24733
  required:
24444
24734
  - tool
24445
24735
  - spaceId
24736
+ - baseRevisionId
24446
24737
  - page
24447
24738
  AIToolCallDeletePage:
24448
24739
  type: object
@@ -24454,11 +24745,15 @@ components:
24454
24745
  spaceId:
24455
24746
  type: string
24456
24747
  description: The ID of the space being edited.
24748
+ baseRevisionId:
24749
+ type: string
24750
+ description: The base revision ID used to compare the page deletion in the current conversation.
24457
24751
  page:
24458
24752
  $ref: "#/components/schemas/ChangedRevisionPage"
24459
24753
  required:
24460
24754
  - tool
24461
24755
  - spaceId
24756
+ - baseRevisionId
24462
24757
  - page
24463
24758
  AIToolCallRenamePage:
24464
24759
  type: object
@@ -24470,6 +24765,9 @@ components:
24470
24765
  spaceId:
24471
24766
  type: string
24472
24767
  description: The ID of the space being edited.
24768
+ baseRevisionId:
24769
+ type: string
24770
+ description: The base revision ID used to compare the page rename in the current conversation.
24473
24771
  page:
24474
24772
  $ref: "#/components/schemas/ChangedRevisionPage"
24475
24773
  title:
@@ -24478,6 +24776,7 @@ components:
24478
24776
  required:
24479
24777
  - tool
24480
24778
  - spaceId
24779
+ - baseRevisionId
24481
24780
  - page
24482
24781
  - title
24483
24782
  AIToolCallMovePage:
@@ -24490,6 +24789,9 @@ components:
24490
24789
  spaceId:
24491
24790
  type: string
24492
24791
  description: The ID of the space being edited.
24792
+ baseRevisionId:
24793
+ type: string
24794
+ description: The base revision ID used to compare the page move in the current conversation.
24493
24795
  page:
24494
24796
  $ref: "#/components/schemas/ChangedRevisionPage"
24495
24797
  to:
@@ -24508,6 +24810,7 @@ components:
24508
24810
  required:
24509
24811
  - tool
24510
24812
  - spaceId
24813
+ - baseRevisionId
24511
24814
  - page
24512
24815
  - moveType
24513
24816
  AIToolCallListModifiedPages:
@@ -24549,11 +24852,15 @@ components:
24549
24852
  spaceId:
24550
24853
  type: string
24551
24854
  description: The ID of the space being edited.
24855
+ baseRevisionId:
24856
+ type: string
24857
+ description: The base revision ID used to compare the reusable content change in the current conversation.
24552
24858
  reusableContent:
24553
24859
  $ref: "#/components/schemas/ChangedRevisionReusableContent"
24554
24860
  required:
24555
24861
  - tool
24556
24862
  - spaceId
24863
+ - baseRevisionId
24557
24864
  - reusableContent
24558
24865
  AIToolCallEditReusableContent:
24559
24866
  type: object
@@ -24565,11 +24872,15 @@ components:
24565
24872
  spaceId:
24566
24873
  type: string
24567
24874
  description: The ID of the space being edited.
24875
+ baseRevisionId:
24876
+ type: string
24877
+ description: The base revision ID used to compare the reusable content change in the current conversation.
24568
24878
  reusableContent:
24569
24879
  $ref: "#/components/schemas/ChangedRevisionReusableContent"
24570
24880
  required:
24571
24881
  - tool
24572
24882
  - spaceId
24883
+ - baseRevisionId
24573
24884
  - reusableContent
24574
24885
  AIToolCallGetReusableContent:
24575
24886
  type: object
@@ -25144,6 +25455,27 @@ components:
25144
25455
  required:
25145
25456
  - spaceId
25146
25457
  - pageId
25458
+ selection:
25459
+ type: object
25460
+ description: Range of the current selection in a document.
25461
+ properties:
25462
+ anchorKey:
25463
+ oneOf:
25464
+ - type: string
25465
+ - type: "null"
25466
+ anchorOffset:
25467
+ type: integer
25468
+ focusKey:
25469
+ oneOf:
25470
+ - type: string
25471
+ - type: "null"
25472
+ focusOffset:
25473
+ type: integer
25474
+ required:
25475
+ - anchorKey
25476
+ - anchorOffset
25477
+ - focusKey
25478
+ - focusOffset
25147
25479
  AIMessageInput:
25148
25480
  type: object
25149
25481
  description: Input version of an AI message.
@@ -26462,6 +26794,8 @@ components:
26462
26794
  - facebookbot
26463
26795
  - applebot
26464
26796
  - chatgpt
26797
+ - openai
26798
+ - claude
26465
26799
  - anthropic
26466
26800
  - gemini
26467
26801
  - perplexity
@@ -26476,6 +26810,8 @@ components:
26476
26810
  - cursor
26477
26811
  - vscode
26478
26812
  - claude-code
26813
+ - codex
26814
+ - opencode
26479
26815
  SiteInsightsQueryEventsValues:
26480
26816
  oneOf:
26481
26817
  - type: object
@@ -27678,6 +28014,24 @@ components:
27678
28014
  type: string
27679
28015
  required:
27680
28016
  - contents
28017
+ SignedURL:
28018
+ type: object
28019
+ properties:
28020
+ object:
28021
+ type: string
28022
+ description: The kind of signed URL
28023
+ enum:
28024
+ - signed-url
28025
+ url:
28026
+ $ref: "#/components/schemas/URL"
28027
+ description: Signed URL that can be opened by the browser
28028
+ expiresAt:
28029
+ $ref: "#/components/schemas/Timestamp"
28030
+ description: Expiration time of the signed URL
28031
+ required:
28032
+ - object
28033
+ - url
28034
+ - expiresAt
27681
28035
  PurgeCDNCacheContext:
27682
28036
  type: object
27683
28037
  description: The context to send when purging the CDN Cache
@@ -28046,6 +28400,201 @@ components:
28046
28400
  description: JWT token generated for a authenticated access session.
28047
28401
  unsignedClaims:
28048
28402
  $ref: "#/components/schemas/PlainObject"
28403
+ GitSyncInstallationProvider:
28404
+ type: string
28405
+ description: The provider of the Git Sync installation.
28406
+ enum:
28407
+ - github
28408
+ - gitlab
28409
+ GitSyncInstallationTarget:
28410
+ type: object
28411
+ description: Resource targeted by a Git Sync installation. Currently only spaces are supported.
28412
+ properties:
28413
+ spaceId:
28414
+ type: string
28415
+ description: Unique identifier of the space targeted by the Git Sync installation.
28416
+ required:
28417
+ - spaceId
28418
+ GitSyncInstallationPriority:
28419
+ type: string
28420
+ description: Which side should be treated as the source of truth when Git Sync is configured.
28421
+ enum:
28422
+ - git
28423
+ - gitbook
28424
+ GitSyncInstallationSetupCommon:
28425
+ type: object
28426
+ description: Common setup fields for a Git Sync installation.
28427
+ properties:
28428
+ projectDirectory:
28429
+ type: string
28430
+ description: Optional directory used when syncing a monorepo subdirectory.
28431
+ commitMessageTemplate:
28432
+ type: string
28433
+ description: Optional template used when generating commit messages.
28434
+ previewExternalBranches:
28435
+ type: boolean
28436
+ default: false
28437
+ description: Whether previews should be generated from branches outside the configured branch.
28438
+ priority:
28439
+ $ref: "#/components/schemas/GitSyncInstallationPriority"
28440
+ GitSyncInstallationSetupGitHub:
28441
+ type: object
28442
+ description: GitHub provider configuration for a Git Sync installation.
28443
+ properties:
28444
+ provider:
28445
+ type: string
28446
+ enum:
28447
+ - github
28448
+ providerConfiguration:
28449
+ type: object
28450
+ description: GitHub specific configuration for the Git Sync installation.
28451
+ properties:
28452
+ repositoryId:
28453
+ type: number
28454
+ description: GitHub repository identifier.
28455
+ branch:
28456
+ type: string
28457
+ pattern: ^refs/heads/.+$
28458
+ description: GitHub repository branch ref.
28459
+ required:
28460
+ - provider
28461
+ - providerConfiguration
28462
+ GitSyncInstallationSetupGitLab:
28463
+ type: object
28464
+ description: GitLab provider configuration for a Git Sync installation.
28465
+ properties:
28466
+ provider:
28467
+ type: string
28468
+ enum:
28469
+ - gitlab
28470
+ providerConfiguration:
28471
+ type: object
28472
+ description: GitLab specific configuration for the Git Sync installation.
28473
+ properties:
28474
+ projectId:
28475
+ type: number
28476
+ description: GitLab project identifier.
28477
+ accessToken:
28478
+ type: string
28479
+ description: GitLab access token with appropriate scopes for repository access.
28480
+ customInstanceURL:
28481
+ oneOf:
28482
+ - type: string
28483
+ - type: "null"
28484
+ description: Custom GitLab instance URL, if using a self-hosted GitLab. Use null to clear a self-hosted URL.
28485
+ branch:
28486
+ type: string
28487
+ pattern: ^refs/heads/.+$
28488
+ description: GitLab repository branch ref.
28489
+ required:
28490
+ - provider
28491
+ - providerConfiguration
28492
+ GitSyncInstallationSetup:
28493
+ description: Provider-specific setup payload for a Git Sync installation.
28494
+ allOf:
28495
+ - $ref: "#/components/schemas/GitSyncInstallationSetupCommon"
28496
+ - oneOf:
28497
+ - $ref: "#/components/schemas/GitSyncInstallationSetupGitHub"
28498
+ - $ref: "#/components/schemas/GitSyncInstallationSetupGitLab"
28499
+ discriminator:
28500
+ propertyName: provider
28501
+ GitSyncInstallation:
28502
+ allOf:
28503
+ - $ref: "#/components/schemas/GitSyncInstallationSetup"
28504
+ - type: object
28505
+ properties:
28506
+ object:
28507
+ type: string
28508
+ enum:
28509
+ - git-sync-installation
28510
+ id:
28511
+ type: string
28512
+ description: Unique identifier of the Git Sync installation.
28513
+ target:
28514
+ $ref: "#/components/schemas/GitSyncInstallationTarget"
28515
+ status:
28516
+ $ref: "#/components/schemas/GitSyncInstallationStatus"
28517
+ createdAt:
28518
+ $ref: "#/components/schemas/Timestamp"
28519
+ createdBy:
28520
+ type: string
28521
+ description: Identifier of the user who created the installation.
28522
+ updatedAt:
28523
+ $ref: "#/components/schemas/Timestamp"
28524
+ urls:
28525
+ type: object
28526
+ description: URLs associated with the installation
28527
+ properties:
28528
+ location:
28529
+ type: string
28530
+ description: URL of the installation endpoint in the API
28531
+ format: uri
28532
+ required:
28533
+ - location
28534
+ required:
28535
+ - object
28536
+ - id
28537
+ - target
28538
+ - status
28539
+ - createdAt
28540
+ - createdBy
28541
+ - updatedAt
28542
+ - urls
28543
+ GitSyncGitHubRepository:
28544
+ type: object
28545
+ description: GitHub repository that can be selected for Git Sync.
28546
+ properties:
28547
+ id:
28548
+ type: number
28549
+ accountName:
28550
+ type: string
28551
+ repositoryName:
28552
+ type: string
28553
+ fullName:
28554
+ type: string
28555
+ defaultBranch:
28556
+ type:
28557
+ - string
28558
+ - "null"
28559
+ required:
28560
+ - id
28561
+ - accountName
28562
+ - repositoryName
28563
+ - fullName
28564
+ - defaultBranch
28565
+ GitSyncBranch:
28566
+ type: object
28567
+ description: Branch that can be used for Git Sync.
28568
+ properties:
28569
+ name:
28570
+ type: string
28571
+ ref:
28572
+ type: string
28573
+ required:
28574
+ - name
28575
+ - ref
28576
+ GitSyncGitLabProject:
28577
+ type: object
28578
+ description: GitLab project that can be selected for Git Sync.
28579
+ properties:
28580
+ id:
28581
+ type: number
28582
+ accountName:
28583
+ type: string
28584
+ repositoryName:
28585
+ type: string
28586
+ fullName:
28587
+ type: string
28588
+ defaultBranch:
28589
+ type:
28590
+ - string
28591
+ - "null"
28592
+ required:
28593
+ - id
28594
+ - accountName
28595
+ - repositoryName
28596
+ - fullName
28597
+ - defaultBranch
28049
28598
  SHA256:
28050
28599
  type: string
28051
28600
  minLength: 64
@@ -29560,6 +30109,18 @@ components:
29560
30109
  required:
29561
30110
  - channel
29562
30111
  - customHostname
30112
+ APIChannelGitSyncInstallation:
30113
+ type: object
30114
+ properties:
30115
+ channel:
30116
+ type: string
30117
+ enum:
30118
+ - git-sync-installation
30119
+ installation:
30120
+ type: string
30121
+ required:
30122
+ - channel
30123
+ - installation
29563
30124
  APIChannelGitSyncOperation:
29564
30125
  type: object
29565
30126
  properties:
@@ -29702,6 +30263,7 @@ components:
29702
30263
  - $ref: "#/components/schemas/APIChannelSiteMcpServer"
29703
30264
  - $ref: "#/components/schemas/APIChannelSiteSection"
29704
30265
  - $ref: "#/components/schemas/APIChannelCustomHostname"
30266
+ - $ref: "#/components/schemas/APIChannelGitSyncInstallation"
29705
30267
  - $ref: "#/components/schemas/APIChannelGitSyncOperation"
29706
30268
  - $ref: "#/components/schemas/APIChannelOpenAPISpec"
29707
30269
  - $ref: "#/components/schemas/APIChannelSubdomain"
@@ -30168,3 +30730,25 @@ components:
30168
30730
  application/json:
30169
30731
  schema:
30170
30732
  $ref: "#/components/schemas/Error"
30733
+ UnauthorizedError:
30734
+ description: Unauthorized
30735
+ content:
30736
+ application/json:
30737
+ schema:
30738
+ type: object
30739
+ required:
30740
+ - error
30741
+ properties:
30742
+ error:
30743
+ type: object
30744
+ properties:
30745
+ code:
30746
+ type: integer
30747
+ format: int32
30748
+ enum:
30749
+ - 401
30750
+ message:
30751
+ type: string
30752
+ required:
30753
+ - code
30754
+ - message