@gitbook/api 0.98.0 → 0.100.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/dist/client.d.ts CHANGED
@@ -3397,6 +3397,7 @@ export type SiteAds = {
3397
3397
  export declare enum SiteCustomizationFeature {
3398
3398
  HeaderLogo = "header-logo",
3399
3399
  ThemePreset = "theme-preset",
3400
+ PremiumFonts = "premium-fonts",
3400
3401
  CustomFonts = "custom-fonts",
3401
3402
  CustomIcons = "custom-icons",
3402
3403
  FooterLogo = "footer-logo",
@@ -3833,6 +3834,10 @@ export interface SiteToMigrate {
3833
3834
  site: Site;
3834
3835
  /** The new type of the site */
3835
3836
  newType: SiteType;
3837
+ traffic: {
3838
+ /** Number of pageviews in the past 30 days */
3839
+ pageviews: number;
3840
+ };
3836
3841
  features: SiteFeature[];
3837
3842
  }
3838
3843
  export interface BillingPortal {
@@ -4111,7 +4116,48 @@ export declare enum CustomizationDefaultFont {
4111
4116
  Poppins = "Poppins",
4112
4117
  FiraSans = "FiraSans"
4113
4118
  }
4114
- export type CustomizationFont = CustomizationDefaultFont;
4119
+ /**
4120
+ * The human-readable font-family name used in CSS (e.g., "Open Sans", "Playfair Display").
4121
+ * @minLength 1
4122
+ * @maxLength 50
4123
+ */
4124
+ export type FontFamily = string;
4125
+ /**
4126
+ * Numeric representation of the font weight (400=regular, 500=medium, 700=bold, 900=black).
4127
+ * @min 1
4128
+ * @max 1000
4129
+ */
4130
+ export type FontWeight = number;
4131
+ /** A font file referenced within a font-face declaration, specifying the file's location and format. */
4132
+ export interface FontSource {
4133
+ /** The absolute or relative URL pointing to the font file. */
4134
+ url: URL;
4135
+ /** The format of the font file. Prefer 'woff2' for modern browsers. */
4136
+ format?: 'woff2' | 'woff';
4137
+ }
4138
+ /** A single font-face declaration specifying the weight and source files for a particular variation of the font. */
4139
+ export interface FontFace {
4140
+ /** Numeric representation of the font weight (400=regular, 500=medium, 700=bold, 900=black). */
4141
+ weight: FontWeight;
4142
+ /**
4143
+ * Font source files provided in supported formats (e.g., woff2, woff).
4144
+ * @minItems 1
4145
+ */
4146
+ sources: FontSource[];
4147
+ }
4148
+ /** Defines a font family along with its various font-face declarations for use in CSS '@font-face' rules. */
4149
+ export interface CustomizationFontDefinition {
4150
+ /** A globally unique identifier for the font definition. */
4151
+ id: string;
4152
+ /** The human-readable font-family name used in CSS (e.g., "Open Sans", "Playfair Display"). */
4153
+ fontFamily: FontFamily;
4154
+ /**
4155
+ * A list of font-face definitions, specifying variations such as weight and style.
4156
+ * @minItems 1
4157
+ */
4158
+ fontFaces: FontFace[];
4159
+ }
4160
+ export type CustomizationFont = CustomizationDefaultFont | CustomizationFontDefinition;
4115
4161
  /**
4116
4162
  * The background style has been deprecated and will be removed in a future release. Use the `tint` settings instead.
4117
4163
  * @deprecated
@@ -5949,12 +5995,6 @@ export interface CustomizationSettings {
5949
5995
  url?: URL;
5950
5996
  };
5951
5997
  }
5952
- /**
5953
- * A user friendly name for the font family (e.g., "Open Sans", "Playfair Display")
5954
- * @minLength 1
5955
- * @maxLength 50
5956
- */
5957
- export type CustomizationFontFamilyName = string;
5958
5998
  /** The status of ads on the site */
5959
5999
  export declare enum SiteAdsStatus {
5960
6000
  Pending = "pending",
package/dist/index.cjs CHANGED
@@ -265,7 +265,7 @@ module.exports = __toCommonJS(src_exports);
265
265
 
266
266
  // package.json
267
267
  var name = "@gitbook/api";
268
- var version = "0.98.0";
268
+ var version = "0.100.0";
269
269
 
270
270
  // src/client.ts
271
271
  var import_event_iterator = __toESM(require_node(), 1);
@@ -651,6 +651,7 @@ var SiteAdsTopic = /* @__PURE__ */ ((SiteAdsTopic2) => {
651
651
  var SiteCustomizationFeature = /* @__PURE__ */ ((SiteCustomizationFeature2) => {
652
652
  SiteCustomizationFeature2["HeaderLogo"] = "header-logo";
653
653
  SiteCustomizationFeature2["ThemePreset"] = "theme-preset";
654
+ SiteCustomizationFeature2["PremiumFonts"] = "premium-fonts";
654
655
  SiteCustomizationFeature2["CustomFonts"] = "custom-fonts";
655
656
  SiteCustomizationFeature2["CustomIcons"] = "custom-icons";
656
657
  SiteCustomizationFeature2["FooterLogo"] = "footer-logo";
package/dist/index.js CHANGED
@@ -172,7 +172,7 @@ var require_node = __commonJS({
172
172
 
173
173
  // package.json
174
174
  var name = "@gitbook/api";
175
- var version = "0.98.0";
175
+ var version = "0.100.0";
176
176
 
177
177
  // src/client.ts
178
178
  var import_event_iterator = __toESM(require_node(), 1);
@@ -558,6 +558,7 @@ var SiteAdsTopic = /* @__PURE__ */ ((SiteAdsTopic2) => {
558
558
  var SiteCustomizationFeature = /* @__PURE__ */ ((SiteCustomizationFeature2) => {
559
559
  SiteCustomizationFeature2["HeaderLogo"] = "header-logo";
560
560
  SiteCustomizationFeature2["ThemePreset"] = "theme-preset";
561
+ SiteCustomizationFeature2["PremiumFonts"] = "premium-fonts";
561
562
  SiteCustomizationFeature2["CustomFonts"] = "custom-fonts";
562
563
  SiteCustomizationFeature2["CustomIcons"] = "custom-icons";
563
564
  SiteCustomizationFeature2["FooterLogo"] = "footer-logo";
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "main": "./dist/index.cjs",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
- "version": "0.98.0",
7
+ "version": "0.100.0",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "README.md",
package/spec/openapi.json CHANGED
@@ -26647,6 +26647,7 @@
26647
26647
  "enum": [
26648
26648
  "header-logo",
26649
26649
  "theme-preset",
26650
+ "premium-fonts",
26650
26651
  "custom-fonts",
26651
26652
  "custom-icons",
26652
26653
  "footer-logo",
@@ -27910,6 +27911,18 @@
27910
27911
  "description": "The new type of the site",
27911
27912
  "$ref": "#/components/schemas/SiteType"
27912
27913
  },
27914
+ "traffic": {
27915
+ "type": "object",
27916
+ "properties": {
27917
+ "pageviews": {
27918
+ "description": "Number of pageviews in the past 30 days",
27919
+ "type": "number"
27920
+ }
27921
+ },
27922
+ "required": [
27923
+ "pageviews"
27924
+ ]
27925
+ },
27913
27926
  "features": {
27914
27927
  "type": "array",
27915
27928
  "items": {
@@ -27921,6 +27934,7 @@
27921
27934
  "object",
27922
27935
  "site",
27923
27936
  "newType",
27937
+ "traffic",
27924
27938
  "features"
27925
27939
  ]
27926
27940
  },
@@ -28606,10 +28620,93 @@
28606
28620
  "FiraSans"
28607
28621
  ]
28608
28622
  },
28623
+ "FontFamily": {
28624
+ "type": "string",
28625
+ "description": "The human-readable font-family name used in CSS (e.g., \"Open Sans\", \"Playfair Display\").",
28626
+ "minLength": 1,
28627
+ "maxLength": 50
28628
+ },
28629
+ "FontWeight": {
28630
+ "type": "integer",
28631
+ "description": "Numeric representation of the font weight (400=regular, 500=medium, 700=bold, 900=black).",
28632
+ "minimum": 1,
28633
+ "maximum": 1000
28634
+ },
28635
+ "FontSource": {
28636
+ "type": "object",
28637
+ "description": "A font file referenced within a font-face declaration, specifying the file's location and format.",
28638
+ "properties": {
28639
+ "url": {
28640
+ "description": "The absolute or relative URL pointing to the font file.",
28641
+ "$ref": "#/components/schemas/URL"
28642
+ },
28643
+ "format": {
28644
+ "type": "string",
28645
+ "description": "The format of the font file. Prefer 'woff2' for modern browsers.",
28646
+ "enum": [
28647
+ "woff2",
28648
+ "woff"
28649
+ ]
28650
+ }
28651
+ },
28652
+ "required": [
28653
+ "url"
28654
+ ]
28655
+ },
28656
+ "FontFace": {
28657
+ "type": "object",
28658
+ "description": "A single font-face declaration specifying the weight and source files for a particular variation of the font.",
28659
+ "properties": {
28660
+ "weight": {
28661
+ "$ref": "#/components/schemas/FontWeight"
28662
+ },
28663
+ "sources": {
28664
+ "type": "array",
28665
+ "description": "Font source files provided in supported formats (e.g., woff2, woff).",
28666
+ "items": {
28667
+ "$ref": "#/components/schemas/FontSource"
28668
+ },
28669
+ "minItems": 1
28670
+ }
28671
+ },
28672
+ "required": [
28673
+ "weight",
28674
+ "sources"
28675
+ ]
28676
+ },
28677
+ "CustomizationFontDefinition": {
28678
+ "type": "object",
28679
+ "description": "Defines a font family along with its various font-face declarations for use in CSS '@font-face' rules.",
28680
+ "properties": {
28681
+ "id": {
28682
+ "type": "string",
28683
+ "description": "A globally unique identifier for the font definition."
28684
+ },
28685
+ "fontFamily": {
28686
+ "$ref": "#/components/schemas/FontFamily"
28687
+ },
28688
+ "fontFaces": {
28689
+ "type": "array",
28690
+ "description": "A list of font-face definitions, specifying variations such as weight and style.",
28691
+ "items": {
28692
+ "$ref": "#/components/schemas/FontFace"
28693
+ },
28694
+ "minItems": 1
28695
+ }
28696
+ },
28697
+ "required": [
28698
+ "id",
28699
+ "fontFamily",
28700
+ "fontFaces"
28701
+ ]
28702
+ },
28609
28703
  "CustomizationFont": {
28610
28704
  "oneOf": [
28611
28705
  {
28612
28706
  "$ref": "#/components/schemas/CustomizationDefaultFont"
28707
+ },
28708
+ {
28709
+ "$ref": "#/components/schemas/CustomizationFontDefinition"
28613
28710
  }
28614
28711
  ]
28615
28712
  },
@@ -35436,12 +35533,6 @@
35436
35533
  "socialPreview"
35437
35534
  ]
35438
35535
  },
35439
- "CustomizationFontFamilyName": {
35440
- "type": "string",
35441
- "description": "A user friendly name for the font family (e.g., \"Open Sans\", \"Playfair Display\")",
35442
- "minLength": 1,
35443
- "maxLength": 50
35444
- },
35445
35536
  "SiteAdsStatus": {
35446
35537
  "type": "string",
35447
35538
  "description": "The status of ads on the site",
package/spec/openapi.yaml CHANGED
@@ -16055,6 +16055,7 @@ components:
16055
16055
  enum:
16056
16056
  - header-logo
16057
16057
  - theme-preset
16058
+ - premium-fonts
16058
16059
  - custom-fonts
16059
16060
  - custom-icons
16060
16061
  - footer-logo
@@ -16918,6 +16919,14 @@ components:
16918
16919
  newType:
16919
16920
  description: The new type of the site
16920
16921
  $ref: "#/components/schemas/SiteType"
16922
+ traffic:
16923
+ type: object
16924
+ properties:
16925
+ pageviews:
16926
+ description: Number of pageviews in the past 30 days
16927
+ type: number
16928
+ required:
16929
+ - pageviews
16921
16930
  features:
16922
16931
  type: array
16923
16932
  items:
@@ -16926,6 +16935,7 @@ components:
16926
16935
  - object
16927
16936
  - site
16928
16937
  - newType
16938
+ - traffic
16929
16939
  - features
16930
16940
  BillingPortal:
16931
16941
  type: object
@@ -17419,9 +17429,69 @@ components:
17419
17429
  - IBMPlexSerif
17420
17430
  - Poppins
17421
17431
  - FiraSans
17432
+ FontFamily:
17433
+ type: string
17434
+ description: The human-readable font-family name used in CSS (e.g., "Open Sans", "Playfair Display").
17435
+ minLength: 1
17436
+ maxLength: 50
17437
+ FontWeight:
17438
+ type: integer
17439
+ description: Numeric representation of the font weight (400=regular, 500=medium, 700=bold, 900=black).
17440
+ minimum: 1
17441
+ maximum: 1000
17442
+ FontSource:
17443
+ type: object
17444
+ description: A font file referenced within a font-face declaration, specifying the file's location and format.
17445
+ properties:
17446
+ url:
17447
+ description: The absolute or relative URL pointing to the font file.
17448
+ $ref: "#/components/schemas/URL"
17449
+ format:
17450
+ type: string
17451
+ description: The format of the font file. Prefer 'woff2' for modern browsers.
17452
+ enum:
17453
+ - woff2
17454
+ - woff
17455
+ required:
17456
+ - url
17457
+ FontFace:
17458
+ type: object
17459
+ description: A single font-face declaration specifying the weight and source files for a particular variation of the font.
17460
+ properties:
17461
+ weight:
17462
+ $ref: "#/components/schemas/FontWeight"
17463
+ sources:
17464
+ type: array
17465
+ description: Font source files provided in supported formats (e.g., woff2, woff).
17466
+ items:
17467
+ $ref: "#/components/schemas/FontSource"
17468
+ minItems: 1
17469
+ required:
17470
+ - weight
17471
+ - sources
17472
+ CustomizationFontDefinition:
17473
+ type: object
17474
+ description: Defines a font family along with its various font-face declarations for use in CSS '@font-face' rules.
17475
+ properties:
17476
+ id:
17477
+ type: string
17478
+ description: A globally unique identifier for the font definition.
17479
+ fontFamily:
17480
+ $ref: "#/components/schemas/FontFamily"
17481
+ fontFaces:
17482
+ type: array
17483
+ description: A list of font-face definitions, specifying variations such as weight and style.
17484
+ items:
17485
+ $ref: "#/components/schemas/FontFace"
17486
+ minItems: 1
17487
+ required:
17488
+ - id
17489
+ - fontFamily
17490
+ - fontFaces
17422
17491
  CustomizationFont:
17423
17492
  oneOf:
17424
17493
  - $ref: "#/components/schemas/CustomizationDefaultFont"
17494
+ - $ref: "#/components/schemas/CustomizationFontDefinition"
17425
17495
  CustomizationBackground:
17426
17496
  type: string
17427
17497
  enum:
@@ -21832,11 +21902,6 @@ components:
21832
21902
  - git
21833
21903
  - privacyPolicy
21834
21904
  - socialPreview
21835
- CustomizationFontFamilyName:
21836
- type: string
21837
- description: A user friendly name for the font family (e.g., "Open Sans", "Playfair Display")
21838
- minLength: 1
21839
- maxLength: 50
21840
21905
  SiteAdsStatus:
21841
21906
  type: string
21842
21907
  description: The status of ads on the site