@gitbook/api 0.70.0 → 0.72.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
@@ -1117,6 +1117,26 @@ paths:
1117
1117
  - $ref: "#/components/schemas/RevisionPageGroup"
1118
1118
  default:
1119
1119
  $ref: "#/components/responses/UnexpectedError"
1120
+ "/spaces/{spaceId}/content/reusable-contents/{reusableContentId}":
1121
+ get:
1122
+ summary: Get a reusable content by its ID in the main revision of a space
1123
+ operationId: getReusableContentById
1124
+ security:
1125
+ - user: []
1126
+ parameters:
1127
+ - $ref: "#/components/parameters/spaceId"
1128
+ - $ref: "#/components/parameters/reusableContentId"
1129
+ - $ref: "#/components/parameters/revisionMetadata"
1130
+ - $ref: "#/components/parameters/revisionComputed"
1131
+ responses:
1132
+ "200":
1133
+ description: OK
1134
+ content:
1135
+ application/json:
1136
+ schema:
1137
+ $ref: "#/components/schemas/RevisionReusableContent"
1138
+ default:
1139
+ $ref: "#/components/responses/UnexpectedError"
1120
1140
  "/spaces/{spaceId}/content/computed/document":
1121
1141
  get:
1122
1142
  operationId: getComputedDocument
@@ -2172,6 +2192,27 @@ paths:
2172
2192
  - $ref: "#/components/schemas/RevisionPageGroup"
2173
2193
  default:
2174
2194
  $ref: "#/components/responses/UnexpectedError"
2195
+ "/spaces/{spaceId}/change-requests/{changeRequestId}/content/reusable-contents/{reusableContentId}":
2196
+ get:
2197
+ summary: Get a reusable content by its ID in the content of a change request
2198
+ operationId: getReusableContentInChangeRequestById
2199
+ security:
2200
+ - user: []
2201
+ parameters:
2202
+ - $ref: "#/components/parameters/spaceId"
2203
+ - $ref: "#/components/parameters/changeRequestId"
2204
+ - $ref: "#/components/parameters/reusableContentId"
2205
+ - $ref: "#/components/parameters/revisionMetadata"
2206
+ - $ref: "#/components/parameters/revisionComputed"
2207
+ responses:
2208
+ "200":
2209
+ description: OK
2210
+ content:
2211
+ application/json:
2212
+ schema:
2213
+ $ref: "#/components/schemas/RevisionReusableContent"
2214
+ default:
2215
+ $ref: "#/components/responses/UnexpectedError"
2175
2216
  "/spaces/{spaceId}/change-requests/{changeRequestId}/touched-content":
2176
2217
  post:
2177
2218
  operationId: touchContentInChangeRequest
@@ -2455,6 +2496,27 @@ paths:
2455
2496
  - $ref: "#/components/schemas/RevisionPageGroup"
2456
2497
  default:
2457
2498
  $ref: "#/components/responses/UnexpectedError"
2499
+ "/spaces/{spaceId}/revisions/{revisionId}/reusable-contents/{reusableContentId}":
2500
+ get:
2501
+ summary: Get reusbale content in a revision by its ID
2502
+ operationId: getReusableContentInRevisionById
2503
+ security:
2504
+ - user: []
2505
+ parameters:
2506
+ - $ref: "#/components/parameters/spaceId"
2507
+ - $ref: "#/components/parameters/revisionId"
2508
+ - $ref: "#/components/parameters/reusableContentId"
2509
+ - $ref: "#/components/parameters/revisionMetadata"
2510
+ - $ref: "#/components/parameters/revisionComputed"
2511
+ responses:
2512
+ "200":
2513
+ description: OK
2514
+ content:
2515
+ application/json:
2516
+ schema:
2517
+ $ref: "#/components/schemas/RevisionReusableContent"
2518
+ default:
2519
+ $ref: "#/components/responses/UnexpectedError"
2458
2520
  "/spaces/{spaceId}/comments":
2459
2521
  get:
2460
2522
  operationId: listCommentsInSpace
@@ -7121,27 +7183,7 @@ paths:
7121
7183
  content:
7122
7184
  application/json:
7123
7185
  schema:
7124
- oneOf:
7125
- - type: object
7126
- properties:
7127
- type:
7128
- type: string
7129
- enum:
7130
- - sections
7131
- structure:
7132
- type: array
7133
- items:
7134
- $ref: "#/components/schemas/SiteSection"
7135
- - type: object
7136
- properties:
7137
- type:
7138
- type: string
7139
- enum:
7140
- - siteSpaces
7141
- structure:
7142
- type: array
7143
- items:
7144
- $ref: "#/components/schemas/SiteSpace"
7186
+ $ref: "#/components/schemas/SiteStructure"
7145
7187
  "404":
7146
7188
  description: No matching site found
7147
7189
  $ref: "#/components/responses/NotFoundError"
@@ -7692,17 +7734,51 @@ paths:
7692
7734
  content:
7693
7735
  application/json:
7694
7736
  schema:
7695
- type: object
7696
- properties:
7697
- query:
7698
- type: string
7699
- siteSpaceIds:
7700
- type: array
7701
- minLength: 1
7702
- items:
7703
- type: string
7704
- required:
7705
- - query
7737
+ oneOf:
7738
+ - type: object
7739
+ properties:
7740
+ mode:
7741
+ description: Search only in the site spaces provided
7742
+ type: string
7743
+ enum:
7744
+ - specific
7745
+ siteSpaceIds:
7746
+ type: array
7747
+ minLength: 1
7748
+ items:
7749
+ type: string
7750
+ query:
7751
+ type: string
7752
+ required:
7753
+ - siteSpaceIds
7754
+ - query
7755
+ - type: object
7756
+ properties:
7757
+ mode:
7758
+ description: Search in the current site space and all section's defaults
7759
+ type: string
7760
+ enum:
7761
+ - current
7762
+ siteSpaceId:
7763
+ type: string
7764
+ query:
7765
+ type: string
7766
+ required:
7767
+ - mode
7768
+ - siteSpaceId
7769
+ - query
7770
+ - type: object
7771
+ properties:
7772
+ mode:
7773
+ description: search in all site-spaces
7774
+ type: string
7775
+ enum:
7776
+ - all
7777
+ query:
7778
+ type: string
7779
+ required:
7780
+ - mode
7781
+ - query
7706
7782
  responses:
7707
7783
  "200":
7708
7784
  description: OK
@@ -8160,6 +8236,42 @@ paths:
8160
8236
  $ref: "#/components/schemas/PageFeedback"
8161
8237
  default:
8162
8238
  $ref: "#/components/responses/UnexpectedError"
8239
+ "/orgs/{organizationId}/sites/{siteId}/sections/{siteSectionId}/move":
8240
+ post:
8241
+ operationId: moveSiteSection
8242
+ summary: Move a site section to a new position in the site.
8243
+ tags:
8244
+ - sites
8245
+ security:
8246
+ - user: []
8247
+ parameters:
8248
+ - $ref: "#/components/parameters/organizationId"
8249
+ - $ref: "#/components/parameters/siteId"
8250
+ - $ref: "#/components/parameters/siteSectionId"
8251
+ requestBody:
8252
+ content:
8253
+ application/json:
8254
+ schema:
8255
+ type: object
8256
+ properties:
8257
+ position:
8258
+ description: The position where to move the site section. When not provided the site section is moved at the end of the site.
8259
+ $ref: "#/components/schemas/SiteSectionMovePosition"
8260
+ responses:
8261
+ "200":
8262
+ description: Site section moved
8263
+ content:
8264
+ application/json:
8265
+ schema:
8266
+ $ref: "#/components/schemas/SiteSection"
8267
+ "400":
8268
+ description: Invalid move site section position provided
8269
+ $ref: "#/components/responses/BadRequestError"
8270
+ "404":
8271
+ description: No matching Site section found
8272
+ $ref: "#/components/responses/NotFoundError"
8273
+ default:
8274
+ $ref: "#/components/responses/UnexpectedError"
8163
8275
  "/orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}/move":
8164
8276
  post:
8165
8277
  operationId: moveSiteSpace
@@ -8799,6 +8911,13 @@ components:
8799
8911
  description: The path of the page in the revision.
8800
8912
  schema:
8801
8913
  type: string
8914
+ reusableContentId:
8915
+ name: reusableContentId
8916
+ in: path
8917
+ required: true
8918
+ description: The unique id of the reusable content
8919
+ schema:
8920
+ type: string
8802
8921
  documentSchema:
8803
8922
  name: schema
8804
8923
  in: query
@@ -12059,6 +12178,40 @@ components:
12059
12178
  type: number
12060
12179
  required:
12061
12180
  - yPos
12181
+ AnalyticsFeedbacksPageScore:
12182
+ type: object
12183
+ description: A score breakdown for a specific page.
12184
+ required:
12185
+ - score
12186
+ - total
12187
+ - rating
12188
+ - ponderedScore
12189
+ - bad
12190
+ - ok
12191
+ - good
12192
+ properties:
12193
+ score:
12194
+ type: number
12195
+ description: Score based on each rating (+1 for 'good', -0.5 for 'ok', -2 for 'bad').
12196
+ total:
12197
+ type: number
12198
+ description: Total number of ratings done by end users.
12199
+ rating:
12200
+ type: string
12201
+ deprecated: true
12202
+ description: Summary of the rating based on the score ('good', 'ok', or 'bad')
12203
+ ponderedScore:
12204
+ type: number
12205
+ description: Score multiplied by the number of ratings to give more importance to highly rated content.
12206
+ bad:
12207
+ type: number
12208
+ description: Number of 'bad' ratings.
12209
+ ok:
12210
+ type: number
12211
+ description: Number of 'ok' ratings.
12212
+ good:
12213
+ type: number
12214
+ description: Number of 'good' ratings.
12062
12215
  AnalyticsContentPage:
12063
12216
  type: object
12064
12217
  description: Page entry in the content analytics.
@@ -12071,38 +12224,7 @@ components:
12071
12224
  pageViews:
12072
12225
  type: number
12073
12226
  feedbacks:
12074
- type: object
12075
- required:
12076
- - score
12077
- - total
12078
- - rating
12079
- - ponderedScore
12080
- - bad
12081
- - ok
12082
- - good
12083
- properties:
12084
- score:
12085
- type: number
12086
- description: Score based on each rating (+1 for 'good', -0.5 for 'ok', -2 for 'bad').
12087
- total:
12088
- type: number
12089
- description: Total number of ratings done by end users.
12090
- rating:
12091
- type: string
12092
- deprecated: true
12093
- description: Summary of the rating based on the score ('good', 'ok', or 'bad')
12094
- ponderedScore:
12095
- type: number
12096
- description: Score multiplied by the number of ratings to give more importance to highly rated content.
12097
- bad:
12098
- type: number
12099
- description: Number of 'bad' ratings.
12100
- ok:
12101
- type: number
12102
- description: Number of 'ok' ratings.
12103
- good:
12104
- type: number
12105
- description: Number of 'good' ratings.
12227
+ $ref: "#/components/schemas/AnalyticsFeedbacksPageScore"
12106
12228
  AnalyticsContentPages:
12107
12229
  type: object
12108
12230
  required:
@@ -12331,6 +12453,20 @@ components:
12331
12453
  - contentType
12332
12454
  - downloadURL
12333
12455
  - size
12456
+ RevisionReusableContent:
12457
+ type: object
12458
+ properties:
12459
+ id:
12460
+ type: string
12461
+ title:
12462
+ type: string
12463
+ document:
12464
+ type: string
12465
+ git:
12466
+ $ref: "#/components/schemas/GitSyncBlob"
12467
+ required:
12468
+ - id
12469
+ - title
12334
12470
  GitSyncCommit:
12335
12471
  type: object
12336
12472
  properties:
@@ -12377,6 +12513,10 @@ components:
12377
12513
  type: array
12378
12514
  items:
12379
12515
  $ref: "#/components/schemas/RevisionFile"
12516
+ reusableContents:
12517
+ type: array
12518
+ items:
12519
+ $ref: "#/components/schemas/RevisionReusableContent"
12380
12520
  createdAt:
12381
12521
  description: When the revision was created.
12382
12522
  $ref: "#/components/schemas/Timestamp"
@@ -12406,6 +12546,7 @@ components:
12406
12546
  - parents
12407
12547
  - pages
12408
12548
  - files
12549
+ - reusableContents
12409
12550
  - urls
12410
12551
  - createdAt
12411
12552
  RevisionTypeEdits:
@@ -13450,6 +13591,28 @@ components:
13450
13591
  - kind
13451
13592
  - organization
13452
13593
  - syncedBlock
13594
+ ContentLocationReusableContent:
13595
+ type: object
13596
+ properties:
13597
+ kind:
13598
+ type: string
13599
+ enum:
13600
+ - reusable-content
13601
+ organization:
13602
+ $ref: "#/components/schemas/Organization"
13603
+ space:
13604
+ $ref: "#/components/schemas/Space"
13605
+ versionContext:
13606
+ oneOf:
13607
+ - $ref: "#/components/schemas/ContentLocationRevisionContext"
13608
+ - $ref: "#/components/schemas/ContentLocationChangeRequestContext"
13609
+ reusableContent:
13610
+ $ref: "#/components/schemas/RevisionReusableContent"
13611
+ required:
13612
+ - kind
13613
+ - organization
13614
+ - space
13615
+ - reusableContent
13453
13616
  ContentLocation:
13454
13617
  description: An absolute reference to content in GitBook.
13455
13618
  oneOf:
@@ -13461,6 +13624,7 @@ components:
13461
13624
  - $ref: "#/components/schemas/ContentLocationSpace"
13462
13625
  - $ref: "#/components/schemas/ContentLocationSnippet"
13463
13626
  - $ref: "#/components/schemas/ContentLocationSyncedBlock"
13627
+ - $ref: "#/components/schemas/ContentLocationReusableContent"
13464
13628
  discriminator:
13465
13629
  propertyName: kind
13466
13630
  ContentReferenceStatus:
@@ -17841,6 +18005,34 @@ components:
17841
18005
  - path
17842
18006
  - siteSpaces
17843
18007
  - urls
18008
+ SiteStructure:
18009
+ oneOf:
18010
+ - type: object
18011
+ properties:
18012
+ type:
18013
+ type: string
18014
+ enum:
18015
+ - sections
18016
+ structure:
18017
+ type: array
18018
+ items:
18019
+ $ref: "#/components/schemas/SiteSection"
18020
+ required:
18021
+ - type
18022
+ - structure
18023
+ - type: object
18024
+ properties:
18025
+ type:
18026
+ type: string
18027
+ enum:
18028
+ - siteSpaces
18029
+ structure:
18030
+ type: array
18031
+ items:
18032
+ $ref: "#/components/schemas/SiteSpace"
18033
+ required:
18034
+ - type
18035
+ - structure
17844
18036
  SitePublishingAuth:
17845
18037
  allOf:
17846
18038
  - oneOf:
@@ -18076,6 +18268,27 @@ components:
18076
18268
  required:
18077
18269
  - script
18078
18270
  - cookies
18271
+ SiteSectionPointer:
18272
+ type: object
18273
+ properties:
18274
+ type:
18275
+ type: string
18276
+ enum:
18277
+ - site-section
18278
+ siteSection:
18279
+ type: string
18280
+ description: Unique identifier for the site section
18281
+ required:
18282
+ - type
18283
+ - siteSection
18284
+ SiteSectionMovePosition:
18285
+ type: object
18286
+ description: Position at which to move the site section to.
18287
+ properties:
18288
+ before:
18289
+ $ref: "#/components/schemas/SiteSectionPointer"
18290
+ after:
18291
+ $ref: "#/components/schemas/SiteSectionPointer"
18079
18292
  SiteSpacePointer:
18080
18293
  type: object
18081
18294
  properties:
@@ -19783,6 +19996,19 @@ components:
19783
19996
  required:
19784
19997
  - channel
19785
19998
  - site
19999
+ SiteStructureChannel:
20000
+ type: object
20001
+ description: Subscription channel for changes in site structure in an organization.
20002
+ properties:
20003
+ channel:
20004
+ type: string
20005
+ enum:
20006
+ - site-structure
20007
+ site:
20008
+ type: string
20009
+ required:
20010
+ - channel
20011
+ - site
19786
20012
  SitePublishingAuthChannel:
19787
20013
  type: object
19788
20014
  properties:
@@ -19918,6 +20144,7 @@ components:
19918
20144
  - $ref: "#/components/schemas/SiteSpaceChannel"
19919
20145
  - $ref: "#/components/schemas/SiteSpaceCustomizationChannel"
19920
20146
  - $ref: "#/components/schemas/SiteSpacesChannel"
20147
+ - $ref: "#/components/schemas/SiteStructureChannel"
19921
20148
  - $ref: "#/components/schemas/SitePublishingAuthChannel"
19922
20149
  - $ref: "#/components/schemas/SiteShareLinksChannel"
19923
20150
  - $ref: "#/components/schemas/SiteShareLinkChannel"