@gitbook/api 0.189.0 → 0.190.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
@@ -949,21 +949,6 @@ paths:
949
949
  "404":
950
950
  description: No Git provider currently set up on the space
951
951
  $ref: "#/components/responses/NotFoundError"
952
- /spaces/{spaceId}/git/legacy-installation:
953
- delete:
954
- operationId: deleteLegacyGitInstallation
955
- summary: Remove the legacy Git Sync installation from the space to be able to upgrade it to use the new Git integrations
956
- tags:
957
- - space-git
958
- security:
959
- - user-internal: []
960
- parameters:
961
- - $ref: "#/components/parameters/spaceId"
962
- responses:
963
- "204":
964
- description: The legacy Git installation was already removed
965
- "205":
966
- description: The legacy Git installation was successfully removed
967
952
  /spaces/{spaceId}/permissions:
968
953
  post:
969
954
  operationId: inviteToSpace
@@ -2388,7 +2373,23 @@ paths:
2388
2373
  post:
2389
2374
  operationId: updateChangeRequestContent
2390
2375
  summary: Apply a batch of content changes to a change request
2391
- description: Applies an ordered array of content changes (up to 50) to the change request atomically, creating a single new revision. Changes are applied sequentially; if any single change is invalid the entire batch is rejected and no revision is created. Use this to create, update, move, or delete pages within a change request before merging to live. This is the primary way to programmatically author content in a change request.
2376
+ description: |-
2377
+ Applies an ordered array of content changes (up to 50) to the change request atomically, creating a single new revision. Changes are applied sequentially; if any single change is invalid the entire batch is rejected and no revision is created. Use this to create, update, move, or delete pages within a change request before merging to live. This is the primary way to programmatically author content in a change request.
2378
+
2379
+ When page content is provided as markdown, links to other pages are resolved against the change request's current page tree. You can link a page by:
2380
+ - Page ID — `/pages/<pageId>` (also `/pages/<pageId>#anchor`).
2381
+ - Page slug path — `/pages/<slug>` for a top-level page, or `/pages/<parent-slug>/<slug>`
2382
+ for a nested page (e.g. `/pages/guides/getting-started`).
2383
+
2384
+ - Markdown file path — the path the page would have in Git: `/pages/<slug>.md` for a page,
2385
+ or `/pages/<slug>/README.md` for a page that has child pages. The space's root page is
2386
+ `/pages/README.md`.
2387
+
2388
+ - Relative markdown link — resolved against the page being edited, e.g. `./sibling.md`,
2389
+ `../other.md`, or `../README.md` (the parent page). Folder-style links without an
2390
+ extension (e.g. `./section`) resolve to that folder's page.
2391
+
2392
+ External URLs (`https://…`) are kept as-is. A link that does not match any page in the change request is left as plain text rather than causing the request to fail.
2392
2393
  x-gitbook-mcp: true
2393
2394
  tags:
2394
2395
  - change-request-content
@@ -4859,7 +4860,7 @@ paths:
4859
4860
  $ref: "#/components/schemas/MemberRoleOrGuest"
4860
4861
  delete:
4861
4862
  operationId: removeMemberFromOrganizationById
4862
- summary: Delete an organization member
4863
+ summary: Remove an organization member or request an organization admin to do it
4863
4864
  tags:
4864
4865
  - organization-members
4865
4866
  security:
@@ -4870,6 +4871,8 @@ paths:
4870
4871
  - $ref: "#/components/parameters/organizationId"
4871
4872
  - $ref: "#/components/parameters/userId"
4872
4873
  responses:
4874
+ "202":
4875
+ description: The removal request was sent to the organization administrators.
4873
4876
  "204":
4874
4877
  description: Member did not exist in the organization.
4875
4878
  "205":
@@ -8362,10 +8365,9 @@ paths:
8362
8365
  siteSpaceId:
8363
8366
  type: string
8364
8367
  goal:
8365
- type: string
8366
- maxLength: 1024
8367
8368
  description: |
8368
8369
  The end goal the agent is trying to accomplish on behalf of the user. Unlike the question, which is the immediate query, the goal describes the broader task or outcome the agent is working towards. GitBook uses this to steer the answer towards what is ultimately useful for that goal.
8370
+ $ref: "#/components/schemas/AgentGoal"
8369
8371
  scope:
8370
8372
  $ref: "#/components/schemas/SiteSearchScope"
8371
8373
  session:
@@ -12795,6 +12797,18 @@ components:
12795
12797
  - github
12796
12798
  - gitlab
12797
12799
  - github-legacy
12800
+ GitSyncOperationState:
12801
+ type: string
12802
+ description: |
12803
+ * `running`: The operation is still running
12804
+ * `failure`: The operation failed
12805
+ * `success`: The operation was successful
12806
+ * `timeout`: The operation timed out
12807
+ enum:
12808
+ - running
12809
+ - failure
12810
+ - success
12811
+ - timeout
12798
12812
  GitSyncState:
12799
12813
  type: object
12800
12814
  properties:
@@ -12815,6 +12829,14 @@ components:
12815
12829
  url:
12816
12830
  type: string
12817
12831
  description: The URL to the repository tree, used when rendering public content.
12832
+ operation:
12833
+ type: object
12834
+ description: The latest operation on the Git Sync installation.
12835
+ properties:
12836
+ state:
12837
+ $ref: "#/components/schemas/GitSyncOperationState"
12838
+ required:
12839
+ - state
12818
12840
  updatedAt:
12819
12841
  description: When the Git provider details were last updated
12820
12842
  $ref: "#/components/schemas/Timestamp"
@@ -13294,6 +13316,7 @@ components:
13294
13316
  description: If true, the import will generate a revision without updating the space primary content.
13295
13317
  gitInfo:
13296
13318
  description: Optional metadata to store on the space about the Git provider
13319
+ deprecated: true
13297
13320
  $ref: "#/components/schemas/UpdateSpaceGitInfo"
13298
13321
  required:
13299
13322
  - url
@@ -13329,8 +13352,13 @@ components:
13329
13352
  $ref: "#/components/schemas/Timestamp"
13330
13353
  force:
13331
13354
  type: boolean
13355
+ standalone:
13356
+ type: boolean
13357
+ description: |
13358
+ If true, the export will be done in a standalone mode, meaning that the exported content will not be linked to the Git repository. This is useful for creating a snapshot of the space's content.
13332
13359
  gitInfo:
13333
13360
  description: Optional metadata to store on the space about the Git provider
13361
+ deprecated: true
13334
13362
  $ref: "#/components/schemas/UpdateSpaceGitInfo"
13335
13363
  required:
13336
13364
  - url
@@ -13457,6 +13485,10 @@ components:
13457
13485
  updatedAt:
13458
13486
  description: When the page was last edited. Only present if page has been edited at least once.
13459
13487
  $ref: "#/components/schemas/Timestamp"
13488
+ condition:
13489
+ description: Adaptive-content condition controlling whether the page is shown to a visitor. Only present when the page has a condition set, and only returned when the API is called with a user, user-internal or OAuth token (never with a site/content token).
13490
+ type: string
13491
+ minLength: 1
13460
13492
  required:
13461
13493
  - id
13462
13494
  - title
@@ -14888,6 +14920,14 @@ components:
14888
14920
  $ref: "#/components/schemas/Icon"
14889
14921
  openInAIProviders:
14890
14922
  type: boolean
14923
+ defaultExpanded:
14924
+ type: string
14925
+ default: hidden
14926
+ description: Controls how much of the prompt content is visible by default.
14927
+ enum:
14928
+ - hidden
14929
+ - partial
14930
+ - full
14891
14931
  required:
14892
14932
  - description
14893
14933
  additionalProperties: false
@@ -17867,23 +17907,54 @@ components:
17867
17907
  - comment
17868
17908
  required:
17869
17909
  - actionType
17870
- ChangeRequestContentChangeUpdatePage:
17910
+ RevisionPageUpdate:
17871
17911
  type: object
17872
- description: Replace the document of an existing page with another document.
17873
- required:
17874
- - operation
17875
- - page
17876
- - document
17912
+ description: Page metadata that can be set when inserting or updating a page through a change request. When a markdown document is provided on the same operation, the values read from its frontmatter take precedence over these fields.
17877
17913
  properties:
17878
- operation:
17914
+ title:
17879
17915
  type: string
17880
- enum:
17881
- - update_page
17882
- page:
17916
+ minLength: 1
17917
+ description: Title of the page.
17918
+ emoji:
17919
+ description: Emoji of the page. Set to an empty string to remove it.
17920
+ $ref: "#/components/schemas/Emoji"
17921
+ icon:
17922
+ description: Icon of the page. Set to an empty string to remove it.
17923
+ $ref: "#/components/schemas/Icon"
17924
+ description:
17883
17925
  type: string
17884
- description: ID of the page whose content should be updated.
17885
- document:
17886
- $ref: "#/components/schemas/Document"
17926
+ description: Description of the page.
17927
+ hidden:
17928
+ type: boolean
17929
+ description: If true, the page is not displayed in the navigation, while still being accessible.
17930
+ noIndex:
17931
+ type: boolean
17932
+ description: If true, the page is not indexable in the search and ask features.
17933
+ noRobotsIndex:
17934
+ type: boolean
17935
+ description: If true, the page is not indexable by search engine robots.
17936
+ condition:
17937
+ type: string
17938
+ description: Adaptive-content condition controlling whether the page is shown to a visitor. Set to an empty string to remove the condition.
17939
+ ChangeRequestContentChangeUpdatePage:
17940
+ description: Update an existing page. Its document and/or its metadata (title, icon, description, visibility, adaptive-content condition) can be changed.
17941
+ allOf:
17942
+ - $ref: "#/components/schemas/RevisionPageUpdate"
17943
+ - type: object
17944
+ required:
17945
+ - operation
17946
+ - page
17947
+ properties:
17948
+ operation:
17949
+ type: string
17950
+ enum:
17951
+ - update_page
17952
+ page:
17953
+ type: string
17954
+ description: ID of the page to update.
17955
+ document:
17956
+ description: New document for the page. When provided as markdown, its frontmatter is read to update the page metadata. Omit to update only the metadata fields.
17957
+ $ref: "#/components/schemas/Document"
17887
17958
  example:
17888
17959
  operation: update_page
17889
17960
  page: page_id
@@ -17893,29 +17964,29 @@ components:
17893
17964
 
17894
17965
  This is a markdown document linking to [another page](/pages/page_id).
17895
17966
  ChangeRequestContentChangeInsertPage:
17896
- type: object
17897
17967
  description: Insert a new page into the change request.
17898
- required:
17899
- - operation
17900
- - title
17901
- - document
17902
- properties:
17903
- operation:
17904
- type: string
17905
- enum:
17906
- - insert_page
17907
- title:
17908
- type: string
17909
- description: Title of the new page.
17910
- into:
17911
- type: string
17912
- description: ID of the parent page to insert the new page into. If omitted, the page is inserted as a root page.
17913
- at:
17914
- type: integer
17915
- minimum: 0
17916
- description: Zero-based index to insert the page at among its siblings. If omitted, the page is appended at the end.
17917
- document:
17918
- $ref: "#/components/schemas/Document"
17968
+ allOf:
17969
+ - $ref: "#/components/schemas/RevisionPageUpdate"
17970
+ - type: object
17971
+ required:
17972
+ - operation
17973
+ - title
17974
+ - document
17975
+ properties:
17976
+ operation:
17977
+ type: string
17978
+ enum:
17979
+ - insert_page
17980
+ into:
17981
+ type: string
17982
+ description: ID of the parent page to insert the new page into. If omitted, the page is inserted as a root page.
17983
+ at:
17984
+ type: integer
17985
+ minimum: 0
17986
+ description: Zero-based index to insert the page at among its siblings. If omitted, the page is appended at the end.
17987
+ document:
17988
+ description: Document for the new page. When provided as markdown, its frontmatter is read to set the page metadata.
17989
+ $ref: "#/components/schemas/Document"
17919
17990
  example:
17920
17991
  operation: insert_page
17921
17992
  title: New page
@@ -18526,7 +18597,6 @@ components:
18526
18597
  - analytics
18527
18598
  - collaboration
18528
18599
  - content
18529
- - gitsync
18530
18600
  - marketing
18531
18601
  - visitor-auth
18532
18602
  - other
@@ -24870,6 +24940,36 @@ components:
24870
24940
  type: string
24871
24941
  description: |
24872
24942
  The ID of the site space that must always be included in the search results. The language of this site space will be used to match other site spaces with the same language, if applicable.
24943
+ restrictTo:
24944
+ description: |
24945
+ Must not be provided when searching the entire default scope. To restrict the search to a subset of the default scope, provide `restrictTo` along with `currentSiteSpace`.
24946
+ type: string
24947
+ minLength: 2
24948
+ maxLength: 1
24949
+ x-typescript: never
24950
+ - type: object
24951
+ required:
24952
+ - mode
24953
+ - currentSiteSpace
24954
+ - restrictTo
24955
+ properties:
24956
+ mode:
24957
+ description: |
24958
+ Search a subset of the default scope of the site, relative to the current site space.
24959
+ type: string
24960
+ enum:
24961
+ - default
24962
+ currentSiteSpace:
24963
+ type: string
24964
+ description: |
24965
+ The ID of the site space the search is made from. The language of this site space will be used to match other site spaces with the same language, if applicable.
24966
+ restrictTo:
24967
+ type: string
24968
+ enum:
24969
+ - currentSiteSpace
24970
+ - otherSiteSpaces
24971
+ description: |
24972
+ Restrict the search to a subset of the default scope. With `currentSiteSpace`, only the current site space is searched. With `otherSiteSpaces`, the current site space is excluded and only the other site spaces in the default scope are searched.
24873
24973
  - type: object
24874
24974
  required:
24875
24975
  - mode
@@ -24923,6 +25023,10 @@ components:
24923
25023
  - title
24924
25024
  - score
24925
25025
  - url
25026
+ AgentGoal:
25027
+ type: string
25028
+ maxLength: 1024
25029
+ description: The end goal the agent is trying to accomplish on behalf of the user. Unlike the immediate query, the goal describes the broader task or outcome the agent is working towards.
24926
25030
  SiteInsightsSession:
24927
25031
  type: object
24928
25032
  description: Identifiers for a GitBook site session, used for analytics and adaptive content.
@@ -24957,9 +25061,12 @@ components:
24957
25061
  - builtin:github-discussions
24958
25062
  - builtin:github-issues
24959
25063
  - builtin:intercom
25064
+ - builtin:front
24960
25065
  - builtin:zendesk
24961
25066
  - builtin:zoho-desk
25067
+ - builtin:freshdesk
24962
25068
  - builtin:pylon
25069
+ - builtin:hubspot
24963
25070
  - builtin:linear
24964
25071
  - builtin:jira
24965
25072
  ContextRecordTitle:
@@ -25595,6 +25702,23 @@ components:
25595
25702
  required:
25596
25703
  - connector
25597
25704
  - setupSettings
25705
+ - type: object
25706
+ properties:
25707
+ connector:
25708
+ type: string
25709
+ enum:
25710
+ - builtin:front
25711
+ setupSettings:
25712
+ type: object
25713
+ properties:
25714
+ token:
25715
+ type: string
25716
+ minLength: 1
25717
+ required:
25718
+ - token
25719
+ required:
25720
+ - connector
25721
+ - setupSettings
25598
25722
  - type: object
25599
25723
  properties:
25600
25724
  connector:
@@ -25655,6 +25779,29 @@ components:
25655
25779
  required:
25656
25780
  - connector
25657
25781
  - setupSettings
25782
+ - type: object
25783
+ properties:
25784
+ connector:
25785
+ type: string
25786
+ enum:
25787
+ - builtin:freshdesk
25788
+ setupSettings:
25789
+ type: object
25790
+ properties:
25791
+ domain:
25792
+ type: string
25793
+ minLength: 1
25794
+ description: Freshdesk domain hosting the account, e.g. `mycompany.freshdesk.com` or just `mycompany`. Tickets and the API are scoped by this domain.
25795
+ apiKey:
25796
+ type: string
25797
+ minLength: 1
25798
+ description: Freshdesk API key with permission to read tickets. Sent as HTTP Basic auth and redacted when read back.
25799
+ required:
25800
+ - domain
25801
+ - apiKey
25802
+ required:
25803
+ - connector
25804
+ - setupSettings
25658
25805
  - type: object
25659
25806
  properties:
25660
25807
  connector:
@@ -25672,6 +25819,23 @@ components:
25672
25819
  required:
25673
25820
  - connector
25674
25821
  - setupSettings
25822
+ - type: object
25823
+ properties:
25824
+ connector:
25825
+ type: string
25826
+ enum:
25827
+ - builtin:hubspot
25828
+ setupSettings:
25829
+ type: object
25830
+ properties:
25831
+ token:
25832
+ type: string
25833
+ minLength: 1
25834
+ required:
25835
+ - token
25836
+ required:
25837
+ - connector
25838
+ - setupSettings
25675
25839
  - type: object
25676
25840
  properties:
25677
25841
  connector:
@@ -26902,6 +27066,20 @@ components:
26902
27066
  required:
26903
27067
  - spaceId
26904
27068
  - pageId
27069
+ comments:
27070
+ type: array
27071
+ description: Comments on the content the user is referring to in the message.
27072
+ items:
27073
+ type: object
27074
+ properties:
27075
+ id:
27076
+ type: string
27077
+ description: ID of the comment.
27078
+ content:
27079
+ type: string
27080
+ description: Snapshot of the comment for display.
27081
+ required:
27082
+ - id
26905
27083
  selection:
26906
27084
  type: object
26907
27085
  description: Range of the current selection in a document.
@@ -30882,16 +31060,6 @@ components:
30882
31060
  - tag_created
30883
31061
  - tag_deleted
30884
31062
  - tag_edited
30885
- GitSyncOperationState:
30886
- type: string
30887
- description: |
30888
- * `running`: The operation is still running
30889
- * `failure`: The operation failed
30890
- * `success`: The operation was successful
30891
- enum:
30892
- - running
30893
- - failure
30894
- - success
30895
31063
  GitSyncOperationDirection:
30896
31064
  type: string
30897
31065
  enum: