@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.json CHANGED
@@ -11546,6 +11546,10 @@
11546
11546
  "schema": {
11547
11547
  "type": "object",
11548
11548
  "properties": {
11549
+ "type": {
11550
+ "description": "The type of the site, defaults to Basic",
11551
+ "$ref": "#/components/schemas/SiteType"
11552
+ },
11549
11553
  "title": {
11550
11554
  "$ref": "#/components/schemas/SiteTitle"
11551
11555
  },
@@ -11756,7 +11760,31 @@
11756
11760
  "content": {
11757
11761
  "application/json": {
11758
11762
  "schema": {
11759
- "$ref": "#/components/schemas/Site"
11763
+ "oneOf": [
11764
+ {
11765
+ "$ref": "#/components/schemas/Site"
11766
+ },
11767
+ {
11768
+ "type": "object",
11769
+ "description": "User needs to checkout in order to publish the site.",
11770
+ "properties": {
11771
+ "type": {
11772
+ "type": "string",
11773
+ "enum": [
11774
+ "checkout"
11775
+ ]
11776
+ },
11777
+ "sessionId": {
11778
+ "type": "string",
11779
+ "description": "Stripe payment session ID"
11780
+ }
11781
+ },
11782
+ "required": [
11783
+ "type",
11784
+ "sessionId"
11785
+ ]
11786
+ }
11787
+ ]
11760
11788
  }
11761
11789
  }
11762
11790
  }
@@ -12315,15 +12343,10 @@
12315
12343
  "enum": [
12316
12344
  "checkout"
12317
12345
  ]
12318
- },
12319
- "sessionId": {
12320
- "type": "string",
12321
- "description": "Stripe payment session ID"
12322
12346
  }
12323
12347
  },
12324
12348
  "required": [
12325
- "type",
12326
- "sessionId"
12349
+ "type"
12327
12350
  ]
12328
12351
  },
12329
12352
  {
@@ -12340,29 +12363,6 @@
12340
12363
  "required": [
12341
12364
  "type"
12342
12365
  ]
12343
- },
12344
- {
12345
- "type": "object",
12346
- "properties": {
12347
- "type": {
12348
- "description": "User must upgrade their organization plan before publishing.",
12349
- "type": "string",
12350
- "enum": [
12351
- "legacy-upgrade"
12352
- ]
12353
- },
12354
- "plan": {
12355
- "description": "The org plan to upgrade to",
12356
- "$ref": "#/components/schemas/BillingProduct"
12357
- },
12358
- "invoice": {
12359
- "$ref": "#/components/schemas/BillingInvoicePreview"
12360
- }
12361
- },
12362
- "required": [
12363
- "type",
12364
- "plan"
12365
- ]
12366
12366
  }
12367
12367
  ]
12368
12368
  }
@@ -13290,6 +13290,88 @@
13290
13290
  }
13291
13291
  }
13292
13292
  },
13293
+ "/orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}/insights/pages/{pageId}/feedbacks/{visitorId}": {
13294
+ "put": {
13295
+ "operationId": "createSitesPageFeedback",
13296
+ "summary": "Create a page feedback by a visitor on a site.",
13297
+ "tags": [
13298
+ "sites"
13299
+ ],
13300
+ "security": [
13301
+ {
13302
+ "user": []
13303
+ }
13304
+ ],
13305
+ "parameters": [
13306
+ {
13307
+ "$ref": "#/components/parameters/organizationId"
13308
+ },
13309
+ {
13310
+ "$ref": "#/components/parameters/siteId"
13311
+ },
13312
+ {
13313
+ "$ref": "#/components/parameters/siteSpaceId"
13314
+ },
13315
+ {
13316
+ "$ref": "#/components/parameters/pageId"
13317
+ },
13318
+ {
13319
+ "$ref": "#/components/parameters/visitorId"
13320
+ }
13321
+ ],
13322
+ "requestBody": {
13323
+ "required": true,
13324
+ "content": {
13325
+ "application/json": {
13326
+ "schema": {
13327
+ "type": "object",
13328
+ "properties": {
13329
+ "rating": {
13330
+ "$ref": "#/components/schemas/PageFeedbackRating"
13331
+ }
13332
+ },
13333
+ "required": [
13334
+ "rating"
13335
+ ]
13336
+ }
13337
+ }
13338
+ }
13339
+ },
13340
+ "responses": {
13341
+ "200": {
13342
+ "description": "Feedback updated",
13343
+ "content": {
13344
+ "application/json": {
13345
+ "schema": {
13346
+ "$ref": "#/components/schemas/PageFeedback"
13347
+ }
13348
+ }
13349
+ }
13350
+ },
13351
+ "201": {
13352
+ "description": "Feedback created",
13353
+ "headers": {
13354
+ "Location": {
13355
+ "description": "URL for the feedback",
13356
+ "schema": {
13357
+ "type": "string"
13358
+ }
13359
+ }
13360
+ },
13361
+ "content": {
13362
+ "application/json": {
13363
+ "schema": {
13364
+ "$ref": "#/components/schemas/PageFeedback"
13365
+ }
13366
+ }
13367
+ }
13368
+ },
13369
+ "default": {
13370
+ "$ref": "#/components/responses/UnexpectedError"
13371
+ }
13372
+ }
13373
+ }
13374
+ },
13293
13375
  "/orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}/move": {
13294
13376
  "post": {
13295
13377
  "operationId": "moveSiteSpace",
@@ -13452,6 +13534,58 @@
13452
13534
  }
13453
13535
  }
13454
13536
  },
13537
+ "/orgs/{organizationId}/sites/{siteId}/ads": {
13538
+ "post": {
13539
+ "operationId": "updateSiteAdsById",
13540
+ "summary": "Enable, disable, or submit for review Ads on a site.",
13541
+ "tags": [
13542
+ "sites"
13543
+ ],
13544
+ "security": [
13545
+ {
13546
+ "user": []
13547
+ }
13548
+ ],
13549
+ "parameters": [
13550
+ {
13551
+ "$ref": "#/components/parameters/organizationId"
13552
+ },
13553
+ {
13554
+ "$ref": "#/components/parameters/siteId"
13555
+ }
13556
+ ],
13557
+ "requestBody": {
13558
+ "required": false,
13559
+ "content": {
13560
+ "application/json": {
13561
+ "schema": {
13562
+ "type": "object",
13563
+ "properties": {
13564
+ "status": {
13565
+ "type": "string",
13566
+ "enum": [
13567
+ "in-review",
13568
+ "disabled"
13569
+ ]
13570
+ },
13571
+ "topic": {
13572
+ "$ref": "#/components/schemas/SiteAdsTopic"
13573
+ }
13574
+ }
13575
+ }
13576
+ }
13577
+ }
13578
+ },
13579
+ "responses": {
13580
+ "204": {
13581
+ "description": "OK"
13582
+ },
13583
+ "default": {
13584
+ "$ref": "#/components/responses/UnexpectedError"
13585
+ }
13586
+ }
13587
+ }
13588
+ },
13455
13589
  "/custom-hostnames/{hostname}": {
13456
13590
  "get": {
13457
13591
  "operationId": "getCustomHostname",
@@ -13687,6 +13821,168 @@
13687
13821
  }
13688
13822
  }
13689
13823
  },
13824
+ "/ads/sites": {
13825
+ "get": {
13826
+ "operationId": "adsListSites",
13827
+ "summary": "List all the sites with ads configured",
13828
+ "tags": [
13829
+ "ads"
13830
+ ],
13831
+ "parameters": [
13832
+ {
13833
+ "$ref": "#/components/parameters/listPage"
13834
+ },
13835
+ {
13836
+ "$ref": "#/components/parameters/listLimit"
13837
+ },
13838
+ {
13839
+ "$ref": "#/components/parameters/xGitBookPartnerKey"
13840
+ }
13841
+ ],
13842
+ "responses": {
13843
+ "200": {
13844
+ "description": "OK",
13845
+ "content": {
13846
+ "application/json": {
13847
+ "schema": {
13848
+ "allOf": [
13849
+ {
13850
+ "$ref": "#/components/schemas/List"
13851
+ },
13852
+ {
13853
+ "type": "object",
13854
+ "required": [
13855
+ "items"
13856
+ ],
13857
+ "properties": {
13858
+ "items": {
13859
+ "type": "array",
13860
+ "items": {
13861
+ "type": "object",
13862
+ "required": [
13863
+ "id",
13864
+ "ads",
13865
+ "url"
13866
+ ],
13867
+ "properties": {
13868
+ "id": {
13869
+ "type": "string"
13870
+ },
13871
+ "url": {
13872
+ "type": "string"
13873
+ },
13874
+ "ads": {
13875
+ "$ref": "#/components/schemas/SiteAds"
13876
+ }
13877
+ }
13878
+ }
13879
+ }
13880
+ }
13881
+ }
13882
+ ]
13883
+ }
13884
+ }
13885
+ }
13886
+ },
13887
+ "default": {
13888
+ "$ref": "#/components/responses/UnexpectedError"
13889
+ }
13890
+ }
13891
+ }
13892
+ },
13893
+ "/ads/sites/{siteId}": {
13894
+ "patch": {
13895
+ "operationId": "adsUpdateSite",
13896
+ "summary": "Update the Ads configuration for a site",
13897
+ "tags": [
13898
+ "ads"
13899
+ ],
13900
+ "security": [
13901
+ {
13902
+ "user": []
13903
+ }
13904
+ ],
13905
+ "parameters": [
13906
+ {
13907
+ "$ref": "#/components/parameters/siteId"
13908
+ },
13909
+ {
13910
+ "$ref": "#/components/parameters/xGitBookPartnerKey"
13911
+ }
13912
+ ],
13913
+ "requestBody": {
13914
+ "required": true,
13915
+ "content": {
13916
+ "application/json": {
13917
+ "schema": {
13918
+ "oneOf": [
13919
+ {
13920
+ "type": "object",
13921
+ "required": [
13922
+ "status",
13923
+ "zoneId",
13924
+ "reportingId"
13925
+ ],
13926
+ "properties": {
13927
+ "status": {
13928
+ "type": "string",
13929
+ "enum": [
13930
+ "live"
13931
+ ]
13932
+ },
13933
+ "zoneId": {
13934
+ "type": "string",
13935
+ "description": "ID of the zone"
13936
+ },
13937
+ "reportingId": {
13938
+ "type": "string",
13939
+ "description": "ID to fetch reporting data"
13940
+ }
13941
+ }
13942
+ },
13943
+ {
13944
+ "type": "object",
13945
+ "required": [
13946
+ "status"
13947
+ ],
13948
+ "properties": {
13949
+ "status": {
13950
+ "type": "string",
13951
+ "enum": [
13952
+ "rejected"
13953
+ ]
13954
+ }
13955
+ }
13956
+ },
13957
+ {
13958
+ "type": "object",
13959
+ "required": [
13960
+ "status"
13961
+ ],
13962
+ "properties": {
13963
+ "status": {
13964
+ "type": "string",
13965
+ "enum": [
13966
+ "pending"
13967
+ ]
13968
+ }
13969
+ }
13970
+ }
13971
+ ]
13972
+ }
13973
+ }
13974
+ }
13975
+ },
13976
+ "responses": {
13977
+ "204": {
13978
+ "description": "OK"
13979
+ },
13980
+ "default": {
13981
+ "$ref": "#/components/responses/UnexpectedError"
13982
+ }
13983
+ }
13984
+ }
13985
+ },
13690
13986
  "/internal/hive/token": {
13691
13987
  "post": {
13692
13988
  "operationId": "generateHiveAccessToken",
@@ -14293,6 +14589,14 @@
14293
14589
  "type": "string"
14294
14590
  }
14295
14591
  },
14592
+ "xGitBookPartnerKey": {
14593
+ "in": "header",
14594
+ "name": "X-GitBook-Partner-Key",
14595
+ "schema": {
14596
+ "type": "string"
14597
+ },
14598
+ "required": true
14599
+ },
14296
14600
  "pageFormat": {
14297
14601
  "$ref": "#/components/parameters/documentFormat"
14298
14602
  },
@@ -18427,6 +18731,12 @@
18427
18731
  "commitMessageTemplate"
18428
18732
  ]
18429
18733
  },
18734
+ "Icon": {
18735
+ "type": "string",
18736
+ "maxLength": 50,
18737
+ "description": "Name of the icon",
18738
+ "example": "gear"
18739
+ },
18430
18740
  "RevisionPageBase": {
18431
18741
  "type": "object",
18432
18742
  "properties": {
@@ -18443,6 +18753,10 @@
18443
18753
  "description": "Emoji of the page, if one has been set.",
18444
18754
  "$ref": "#/components/schemas/Emoji"
18445
18755
  },
18756
+ "icon": {
18757
+ "description": "Icon of the page, if one has been set.",
18758
+ "$ref": "#/components/schemas/Icon"
18759
+ },
18446
18760
  "createdAt": {
18447
18761
  "description": "When the page was first created. Only present if page has been edited at least once.",
18448
18762
  "$ref": "#/components/schemas/Timestamp"
@@ -26367,17 +26681,101 @@
26367
26681
  "visitor-auth"
26368
26682
  ]
26369
26683
  },
26370
- "SiteAdsConfig": {
26371
- "type": "object",
26372
- "description": "The configuration for serving ads in the site",
26373
- "properties": {
26374
- "zone": {
26375
- "type": "string",
26376
- "description": "The ad network zone ID"
26684
+ "SiteAdsTopic": {
26685
+ "type": "string",
26686
+ "description": "Topic of the content",
26687
+ "enum": [
26688
+ "webdev",
26689
+ "crypto"
26690
+ ]
26691
+ },
26692
+ "SiteAds": {
26693
+ "oneOf": [
26694
+ {
26695
+ "type": "object",
26696
+ "required": [
26697
+ "status",
26698
+ "submittable"
26699
+ ],
26700
+ "properties": {
26701
+ "status": {
26702
+ "type": "string",
26703
+ "enum": [
26704
+ "pending"
26705
+ ]
26706
+ },
26707
+ "submittable": {
26708
+ "type": "boolean",
26709
+ "description": "True if the user can submit the site for review."
26710
+ }
26711
+ }
26712
+ },
26713
+ {
26714
+ "type": "object",
26715
+ "required": [
26716
+ "status",
26717
+ "topic",
26718
+ "accountEmail"
26719
+ ],
26720
+ "properties": {
26721
+ "status": {
26722
+ "type": "string",
26723
+ "enum": [
26724
+ "in-review"
26725
+ ]
26726
+ },
26727
+ "topic": {
26728
+ "$ref": "#/components/schemas/SiteAdsTopic"
26729
+ },
26730
+ "accountEmail": {
26731
+ "type": "string",
26732
+ "description": "The email address linked to the Ads partner account"
26733
+ }
26734
+ }
26735
+ },
26736
+ {
26737
+ "type": "object",
26738
+ "required": [
26739
+ "status"
26740
+ ],
26741
+ "properties": {
26742
+ "status": {
26743
+ "type": "string",
26744
+ "enum": [
26745
+ "rejected"
26746
+ ]
26747
+ }
26748
+ }
26749
+ },
26750
+ {
26751
+ "type": "object",
26752
+ "required": [
26753
+ "status",
26754
+ "topic",
26755
+ "zoneId",
26756
+ "accountEmail"
26757
+ ],
26758
+ "properties": {
26759
+ "status": {
26760
+ "type": "string",
26761
+ "enum": [
26762
+ "live",
26763
+ "disabled"
26764
+ ]
26765
+ },
26766
+ "topic": {
26767
+ "$ref": "#/components/schemas/SiteAdsTopic"
26768
+ },
26769
+ "zoneId": {
26770
+ "type": "string",
26771
+ "description": "The ad network zone ID"
26772
+ },
26773
+ "accountEmail": {
26774
+ "type": "string",
26775
+ "description": "The email address linked to the Ads partner account"
26776
+ }
26777
+ }
26377
26778
  }
26378
- },
26379
- "required": [
26380
- "zone"
26381
26779
  ]
26382
26780
  },
26383
26781
  "Site": {
@@ -26420,7 +26818,7 @@
26420
26818
  "format": "date-time"
26421
26819
  },
26422
26820
  "ads": {
26423
- "$ref": "#/components/schemas/SiteAdsConfig"
26821
+ "$ref": "#/components/schemas/SiteAds"
26424
26822
  },
26425
26823
  "urls": {
26426
26824
  "type": "object",
@@ -26528,6 +26926,16 @@
26528
26926
  }
26529
26927
  ]
26530
26928
  },
26929
+ "CustomizationIconsStyle": {
26930
+ "type": "string",
26931
+ "enum": [
26932
+ "regular",
26933
+ "solid",
26934
+ "duotone",
26935
+ "light",
26936
+ "thin"
26937
+ ]
26938
+ },
26531
26939
  "SiteCustomizationSettings": {
26532
26940
  "type": "object",
26533
26941
  "properties": {
@@ -26549,13 +26957,17 @@
26549
26957
  },
26550
26958
  "background": {
26551
26959
  "$ref": "#/components/schemas/CustomizationBackground"
26960
+ },
26961
+ "icons": {
26962
+ "$ref": "#/components/schemas/CustomizationIconsStyle"
26552
26963
  }
26553
26964
  },
26554
26965
  "required": [
26555
26966
  "primaryColor",
26556
26967
  "corners",
26557
26968
  "font",
26558
- "background"
26969
+ "background",
26970
+ "icons"
26559
26971
  ]
26560
26972
  },
26561
26973
  "internationalization": {
@@ -26919,6 +27331,21 @@
26919
27331
  }
26920
27332
  ]
26921
27333
  },
27334
+ "icons": {
27335
+ "description": "The icons style to use for the content. Set to null to reset the override.",
27336
+ "oneOf": [
27337
+ {
27338
+ "$ref": "#/components/schemas/CustomizationIconsStyle"
27339
+ },
27340
+ {
27341
+ "type": "string",
27342
+ "nullable": true,
27343
+ "enum": [
27344
+ null
27345
+ ]
27346
+ }
27347
+ ]
27348
+ },
26922
27349
  "background": {
26923
27350
  "description": "The style of background to use. Set to null to reset the override.",
26924
27351
  "oneOf": [
@@ -29653,6 +30080,17 @@
29653
30080
  "propertyName": "channel"
29654
30081
  }
29655
30082
  },
30083
+ "SiteAdsStatus": {
30084
+ "type": "string",
30085
+ "description": "The status of ads on the site",
30086
+ "enum": [
30087
+ "pending",
30088
+ "in-review",
30089
+ "live",
30090
+ "rejected",
30091
+ "disabled"
30092
+ ]
30093
+ },
29656
30094
  "Seat": {
29657
30095
  "type": "object",
29658
30096
  "properties": {