@gitbook/api 0.76.0 → 0.77.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
@@ -50,6 +50,7 @@ paths:
50
50
  required: true
51
51
  schema:
52
52
  type: string
53
+ maxLength: 512
53
54
  - $ref: "#/components/parameters/listPage"
54
55
  - $ref: "#/components/parameters/listLimit"
55
56
  responses:
@@ -463,6 +464,7 @@ paths:
463
464
  required: true
464
465
  schema:
465
466
  type: string
467
+ maxLength: 512
466
468
  - $ref: "#/components/parameters/spaceId"
467
469
  - $ref: "#/components/parameters/listPage"
468
470
  - $ref: "#/components/parameters/listLimit"
@@ -3112,8 +3114,6 @@ paths:
3112
3114
  schema:
3113
3115
  type: object
3114
3116
  properties:
3115
- visibility:
3116
- $ref: "#/components/schemas/ContentVisibility"
3117
3117
  title:
3118
3118
  $ref: "#/components/schemas/CollectionTitle"
3119
3119
  description:
@@ -4350,6 +4350,7 @@ paths:
4350
4350
  Lists all spaces, collections, sites accessible by current user in the current organization. This endpoint is internal for now as the data structure is optimized for the sidebar.
4351
4351
  tags:
4352
4352
  - organizations
4353
+ - critical
4353
4354
  security:
4354
4355
  - user-internal: []
4355
4356
  parameters:
@@ -5193,6 +5194,7 @@ paths:
5193
5194
  required: true
5194
5195
  schema:
5195
5196
  type: string
5197
+ maxLength: 512
5196
5198
  - $ref: "#/components/parameters/organizationId"
5197
5199
  - $ref: "#/components/parameters/listPage"
5198
5200
  - $ref: "#/components/parameters/listLimit"
@@ -7042,7 +7044,7 @@ paths:
7042
7044
  * `upgraded`: Subscription was upgraded to include the site
7043
7045
  * `downgraded`: Subscription was downgraded by removing the site
7044
7046
  * `no-payment-changes`: No impact on subscription (e.g. trial, unpublished)
7045
- type: object
7047
+ type: string
7046
7048
  enum:
7047
7049
  - upgraded
7048
7050
  - downgraded
@@ -7539,6 +7541,7 @@ paths:
7539
7541
  type: string
7540
7542
  query:
7541
7543
  type: string
7544
+ maxLength: 512
7542
7545
  required:
7543
7546
  - siteSpaceIds
7544
7547
  - query
@@ -7553,6 +7556,7 @@ paths:
7553
7556
  type: string
7554
7557
  query:
7555
7558
  type: string
7559
+ maxLength: 512
7556
7560
  required:
7557
7561
  - mode
7558
7562
  - siteSpaceId
@@ -7566,6 +7570,7 @@ paths:
7566
7570
  - all
7567
7571
  query:
7568
7572
  type: string
7573
+ maxLength: 512
7569
7574
  required:
7570
7575
  - mode
7571
7576
  - query
@@ -8282,6 +8287,156 @@ paths:
8282
8287
  description: OK
8283
8288
  default:
8284
8289
  $ref: "#/components/responses/UnexpectedError"
8290
+ "/orgs/{organizationId}/sites/{siteId}/redirects":
8291
+ post:
8292
+ operationId: createSiteRedirect
8293
+ summary: Configure a redirect explicitly for a site.
8294
+ tags:
8295
+ - sites
8296
+ security:
8297
+ - user: []
8298
+ parameters:
8299
+ - $ref: "#/components/parameters/organizationId"
8300
+ - $ref: "#/components/parameters/siteId"
8301
+ requestBody:
8302
+ required: true
8303
+ content:
8304
+ application/json:
8305
+ schema:
8306
+ type: object
8307
+ properties:
8308
+ source:
8309
+ $ref: "#/components/schemas/SiteRedirectSourcePath"
8310
+ destination:
8311
+ $ref: "#/components/schemas/SiteRedirectDestination"
8312
+ required:
8313
+ - source
8314
+ - destination
8315
+ responses:
8316
+ "201":
8317
+ description: The redirect was created successfully.
8318
+ content:
8319
+ application/json:
8320
+ schema:
8321
+ $ref: "#/components/schemas/SiteRedirect"
8322
+ default:
8323
+ $ref: "#/components/responses/UnexpectedError"
8324
+ get:
8325
+ operationId: listSiteRedirects
8326
+ summary: List the redirects configured for a site.
8327
+ tags:
8328
+ - sites
8329
+ security:
8330
+ - user: []
8331
+ parameters:
8332
+ - $ref: "#/components/parameters/organizationId"
8333
+ - $ref: "#/components/parameters/siteId"
8334
+ - $ref: "#/components/parameters/listPage"
8335
+ - $ref: "#/components/parameters/listLimit"
8336
+ responses:
8337
+ "200":
8338
+ description: The list of redirects for the site.
8339
+ content:
8340
+ application/json:
8341
+ schema:
8342
+ allOf:
8343
+ - $ref: "#/components/schemas/List"
8344
+ - type: object
8345
+ required:
8346
+ - items
8347
+ properties:
8348
+ items:
8349
+ type: array
8350
+ items:
8351
+ $ref: "#/components/schemas/SiteRedirect"
8352
+ default:
8353
+ $ref: "#/components/responses/UnexpectedError"
8354
+ "/orgs/{organizationId}/sites/{siteId}/redirects/{siteRedirectId}":
8355
+ patch:
8356
+ operationId: updateSiteRedirectById
8357
+ summary: Update a redirect for a site
8358
+ tags:
8359
+ - sites
8360
+ security:
8361
+ - user: []
8362
+ parameters:
8363
+ - $ref: "#/components/parameters/organizationId"
8364
+ - $ref: "#/components/parameters/siteId"
8365
+ - $ref: "#/components/parameters/siteRedirectId"
8366
+ requestBody:
8367
+ required: true
8368
+ content:
8369
+ application/json:
8370
+ schema:
8371
+ type: object
8372
+ properties:
8373
+ source:
8374
+ $ref: "#/components/schemas/SiteRedirectSourcePath"
8375
+ destination:
8376
+ $ref: "#/components/schemas/SiteRedirectDestination"
8377
+ responses:
8378
+ "200":
8379
+ description: OK
8380
+ content:
8381
+ application/json:
8382
+ schema:
8383
+ $ref: "#/components/schemas/SiteRedirect"
8384
+ default:
8385
+ $ref: "#/components/responses/UnexpectedError"
8386
+ delete:
8387
+ operationId: deleteSiteRedirectById
8388
+ summary: Delete a redirect for a site
8389
+ tags:
8390
+ - sites
8391
+ security:
8392
+ - user: []
8393
+ parameters:
8394
+ - $ref: "#/components/parameters/organizationId"
8395
+ - $ref: "#/components/parameters/siteId"
8396
+ - $ref: "#/components/parameters/siteRedirectId"
8397
+ responses:
8398
+ "205":
8399
+ description: Site redirect deleted
8400
+ default:
8401
+ $ref: "#/components/responses/UnexpectedError"
8402
+ "/orgs/{organizationId}/sites/{siteId}/redirect":
8403
+ get:
8404
+ operationId: getSiteRedirectBySource
8405
+ summary: Resolve a redirect in a site by its source path.
8406
+ tags:
8407
+ - sites
8408
+ security:
8409
+ - user: []
8410
+ parameters:
8411
+ - $ref: "#/components/parameters/organizationId"
8412
+ - $ref: "#/components/parameters/siteId"
8413
+ - $ref: "#/components/parameters/siteShareKey"
8414
+ - name: source
8415
+ in: query
8416
+ required: true
8417
+ description: The source path of the redirect.
8418
+ schema:
8419
+ $ref: "#/components/schemas/SiteRedirectSourcePath"
8420
+ responses:
8421
+ "200":
8422
+ description: The redirect was resolved successfully.
8423
+ content:
8424
+ application/json:
8425
+ schema:
8426
+ type: object
8427
+ properties:
8428
+ redirect:
8429
+ $ref: "#/components/schemas/SiteRedirect"
8430
+ target:
8431
+ type: string
8432
+ description: URL of the destination of the redirect.
8433
+ required:
8434
+ - redirect
8435
+ - target
8436
+ "404":
8437
+ $ref: "#/components/responses/NotFoundError"
8438
+ default:
8439
+ $ref: "#/components/responses/UnexpectedError"
8285
8440
  "/custom-hostnames/{hostname}":
8286
8441
  get:
8287
8442
  operationId: getCustomHostname
@@ -8955,6 +9110,13 @@ components:
8955
9110
  description: The unique id of the site-space relationship
8956
9111
  schema:
8957
9112
  type: string
9113
+ siteRedirectId:
9114
+ name: siteRedirectId
9115
+ in: path
9116
+ required: true
9117
+ description: The unique id of the site redirect
9118
+ schema:
9119
+ type: string
8958
9120
  hostname:
8959
9121
  name: hostname
8960
9122
  in: path
@@ -12769,25 +12931,12 @@ components:
12769
12931
  $ref: "#/components/schemas/CollectionTitle"
12770
12932
  description:
12771
12933
  $ref: "#/components/schemas/CollectionDescription"
12772
- path:
12773
- type: string
12774
- description: Path in the published URL
12775
- visibility:
12776
- $ref: "#/components/schemas/ContentVisibility"
12777
- publishingType:
12778
- type: string
12779
- enum:
12780
- - variants
12781
12934
  organization:
12782
12935
  type: string
12783
12936
  description: ID of the organization owning this collection
12784
12937
  parent:
12785
12938
  type: string
12786
12939
  description: ID of the parent collection, if any
12787
- collection:
12788
- type: string
12789
- deprecated: true
12790
- description: ID of the parent collection, if any
12791
12940
  defaultLevel:
12792
12941
  $ref: "#/components/schemas/DefaultLevel"
12793
12942
  urls:
@@ -12805,14 +12954,27 @@ components:
12805
12954
  required:
12806
12955
  - app
12807
12956
  - location
12957
+ permissions:
12958
+ type: object
12959
+ description: The set of permissions for the collection
12960
+ properties:
12961
+ admin:
12962
+ type: boolean
12963
+ description: Can the user edit the title/description.
12964
+ create:
12965
+ type: boolean
12966
+ description: Can the user create spaces/collections in this collection.
12967
+ required:
12968
+ - admin
12969
+ - create
12808
12970
  required:
12809
12971
  - object
12810
12972
  - id
12811
12973
  - title
12812
12974
  - organization
12813
- - visibility
12814
12975
  - urls
12815
12976
  - defaultLevel
12977
+ - permissions
12816
12978
  ContentLocationCollection:
12817
12979
  type: object
12818
12980
  properties:
@@ -18204,6 +18366,78 @@ components:
18204
18366
  icon:
18205
18367
  description: Icon of the page, if one has been set.
18206
18368
  $ref: "#/components/schemas/Icon"
18369
+ SiteRedirectSourcePath:
18370
+ type: string
18371
+ description: The source path to redirect from.
18372
+ maxLength: 512
18373
+ pattern: ^/[a-zA-Z0-9-_.\/]+[a-zA-Z0-9-_.]$
18374
+ SiteRedirectDestinationSiteSection:
18375
+ type: object
18376
+ properties:
18377
+ kind:
18378
+ type: string
18379
+ enum:
18380
+ - site-section
18381
+ siteSectionId:
18382
+ type: string
18383
+ description: Unique identifier for the site section to redirect to
18384
+ required:
18385
+ - kind
18386
+ - siteSectionId
18387
+ SiteRedirectDestinationSiteSpace:
18388
+ type: object
18389
+ properties:
18390
+ kind:
18391
+ type: string
18392
+ enum:
18393
+ - site-space
18394
+ siteSpaceId:
18395
+ type: string
18396
+ description: Unique identifier for the site space to redirect to
18397
+ required:
18398
+ - kind
18399
+ - siteSpaceId
18400
+ SiteRedirectDestinationPage:
18401
+ type: object
18402
+ properties:
18403
+ kind:
18404
+ type: string
18405
+ enum:
18406
+ - site-page
18407
+ siteSpaceId:
18408
+ type: string
18409
+ description: Unique identifier for the site space of the page
18410
+ pageId:
18411
+ type: string
18412
+ description: Unique identifier for the page within the site space to redirect to
18413
+ required:
18414
+ - kind
18415
+ - siteSpaceId
18416
+ - pageId
18417
+ SiteRedirectDestination:
18418
+ oneOf:
18419
+ - $ref: "#/components/schemas/SiteRedirectDestinationSiteSection"
18420
+ - $ref: "#/components/schemas/SiteRedirectDestinationSiteSpace"
18421
+ - $ref: "#/components/schemas/SiteRedirectDestinationPage"
18422
+ SiteRedirect:
18423
+ type: object
18424
+ properties:
18425
+ object:
18426
+ type: string
18427
+ enum:
18428
+ - site-redirect
18429
+ id:
18430
+ type: string
18431
+ description: The unique identifier for the redirect.
18432
+ source:
18433
+ $ref: "#/components/schemas/SiteRedirectSourcePath"
18434
+ destination:
18435
+ $ref: "#/components/schemas/SiteRedirectDestination"
18436
+ required:
18437
+ - object
18438
+ - id
18439
+ - source
18440
+ - destination
18207
18441
  CustomHostnameDnsStatus:
18208
18442
  type: string
18209
18443
  enum:
@@ -19733,6 +19967,18 @@ components:
19733
19967
  required:
19734
19968
  - channel
19735
19969
  - site
19970
+ SiteRedirectsChannel:
19971
+ type: object
19972
+ properties:
19973
+ channel:
19974
+ type: string
19975
+ enum:
19976
+ - site-redirects
19977
+ site:
19978
+ type: string
19979
+ required:
19980
+ - channel
19981
+ - site
19736
19982
  SiteChannel:
19737
19983
  type: object
19738
19984
  properties:
@@ -19952,6 +20198,7 @@ components:
19952
20198
  - $ref: "#/components/schemas/IntegrationSiteInstallationChannel"
19953
20199
  - $ref: "#/components/schemas/IntegrationSiteInstallationsChannel"
19954
20200
  - $ref: "#/components/schemas/PublishedContentSiteChannel"
20201
+ - $ref: "#/components/schemas/SiteRedirectsChannel"
19955
20202
  - $ref: "#/components/schemas/SiteChannel"
19956
20203
  - $ref: "#/components/schemas/SiteCustomizationChannel"
19957
20204
  - $ref: "#/components/schemas/SiteIntegrationsChannel"
@@ -20154,6 +20401,8 @@ components:
20154
20401
  $ref: "#/components/schemas/VisitorAuthIntegrationBackend"
20155
20402
  UserPermissions:
20156
20403
  $ref: "#/components/schemas/_index"
20404
+ SiteRedirectDestinationSpace:
20405
+ $ref: "#/components/schemas/SiteRedirectDestinationSiteSpace"
20157
20406
  responses:
20158
20407
  UnexpectedError:
20159
20408
  description: Unexpected Error