@gitbook/api 0.38.0 → 0.40.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
@@ -1221,6 +1221,57 @@ components:
1221
1221
  - pathname
1222
1222
  - basePath
1223
1223
  - apiToken
1224
+ PublishedSiteContentLookup:
1225
+ oneOf:
1226
+ - type: object
1227
+ title: Redirect
1228
+ properties:
1229
+ target:
1230
+ type: string
1231
+ description: Type of target for the redirect
1232
+ enum:
1233
+ - application
1234
+ - content
1235
+ - external
1236
+ redirect:
1237
+ $ref: "#/components/schemas/URL"
1238
+ required:
1239
+ - target
1240
+ - redirect
1241
+ - type: object
1242
+ title: Content
1243
+ properties:
1244
+ site:
1245
+ type: string
1246
+ description: ID of the site matching.
1247
+ siteSpace:
1248
+ type: string
1249
+ description: ID of the site-space matching.
1250
+ space:
1251
+ type: string
1252
+ description: ID of the space matching.
1253
+ changeRequest:
1254
+ type: string
1255
+ description: Identifier of the change request being previewed in this URL.
1256
+ revision:
1257
+ type: string
1258
+ description: Identifier of the revision being previewed in this URL.
1259
+ pathname:
1260
+ type: string
1261
+ description: Path of the content relative to the space
1262
+ basePath:
1263
+ type: string
1264
+ description: Prefix of the path in the URL dedicated to the space
1265
+ apiToken:
1266
+ type: string
1267
+ description: Short-lived API token to fetch content related to the space in the context of the URL.
1268
+ required:
1269
+ - site
1270
+ - siteSpace
1271
+ - space
1272
+ - pathname
1273
+ - basePath
1274
+ - apiToken
1224
1275
  SpacePointer:
1225
1276
  type: object
1226
1277
  properties:
@@ -3084,12 +3135,9 @@ components:
3084
3135
  - synced-block
3085
3136
  syncedBlock:
3086
3137
  type: string
3087
- organization:
3088
- type: string
3089
3138
  required:
3090
3139
  - kind
3091
3140
  - syncedBlock
3092
- - organization
3093
3141
  ContentLocation:
3094
3142
  description: An absolute reference to content in GitBook.
3095
3143
  oneOf:
@@ -3126,6 +3174,8 @@ components:
3126
3174
  $ref: "#/components/schemas/Space"
3127
3175
  changeRequest:
3128
3176
  $ref: "#/components/schemas/ChangeRequest"
3177
+ revision:
3178
+ $ref: "#/components/schemas/Revision"
3129
3179
  file:
3130
3180
  $ref: "#/components/schemas/RevisionFile"
3131
3181
  required:
@@ -3148,7 +3198,13 @@ components:
3148
3198
  $ref: "#/components/schemas/Space"
3149
3199
  changeRequest:
3150
3200
  $ref: "#/components/schemas/ChangeRequest"
3201
+ revision:
3202
+ $ref: "#/components/schemas/Revision"
3151
3203
  anchor:
3204
+ description: The anchor within the page.
3205
+ type: string
3206
+ node:
3207
+ description: The node id within the page.
3152
3208
  type: string
3153
3209
  required:
3154
3210
  - kind
@@ -4339,6 +4395,7 @@ components:
4339
4395
  oneOf:
4340
4396
  - $ref: "#/components/schemas/SpacePointer"
4341
4397
  - $ref: "#/components/schemas/CollectionPointer"
4398
+ - $ref: "#/components/schemas/SitePointer"
4342
4399
  OrganizationInvite:
4343
4400
  allOf:
4344
4401
  - type: object
@@ -4872,19 +4929,12 @@ components:
4872
4929
  $ref: "#/components/schemas/URL"
4873
4930
  required:
4874
4931
  - location
4875
- document:
4876
- $ref: "#/components/schemas/JSONDocument"
4877
- files:
4878
- type: array
4879
- items:
4880
- $ref: "#/components/schemas/RevisionFile"
4881
4932
  required:
4882
4933
  - id
4883
4934
  - organization
4884
4935
  - source
4885
4936
  - createdAt
4886
4937
  - urls
4887
- - document
4888
4938
  ContentAuditRelation:
4889
4939
  type: object
4890
4940
  description: Content audit relation
@@ -5843,6 +5893,7 @@ components:
5843
5893
  - space:script:cookies
5844
5894
  - space:git:sync
5845
5895
  - space:visitor:auth
5896
+ - site:script:inject
5846
5897
  - site:visitor:auth
5847
5898
  IntegrationSearchQuery:
5848
5899
  name: search
@@ -5977,6 +6028,12 @@ components:
5977
6028
  enum:
5978
6029
  - all
5979
6030
  - selected
6031
+ IntegrationInstallationSiteSelection:
6032
+ type: string
6033
+ description: Describe whether all sites have been selected or there's a selection involved
6034
+ enum:
6035
+ - all
6036
+ - selected
5980
6037
  IntegrationCategory:
5981
6038
  type: string
5982
6039
  enum:
@@ -5994,6 +6051,8 @@ components:
5994
6051
  $ref: "#/components/schemas/IntegrationConfiguration"
5995
6052
  space:
5996
6053
  $ref: "#/components/schemas/IntegrationConfiguration"
6054
+ site:
6055
+ $ref: "#/components/schemas/IntegrationConfiguration"
5997
6056
  IntegrationConfiguration:
5998
6057
  oneOf:
5999
6058
  - $ref: "#/components/schemas/IntegrationConfigurationSchema"
@@ -6249,6 +6308,8 @@ components:
6249
6308
  $ref: "#/components/schemas/IntegrationInstallation"
6250
6309
  spaceInstallation:
6251
6310
  $ref: "#/components/schemas/IntegrationSpaceInstallation"
6311
+ siteInstallation:
6312
+ $ref: "#/components/schemas/IntegrationSiteInstallation"
6252
6313
  secrets:
6253
6314
  $ref: "#/components/schemas/IntegrationSecrets"
6254
6315
  signingSecret:
@@ -6267,6 +6328,9 @@ components:
6267
6328
  spaceInstallation:
6268
6329
  type: string
6269
6330
  description: Secret that can be used to verify the authenticity of incoming HTTP requests to the space installation.
6331
+ siteInstallation:
6332
+ type: string
6333
+ description: Secret that can be used to verify the authenticity of incoming HTTP requests to the site installation.
6270
6334
  required:
6271
6335
  - integration
6272
6336
  apiEndpoint:
@@ -6656,7 +6720,51 @@ components:
6656
6720
  - $ref: "#/components/schemas/InstallationSetupEvent"
6657
6721
  - $ref: "#/components/schemas/SpaceInstallationSetupEvent"
6658
6722
  - $ref: "#/components/schemas/SpaceInstallationDeletedEvent"
6659
- - $ref: "#/components/schemas/SpaceViewEvent"
6723
+ - allOf:
6724
+ - $ref: "#/components/schemas/SiteEvent"
6725
+ - type: object
6726
+ description: Event received when integration has been installed or updated on a site.
6727
+ properties:
6728
+ type:
6729
+ type: string
6730
+ enum:
6731
+ - site_installation_setup
6732
+ status:
6733
+ $ref: "#/components/schemas/IntegrationInstallationStatus"
6734
+ previous:
6735
+ type: object
6736
+ description: The state of the site installation before it was updated.
6737
+ properties:
6738
+ status:
6739
+ $ref: "#/components/schemas/IntegrationInstallationStatus"
6740
+ configuration:
6741
+ type: object
6742
+ description: The previous configuration of the site installation.
6743
+ required:
6744
+ - status
6745
+ required:
6746
+ - type
6747
+ - status
6748
+ - allOf:
6749
+ - $ref: "#/components/schemas/SiteEvent"
6750
+ - type: object
6751
+ description: Event received when integration has been uninstalled from a site.
6752
+ properties:
6753
+ type:
6754
+ type: string
6755
+ enum:
6756
+ - site_installation_deleted
6757
+ previous:
6758
+ type: object
6759
+ description: The state of the site installation before it was deleted.
6760
+ properties:
6761
+ configuration:
6762
+ type: object
6763
+ description: The previous configuration of the site installation.
6764
+ required:
6765
+ - type
6766
+ - previous
6767
+ - $ref: "#/components/schemas/SiteViewEvent"
6660
6768
  - $ref: "#/components/schemas/SpaceContentUpdatedEvent"
6661
6769
  - $ref: "#/components/schemas/SpaceGitSyncCompletedEvent"
6662
6770
  - $ref: "#/components/schemas/SpaceGitSyncStartedEvent"
@@ -6702,6 +6810,17 @@ components:
6702
6810
  description: ID of the space
6703
6811
  required:
6704
6812
  - spaceId
6813
+ SiteEvent:
6814
+ allOf:
6815
+ - $ref: "#/components/schemas/InstallationEvent"
6816
+ - type: object
6817
+ description: Common properties for all events related to a specific site.
6818
+ properties:
6819
+ siteId:
6820
+ type: string
6821
+ description: ID of the site
6822
+ required:
6823
+ - siteId
6705
6824
  InstallationSetupEvent:
6706
6825
  allOf:
6707
6826
  - $ref: "#/components/schemas/InstallationEvent"
@@ -6775,6 +6894,8 @@ components:
6775
6894
  - type
6776
6895
  - previous
6777
6896
  SpaceViewEvent:
6897
+ $ref: "#/components/schemas/SiteViewEvent"
6898
+ SiteViewEvent:
6778
6899
  allOf:
6779
6900
  - $ref: "#/components/schemas/SpaceEvent"
6780
6901
  - type: object
@@ -6933,6 +7054,9 @@ components:
6933
7054
  spaceId:
6934
7055
  type: string
6935
7056
  description: The space ID, if requests are specific to a single space
7057
+ siteId:
7058
+ type: string
7059
+ description: The site ID, if requests are specific to a single site
6936
7060
  installationId:
6937
7061
  type: string
6938
7062
  description: The installation ID, if requests are specific to a single installation
@@ -6955,7 +7079,9 @@ components:
6955
7079
  - request
6956
7080
  FetchPublishedScriptEvent:
6957
7081
  allOf:
6958
- - $ref: "#/components/schemas/SpaceEvent"
7082
+ - oneOf:
7083
+ - $ref: "#/components/schemas/SpaceEvent"
7084
+ - $ref: "#/components/schemas/SiteEvent"
6959
7085
  - type: object
6960
7086
  description: Common properties for all events related to fetching a published script from an installation
6961
7087
  properties:
@@ -6967,7 +7093,9 @@ components:
6967
7093
  - type
6968
7094
  FetchVisitorAuthenticationEvent:
6969
7095
  allOf:
6970
- - $ref: "#/components/schemas/SpaceEvent"
7096
+ - oneOf:
7097
+ - $ref: "#/components/schemas/SpaceEvent"
7098
+ - $ref: "#/components/schemas/SiteEvent"
6971
7099
  - type: object
6972
7100
  description: Common properties for all events related to visitor authentication from an installation
6973
7101
  properties:
@@ -6983,6 +7111,7 @@ components:
6983
7111
  allOf:
6984
7112
  - oneOf:
6985
7113
  - $ref: "#/components/schemas/SpaceEvent"
7114
+ - $ref: "#/components/schemas/SiteEvent"
6986
7115
  - $ref: "#/components/schemas/InstallationEvent"
6987
7116
  - type: object
6988
7117
  description: Event generated when rendering a UI
@@ -10641,23 +10770,6 @@ paths:
10641
10770
  description: Space has been deleted
10642
10771
  default:
10643
10772
  $ref: "#/components/responses/UnexpectedError"
10644
- "/spaces/{spaceId}/hive/token":
10645
- post:
10646
- operationId: generateSpaceHiveReadAccessToken
10647
- summary: Returns a token to authenticate with Hive to read content from a given space.
10648
- tags:
10649
- - hive
10650
- parameters:
10651
- - $ref: "#/components/parameters/spaceId"
10652
- responses:
10653
- "200":
10654
- description: The JWT to access the space content in Hive.
10655
- content:
10656
- application/json:
10657
- schema:
10658
- $ref: "#/components/schemas/HiveAccessToken"
10659
- default:
10660
- $ref: "#/components/responses/UnexpectedError"
10661
10773
  "/spaces/{spaceId}/duplicate":
10662
10774
  post:
10663
10775
  operationId: duplicateSpace
@@ -11412,6 +11524,12 @@ paths:
11412
11524
  properties:
11413
11525
  subject:
11414
11526
  $ref: "#/components/schemas/ChangeRequestSubject"
11527
+ status:
11528
+ type: string
11529
+ enum:
11530
+ - draft
11531
+ - open
11532
+ - archived
11415
11533
  responses:
11416
11534
  "200":
11417
11535
  description: The change request has been updated
@@ -16519,6 +16637,36 @@ paths:
16519
16637
  description: OK
16520
16638
  default:
16521
16639
  $ref: "#/components/responses/UnexpectedError"
16640
+ "/orgs/{organizationId}/synced-blocks/{syncedBlockId}/content":
16641
+ get:
16642
+ operationId: getSyncedBlockContent
16643
+ summary: Get a synced block content
16644
+ tags:
16645
+ - organizations
16646
+ security:
16647
+ - user: []
16648
+ parameters:
16649
+ - $ref: "#/components/parameters/organizationId"
16650
+ - $ref: "#/components/parameters/syncedBlockId"
16651
+ responses:
16652
+ "200":
16653
+ description: OK
16654
+ content:
16655
+ application/json:
16656
+ schema:
16657
+ type: object
16658
+ properties:
16659
+ document:
16660
+ $ref: "#/components/schemas/JSONDocument"
16661
+ files:
16662
+ type: array
16663
+ items:
16664
+ $ref: "#/components/schemas/RevisionFile"
16665
+ required:
16666
+ - document
16667
+ - files
16668
+ default:
16669
+ $ref: "#/components/responses/UnexpectedError"
16522
16670
  "/orgs/{organizationId}/synced-blocks/{syncedBlockId}/backlinks":
16523
16671
  get:
16524
16672
  operationId: getSyncedBlockBacklinks
@@ -17298,6 +17446,57 @@ paths:
17298
17446
  $ref: "#/components/responses/BadRequestError"
17299
17447
  default:
17300
17448
  $ref: "#/components/responses/UnexpectedError"
17449
+ "/orgs/{organizationId}/sites/{siteId}/permissions/aggregate":
17450
+ get:
17451
+ operationId: listPermissionsAggregateInSite
17452
+ summary: List permissions for all users of a site.
17453
+ tags:
17454
+ - permissions
17455
+ - sites
17456
+ security:
17457
+ - user: []
17458
+ parameters:
17459
+ - $ref: "#/components/parameters/organizationId"
17460
+ - $ref: "#/components/parameters/siteId"
17461
+ - $ref: "#/components/parameters/listPage"
17462
+ - $ref: "#/components/parameters/listLimit"
17463
+ - name: role
17464
+ in: query
17465
+ description: If defined, only members with this role will be returned.
17466
+ schema:
17467
+ $ref: "#/components/schemas/MemberRole"
17468
+ responses:
17469
+ "200":
17470
+ description: Listing of users who can access the site.
17471
+ content:
17472
+ application/json:
17473
+ schema:
17474
+ allOf:
17475
+ - $ref: "#/components/schemas/List"
17476
+ - type: object
17477
+ required:
17478
+ - items
17479
+ properties:
17480
+ items:
17481
+ type: array
17482
+ items:
17483
+ type: object
17484
+ description: Permission of a user in a site.
17485
+ properties:
17486
+ permission:
17487
+ $ref: "#/components/schemas/MemberRole"
17488
+ user:
17489
+ $ref: "#/components/schemas/User"
17490
+ origin:
17491
+ description: The content or organization that enforced this permission level.
17492
+ oneOf:
17493
+ - $ref: "#/components/schemas/SpacePointer"
17494
+ required:
17495
+ - permission
17496
+ - user
17497
+ - origin
17498
+ default:
17499
+ $ref: "#/components/responses/UnexpectedError"
17301
17500
  "/orgs/{organizationId}/seats":
17302
17501
  get:
17303
17502
  operationId: listSeatsInOrganizationById
@@ -17648,9 +17847,15 @@ paths:
17648
17847
  type: object
17649
17848
  properties:
17650
17849
  spaces:
17850
+ deprecated: true
17651
17851
  type: array
17652
17852
  items:
17653
- description: ID of a space, potentially not directly listed in user permissions
17853
+ description: Deprecated. Use contentIds.
17854
+ type: string
17855
+ contentIds:
17856
+ type: array
17857
+ items:
17858
+ description: Content IDs to retrieve permissions for.
17654
17859
  type: string
17655
17860
  responses:
17656
17861
  "200":
@@ -17752,7 +17957,9 @@ paths:
17752
17957
  content:
17753
17958
  application/json:
17754
17959
  schema:
17755
- $ref: "#/components/schemas/PublishedContentLookup"
17960
+ oneOf:
17961
+ - $ref: "#/components/schemas/PublishedContentLookup"
17962
+ - $ref: "#/components/schemas/PublishedSiteContentLookup"
17756
17963
  "404":
17757
17964
  description: No content found for the URL.
17758
17965
  $ref: "#/components/responses/NotFoundError"