@gitbook/api 0.103.0 → 0.105.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
@@ -62,6 +62,9 @@ tags:
62
62
  - name: hive
63
63
  x-page-title: Hive
64
64
  x-page-description: Manage Hive for team collaboration and resource sharing.
65
+ - name: subdomains
66
+ x-page-title: Subdomains
67
+ x-page-description: Configure and manage subdomains for your organization.
65
68
  - name: custom-hostnames
66
69
  x-page-title: Custom hostnames
67
70
  x-page-description: Configure and manage custom hostnames for your docs sites.
@@ -4811,6 +4814,25 @@ paths:
4811
4814
  default:
4812
4815
  $ref: "#/components/responses/UnexpectedError"
4813
4816
  "/orgs/{organizationId}/link-invites/{inviteId}":
4817
+ get:
4818
+ operationId: getOrganizationInviteLink
4819
+ summary: Get an invite link to an organization
4820
+ tags:
4821
+ - organizations
4822
+ security:
4823
+ - user: []
4824
+ parameters:
4825
+ - $ref: "#/components/parameters/organizationId"
4826
+ - $ref: "#/components/parameters/inviteId"
4827
+ responses:
4828
+ "200":
4829
+ description: Invite link in the organization.
4830
+ content:
4831
+ application/json:
4832
+ schema:
4833
+ $ref: "#/components/schemas/OrganizationInviteLink"
4834
+ default:
4835
+ $ref: "#/components/responses/UnexpectedError"
4814
4836
  patch:
4815
4837
  operationId: updateOrganizationInviteById
4816
4838
  summary: Update an organization invite.
@@ -5979,6 +6001,81 @@ paths:
5979
6001
  default:
5980
6002
  $ref: "#/components/responses/UnexpectedError"
5981
6003
  "/orgs/{organizationId}/fonts/{fontId}":
6004
+ get:
6005
+ operationId: getCustomFont
6006
+ summary: Get a custom font by its id
6007
+ tags:
6008
+ - organizations
6009
+ security:
6010
+ - user-internal: []
6011
+ parameters:
6012
+ - $ref: "#/components/parameters/organizationId"
6013
+ - $ref: "#/components/parameters/fontId"
6014
+ responses:
6015
+ "200":
6016
+ description: Custom font.
6017
+ content:
6018
+ application/json:
6019
+ schema:
6020
+ $ref: "#/components/schemas/CustomizationFontDefinition"
6021
+ "404":
6022
+ description: Organization or font not found.
6023
+ $ref: "#/components/responses/NotFoundError"
6024
+ default:
6025
+ $ref: "#/components/responses/UnexpectedError"
6026
+ post:
6027
+ operationId: updateCustomFont
6028
+ summary: Update a custom font
6029
+ tags:
6030
+ - organizations
6031
+ security:
6032
+ - user-internal: []
6033
+ parameters:
6034
+ - $ref: "#/components/parameters/organizationId"
6035
+ - $ref: "#/components/parameters/fontId"
6036
+ requestBody:
6037
+ required: true
6038
+ content:
6039
+ application/json:
6040
+ schema:
6041
+ type: object
6042
+ description: Defines a custom font and associated font faces with storage references.
6043
+ properties:
6044
+ fontFamily:
6045
+ $ref: "#/components/schemas/FontFamily"
6046
+ fontFaces:
6047
+ type: array
6048
+ description: |
6049
+ Array of font faces specifying weights and their corresponding storage keys. Passing null as the storage key will remove that weight.
6050
+ items:
6051
+ type: object
6052
+ properties:
6053
+ weight:
6054
+ $ref: "#/components/schemas/FontWeight"
6055
+ storageKey:
6056
+ oneOf:
6057
+ - $ref: "#/components/schemas/StorageFileKey"
6058
+ - type: string
6059
+ nullable: true
6060
+ enum:
6061
+ - null
6062
+ required:
6063
+ - weight
6064
+ - storageKey
6065
+ responses:
6066
+ "201":
6067
+ description: Custom font created successfully.
6068
+ content:
6069
+ application/json:
6070
+ schema:
6071
+ $ref: "#/components/schemas/CustomizationFontDefinition"
6072
+ "404":
6073
+ $ref: "#/components/responses/NotFoundError"
6074
+ "412":
6075
+ description: Invalid request data, such as missing required font weights.
6076
+ $ref: "#/components/responses/PreconditionFailedError"
6077
+ default:
6078
+ $ref: "#/components/responses/UnexpectedError"
5982
6079
  delete:
5983
6080
  operationId: deleteCustomFont
5984
6081
  summary: Delete a custom font from an organization
@@ -6160,7 +6257,7 @@ paths:
6160
6257
  Configure a proxy URL for a site. For example, you can use it to host the site on a subdirectory of your domain like `https://company.com/docs`.
6161
6258
  Use `null` to remove the proxy.
6162
6259
  oneOf:
6163
- - $ref: "#/components/schemas/SiteProxy"
6260
+ - $ref: "#/components/schemas/SiteProxyOrigin"
6164
6261
  - type: string
6165
6262
  nullable: true
6166
6263
  enum:
@@ -7804,6 +7901,8 @@ paths:
7804
7901
  $ref: "#/components/schemas/AIOutputFormat"
7805
7902
  model:
7806
7903
  $ref: "#/components/schemas/AIModel"
7904
+ tools:
7905
+ $ref: "#/components/schemas/AIToolCapabilities"
7807
7906
  responses:
7808
7907
  "200":
7809
7908
  description: OK
@@ -8070,6 +8169,25 @@ paths:
8070
8169
  $ref: "#/components/responses/NotFoundError"
8071
8170
  default:
8072
8171
  $ref: "#/components/responses/UnexpectedError"
8172
+ "/subdomains/{subdomain}":
8173
+ get:
8174
+ operationId: getSubdomain
8175
+ summary: Get the details about a subdomain.
8176
+ tags:
8177
+ - subdomains
8178
+ security:
8179
+ - user: []
8180
+ parameters:
8181
+ - $ref: "#/components/parameters/subdomain"
8182
+ responses:
8183
+ "200":
8184
+ description: OK
8185
+ content:
8186
+ application/json:
8187
+ schema:
8188
+ $ref: "#/components/schemas/Subdomain"
8189
+ default:
8190
+ $ref: "#/components/responses/UnexpectedError"
8073
8191
  "/custom-hostnames/{hostname}":
8074
8192
  get:
8075
8193
  operationId: getCustomHostname
@@ -8723,6 +8841,16 @@ components:
8723
8841
  description: The unique id of the site redirect
8724
8842
  schema:
8725
8843
  type: string
8844
+ subdomain:
8845
+ name: subdomain
8846
+ in: path
8847
+ required: true
8848
+ description: The subdomain, for example "my-company" in "my-company.gitbook.io"
8849
+ schema:
8850
+ type: string
8851
+ pattern: ^[a-z0-9][a-z0-9-]{1,30}[a-z0-9]$
8852
+ minLength: 3
8853
+ maxLength: 32
8726
8854
  hostname:
8727
8855
  name: hostname
8728
8856
  in: path
@@ -8915,6 +9043,9 @@ components:
8915
9043
  GitSyncState:
8916
9044
  type: object
8917
9045
  properties:
9046
+ repoName:
9047
+ type: string
9048
+ description: Repository name.
8918
9049
  installationProvider:
8919
9050
  $ref: "#/components/schemas/GitSyncProvider"
8920
9051
  integration:
@@ -16174,11 +16305,22 @@ components:
16174
16305
  description: Basename for the site. For e.g. api
16175
16306
  minLength: 1
16176
16307
  maxLength: 100
16177
- SiteProxy:
16308
+ SiteProxyOrigin:
16178
16309
  type: string
16179
16310
  description: Proxy URL for the site, for e.g. company.com/docs or www.company.com/developer/docs etc.
16180
16311
  pattern: ^([\w-]+\.)*[\w-]+\.[a-zA-Z]{2,}(\/[\w-]+)+$
16181
16312
  maxLength: 512
16313
+ SiteProxy:
16314
+ type: object
16315
+ properties:
16316
+ origin:
16317
+ $ref: "#/components/schemas/SiteProxyOrigin"
16318
+ target:
16319
+ type: string
16320
+ description: The target URL to which the requests at the origin URL should be proxied to.
16321
+ required:
16322
+ - origin
16323
+ - target
16182
16324
  SiteVisibility:
16183
16325
  type: string
16184
16326
  description: |
@@ -16266,7 +16408,6 @@ components:
16266
16408
  - header-logo
16267
16409
  - theme-preset
16268
16410
  - premium-fonts
16269
- - custom-fonts
16270
16411
  - custom-icons
16271
16412
  - footer-logo
16272
16413
  - footer-links
@@ -16291,6 +16432,7 @@ components:
16291
16432
  - sites-page-feedback
16292
16433
  - sites-unlisted-visibility
16293
16434
  - sites-share-links
16435
+ - sites-custom-fonts
16294
16436
  plan:
16295
16437
  $ref: "#/components/schemas/SiteType"
16296
16438
  frozen:
@@ -17649,6 +17791,9 @@ components:
17649
17791
  id:
17650
17792
  type: string
17651
17793
  description: A globally unique identifier for the font definition.
17794
+ custom:
17795
+ type: boolean
17796
+ description: Whether the font is a custom font. If false, this font is provided by GitBook.
17652
17797
  fontFamily:
17653
17798
  $ref: "#/components/schemas/FontFamily"
17654
17799
  fontFaces:
@@ -17659,6 +17804,7 @@ components:
17659
17804
  minItems: 1
17660
17805
  required:
17661
17806
  - id
17807
+ - custom
17662
17808
  - fontFamily
17663
17809
  - fontFaces
17664
17810
  StorageFileKey:
@@ -17867,11 +18013,14 @@ components:
17867
18013
  - contrast
17868
18014
  - custom
17869
18015
  - none
18016
+ CustomizationContentLinkTitle:
18017
+ type: string
18018
+ maxLength: 64
17870
18019
  CustomizationContentLink:
17871
18020
  type: object
17872
18021
  properties:
17873
18022
  title:
17874
- type: string
18023
+ $ref: "#/components/schemas/CustomizationContentLinkTitle"
17875
18024
  to:
17876
18025
  $ref: "#/components/schemas/ContentRef"
17877
18026
  required:
@@ -17915,6 +18064,11 @@ components:
17915
18064
  required:
17916
18065
  - title
17917
18066
  - links
18067
+ CustomizationAnnouncementMessage:
18068
+ description: The text content of the announcement.
18069
+ type: string
18070
+ minLength: 2
18071
+ maxLength: 128
17918
18072
  CustomizationAnnouncement:
17919
18073
  type: object
17920
18074
  properties:
@@ -17922,10 +18076,7 @@ components:
17922
18076
  description: Whether to show the site's announcement.
17923
18077
  type: boolean
17924
18078
  message:
17925
- description: The text content of the announcement.
17926
- type: string
17927
- minLength: 2
17928
- maxLength: 128
18079
+ $ref: "#/components/schemas/CustomizationAnnouncementMessage"
17929
18080
  link:
17930
18081
  description: The content or URL the announcement links to when clicked.
17931
18082
  $ref: "#/components/schemas/CustomizationContentLink"
@@ -18433,14 +18584,14 @@ components:
18433
18584
  enum:
18434
18585
  - user
18435
18586
  - developer
18436
- AIMessageAttachmentKnowledge:
18587
+ AIMessageAttachmentSearch:
18437
18588
  type: object
18438
- description: Attachment to extract knowledge matching a given query.
18589
+ description: Attachment to attach search results to a message.
18439
18590
  properties:
18440
18591
  type:
18441
18592
  type: string
18442
18593
  enum:
18443
- - knowledge
18594
+ - search
18444
18595
  query:
18445
18596
  type: string
18446
18597
  description: The query to use to extract the knowledge.
@@ -18459,7 +18610,7 @@ components:
18459
18610
  - type
18460
18611
  AIMessageAttachmentPage:
18461
18612
  type: object
18462
- description: Attachment to extract and pass the content of a page to the AI
18613
+ description: Attachment to extract and pass the content of a page to the AI.
18463
18614
  properties:
18464
18615
  type:
18465
18616
  type: string
@@ -18467,17 +18618,13 @@ components:
18467
18618
  - page
18468
18619
  spaceId:
18469
18620
  type: string
18470
- description: The ID of the space to extract the content from
18471
- revisionId:
18472
- type: string
18473
- description: The ID of the revision to extract the content from
18621
+ description: The ID of the space to extract the content from.
18474
18622
  pageId:
18475
18623
  type: string
18476
- description: The ID of the page to extract the content from
18624
+ description: The ID of the page to extract the content from.
18477
18625
  required:
18478
18626
  - type
18479
18627
  - spaceId
18480
- - revisionId
18481
18628
  - pageId
18482
18629
  AIMessageAttachmentPages:
18483
18630
  type: object
@@ -18489,17 +18636,13 @@ components:
18489
18636
  - pages
18490
18637
  spaceId:
18491
18638
  type: string
18492
- description: The ID of the space to extract the content from
18493
- revisionId:
18494
- type: string
18495
- description: The ID of the revision to extract the content from
18639
+ description: The ID of the space to extract the content from.
18496
18640
  required:
18497
18641
  - type
18498
18642
  - spaceId
18499
- - revisionId
18500
18643
  AIMessageAttachment:
18501
18644
  oneOf:
18502
- - $ref: "#/components/schemas/AIMessageAttachmentKnowledge"
18645
+ - $ref: "#/components/schemas/AIMessageAttachmentSearch"
18503
18646
  - $ref: "#/components/schemas/AIMessageAttachmentVisitorProfile"
18504
18647
  - $ref: "#/components/schemas/AIMessageAttachmentPage"
18505
18648
  - $ref: "#/components/schemas/AIMessageAttachmentPages"
@@ -18509,8 +18652,10 @@ components:
18509
18652
  role:
18510
18653
  $ref: "#/components/schemas/AIMessageRole"
18511
18654
  content:
18512
- type: string
18513
- maxLength: 2048
18655
+ oneOf:
18656
+ - type: string
18657
+ maxLength: 2048
18658
+ - $ref: "#/components/schemas/JSONDocument"
18514
18659
  attachments:
18515
18660
  type: array
18516
18661
  items:
@@ -18518,7 +18663,7 @@ components:
18518
18663
  required:
18519
18664
  - role
18520
18665
  - content
18521
- AIOutputFormatObject:
18666
+ AIOutputObject:
18522
18667
  type: object
18523
18668
  description: |
18524
18669
  Indicate that the AI should response with a JSON object corresponding to the provided schema.
@@ -18530,20 +18675,10 @@ components:
18530
18675
  schema:
18531
18676
  type: object
18532
18677
  description: The JSON schema to use for the object.
18533
- properties:
18534
- type:
18535
- type: string
18536
- enum:
18537
- - object
18538
- properties: {}
18539
- required:
18540
- type: array
18541
- items:
18542
- type: string
18543
18678
  required:
18544
18679
  - type
18545
18680
  - schema
18546
- AIOutputFormatDocument:
18681
+ AIOutputDocument:
18547
18682
  type: object
18548
18683
  description: |
18549
18684
  Indicate that the AI should respond with a rich text document.
@@ -18556,8 +18691,8 @@ components:
18556
18691
  - type
18557
18692
  AIOutputFormat:
18558
18693
  oneOf:
18559
- - $ref: "#/components/schemas/AIOutputFormatObject"
18560
- - $ref: "#/components/schemas/AIOutputFormatDocument"
18694
+ - $ref: "#/components/schemas/AIOutputObject"
18695
+ - $ref: "#/components/schemas/AIOutputDocument"
18561
18696
  AIModel:
18562
18697
  type: string
18563
18698
  enum:
@@ -18565,6 +18700,19 @@ components:
18565
18700
  - reasoning-low
18566
18701
  - reasoning-medium
18567
18702
  - reasoning-high
18703
+ AIToolCapabilities:
18704
+ type: object
18705
+ description: Tools provided to the AI
18706
+ properties:
18707
+ getPageContent:
18708
+ type: boolean
18709
+ description: Whether the AI can read the content of a page
18710
+ getPages:
18711
+ type: boolean
18712
+ description: Whether the AI can read the table of contents of a space
18713
+ search:
18714
+ type: boolean
18715
+ description: Whether the AI can search for content
18568
18716
  AIStreamResponseFinish:
18569
18717
  type: object
18570
18718
  description: |
@@ -18617,11 +18765,102 @@ components:
18617
18765
  required:
18618
18766
  - type
18619
18767
  - jsonChunk
18768
+ AIToolCallGetPageContent:
18769
+ type: object
18770
+ properties:
18771
+ tool:
18772
+ type: string
18773
+ enum:
18774
+ - getPageContent
18775
+ spaceId:
18776
+ type: string
18777
+ description: The ID of the space being accessed.
18778
+ page:
18779
+ $ref: "#/components/schemas/ChangedRevisionPage"
18780
+ required:
18781
+ - tool
18782
+ - spaceId
18783
+ - page
18784
+ AIToolCallGetPages:
18785
+ type: object
18786
+ properties:
18787
+ tool:
18788
+ type: string
18789
+ enum:
18790
+ - getPages
18791
+ spaceId:
18792
+ type: string
18793
+ description: The ID of the space being accessed.
18794
+ required:
18795
+ - tool
18796
+ - spaceId
18797
+ AIToolCallSearchResult:
18798
+ type: object
18799
+ description: Result of a search
18800
+ properties:
18801
+ spaceId:
18802
+ type: string
18803
+ description: The ID of the space
18804
+ pageId:
18805
+ type: string
18806
+ description: The ID of the page
18807
+ anchor:
18808
+ type: string
18809
+ description: The anchor of the result
18810
+ title:
18811
+ type: string
18812
+ description: The title of the result
18813
+ description:
18814
+ type: string
18815
+ description: The description of the result
18816
+ required:
18817
+ - spaceId
18818
+ - pageId
18819
+ - title
18820
+ AIToolCallSearch:
18821
+ type: object
18822
+ description: Tool to search for content
18823
+ properties:
18824
+ tool:
18825
+ type: string
18826
+ enum:
18827
+ - search
18828
+ query:
18829
+ type: string
18830
+ description: The query that has been searched for.
18831
+ results:
18832
+ type: array
18833
+ items:
18834
+ $ref: "#/components/schemas/AIToolCallSearchResult"
18835
+ required:
18836
+ - tool
18837
+ - query
18838
+ - results
18839
+ AIToolCall:
18840
+ oneOf:
18841
+ - $ref: "#/components/schemas/AIToolCallGetPageContent"
18842
+ - $ref: "#/components/schemas/AIToolCallGetPages"
18843
+ - $ref: "#/components/schemas/AIToolCallSearch"
18844
+ AIStreamResponseToolCall:
18845
+ type: object
18846
+ description: |
18847
+ Message emitted by the server to indicate that the AI has called a tool.
18848
+ properties:
18849
+ type:
18850
+ type: string
18851
+ enum:
18852
+ - response_tool_call
18853
+ toolCall:
18854
+ $ref: "#/components/schemas/AIToolCall"
18855
+ required:
18856
+ - type
18857
+ - toolCall
18620
18858
  AIStreamResponse:
18621
18859
  oneOf:
18622
18860
  - $ref: "#/components/schemas/AIStreamResponseFinish"
18623
18861
  - $ref: "#/components/schemas/AIStreamResponseDocument"
18624
18862
  - $ref: "#/components/schemas/AIStreamResponseObject"
18863
+ - $ref: "#/components/schemas/AIStreamResponseToolCall"
18625
18864
  SiteInsightsEventSession:
18626
18865
  type: object
18627
18866
  description: Analytics info on the GitBook's site session.
@@ -18863,6 +19102,7 @@ components:
18863
19102
  SiteInsightsLinkPosition:
18864
19103
  type: string
18865
19104
  enum:
19105
+ - announcement
18866
19106
  - header
18867
19107
  - footer
18868
19108
  - sidebar
@@ -20127,6 +20367,29 @@ components:
20127
20367
  - id
20128
20368
  - source
20129
20369
  - destination
20370
+ Subdomain:
20371
+ type: object
20372
+ properties:
20373
+ object:
20374
+ type: string
20375
+ enum:
20376
+ - subdomain
20377
+ subdomain:
20378
+ type: string
20379
+ description: The GitBook subdomain, for example "my-company" in "my-company.gitbook.io"
20380
+ pattern: ^[a-z0-9][a-z0-9-]{1,30}[a-z0-9]$
20381
+ minLength: 3
20382
+ maxLength: 32
20383
+ target:
20384
+ oneOf:
20385
+ - $ref: "#/components/schemas/OrganizationPointer"
20386
+ isActive:
20387
+ type: boolean
20388
+ required:
20389
+ - object
20390
+ - subdomain
20391
+ - target
20392
+ - isActive
20130
20393
  CustomHostnameDnsStatus:
20131
20394
  type: string
20132
20395
  enum:
@@ -20553,6 +20816,9 @@ components:
20553
20816
  contextId:
20554
20817
  type: string
20555
20818
  description: Context returned only for a visitor authentication session to track changes in the visitor session context that affect content rendering (used for cache invalidation).
20819
+ canonicalUrl:
20820
+ type: string
20821
+ description: The canonical URL of the resolution.
20556
20822
  required:
20557
20823
  - site
20558
20824
  - siteSpace
@@ -20563,6 +20829,7 @@ components:
20563
20829
  - apiToken
20564
20830
  - organization
20565
20831
  - complete
20832
+ - canonicalUrl
20566
20833
  PublishedSiteContentLookup:
20567
20834
  oneOf:
20568
20835
  - type: object
@@ -21991,6 +22258,18 @@ components:
21991
22258
  required:
21992
22259
  - channel
21993
22260
  - openAPISpec
22261
+ SubdomainChannel:
22262
+ type: object
22263
+ properties:
22264
+ channel:
22265
+ type: string
22266
+ enum:
22267
+ - subdomain
22268
+ subdomain:
22269
+ type: string
22270
+ required:
22271
+ - channel
22272
+ - subdomain
21994
22273
  SubscriptionChannel:
21995
22274
  description: Channel to subscribe to for realtime updates.
21996
22275
  oneOf:
@@ -22056,6 +22335,7 @@ components:
22056
22335
  - $ref: "#/components/schemas/GitSyncSettingsChannel"
22057
22336
  - $ref: "#/components/schemas/GitSyncOperationChannel"
22058
22337
  - $ref: "#/components/schemas/OpenAPISpecChannel"
22338
+ - $ref: "#/components/schemas/SubdomainChannel"
22059
22339
  discriminator:
22060
22340
  propertyName: channel
22061
22341
  GitSyncOperationChannelData: