@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.json CHANGED
@@ -82,7 +82,8 @@
82
82
  "in": "query",
83
83
  "required": true,
84
84
  "schema": {
85
- "type": "string"
85
+ "type": "string",
86
+ "maxLength": 512
86
87
  }
87
88
  },
88
89
  {
@@ -785,7 +786,8 @@
785
786
  "in": "query",
786
787
  "required": true,
787
788
  "schema": {
788
- "type": "string"
789
+ "type": "string",
790
+ "maxLength": 512
789
791
  }
790
792
  },
791
793
  {
@@ -5711,9 +5713,6 @@
5711
5713
  "schema": {
5712
5714
  "type": "object",
5713
5715
  "properties": {
5714
- "visibility": {
5715
- "$ref": "#/components/schemas/ContentVisibility"
5716
- },
5717
5716
  "title": {
5718
5717
  "$ref": "#/components/schemas/CollectionTitle"
5719
5718
  },
@@ -7871,7 +7870,8 @@
7871
7870
  "summary": "List all content in an organization",
7872
7871
  "description": "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.\n",
7873
7872
  "tags": [
7874
- "organizations"
7873
+ "organizations",
7874
+ "critical"
7875
7875
  ],
7876
7876
  "security": [
7877
7877
  {
@@ -9365,7 +9365,8 @@
9365
9365
  "in": "query",
9366
9366
  "required": true,
9367
9367
  "schema": {
9368
- "type": "string"
9368
+ "type": "string",
9369
+ "maxLength": 512
9369
9370
  }
9370
9371
  },
9371
9372
  {
@@ -12625,7 +12626,7 @@
12625
12626
  },
12626
12627
  "outcome": {
12627
12628
  "description": "* `upgraded`: Subscription was upgraded to include the site\n* `downgraded`: Subscription was downgraded by removing the site\n* `no-payment-changes`: No impact on subscription (e.g. trial, unpublished)\n",
12628
- "type": "object",
12629
+ "type": "string",
12629
12630
  "enum": [
12630
12631
  "upgraded",
12631
12632
  "downgraded",
@@ -13521,7 +13522,8 @@
13521
13522
  }
13522
13523
  },
13523
13524
  "query": {
13524
- "type": "string"
13525
+ "type": "string",
13526
+ "maxLength": 512
13525
13527
  }
13526
13528
  },
13527
13529
  "required": [
@@ -13543,7 +13545,8 @@
13543
13545
  "type": "string"
13544
13546
  },
13545
13547
  "query": {
13546
- "type": "string"
13548
+ "type": "string",
13549
+ "maxLength": 512
13547
13550
  }
13548
13551
  },
13549
13552
  "required": [
@@ -13563,7 +13566,8 @@
13563
13566
  ]
13564
13567
  },
13565
13568
  "query": {
13566
- "type": "string"
13569
+ "type": "string",
13570
+ "maxLength": 512
13567
13571
  }
13568
13572
  },
13569
13573
  "required": [
@@ -14827,6 +14831,278 @@
14827
14831
  }
14828
14832
  }
14829
14833
  },
14834
+ "/orgs/{organizationId}/sites/{siteId}/redirects": {
14835
+ "post": {
14836
+ "operationId": "createSiteRedirect",
14837
+ "summary": "Configure a redirect explicitly for a site.",
14838
+ "tags": [
14839
+ "sites"
14840
+ ],
14841
+ "security": [
14842
+ {
14843
+ "user": []
14844
+ }
14845
+ ],
14846
+ "parameters": [
14847
+ {
14848
+ "$ref": "#/components/parameters/organizationId"
14849
+ },
14850
+ {
14851
+ "$ref": "#/components/parameters/siteId"
14852
+ }
14853
+ ],
14854
+ "requestBody": {
14855
+ "required": true,
14856
+ "content": {
14857
+ "application/json": {
14858
+ "schema": {
14859
+ "type": "object",
14860
+ "properties": {
14861
+ "source": {
14862
+ "$ref": "#/components/schemas/SiteRedirectSourcePath"
14863
+ },
14864
+ "destination": {
14865
+ "$ref": "#/components/schemas/SiteRedirectDestination"
14866
+ }
14867
+ },
14868
+ "required": [
14869
+ "source",
14870
+ "destination"
14871
+ ]
14872
+ }
14873
+ }
14874
+ }
14875
+ },
14876
+ "responses": {
14877
+ "201": {
14878
+ "description": "The redirect was created successfully.",
14879
+ "content": {
14880
+ "application/json": {
14881
+ "schema": {
14882
+ "$ref": "#/components/schemas/SiteRedirect"
14883
+ }
14884
+ }
14885
+ }
14886
+ },
14887
+ "default": {
14888
+ "$ref": "#/components/responses/UnexpectedError"
14889
+ }
14890
+ }
14891
+ },
14892
+ "get": {
14893
+ "operationId": "listSiteRedirects",
14894
+ "summary": "List the redirects configured for a site.",
14895
+ "tags": [
14896
+ "sites"
14897
+ ],
14898
+ "security": [
14899
+ {
14900
+ "user": []
14901
+ }
14902
+ ],
14903
+ "parameters": [
14904
+ {
14905
+ "$ref": "#/components/parameters/organizationId"
14906
+ },
14907
+ {
14908
+ "$ref": "#/components/parameters/siteId"
14909
+ },
14910
+ {
14911
+ "$ref": "#/components/parameters/listPage"
14912
+ },
14913
+ {
14914
+ "$ref": "#/components/parameters/listLimit"
14915
+ }
14916
+ ],
14917
+ "responses": {
14918
+ "200": {
14919
+ "description": "The list of redirects for the site.",
14920
+ "content": {
14921
+ "application/json": {
14922
+ "schema": {
14923
+ "allOf": [
14924
+ {
14925
+ "$ref": "#/components/schemas/List"
14926
+ },
14927
+ {
14928
+ "type": "object",
14929
+ "required": [
14930
+ "items"
14931
+ ],
14932
+ "properties": {
14933
+ "items": {
14934
+ "type": "array",
14935
+ "items": {
14936
+ "$ref": "#/components/schemas/SiteRedirect"
14937
+ }
14938
+ }
14939
+ }
14940
+ }
14941
+ ]
14942
+ }
14943
+ }
14944
+ }
14945
+ },
14946
+ "default": {
14947
+ "$ref": "#/components/responses/UnexpectedError"
14948
+ }
14949
+ }
14950
+ }
14951
+ },
14952
+ "/orgs/{organizationId}/sites/{siteId}/redirects/{siteRedirectId}": {
14953
+ "patch": {
14954
+ "operationId": "updateSiteRedirectById",
14955
+ "summary": "Update a redirect for a site",
14956
+ "tags": [
14957
+ "sites"
14958
+ ],
14959
+ "security": [
14960
+ {
14961
+ "user": []
14962
+ }
14963
+ ],
14964
+ "parameters": [
14965
+ {
14966
+ "$ref": "#/components/parameters/organizationId"
14967
+ },
14968
+ {
14969
+ "$ref": "#/components/parameters/siteId"
14970
+ },
14971
+ {
14972
+ "$ref": "#/components/parameters/siteRedirectId"
14973
+ }
14974
+ ],
14975
+ "requestBody": {
14976
+ "required": true,
14977
+ "content": {
14978
+ "application/json": {
14979
+ "schema": {
14980
+ "type": "object",
14981
+ "properties": {
14982
+ "source": {
14983
+ "$ref": "#/components/schemas/SiteRedirectSourcePath"
14984
+ },
14985
+ "destination": {
14986
+ "$ref": "#/components/schemas/SiteRedirectDestination"
14987
+ }
14988
+ }
14989
+ }
14990
+ }
14991
+ }
14992
+ },
14993
+ "responses": {
14994
+ "200": {
14995
+ "description": "OK",
14996
+ "content": {
14997
+ "application/json": {
14998
+ "schema": {
14999
+ "$ref": "#/components/schemas/SiteRedirect"
15000
+ }
15001
+ }
15002
+ }
15003
+ },
15004
+ "default": {
15005
+ "$ref": "#/components/responses/UnexpectedError"
15006
+ }
15007
+ }
15008
+ },
15009
+ "delete": {
15010
+ "operationId": "deleteSiteRedirectById",
15011
+ "summary": "Delete a redirect for a site",
15012
+ "tags": [
15013
+ "sites"
15014
+ ],
15015
+ "security": [
15016
+ {
15017
+ "user": []
15018
+ }
15019
+ ],
15020
+ "parameters": [
15021
+ {
15022
+ "$ref": "#/components/parameters/organizationId"
15023
+ },
15024
+ {
15025
+ "$ref": "#/components/parameters/siteId"
15026
+ },
15027
+ {
15028
+ "$ref": "#/components/parameters/siteRedirectId"
15029
+ }
15030
+ ],
15031
+ "responses": {
15032
+ "205": {
15033
+ "description": "Site redirect deleted"
15034
+ },
15035
+ "default": {
15036
+ "$ref": "#/components/responses/UnexpectedError"
15037
+ }
15038
+ }
15039
+ }
15040
+ },
15041
+ "/orgs/{organizationId}/sites/{siteId}/redirect": {
15042
+ "get": {
15043
+ "operationId": "getSiteRedirectBySource",
15044
+ "summary": "Resolve a redirect in a site by its source path.",
15045
+ "tags": [
15046
+ "sites"
15047
+ ],
15048
+ "security": [
15049
+ {
15050
+ "user": []
15051
+ }
15052
+ ],
15053
+ "parameters": [
15054
+ {
15055
+ "$ref": "#/components/parameters/organizationId"
15056
+ },
15057
+ {
15058
+ "$ref": "#/components/parameters/siteId"
15059
+ },
15060
+ {
15061
+ "$ref": "#/components/parameters/siteShareKey"
15062
+ },
15063
+ {
15064
+ "name": "source",
15065
+ "in": "query",
15066
+ "required": true,
15067
+ "description": "The source path of the redirect.",
15068
+ "schema": {
15069
+ "$ref": "#/components/schemas/SiteRedirectSourcePath"
15070
+ }
15071
+ }
15072
+ ],
15073
+ "responses": {
15074
+ "200": {
15075
+ "description": "The redirect was resolved successfully.",
15076
+ "content": {
15077
+ "application/json": {
15078
+ "schema": {
15079
+ "type": "object",
15080
+ "properties": {
15081
+ "redirect": {
15082
+ "$ref": "#/components/schemas/SiteRedirect"
15083
+ },
15084
+ "target": {
15085
+ "type": "string",
15086
+ "description": "URL of the destination of the redirect."
15087
+ }
15088
+ },
15089
+ "required": [
15090
+ "redirect",
15091
+ "target"
15092
+ ]
15093
+ }
15094
+ }
15095
+ }
15096
+ },
15097
+ "404": {
15098
+ "$ref": "#/components/responses/NotFoundError"
15099
+ },
15100
+ "default": {
15101
+ "$ref": "#/components/responses/UnexpectedError"
15102
+ }
15103
+ }
15104
+ }
15105
+ },
14830
15106
  "/custom-hostnames/{hostname}": {
14831
15107
  "get": {
14832
15108
  "operationId": "getCustomHostname",
@@ -15848,6 +16124,15 @@
15848
16124
  "type": "string"
15849
16125
  }
15850
16126
  },
16127
+ "siteRedirectId": {
16128
+ "name": "siteRedirectId",
16129
+ "in": "path",
16130
+ "required": true,
16131
+ "description": "The unique id of the site redirect",
16132
+ "schema": {
16133
+ "type": "string"
16134
+ }
16135
+ },
15851
16136
  "hostname": {
15852
16137
  "name": "hostname",
15853
16138
  "in": "path",
@@ -21666,19 +21951,6 @@
21666
21951
  "description": {
21667
21952
  "$ref": "#/components/schemas/CollectionDescription"
21668
21953
  },
21669
- "path": {
21670
- "type": "string",
21671
- "description": "Path in the published URL"
21672
- },
21673
- "visibility": {
21674
- "$ref": "#/components/schemas/ContentVisibility"
21675
- },
21676
- "publishingType": {
21677
- "type": "string",
21678
- "enum": [
21679
- "variants"
21680
- ]
21681
- },
21682
21954
  "organization": {
21683
21955
  "type": "string",
21684
21956
  "description": "ID of the organization owning this collection"
@@ -21687,11 +21959,6 @@
21687
21959
  "type": "string",
21688
21960
  "description": "ID of the parent collection, if any"
21689
21961
  },
21690
- "collection": {
21691
- "type": "string",
21692
- "deprecated": true,
21693
- "description": "ID of the parent collection, if any"
21694
- },
21695
21962
  "defaultLevel": {
21696
21963
  "$ref": "#/components/schemas/DefaultLevel"
21697
21964
  },
@@ -21714,6 +21981,24 @@
21714
21981
  "app",
21715
21982
  "location"
21716
21983
  ]
21984
+ },
21985
+ "permissions": {
21986
+ "type": "object",
21987
+ "description": "The set of permissions for the collection",
21988
+ "properties": {
21989
+ "admin": {
21990
+ "type": "boolean",
21991
+ "description": "Can the user edit the title/description."
21992
+ },
21993
+ "create": {
21994
+ "type": "boolean",
21995
+ "description": "Can the user create spaces/collections in this collection."
21996
+ }
21997
+ },
21998
+ "required": [
21999
+ "admin",
22000
+ "create"
22001
+ ]
21717
22002
  }
21718
22003
  },
21719
22004
  "required": [
@@ -21721,9 +22006,9 @@
21721
22006
  "id",
21722
22007
  "title",
21723
22008
  "organization",
21724
- "visibility",
21725
22009
  "urls",
21726
- "defaultLevel"
22010
+ "defaultLevel",
22011
+ "permissions"
21727
22012
  ]
21728
22013
  },
21729
22014
  "ContentLocationCollection": {
@@ -29882,6 +30167,114 @@
29882
30167
  }
29883
30168
  }
29884
30169
  },
30170
+ "SiteRedirectSourcePath": {
30171
+ "type": "string",
30172
+ "description": "The source path to redirect from.",
30173
+ "maxLength": 512,
30174
+ "pattern": "^/[a-zA-Z0-9-_.\\/]+[a-zA-Z0-9-_.]$"
30175
+ },
30176
+ "SiteRedirectDestinationSiteSection": {
30177
+ "type": "object",
30178
+ "properties": {
30179
+ "kind": {
30180
+ "type": "string",
30181
+ "enum": [
30182
+ "site-section"
30183
+ ]
30184
+ },
30185
+ "siteSectionId": {
30186
+ "type": "string",
30187
+ "description": "Unique identifier for the site section to redirect to"
30188
+ }
30189
+ },
30190
+ "required": [
30191
+ "kind",
30192
+ "siteSectionId"
30193
+ ]
30194
+ },
30195
+ "SiteRedirectDestinationSiteSpace": {
30196
+ "type": "object",
30197
+ "properties": {
30198
+ "kind": {
30199
+ "type": "string",
30200
+ "enum": [
30201
+ "site-space"
30202
+ ]
30203
+ },
30204
+ "siteSpaceId": {
30205
+ "type": "string",
30206
+ "description": "Unique identifier for the site space to redirect to"
30207
+ }
30208
+ },
30209
+ "required": [
30210
+ "kind",
30211
+ "siteSpaceId"
30212
+ ]
30213
+ },
30214
+ "SiteRedirectDestinationPage": {
30215
+ "type": "object",
30216
+ "properties": {
30217
+ "kind": {
30218
+ "type": "string",
30219
+ "enum": [
30220
+ "site-page"
30221
+ ]
30222
+ },
30223
+ "siteSpaceId": {
30224
+ "type": "string",
30225
+ "description": "Unique identifier for the site space of the page"
30226
+ },
30227
+ "pageId": {
30228
+ "type": "string",
30229
+ "description": "Unique identifier for the page within the site space to redirect to"
30230
+ }
30231
+ },
30232
+ "required": [
30233
+ "kind",
30234
+ "siteSpaceId",
30235
+ "pageId"
30236
+ ]
30237
+ },
30238
+ "SiteRedirectDestination": {
30239
+ "oneOf": [
30240
+ {
30241
+ "$ref": "#/components/schemas/SiteRedirectDestinationSiteSection"
30242
+ },
30243
+ {
30244
+ "$ref": "#/components/schemas/SiteRedirectDestinationSiteSpace"
30245
+ },
30246
+ {
30247
+ "$ref": "#/components/schemas/SiteRedirectDestinationPage"
30248
+ }
30249
+ ]
30250
+ },
30251
+ "SiteRedirect": {
30252
+ "type": "object",
30253
+ "properties": {
30254
+ "object": {
30255
+ "type": "string",
30256
+ "enum": [
30257
+ "site-redirect"
30258
+ ]
30259
+ },
30260
+ "id": {
30261
+ "type": "string",
30262
+ "description": "The unique identifier for the redirect."
30263
+ },
30264
+ "source": {
30265
+ "$ref": "#/components/schemas/SiteRedirectSourcePath"
30266
+ },
30267
+ "destination": {
30268
+ "$ref": "#/components/schemas/SiteRedirectDestination"
30269
+ }
30270
+ },
30271
+ "required": [
30272
+ "object",
30273
+ "id",
30274
+ "source",
30275
+ "destination"
30276
+ ]
30277
+ },
29885
30278
  "CustomHostnameDnsStatus": {
29886
30279
  "type": "string",
29887
30280
  "enum": [
@@ -32212,6 +32605,24 @@
32212
32605
  "site"
32213
32606
  ]
32214
32607
  },
32608
+ "SiteRedirectsChannel": {
32609
+ "type": "object",
32610
+ "properties": {
32611
+ "channel": {
32612
+ "type": "string",
32613
+ "enum": [
32614
+ "site-redirects"
32615
+ ]
32616
+ },
32617
+ "site": {
32618
+ "type": "string"
32619
+ }
32620
+ },
32621
+ "required": [
32622
+ "channel",
32623
+ "site"
32624
+ ]
32625
+ },
32215
32626
  "SiteChannel": {
32216
32627
  "type": "object",
32217
32628
  "properties": {
@@ -32605,6 +33016,9 @@
32605
33016
  {
32606
33017
  "$ref": "#/components/schemas/PublishedContentSiteChannel"
32607
33018
  },
33019
+ {
33020
+ "$ref": "#/components/schemas/SiteRedirectsChannel"
33021
+ },
32608
33022
  {
32609
33023
  "$ref": "#/components/schemas/SiteChannel"
32610
33024
  },
@@ -32923,6 +33337,9 @@
32923
33337
  },
32924
33338
  "UserPermissions": {
32925
33339
  "$ref": "#/components/schemas/_index"
33340
+ },
33341
+ "SiteRedirectDestinationSpace": {
33342
+ "$ref": "#/components/schemas/SiteRedirectDestinationSiteSpace"
32926
33343
  }
32927
33344
  },
32928
33345
  "responses": {