@gitbook/api 0.102.0 → 0.104.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:
@@ -7769,6 +7866,52 @@ paths:
7769
7866
  $ref: "#/components/schemas/UserSitePermission"
7770
7867
  default:
7771
7868
  $ref: "#/components/responses/UnexpectedError"
7869
+ "/orgs/{organizationId}/sites/{siteId}/ai/response":
7870
+ post:
7871
+ operationId: streamAIResponseInSite
7872
+ summary: Generate an AI response in a site
7873
+ description: |
7874
+ Experimental operation to generate an AI response in a site.
7875
+ tags:
7876
+ - sites
7877
+ x-internal: true
7878
+ security:
7879
+ - user: []
7880
+ parameters:
7881
+ - $ref: "#/components/parameters/organizationId"
7882
+ - $ref: "#/components/parameters/siteId"
7883
+ requestBody:
7884
+ required: true
7885
+ content:
7886
+ application/json:
7887
+ schema:
7888
+ type: object
7889
+ required:
7890
+ - input
7891
+ - output
7892
+ properties:
7893
+ previousResponseId:
7894
+ type: string
7895
+ description: The ID of the previous response to continue from
7896
+ input:
7897
+ type: array
7898
+ items:
7899
+ $ref: "#/components/schemas/AIMessageInput"
7900
+ output:
7901
+ $ref: "#/components/schemas/AIOutputFormat"
7902
+ model:
7903
+ $ref: "#/components/schemas/AIModel"
7904
+ tools:
7905
+ $ref: "#/components/schemas/AIToolCapabilities"
7906
+ responses:
7907
+ "200":
7908
+ description: OK
7909
+ content:
7910
+ text/event-stream:
7911
+ schema:
7912
+ $ref: "#/components/schemas/AIStreamResponse"
7913
+ default:
7914
+ $ref: "#/components/responses/UnexpectedError"
7772
7915
  "/orgs/{organizationId}/sites/{siteId}/insights/events":
7773
7916
  post:
7774
7917
  operationId: trackEventsInSiteById
@@ -8026,6 +8169,25 @@ paths:
8026
8169
  $ref: "#/components/responses/NotFoundError"
8027
8170
  default:
8028
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"
8029
8191
  "/custom-hostnames/{hostname}":
8030
8192
  get:
8031
8193
  operationId: getCustomHostname
@@ -8679,6 +8841,16 @@ components:
8679
8841
  description: The unique id of the site redirect
8680
8842
  schema:
8681
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
8682
8854
  hostname:
8683
8855
  name: hostname
8684
8856
  in: path
@@ -8871,6 +9043,9 @@ components:
8871
9043
  GitSyncState:
8872
9044
  type: object
8873
9045
  properties:
9046
+ repoName:
9047
+ type: string
9048
+ description: Repository name.
8874
9049
  installationProvider:
8875
9050
  $ref: "#/components/schemas/GitSyncProvider"
8876
9051
  integration:
@@ -16130,11 +16305,22 @@ components:
16130
16305
  description: Basename for the site. For e.g. api
16131
16306
  minLength: 1
16132
16307
  maxLength: 100
16133
- SiteProxy:
16308
+ SiteProxyOrigin:
16134
16309
  type: string
16135
16310
  description: Proxy URL for the site, for e.g. company.com/docs or www.company.com/developer/docs etc.
16136
16311
  pattern: ^([\w-]+\.)*[\w-]+\.[a-zA-Z]{2,}(\/[\w-]+)+$
16137
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
16138
16324
  SiteVisibility:
16139
16325
  type: string
16140
16326
  description: |
@@ -16222,7 +16408,6 @@ components:
16222
16408
  - header-logo
16223
16409
  - theme-preset
16224
16410
  - premium-fonts
16225
- - custom-fonts
16226
16411
  - custom-icons
16227
16412
  - footer-logo
16228
16413
  - footer-links
@@ -16247,6 +16432,7 @@ components:
16247
16432
  - sites-page-feedback
16248
16433
  - sites-unlisted-visibility
16249
16434
  - sites-share-links
16435
+ - sites-custom-fonts
16250
16436
  plan:
16251
16437
  $ref: "#/components/schemas/SiteType"
16252
16438
  frozen:
@@ -17605,6 +17791,9 @@ components:
17605
17791
  id:
17606
17792
  type: string
17607
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.
17608
17797
  fontFamily:
17609
17798
  $ref: "#/components/schemas/FontFamily"
17610
17799
  fontFaces:
@@ -17615,6 +17804,7 @@ components:
17615
17804
  minItems: 1
17616
17805
  required:
17617
17806
  - id
17807
+ - custom
17618
17808
  - fontFamily
17619
17809
  - fontFaces
17620
17810
  StorageFileKey:
@@ -17823,11 +18013,14 @@ components:
17823
18013
  - contrast
17824
18014
  - custom
17825
18015
  - none
18016
+ CustomizationContentLinkTitle:
18017
+ type: string
18018
+ maxLength: 64
17826
18019
  CustomizationContentLink:
17827
18020
  type: object
17828
18021
  properties:
17829
18022
  title:
17830
- type: string
18023
+ $ref: "#/components/schemas/CustomizationContentLinkTitle"
17831
18024
  to:
17832
18025
  $ref: "#/components/schemas/ContentRef"
17833
18026
  required:
@@ -17871,6 +18064,11 @@ components:
17871
18064
  required:
17872
18065
  - title
17873
18066
  - links
18067
+ CustomizationAnnouncementMessage:
18068
+ description: The text content of the announcement.
18069
+ type: string
18070
+ minLength: 2
18071
+ maxLength: 128
17874
18072
  CustomizationAnnouncement:
17875
18073
  type: object
17876
18074
  properties:
@@ -17878,10 +18076,7 @@ components:
17878
18076
  description: Whether to show the site's announcement.
17879
18077
  type: boolean
17880
18078
  message:
17881
- description: The text content of the announcement.
17882
- type: string
17883
- minLength: 2
17884
- maxLength: 128
18079
+ $ref: "#/components/schemas/CustomizationAnnouncementMessage"
17885
18080
  link:
17886
18081
  description: The content or URL the announcement links to when clicked.
17887
18082
  $ref: "#/components/schemas/CustomizationContentLink"
@@ -18384,6 +18579,288 @@ components:
18384
18579
  - permission
18385
18580
  - user
18386
18581
  - origin
18582
+ AIMessageRole:
18583
+ type: string
18584
+ enum:
18585
+ - user
18586
+ - developer
18587
+ AIMessageAttachmentSearch:
18588
+ type: object
18589
+ description: Attachment to attach search results to a message.
18590
+ properties:
18591
+ type:
18592
+ type: string
18593
+ enum:
18594
+ - search
18595
+ query:
18596
+ type: string
18597
+ description: The query to use to extract the knowledge.
18598
+ required:
18599
+ - type
18600
+ - query
18601
+ AIMessageAttachmentVisitorProfile:
18602
+ type: object
18603
+ description: Attachment representing the profile of the visitor
18604
+ properties:
18605
+ type:
18606
+ type: string
18607
+ enum:
18608
+ - visitor_profile
18609
+ required:
18610
+ - type
18611
+ AIMessageAttachmentPage:
18612
+ type: object
18613
+ description: Attachment to extract and pass the content of a page to the AI.
18614
+ properties:
18615
+ type:
18616
+ type: string
18617
+ enum:
18618
+ - page
18619
+ spaceId:
18620
+ type: string
18621
+ description: The ID of the space to extract the content from.
18622
+ pageId:
18623
+ type: string
18624
+ description: The ID of the page to extract the content from.
18625
+ required:
18626
+ - type
18627
+ - spaceId
18628
+ - pageId
18629
+ AIMessageAttachmentPages:
18630
+ type: object
18631
+ description: Attachment to pass the tree of pages to the AI
18632
+ properties:
18633
+ type:
18634
+ type: string
18635
+ enum:
18636
+ - pages
18637
+ spaceId:
18638
+ type: string
18639
+ description: The ID of the space to extract the content from.
18640
+ required:
18641
+ - type
18642
+ - spaceId
18643
+ AIMessageAttachment:
18644
+ oneOf:
18645
+ - $ref: "#/components/schemas/AIMessageAttachmentSearch"
18646
+ - $ref: "#/components/schemas/AIMessageAttachmentVisitorProfile"
18647
+ - $ref: "#/components/schemas/AIMessageAttachmentPage"
18648
+ - $ref: "#/components/schemas/AIMessageAttachmentPages"
18649
+ AIMessageInput:
18650
+ type: object
18651
+ properties:
18652
+ role:
18653
+ $ref: "#/components/schemas/AIMessageRole"
18654
+ content:
18655
+ oneOf:
18656
+ - type: string
18657
+ maxLength: 2048
18658
+ - $ref: "#/components/schemas/JSONDocument"
18659
+ attachments:
18660
+ type: array
18661
+ items:
18662
+ $ref: "#/components/schemas/AIMessageAttachment"
18663
+ required:
18664
+ - role
18665
+ - content
18666
+ AIOutputObject:
18667
+ type: object
18668
+ description: |
18669
+ Indicate that the AI should response with a JSON object corresponding to the provided schema.
18670
+ properties:
18671
+ type:
18672
+ type: string
18673
+ enum:
18674
+ - object
18675
+ schema:
18676
+ type: object
18677
+ description: The JSON schema to use for the object.
18678
+ required:
18679
+ - type
18680
+ - schema
18681
+ AIOutputDocument:
18682
+ type: object
18683
+ description: |
18684
+ Indicate that the AI should respond with a rich text document.
18685
+ properties:
18686
+ type:
18687
+ type: string
18688
+ enum:
18689
+ - document
18690
+ required:
18691
+ - type
18692
+ AIOutputFormat:
18693
+ oneOf:
18694
+ - $ref: "#/components/schemas/AIOutputObject"
18695
+ - $ref: "#/components/schemas/AIOutputDocument"
18696
+ AIModel:
18697
+ type: string
18698
+ enum:
18699
+ - fast
18700
+ - reasoning-low
18701
+ - reasoning-medium
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
18716
+ AIStreamResponseFinish:
18717
+ type: object
18718
+ description: |
18719
+ Message emitted by the server to indicate the end of the AI response. It contains the ID of the response to be referenced for followup requests.
18720
+ properties:
18721
+ type:
18722
+ type: string
18723
+ enum:
18724
+ - response_finish
18725
+ responseId:
18726
+ type: string
18727
+ description: The ID of the response
18728
+ required:
18729
+ - type
18730
+ - responseId
18731
+ AIStreamResponseDocument:
18732
+ type: object
18733
+ description: |
18734
+ Message emitted by the server to indicate the latest block of the document. The block can either be a new block or an update to the previous block.
18735
+ properties:
18736
+ type:
18737
+ type: string
18738
+ enum:
18739
+ - response_document
18740
+ operation:
18741
+ type: string
18742
+ enum:
18743
+ - insert
18744
+ - update
18745
+ blocks:
18746
+ type: array
18747
+ items:
18748
+ $ref: "#/components/schemas/DocumentBlock"
18749
+ required:
18750
+ - type
18751
+ - operation
18752
+ - blocks
18753
+ AIStreamResponseObject:
18754
+ type: object
18755
+ description: |
18756
+ Message emitted by the server to indicate a chunk of the JSON object response.
18757
+ properties:
18758
+ type:
18759
+ type: string
18760
+ enum:
18761
+ - response_object
18762
+ jsonChunk:
18763
+ type: string
18764
+ description: The chunk of the JSON object response
18765
+ required:
18766
+ - type
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
18858
+ AIStreamResponse:
18859
+ oneOf:
18860
+ - $ref: "#/components/schemas/AIStreamResponseFinish"
18861
+ - $ref: "#/components/schemas/AIStreamResponseDocument"
18862
+ - $ref: "#/components/schemas/AIStreamResponseObject"
18863
+ - $ref: "#/components/schemas/AIStreamResponseToolCall"
18387
18864
  SiteInsightsEventSession:
18388
18865
  type: object
18389
18866
  description: Analytics info on the GitBook's site session.
@@ -19889,6 +20366,29 @@ components:
19889
20366
  - id
19890
20367
  - source
19891
20368
  - destination
20369
+ Subdomain:
20370
+ type: object
20371
+ properties:
20372
+ object:
20373
+ type: string
20374
+ enum:
20375
+ - subdomain
20376
+ subdomain:
20377
+ type: string
20378
+ description: The GitBook subdomain, for example "my-company" in "my-company.gitbook.io"
20379
+ pattern: ^[a-z0-9][a-z0-9-]{1,30}[a-z0-9]$
20380
+ minLength: 3
20381
+ maxLength: 32
20382
+ target:
20383
+ oneOf:
20384
+ - $ref: "#/components/schemas/OrganizationPointer"
20385
+ isActive:
20386
+ type: boolean
20387
+ required:
20388
+ - object
20389
+ - subdomain
20390
+ - target
20391
+ - isActive
19892
20392
  CustomHostnameDnsStatus:
19893
20393
  type: string
19894
20394
  enum:
@@ -20315,6 +20815,9 @@ components:
20315
20815
  contextId:
20316
20816
  type: string
20317
20817
  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).
20818
+ canonicalUrl:
20819
+ type: string
20820
+ description: The canonical URL of the resolution.
20318
20821
  required:
20319
20822
  - site
20320
20823
  - siteSpace
@@ -20325,6 +20828,7 @@ components:
20325
20828
  - apiToken
20326
20829
  - organization
20327
20830
  - complete
20831
+ - canonicalUrl
20328
20832
  PublishedSiteContentLookup:
20329
20833
  oneOf:
20330
20834
  - type: object
@@ -21753,6 +22257,18 @@ components:
21753
22257
  required:
21754
22258
  - channel
21755
22259
  - openAPISpec
22260
+ SubdomainChannel:
22261
+ type: object
22262
+ properties:
22263
+ channel:
22264
+ type: string
22265
+ enum:
22266
+ - subdomain
22267
+ subdomain:
22268
+ type: string
22269
+ required:
22270
+ - channel
22271
+ - subdomain
21756
22272
  SubscriptionChannel:
21757
22273
  description: Channel to subscribe to for realtime updates.
21758
22274
  oneOf:
@@ -21818,6 +22334,7 @@ components:
21818
22334
  - $ref: "#/components/schemas/GitSyncSettingsChannel"
21819
22335
  - $ref: "#/components/schemas/GitSyncOperationChannel"
21820
22336
  - $ref: "#/components/schemas/OpenAPISpecChannel"
22337
+ - $ref: "#/components/schemas/SubdomainChannel"
21821
22338
  discriminator:
21822
22339
  propertyName: channel
21823
22340
  GitSyncOperationChannelData: