@gitbook/api 0.58.0 → 0.60.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
@@ -6440,6 +6440,9 @@ paths:
6440
6440
  schema:
6441
6441
  type: object
6442
6442
  properties:
6443
+ type:
6444
+ description: The type of the site, defaults to Basic
6445
+ $ref: "#/components/schemas/SiteType"
6443
6446
  title:
6444
6447
  $ref: "#/components/schemas/SiteTitle"
6445
6448
  visibility:
@@ -6559,7 +6562,21 @@ paths:
6559
6562
  content:
6560
6563
  application/json:
6561
6564
  schema:
6562
- $ref: "#/components/schemas/Site"
6565
+ oneOf:
6566
+ - $ref: "#/components/schemas/Site"
6567
+ - type: object
6568
+ description: User needs to checkout in order to publish the site.
6569
+ properties:
6570
+ type:
6571
+ type: string
6572
+ enum:
6573
+ - checkout
6574
+ sessionId:
6575
+ type: string
6576
+ description: Stripe payment session ID
6577
+ required:
6578
+ - type
6579
+ - sessionId
6563
6580
  default:
6564
6581
  $ref: "#/components/responses/UnexpectedError"
6565
6582
  "/orgs/{organizationId}/sites/{siteId}/unpublish":
@@ -6880,12 +6897,8 @@ paths:
6880
6897
  type: string
6881
6898
  enum:
6882
6899
  - checkout
6883
- sessionId:
6884
- type: string
6885
- description: Stripe payment session ID
6886
6900
  required:
6887
6901
  - type
6888
- - sessionId
6889
6902
  - type: object
6890
6903
  properties:
6891
6904
  type:
@@ -6895,21 +6908,6 @@ paths:
6895
6908
  - no-permissions
6896
6909
  required:
6897
6910
  - type
6898
- - type: object
6899
- properties:
6900
- type:
6901
- description: User must upgrade their organization plan before publishing.
6902
- type: string
6903
- enum:
6904
- - legacy-upgrade
6905
- plan:
6906
- description: The org plan to upgrade to
6907
- $ref: "#/components/schemas/BillingProduct"
6908
- invoice:
6909
- $ref: "#/components/schemas/BillingInvoicePreview"
6910
- required:
6911
- - type
6912
- - plan
6913
6911
  "404":
6914
6912
  description: No matching site found
6915
6913
  $ref: "#/components/responses/NotFoundError"
@@ -7411,6 +7409,51 @@ paths:
7411
7409
  $ref: "#/components/schemas/AnalyticsContentPages"
7412
7410
  default:
7413
7411
  $ref: "#/components/responses/UnexpectedError"
7412
+ "/orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}/insights/pages/{pageId}/feedbacks/{visitorId}":
7413
+ put:
7414
+ operationId: createSitesPageFeedback
7415
+ summary: Create a page feedback by a visitor on a site.
7416
+ tags:
7417
+ - sites
7418
+ security:
7419
+ - user: []
7420
+ parameters:
7421
+ - $ref: "#/components/parameters/organizationId"
7422
+ - $ref: "#/components/parameters/siteId"
7423
+ - $ref: "#/components/parameters/siteSpaceId"
7424
+ - $ref: "#/components/parameters/pageId"
7425
+ - $ref: "#/components/parameters/visitorId"
7426
+ requestBody:
7427
+ required: true
7428
+ content:
7429
+ application/json:
7430
+ schema:
7431
+ type: object
7432
+ properties:
7433
+ rating:
7434
+ $ref: "#/components/schemas/PageFeedbackRating"
7435
+ required:
7436
+ - rating
7437
+ responses:
7438
+ "200":
7439
+ description: Feedback updated
7440
+ content:
7441
+ application/json:
7442
+ schema:
7443
+ $ref: "#/components/schemas/PageFeedback"
7444
+ "201":
7445
+ description: Feedback created
7446
+ headers:
7447
+ Location:
7448
+ description: URL for the feedback
7449
+ schema:
7450
+ type: string
7451
+ content:
7452
+ application/json:
7453
+ schema:
7454
+ $ref: "#/components/schemas/PageFeedback"
7455
+ default:
7456
+ $ref: "#/components/responses/UnexpectedError"
7414
7457
  "/orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}/move":
7415
7458
  post:
7416
7459
  operationId: moveSiteSpace
@@ -7501,6 +7544,36 @@ paths:
7501
7544
  application/json:
7502
7545
  schema:
7503
7546
  $ref: "#/components/schemas/SiteTrackPageView"
7547
+ "/orgs/{organizationId}/sites/{siteId}/ads":
7548
+ post:
7549
+ operationId: updateSiteAdsById
7550
+ summary: Enable, disable, or submit for review Ads on a site.
7551
+ tags:
7552
+ - sites
7553
+ security:
7554
+ - user: []
7555
+ parameters:
7556
+ - $ref: "#/components/parameters/organizationId"
7557
+ - $ref: "#/components/parameters/siteId"
7558
+ requestBody:
7559
+ required: false
7560
+ content:
7561
+ application/json:
7562
+ schema:
7563
+ type: object
7564
+ properties:
7565
+ status:
7566
+ type: string
7567
+ enum:
7568
+ - in-review
7569
+ - disabled
7570
+ topic:
7571
+ $ref: "#/components/schemas/SiteAdsTopic"
7572
+ responses:
7573
+ "204":
7574
+ description: OK
7575
+ default:
7576
+ $ref: "#/components/responses/UnexpectedError"
7504
7577
  "/custom-hostnames/{hostname}":
7505
7578
  get:
7506
7579
  operationId: getCustomHostname
@@ -7632,6 +7705,99 @@ paths:
7632
7705
  $ref: "#/components/responses/ConflictError"
7633
7706
  default:
7634
7707
  $ref: "#/components/responses/UnexpectedError"
7708
+ /ads/sites:
7709
+ get:
7710
+ operationId: adsListSites
7711
+ summary: List all the sites with ads configured
7712
+ tags:
7713
+ - ads
7714
+ parameters:
7715
+ - $ref: "#/components/parameters/listPage"
7716
+ - $ref: "#/components/parameters/listLimit"
7717
+ - $ref: "#/components/parameters/xGitBookPartnerKey"
7718
+ responses:
7719
+ "200":
7720
+ description: OK
7721
+ content:
7722
+ application/json:
7723
+ schema:
7724
+ allOf:
7725
+ - $ref: "#/components/schemas/List"
7726
+ - type: object
7727
+ required:
7728
+ - items
7729
+ properties:
7730
+ items:
7731
+ type: array
7732
+ items:
7733
+ type: object
7734
+ required:
7735
+ - id
7736
+ - ads
7737
+ - url
7738
+ properties:
7739
+ id:
7740
+ type: string
7741
+ url:
7742
+ type: string
7743
+ ads:
7744
+ $ref: "#/components/schemas/SiteAds"
7745
+ default:
7746
+ $ref: "#/components/responses/UnexpectedError"
7747
+ "/ads/sites/{siteId}":
7748
+ patch:
7749
+ operationId: adsUpdateSite
7750
+ summary: Update the Ads configuration for a site
7751
+ tags:
7752
+ - ads
7753
+ security:
7754
+ - user: []
7755
+ parameters:
7756
+ - $ref: "#/components/parameters/siteId"
7757
+ - $ref: "#/components/parameters/xGitBookPartnerKey"
7758
+ requestBody:
7759
+ required: true
7760
+ content:
7761
+ application/json:
7762
+ schema:
7763
+ oneOf:
7764
+ - type: object
7765
+ required:
7766
+ - status
7767
+ - zoneId
7768
+ - reportingId
7769
+ properties:
7770
+ status:
7771
+ type: string
7772
+ enum:
7773
+ - live
7774
+ zoneId:
7775
+ type: string
7776
+ description: ID of the zone
7777
+ reportingId:
7778
+ type: string
7779
+ description: ID to fetch reporting data
7780
+ - type: object
7781
+ required:
7782
+ - status
7783
+ properties:
7784
+ status:
7785
+ type: string
7786
+ enum:
7787
+ - rejected
7788
+ - type: object
7789
+ required:
7790
+ - status
7791
+ properties:
7792
+ status:
7793
+ type: string
7794
+ enum:
7795
+ - pending
7796
+ responses:
7797
+ "204":
7798
+ description: OK
7799
+ default:
7800
+ $ref: "#/components/responses/UnexpectedError"
7635
7801
  /internal/hive/token:
7636
7802
  post:
7637
7803
  operationId: generateHiveAccessToken
@@ -8062,6 +8228,12 @@ components:
8062
8228
  description: The custom hostname, for example "docs.gitbook.com"
8063
8229
  schema:
8064
8230
  type: string
8231
+ xGitBookPartnerKey:
8232
+ in: header
8233
+ name: X-GitBook-Partner-Key
8234
+ schema:
8235
+ type: string
8236
+ required: true
8065
8237
  pageFormat:
8066
8238
  $ref: "#/components/parameters/documentFormat"
8067
8239
  commentStatus:
@@ -10748,6 +10920,11 @@ components:
10748
10920
  - repoTreeURL
10749
10921
  - repoCommitURL
10750
10922
  - commitMessageTemplate
10923
+ Icon:
10924
+ type: string
10925
+ maxLength: 50
10926
+ description: Name of the icon
10927
+ example: gear
10751
10928
  RevisionPageBase:
10752
10929
  type: object
10753
10930
  properties:
@@ -10761,6 +10938,9 @@ components:
10761
10938
  emoji:
10762
10939
  description: Emoji of the page, if one has been set.
10763
10940
  $ref: "#/components/schemas/Emoji"
10941
+ icon:
10942
+ description: Icon of the page, if one has been set.
10943
+ $ref: "#/components/schemas/Icon"
10764
10944
  createdAt:
10765
10945
  description: When the page was first created. Only present if page has been edited at least once.
10766
10946
  $ref: "#/components/schemas/Timestamp"
@@ -16040,15 +16220,69 @@ components:
16040
16220
  - unlisted
16041
16221
  - share-link
16042
16222
  - visitor-auth
16043
- SiteAdsConfig:
16044
- type: object
16045
- description: The configuration for serving ads in the site
16046
- properties:
16047
- zone:
16048
- type: string
16049
- description: The ad network zone ID
16050
- required:
16051
- - zone
16223
+ SiteAdsTopic:
16224
+ type: string
16225
+ description: Topic of the content
16226
+ enum:
16227
+ - webdev
16228
+ - crypto
16229
+ SiteAds:
16230
+ oneOf:
16231
+ - type: object
16232
+ required:
16233
+ - status
16234
+ - submittable
16235
+ properties:
16236
+ status:
16237
+ type: string
16238
+ enum:
16239
+ - pending
16240
+ submittable:
16241
+ type: boolean
16242
+ description: True if the user can submit the site for review.
16243
+ - type: object
16244
+ required:
16245
+ - status
16246
+ - topic
16247
+ - accountEmail
16248
+ properties:
16249
+ status:
16250
+ type: string
16251
+ enum:
16252
+ - in-review
16253
+ topic:
16254
+ $ref: "#/components/schemas/SiteAdsTopic"
16255
+ accountEmail:
16256
+ type: string
16257
+ description: The email address linked to the Ads partner account
16258
+ - type: object
16259
+ required:
16260
+ - status
16261
+ properties:
16262
+ status:
16263
+ type: string
16264
+ enum:
16265
+ - rejected
16266
+ - type: object
16267
+ required:
16268
+ - status
16269
+ - topic
16270
+ - zoneId
16271
+ - accountEmail
16272
+ properties:
16273
+ status:
16274
+ type: string
16275
+ enum:
16276
+ - live
16277
+ - disabled
16278
+ topic:
16279
+ $ref: "#/components/schemas/SiteAdsTopic"
16280
+ zoneId:
16281
+ type: string
16282
+ description: The ad network zone ID
16283
+ accountEmail:
16284
+ type: string
16285
+ description: The email address linked to the Ads partner account
16052
16286
  Site:
16053
16287
  type: object
16054
16288
  properties:
@@ -16078,7 +16312,7 @@ components:
16078
16312
  type: string
16079
16313
  format: date-time
16080
16314
  ads:
16081
- $ref: "#/components/schemas/SiteAdsConfig"
16315
+ $ref: "#/components/schemas/SiteAds"
16082
16316
  urls:
16083
16317
  type: object
16084
16318
  description: URLs associated with the object
@@ -16147,6 +16381,14 @@ components:
16147
16381
  type: string
16148
16382
  format: uri
16149
16383
  description: A fallback URL that will be used if authentication fails.
16384
+ CustomizationIconsStyle:
16385
+ type: string
16386
+ enum:
16387
+ - regular
16388
+ - solid
16389
+ - duotone
16390
+ - light
16391
+ - thin
16150
16392
  SiteCustomizationSettings:
16151
16393
  type: object
16152
16394
  properties:
@@ -16164,11 +16406,14 @@ components:
16164
16406
  $ref: "#/components/schemas/CustomizationFont"
16165
16407
  background:
16166
16408
  $ref: "#/components/schemas/CustomizationBackground"
16409
+ icons:
16410
+ $ref: "#/components/schemas/CustomizationIconsStyle"
16167
16411
  required:
16168
16412
  - primaryColor
16169
16413
  - corners
16170
16414
  - font
16171
16415
  - background
16416
+ - icons
16172
16417
  internationalization:
16173
16418
  type: object
16174
16419
  properties:
@@ -16410,6 +16655,14 @@ components:
16410
16655
  nullable: true
16411
16656
  enum:
16412
16657
  - null
16658
+ icons:
16659
+ description: The icons style to use for the content. Set to null to reset the override.
16660
+ oneOf:
16661
+ - $ref: "#/components/schemas/CustomizationIconsStyle"
16662
+ - type: string
16663
+ nullable: true
16664
+ enum:
16665
+ - null
16413
16666
  background:
16414
16667
  description: The style of background to use. Set to null to reset the override.
16415
16668
  oneOf:
@@ -18175,6 +18428,15 @@ components:
18175
18428
  - $ref: "#/components/schemas/CustomHostnameChannel"
18176
18429
  discriminator:
18177
18430
  propertyName: channel
18431
+ SiteAdsStatus:
18432
+ type: string
18433
+ description: The status of ads on the site
18434
+ enum:
18435
+ - pending
18436
+ - in-review
18437
+ - live
18438
+ - rejected
18439
+ - disabled
18178
18440
  Seat:
18179
18441
  type: object
18180
18442
  properties: