@gitbook/api 0.43.0 → 0.45.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
@@ -417,6 +417,57 @@ components:
417
417
  - visitor
418
418
  - url
419
419
  - referrer
420
+ RequestSiteTrackPageView:
421
+ type: object
422
+ properties:
423
+ pageId:
424
+ type: string
425
+ description: Unique identifier of the page.
426
+ spaceId:
427
+ type: string
428
+ description: Unique identifier of the space.
429
+ visitor:
430
+ type: object
431
+ description: Analytics info on the GitBook's content visitor.
432
+ properties:
433
+ anonymousId:
434
+ type: string
435
+ description: GitBook's unique identifier of the visitor.
436
+ cookies:
437
+ type: object
438
+ description: The visitors cookies.
439
+ additionalProperties:
440
+ type: string
441
+ ip:
442
+ type: string
443
+ description: |
444
+ IP address of the visitor.
445
+ If undefined, it'll default to the IP executing the request.
446
+ userAgent:
447
+ type: string
448
+ description: |
449
+ User-agent of the visitor.
450
+ https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent
451
+ language:
452
+ type: string
453
+ description: |
454
+ Language of the visitor.
455
+ https://developer.mozilla.org/en-US/docs/Web/API/Navigator/language
456
+ required:
457
+ - anonymousId
458
+ - cookies
459
+ - userAgent
460
+ url:
461
+ type: string
462
+ description: The GitBook content's URL visited (including URL params).
463
+ referrer:
464
+ type: string
465
+ description: The URL of referrer that linked to the page.
466
+ required:
467
+ - visitor
468
+ - url
469
+ - referrer
470
+ - spaceId
420
471
  RequestPublishIntegration:
421
472
  type: object
422
473
  properties:
@@ -1015,6 +1066,18 @@ components:
1015
1066
  required:
1016
1067
  - type
1017
1068
  - html
1069
+ - type: object
1070
+ title: Integration
1071
+ properties:
1072
+ type:
1073
+ type: string
1074
+ enum:
1075
+ - integration
1076
+ block:
1077
+ $ref: "#/components/schemas/IntegrationBlock"
1078
+ required:
1079
+ - type
1080
+ - block
1018
1081
  Comment:
1019
1082
  allOf:
1020
1083
  - type: object
@@ -5890,6 +5953,7 @@ components:
5890
5953
  - space:script:cookies
5891
5954
  - space:git:sync
5892
5955
  - space:visitor:auth
5956
+ - site:views:read
5893
5957
  - site:script:inject
5894
5958
  - site:script:cookies
5895
5959
  - site:visitor:auth
@@ -6148,6 +6212,8 @@ components:
6148
6212
  $ref: "#/components/schemas/IntegrationInstallationStatus"
6149
6213
  space_selection:
6150
6214
  $ref: "#/components/schemas/IntegrationInstallationSpaceSelection"
6215
+ site_selection:
6216
+ $ref: "#/components/schemas/IntegrationInstallationSiteSelection"
6151
6217
  spaces:
6152
6218
  type: number
6153
6219
  description: Count of spaces, the installation is managing
@@ -6186,6 +6252,7 @@ components:
6186
6252
  - id
6187
6253
  - status
6188
6254
  - space_selection
6255
+ - site_selection
6189
6256
  - spaces
6190
6257
  - configuration
6191
6258
  - urls
@@ -6733,50 +6800,9 @@ components:
6733
6800
  - $ref: "#/components/schemas/InstallationSetupEvent"
6734
6801
  - $ref: "#/components/schemas/SpaceInstallationSetupEvent"
6735
6802
  - $ref: "#/components/schemas/SpaceInstallationDeletedEvent"
6736
- - allOf:
6737
- - $ref: "#/components/schemas/SiteEvent"
6738
- - type: object
6739
- description: Event received when integration has been installed or updated on a site.
6740
- properties:
6741
- type:
6742
- type: string
6743
- enum:
6744
- - site_installation_setup
6745
- status:
6746
- $ref: "#/components/schemas/IntegrationInstallationStatus"
6747
- previous:
6748
- type: object
6749
- description: The state of the site installation before it was updated.
6750
- properties:
6751
- status:
6752
- $ref: "#/components/schemas/IntegrationInstallationStatus"
6753
- configuration:
6754
- type: object
6755
- description: The previous configuration of the site installation.
6756
- required:
6757
- - status
6758
- required:
6759
- - type
6760
- - status
6761
- - allOf:
6762
- - $ref: "#/components/schemas/SiteEvent"
6763
- - type: object
6764
- description: Event received when integration has been uninstalled from a site.
6765
- properties:
6766
- type:
6767
- type: string
6768
- enum:
6769
- - site_installation_deleted
6770
- previous:
6771
- type: object
6772
- description: The state of the site installation before it was deleted.
6773
- properties:
6774
- configuration:
6775
- type: object
6776
- description: The previous configuration of the site installation.
6777
- required:
6778
- - type
6779
- - previous
6803
+ - $ref: "#/components/schemas/SiteInstallationSetupEvent"
6804
+ - $ref: "#/components/schemas/SiteInstallationDeletedEvent"
6805
+ - $ref: "#/components/schemas/SpaceViewEvent"
6780
6806
  - $ref: "#/components/schemas/SiteViewEvent"
6781
6807
  - $ref: "#/components/schemas/SpaceContentUpdatedEvent"
6782
6808
  - $ref: "#/components/schemas/SpaceGitSyncCompletedEvent"
@@ -6906,9 +6932,53 @@ components:
6906
6932
  required:
6907
6933
  - type
6908
6934
  - previous
6935
+ SiteInstallationSetupEvent:
6936
+ allOf:
6937
+ - $ref: "#/components/schemas/SiteEvent"
6938
+ - type: object
6939
+ description: Event received when integration has been installed or updated on a site.
6940
+ properties:
6941
+ type:
6942
+ type: string
6943
+ enum:
6944
+ - site_installation_setup
6945
+ status:
6946
+ $ref: "#/components/schemas/IntegrationInstallationStatus"
6947
+ previous:
6948
+ type: object
6949
+ description: The state of the site installation before it was updated.
6950
+ properties:
6951
+ status:
6952
+ $ref: "#/components/schemas/IntegrationInstallationStatus"
6953
+ configuration:
6954
+ type: object
6955
+ description: The previous configuration of the site installation.
6956
+ required:
6957
+ - status
6958
+ required:
6959
+ - type
6960
+ - status
6961
+ SiteInstallationDeletedEvent:
6962
+ allOf:
6963
+ - $ref: "#/components/schemas/SiteEvent"
6964
+ - type: object
6965
+ description: Event received when integration has been uninstalled from a site.
6966
+ properties:
6967
+ type:
6968
+ type: string
6969
+ enum:
6970
+ - site_installation_deleted
6971
+ previous:
6972
+ type: object
6973
+ description: The state of the site installation before it was deleted.
6974
+ properties:
6975
+ configuration:
6976
+ type: object
6977
+ description: The previous configuration of the site installation.
6978
+ required:
6979
+ - type
6980
+ - previous
6909
6981
  SpaceViewEvent:
6910
- $ref: "#/components/schemas/SiteViewEvent"
6911
- SiteViewEvent:
6912
6982
  allOf:
6913
6983
  - $ref: "#/components/schemas/SpaceEvent"
6914
6984
  - type: object
@@ -6958,6 +7028,60 @@ components:
6958
7028
  - visitor
6959
7029
  - url
6960
7030
  - referrer
7031
+ SiteViewEvent:
7032
+ allOf:
7033
+ - $ref: "#/components/schemas/SiteEvent"
7034
+ - type: object
7035
+ description: Event received when a page has been visited on a site.
7036
+ properties:
7037
+ type:
7038
+ type: string
7039
+ enum:
7040
+ - site_view
7041
+ spaceId:
7042
+ type: string
7043
+ description: Unique identifier of the visited space in the site.
7044
+ pageId:
7045
+ type: string
7046
+ description: Unique identifier of the visited page.
7047
+ visitor:
7048
+ type: object
7049
+ description: Analytics info on the GitBook's content visitor.
7050
+ properties:
7051
+ anonymousId:
7052
+ type: string
7053
+ description: GitBook's unique identifier of the visitor.
7054
+ cookies:
7055
+ type: object
7056
+ description: The visitors cookies.
7057
+ additionalProperties:
7058
+ type: string
7059
+ userAgent:
7060
+ type: string
7061
+ description: User-agent of the visitor.
7062
+ ip:
7063
+ type: string
7064
+ description: IP address of the visitor.
7065
+ language:
7066
+ type: string
7067
+ description: Language of the visitor.
7068
+ required:
7069
+ - anonymousId
7070
+ - cookies
7071
+ - userAgent
7072
+ - ip
7073
+ url:
7074
+ type: string
7075
+ description: The GitBook content's URL visited (including URL params).
7076
+ referrer:
7077
+ type: string
7078
+ description: The URL of referrer that linked to the page.
7079
+ required:
7080
+ - type
7081
+ - visitor
7082
+ - url
7083
+ - referrer
7084
+ - spaceId
6961
7085
  SpaceContentUpdatedEvent:
6962
7086
  allOf:
6963
7087
  - $ref: "#/components/schemas/SpaceEvent"
@@ -7179,7 +7303,7 @@ components:
7179
7303
  - free_2024
7180
7304
  - plus_2024
7181
7305
  - pro_2024
7182
- - enterprise_2024
7306
+ - enterprise
7183
7307
  - free
7184
7308
  - plus
7185
7309
  - pro
@@ -7187,7 +7311,6 @@ components:
7187
7311
  - business
7188
7312
  - legacy
7189
7313
  - startup
7190
- - enterprise
7191
7314
  BillingUpgrade:
7192
7315
  oneOf:
7193
7316
  - type: object
@@ -7649,6 +7772,7 @@ components:
7649
7772
  oneOf:
7650
7773
  - $ref: "#/components/schemas/ContentKitContextConfigurationAccount"
7651
7774
  - $ref: "#/components/schemas/ContentKitContextConfigurationSpace"
7775
+ - $ref: "#/components/schemas/ContentKitContextConfigurationSite"
7652
7776
  - $ref: "#/components/schemas/ContentKitContextDocument"
7653
7777
  ContentKitContextConfigurationAccount:
7654
7778
  allOf:
@@ -7682,6 +7806,22 @@ components:
7682
7806
  required:
7683
7807
  - type
7684
7808
  - spaceId
7809
+ ContentKitContextConfigurationSite:
7810
+ allOf:
7811
+ - $ref: "#/components/schemas/ContentKitContextBase"
7812
+ - type: object
7813
+ description: Context while rendering in a site-installation's configuration.
7814
+ properties:
7815
+ type:
7816
+ type: string
7817
+ enum:
7818
+ - configuration_site
7819
+ siteId:
7820
+ type: string
7821
+ description: ID of the site the site-installation configuration is in.
7822
+ required:
7823
+ - type
7824
+ - siteId
7685
7825
  ContentKitContextDocument:
7686
7826
  allOf:
7687
7827
  - $ref: "#/components/schemas/ContentKitContextBase"
@@ -8642,6 +8782,7 @@ components:
8642
8782
  - $ref: "#/components/schemas/IntegrationSiteInstallationsChannel"
8643
8783
  - $ref: "#/components/schemas/SiteChannel"
8644
8784
  - $ref: "#/components/schemas/SiteCustomizationChannel"
8785
+ - $ref: "#/components/schemas/SiteIntegrationsChannel"
8645
8786
  - $ref: "#/components/schemas/SiteSpaceChannel"
8646
8787
  - $ref: "#/components/schemas/SiteSpaceCustomizationChannel"
8647
8788
  - $ref: "#/components/schemas/SiteSpacesChannel"
@@ -9195,6 +9336,18 @@ components:
9195
9336
  required:
9196
9337
  - channel
9197
9338
  - site
9339
+ SiteIntegrationsChannel:
9340
+ type: object
9341
+ properties:
9342
+ channel:
9343
+ type: string
9344
+ enum:
9345
+ - site-integrations
9346
+ site:
9347
+ type: string
9348
+ required:
9349
+ - channel
9350
+ - site
9198
9351
  SitePublishingAuthChannel:
9199
9352
  type: object
9200
9353
  properties:
@@ -9740,10 +9893,19 @@ components:
9740
9893
  $ref: "#/components/schemas/ShareLinkName"
9741
9894
  active:
9742
9895
  type: boolean
9896
+ urls:
9897
+ type: object
9898
+ description: URLs associated with the object
9899
+ properties:
9900
+ published:
9901
+ type: string
9902
+ description: URL of the published version of the share-link.
9903
+ format: uri
9743
9904
  required:
9744
9905
  - object
9745
9906
  - id
9746
9907
  - createdAt
9908
+ - urls
9747
9909
  ShareLinkName:
9748
9910
  type: string
9749
9911
  description: Name of the share link
@@ -10333,6 +10495,7 @@ components:
10333
10495
  enum:
10334
10496
  - basic
10335
10497
  - premium
10498
+ - premium_va
10336
10499
  SiteSubscription:
10337
10500
  type: object
10338
10501
  properties:
@@ -10924,6 +11087,31 @@ paths:
10924
11087
  $ref: "#/components/responses/PreconditionFailedError"
10925
11088
  default:
10926
11089
  $ref: "#/components/responses/UnexpectedError"
11090
+ "/spaces/{spaceId}/embed":
11091
+ get:
11092
+ operationId: getEmbedByUrlInSpace
11093
+ summary: Resolve a URL to an embed in a given space
11094
+ tags:
11095
+ - spaces
11096
+ security:
11097
+ - user: []
11098
+ parameters:
11099
+ - $ref: "#/components/parameters/spaceId"
11100
+ - name: url
11101
+ in: query
11102
+ required: true
11103
+ description: URL to resolve
11104
+ schema:
11105
+ type: string
11106
+ responses:
11107
+ "200":
11108
+ description: OK
11109
+ content:
11110
+ application/json:
11111
+ schema:
11112
+ $ref: "#/components/schemas/Embed"
11113
+ default:
11114
+ $ref: "#/components/responses/UnexpectedError"
10927
11115
  "/spaces/{spaceId}/search":
10928
11116
  get:
10929
11117
  operationId: searchSpaceContent
@@ -17214,7 +17402,7 @@ paths:
17214
17402
  $ref: "#/components/responses/UnexpectedError"
17215
17403
  "/orgs/{organizationId}/sites/{siteId}/publishing/auth":
17216
17404
  get:
17217
- operationId: getSitePublishingAuthSettings
17405
+ operationId: getSitePublishingAuthById
17218
17406
  summary: Get the publishing authentication settings for a site.
17219
17407
  tags:
17220
17408
  - sites
@@ -17235,7 +17423,7 @@ paths:
17235
17423
  default:
17236
17424
  $ref: "#/components/responses/UnexpectedError"
17237
17425
  patch:
17238
- operationId: updateSitePublishingAuthSettings
17426
+ operationId: updateSitePublishingAuthById
17239
17427
  summary: Update the publishing authentication settings for a site.
17240
17428
  tags:
17241
17429
  - sites
@@ -17261,6 +17449,38 @@ paths:
17261
17449
  $ref: "#/components/responses/BadRequestError"
17262
17450
  default:
17263
17451
  $ref: "#/components/responses/UnexpectedError"
17452
+ "/orgs/{organizationId}/sites/{siteId}/publishing/preview":
17453
+ get:
17454
+ operationId: getSitePublishingPreviewById
17455
+ summary: Get a URL to preview the published content of a site. The URL will be valid for 1 hour.
17456
+ tags:
17457
+ - sites
17458
+ security:
17459
+ - user: []
17460
+ parameters:
17461
+ - $ref: "#/components/parameters/organizationId"
17462
+ - $ref: "#/components/parameters/siteId"
17463
+ - name: siteSpace
17464
+ in: query
17465
+ description: ID of the site-space to preview. If not provided, the default site-space will be used.
17466
+ schema:
17467
+ type: string
17468
+ responses:
17469
+ "200":
17470
+ description: OK
17471
+ content:
17472
+ application/json:
17473
+ schema:
17474
+ type: object
17475
+ properties:
17476
+ url:
17477
+ $ref: "#/components/schemas/URL"
17478
+ required:
17479
+ - url
17480
+ "400":
17481
+ $ref: "#/components/responses/BadRequestError"
17482
+ default:
17483
+ $ref: "#/components/responses/UnexpectedError"
17264
17484
  "/orgs/{organizationId}/sites/{siteId}/customization":
17265
17485
  get:
17266
17486
  operationId: getSiteCustomizationById
@@ -17315,6 +17535,7 @@ paths:
17315
17535
  operationId: listSiteIntegrationScripts
17316
17536
  summary: List the scripts to embed in published content for a site.
17317
17537
  tags:
17538
+ - integrations
17318
17539
  - sites
17319
17540
  security:
17320
17541
  - user: []
@@ -17334,6 +17555,37 @@ paths:
17334
17555
  $ref: "#/components/responses/BadRequestError"
17335
17556
  default:
17336
17557
  $ref: "#/components/responses/UnexpectedError"
17558
+ "/orgs/{organizationId}/sites/{siteId}/integrations":
17559
+ get:
17560
+ operationId: listSiteIntegrations
17561
+ summary: List integrations enabled in a site.
17562
+ tags:
17563
+ - integrations
17564
+ - sites
17565
+ security:
17566
+ - user: []
17567
+ parameters:
17568
+ - $ref: "#/components/parameters/organizationId"
17569
+ - $ref: "#/components/parameters/siteId"
17570
+ - $ref: "#/components/schemas/IntegrationSearchQuery"
17571
+ responses:
17572
+ "200":
17573
+ description: Listing of integrations enabled in the site.
17574
+ content:
17575
+ application/json:
17576
+ schema:
17577
+ allOf:
17578
+ - $ref: "#/components/schemas/List"
17579
+ - type: object
17580
+ required:
17581
+ - items
17582
+ properties:
17583
+ items:
17584
+ type: array
17585
+ items:
17586
+ $ref: "#/components/schemas/Integration"
17587
+ default:
17588
+ $ref: "#/components/responses/UnexpectedError"
17337
17589
  "/orgs/{organizationId}/sites/{siteId}/spaces":
17338
17590
  post:
17339
17591
  operationId: addSpaceToSite
@@ -17586,6 +17838,27 @@ paths:
17586
17838
  - origin
17587
17839
  default:
17588
17840
  $ref: "#/components/responses/UnexpectedError"
17841
+ "/orgs/{organizationId}/sites/{siteId}/insights/track_view":
17842
+ post:
17843
+ operationId: trackViewInSiteById
17844
+ description: Track a page view in a site.
17845
+ tags:
17846
+ - analytics
17847
+ - sites
17848
+ parameters:
17849
+ - $ref: "#/components/parameters/organizationId"
17850
+ - $ref: "#/components/parameters/siteId"
17851
+ responses:
17852
+ "204":
17853
+ description: Page view has been tracked.
17854
+ default:
17855
+ $ref: "#/components/responses/UnexpectedError"
17856
+ requestBody:
17857
+ required: true
17858
+ content:
17859
+ application/json:
17860
+ schema:
17861
+ $ref: "#/components/schemas/RequestSiteTrackPageView"
17589
17862
  "/custom-hostnames/{hostname}":
17590
17863
  get:
17591
17864
  operationId: getCustomHostname