@gitbook/api 0.149.0 → 0.151.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
@@ -627,6 +627,8 @@ export interface ContentRefURL {
627
627
  export interface ContentRefFile {
628
628
  kind: 'file';
629
629
  file: string;
630
+ /** ID of the space the file is in. The file is considered as in the current space if none is provided. */
631
+ space?: string;
630
632
  }
631
633
  export interface DocumentInlineImage {
632
634
  object: 'inline';
@@ -1329,9 +1331,10 @@ export interface DocumentBlockUpdates {
1329
1331
  key?: string;
1330
1332
  nodes: DocumentBlockUpdate[];
1331
1333
  isVoid?: false;
1332
- data?: {
1334
+ data: {
1333
1335
  /** @default "full" */
1334
- format?: 'numeric' | 'full';
1336
+ format: 'numeric' | 'full' | 'short';
1337
+ sticky: boolean;
1335
1338
  };
1336
1339
  }
1337
1340
  export type DocumentBlock = DocumentBlockParagraph | DocumentBlockHeading | DocumentBlockListOrdered | DocumentBlockListUnordered | DocumentBlockListTasks | DocumentBlockListItem | DocumentBlockDivider | DocumentBlockQuote | DocumentBlockHint | DocumentBlockIf | DocumentBlockImages | DocumentBlockImage | DocumentBlockFile | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockCode | DocumentBlockCodeLine | DocumentBlockMath | DocumentBlockExpandable | DocumentBlockTabs | DocumentBlockTabsItem | DocumentBlockTable | DocumentBlockOpenAPI | DocumentBlockOpenAPIOperation | DocumentBlockOpenAPISchemas | DocumentBlockOpenAPIWebhook | DocumentBlockContentRef | DocumentBlockIntegration | DocumentBlockReusableContent | DocumentBlockStepper | DocumentBlockStepperStep | DocumentBlockColumns | DocumentBlockColumn | DocumentBlockUpdates | DocumentBlockUpdate;
@@ -3486,6 +3489,7 @@ export declare enum SiteFeatureKey {
3486
3489
  /** A list of all premium customizations. */
3487
3490
  export declare enum SiteCustomizationFeature {
3488
3491
  HeaderLogo = "header-logo",
3492
+ HeaderPrimaryLink = "header-primary-link",
3489
3493
  ThemePreset = "theme-preset",
3490
3494
  PremiumFonts = "premium-fonts",
3491
3495
  CustomIcons = "custom-icons",
@@ -4000,6 +4004,8 @@ export interface SiteSpace {
4000
4004
  */
4001
4005
  published?: string;
4002
4006
  };
4007
+ /** Whether the site space is hidden. If true, the site space will not be shown in the site's navigation. */
4008
+ hidden?: boolean;
4003
4009
  }
4004
4010
  export interface SiteSection {
4005
4011
  /** The object type, which is always "site-section" */
@@ -5272,6 +5278,8 @@ export interface SiteCustomizationSettings {
5272
5278
  /** The header preset to use for the site. This is a legacy setting and the site styling theme should be used instead. */
5273
5279
  preset: CustomizationHeaderPreset;
5274
5280
  logo?: CustomizationThemedURL;
5281
+ /** Destination to open when visitors click the site title/logo in the header. */
5282
+ primaryLink?: ContentRef;
5275
5283
  /**
5276
5284
  * Color of the background in the header. This value is now deprecated in favour of the new theming colors.
5277
5285
  * @deprecated
@@ -12678,6 +12686,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12678
12686
  condition?: Expression | null;
12679
12687
  /** The content that this site space points to. If not set, the space will remain unchanged. */
12680
12688
  spaceId?: string;
12689
+ /** Whether the site space is hidden. If true, the site space will not be shown in the site's navigation. If not set, the hidden state will remain unchanged. If set to false, the site space will be shown in site navigation. */
12690
+ hidden?: boolean;
12681
12691
  }, params?: RequestParams) => Promise<HttpResponse<SiteSpace, any>>;
12682
12692
  /**
12683
12693
  * No description
@@ -12770,6 +12780,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12770
12780
  preset?: CustomizationHeaderPreset | null;
12771
12781
  /** The header logo to use. Set to null to reset the override. */
12772
12782
  logo?: CustomizationThemedURL | null;
12783
+ /** The destination to open when visitors click the site title/logo in the header. Set to null to reset the override. */
12784
+ primaryLink?: ContentRef | null;
12773
12785
  /** The background color used in the header. Set to null to reset the override. */
12774
12786
  backgroundColor?: CustomizationThemedColor | null;
12775
12787
  /** The color used by the links in the header. Set to null to reset the override. */
@@ -74,7 +74,7 @@ export declare const SITE_VISIBILITY_ENUM: ["public", "unlisted", "share-link",
74
74
  export declare const SITE_ADS_TOPIC_ENUM: ["webdev", "crypto"];
75
75
  export declare const SITE_AGENTS_CONTEXT_ENUM: ["excluded", "included"];
76
76
  export declare const SITE_FEATURE_KEY_ENUM: ["sites-adaptive-content", "sites-advanced-customization", "sites-advanced-insights", "sites-ads", "sites-ai-search", "sites-ai-assistant", "sites-embed", "sites-api-playground", "sites-basic-customization", "sites-custom-domain", "sites-custom-fonts", "sites-custom-subdirectory", "sites-full-text-search", "sites-multivariant-site", "sites-no-custom-domain", "sites-page-feedback", "sites-page-traffic-insights", "sites-pdf-export", "sites-preview-deployments", "sites-public-visibility", "sites-redirects", "sites-search-insights", "sites-sections", "sites-seo", "sites-share-links", "sites-unlisted-visibility", "sites-user-contribution", "sites-visitor-authentication", "sites-visitors"];
77
- export declare const SITE_CUSTOMIZATION_FEATURE_ENUM: ["header-logo", "theme-preset", "premium-fonts", "custom-icons", "footer-logo", "footer-links", "footer-copyright", "semantic-colors"];
77
+ export declare const SITE_CUSTOMIZATION_FEATURE_ENUM: ["header-logo", "header-primary-link", "theme-preset", "premium-fonts", "custom-icons", "footer-logo", "footer-links", "footer-copyright", "semantic-colors"];
78
78
  export declare const CONTENT_KIT_ICON_ENUM: ["close", "edit", "github", "gitlab", "maximize", "email", "settings", "search", "delete", "star", "warning", "link", "link-external", "eye", "eye-off", "lock", "check", "check-circle"];
79
79
  export declare const SITE_SECTION_TITLE_MAX_LENGTH = 128;
80
80
  export declare const SITE_SECTION_TITLE_MIN_LENGTH = 2;
package/dist/index.cjs CHANGED
@@ -441,7 +441,7 @@ module.exports = __toCommonJS(src_exports);
441
441
 
442
442
  // package.json
443
443
  var name = "@gitbook/api";
444
- var version = "0.149.0";
444
+ var version = "0.151.0";
445
445
 
446
446
  // src/client.ts
447
447
  var import_event_iterator = __toESM(require_node(), 1);
@@ -907,6 +907,7 @@ var SiteFeatureKey = /* @__PURE__ */ ((SiteFeatureKey2) => {
907
907
  })(SiteFeatureKey || {});
908
908
  var SiteCustomizationFeature = /* @__PURE__ */ ((SiteCustomizationFeature2) => {
909
909
  SiteCustomizationFeature2["HeaderLogo"] = "header-logo";
910
+ SiteCustomizationFeature2["HeaderPrimaryLink"] = "header-primary-link";
910
911
  SiteCustomizationFeature2["ThemePreset"] = "theme-preset";
911
912
  SiteCustomizationFeature2["PremiumFonts"] = "premium-fonts";
912
913
  SiteCustomizationFeature2["CustomIcons"] = "custom-icons";
@@ -4059,7 +4060,7 @@ var SITE_VISIBILITY_ENUM = ["public", "unlisted", "share-link", "visitor-auth"];
4059
4060
  var SITE_ADS_TOPIC_ENUM = ["webdev", "crypto"];
4060
4061
  var SITE_AGENTS_CONTEXT_ENUM = ["excluded", "included"];
4061
4062
  var SITE_FEATURE_KEY_ENUM = ["sites-adaptive-content", "sites-advanced-customization", "sites-advanced-insights", "sites-ads", "sites-ai-search", "sites-ai-assistant", "sites-embed", "sites-api-playground", "sites-basic-customization", "sites-custom-domain", "sites-custom-fonts", "sites-custom-subdirectory", "sites-full-text-search", "sites-multivariant-site", "sites-no-custom-domain", "sites-page-feedback", "sites-page-traffic-insights", "sites-pdf-export", "sites-preview-deployments", "sites-public-visibility", "sites-redirects", "sites-search-insights", "sites-sections", "sites-seo", "sites-share-links", "sites-unlisted-visibility", "sites-user-contribution", "sites-visitor-authentication", "sites-visitors"];
4062
- var SITE_CUSTOMIZATION_FEATURE_ENUM = ["header-logo", "theme-preset", "premium-fonts", "custom-icons", "footer-logo", "footer-links", "footer-copyright", "semantic-colors"];
4063
+ var SITE_CUSTOMIZATION_FEATURE_ENUM = ["header-logo", "header-primary-link", "theme-preset", "premium-fonts", "custom-icons", "footer-logo", "footer-links", "footer-copyright", "semantic-colors"];
4063
4064
  var CONTENT_KIT_ICON_ENUM = ["close", "edit", "github", "gitlab", "maximize", "email", "settings", "search", "delete", "star", "warning", "link", "link-external", "eye", "eye-off", "lock", "check", "check-circle"];
4064
4065
  var SITE_SECTION_TITLE_MAX_LENGTH = 128;
4065
4066
  var SITE_SECTION_TITLE_MIN_LENGTH = 2;
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.149.0";
175
+ var version = "0.151.0";
176
176
 
177
177
  // src/client.ts
178
178
  var import_event_iterator = __toESM(require_node(), 1);
@@ -638,6 +638,7 @@ var SiteFeatureKey = /* @__PURE__ */ ((SiteFeatureKey2) => {
638
638
  })(SiteFeatureKey || {});
639
639
  var SiteCustomizationFeature = /* @__PURE__ */ ((SiteCustomizationFeature2) => {
640
640
  SiteCustomizationFeature2["HeaderLogo"] = "header-logo";
641
+ SiteCustomizationFeature2["HeaderPrimaryLink"] = "header-primary-link";
641
642
  SiteCustomizationFeature2["ThemePreset"] = "theme-preset";
642
643
  SiteCustomizationFeature2["PremiumFonts"] = "premium-fonts";
643
644
  SiteCustomizationFeature2["CustomIcons"] = "custom-icons";
@@ -3790,7 +3791,7 @@ var SITE_VISIBILITY_ENUM = ["public", "unlisted", "share-link", "visitor-auth"];
3790
3791
  var SITE_ADS_TOPIC_ENUM = ["webdev", "crypto"];
3791
3792
  var SITE_AGENTS_CONTEXT_ENUM = ["excluded", "included"];
3792
3793
  var SITE_FEATURE_KEY_ENUM = ["sites-adaptive-content", "sites-advanced-customization", "sites-advanced-insights", "sites-ads", "sites-ai-search", "sites-ai-assistant", "sites-embed", "sites-api-playground", "sites-basic-customization", "sites-custom-domain", "sites-custom-fonts", "sites-custom-subdirectory", "sites-full-text-search", "sites-multivariant-site", "sites-no-custom-domain", "sites-page-feedback", "sites-page-traffic-insights", "sites-pdf-export", "sites-preview-deployments", "sites-public-visibility", "sites-redirects", "sites-search-insights", "sites-sections", "sites-seo", "sites-share-links", "sites-unlisted-visibility", "sites-user-contribution", "sites-visitor-authentication", "sites-visitors"];
3793
- var SITE_CUSTOMIZATION_FEATURE_ENUM = ["header-logo", "theme-preset", "premium-fonts", "custom-icons", "footer-logo", "footer-links", "footer-copyright", "semantic-colors"];
3794
+ var SITE_CUSTOMIZATION_FEATURE_ENUM = ["header-logo", "header-primary-link", "theme-preset", "premium-fonts", "custom-icons", "footer-logo", "footer-links", "footer-copyright", "semantic-colors"];
3794
3795
  var CONTENT_KIT_ICON_ENUM = ["close", "edit", "github", "gitlab", "maximize", "email", "settings", "search", "delete", "star", "warning", "link", "link-external", "eye", "eye-off", "lock", "check", "check-circle"];
3795
3796
  var SITE_SECTION_TITLE_MAX_LENGTH = 128;
3796
3797
  var SITE_SECTION_TITLE_MIN_LENGTH = 2;
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.149.0",
7
+ "version": "0.151.0",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "README.md",
package/spec/openapi.json CHANGED
@@ -14314,6 +14314,10 @@
14314
14314
  "spaceId": {
14315
14315
  "type": "string",
14316
14316
  "description": "The content that this site space points to. If not set, the space will remain unchanged."
14317
+ },
14318
+ "hidden": {
14319
+ "type": "boolean",
14320
+ "description": "Whether the site space is hidden. If true, the site space will not be shown in the site's navigation. If not set, the hidden state will remain unchanged. If set to false, the site space will be shown in site navigation."
14317
14321
  }
14318
14322
  }
14319
14323
  }
@@ -14761,6 +14765,21 @@
14761
14765
  }
14762
14766
  ]
14763
14767
  },
14768
+ "primaryLink": {
14769
+ "description": "The destination to open when visitors click the site title/logo in the header. Set to null to reset the override.",
14770
+ "oneOf": [
14771
+ {
14772
+ "$ref": "#/components/schemas/ContentRef"
14773
+ },
14774
+ {
14775
+ "type": "string",
14776
+ "nullable": true,
14777
+ "enum": [
14778
+ null
14779
+ ]
14780
+ }
14781
+ ]
14782
+ },
14764
14783
  "backgroundColor": {
14765
14784
  "description": "The background color used in the header. Set to null to reset the override.",
14766
14785
  "oneOf": [
@@ -19003,6 +19022,10 @@
19003
19022
  },
19004
19023
  "file": {
19005
19024
  "type": "string"
19025
+ },
19026
+ "space": {
19027
+ "description": "ID of the space the file is in. The file is considered as in the current space if none is provided.",
19028
+ "type": "string"
19006
19029
  }
19007
19030
  },
19008
19031
  "required": [
@@ -22602,18 +22625,27 @@
22602
22625
  "type": "string",
22603
22626
  "enum": [
22604
22627
  "numeric",
22605
- "full"
22628
+ "full",
22629
+ "short"
22606
22630
  ],
22607
22631
  "default": "full"
22632
+ },
22633
+ "sticky": {
22634
+ "type": "boolean"
22608
22635
  }
22609
22636
  },
22637
+ "required": [
22638
+ "sticky",
22639
+ "format"
22640
+ ],
22610
22641
  "additionalProperties": false
22611
22642
  }
22612
22643
  },
22613
22644
  "required": [
22614
22645
  "object",
22615
22646
  "type",
22616
- "nodes"
22647
+ "nodes",
22648
+ "data"
22617
22649
  ]
22618
22650
  },
22619
22651
  "DocumentBlock": {
@@ -29022,6 +29054,7 @@
29022
29054
  "description": "A list of all premium customizations.",
29023
29055
  "enum": [
29024
29056
  "header-logo",
29057
+ "header-primary-link",
29025
29058
  "theme-preset",
29026
29059
  "premium-fonts",
29027
29060
  "custom-icons",
@@ -30682,6 +30715,10 @@
30682
30715
  "format": "uri"
30683
30716
  }
30684
30717
  }
30718
+ },
30719
+ "hidden": {
30720
+ "type": "boolean",
30721
+ "description": "Whether the site space is hidden. If true, the site space will not be shown in the site's navigation."
30685
30722
  }
30686
30723
  },
30687
30724
  "required": [
@@ -34176,6 +34213,10 @@
34176
34213
  "logo": {
34177
34214
  "$ref": "#/components/schemas/CustomizationThemedURL"
34178
34215
  },
34216
+ "primaryLink": {
34217
+ "description": "Destination to open when visitors click the site title/logo in the header.",
34218
+ "$ref": "#/components/schemas/ContentRef"
34219
+ },
34179
34220
  "backgroundColor": {
34180
34221
  "deprecated": true,
34181
34222
  "description": "Color of the background in the header. This value is now deprecated in favour of the new theming colors.",
package/spec/openapi.yaml CHANGED
@@ -8107,6 +8107,9 @@ paths:
8107
8107
  spaceId:
8108
8108
  type: string
8109
8109
  description: The content that this site space points to. If not set, the space will remain unchanged.
8110
+ hidden:
8111
+ type: boolean
8112
+ description: Whether the site space is hidden. If true, the site space will not be shown in the site's navigation. If not set, the hidden state will remain unchanged. If set to false, the site space will be shown in site navigation.
8110
8113
  responses:
8111
8114
  "200":
8112
8115
  description: OK
@@ -8347,6 +8350,14 @@ paths:
8347
8350
  nullable: true
8348
8351
  enum:
8349
8352
  - null
8353
+ primaryLink:
8354
+ description: The destination to open when visitors click the site title/logo in the header. Set to null to reset the override.
8355
+ oneOf:
8356
+ - $ref: "#/components/schemas/ContentRef"
8357
+ - type: string
8358
+ nullable: true
8359
+ enum:
8360
+ - null
8350
8361
  backgroundColor:
8351
8362
  description: The background color used in the header. Set to null to reset the override.
8352
8363
  oneOf:
@@ -11121,6 +11132,9 @@ components:
11121
11132
  - file
11122
11133
  file:
11123
11134
  type: string
11135
+ space:
11136
+ description: ID of the space the file is in. The file is considered as in the current space if none is provided.
11137
+ type: string
11124
11138
  required:
11125
11139
  - kind
11126
11140
  - file
@@ -13337,12 +13351,19 @@ components:
13337
13351
  enum:
13338
13352
  - numeric
13339
13353
  - full
13354
+ - short
13340
13355
  default: full
13356
+ sticky:
13357
+ type: boolean
13358
+ required:
13359
+ - sticky
13360
+ - format
13341
13361
  additionalProperties: false
13342
13362
  required:
13343
13363
  - object
13344
13364
  - type
13345
13365
  - nodes
13366
+ - data
13346
13367
  DocumentBlock:
13347
13368
  oneOf:
13348
13369
  - $ref: "#/components/schemas/DocumentBlockParagraph"
@@ -17581,6 +17602,7 @@ components:
17581
17602
  description: A list of all premium customizations.
17582
17603
  enum:
17583
17604
  - header-logo
17605
+ - header-primary-link
17584
17606
  - theme-preset
17585
17607
  - premium-fonts
17586
17608
  - custom-icons
@@ -18646,6 +18668,9 @@ components:
18646
18668
  type: string
18647
18669
  description: URL of the published version of the site-space. Only defined when site is published.
18648
18670
  format: uri
18671
+ hidden:
18672
+ type: boolean
18673
+ description: Whether the site space is hidden. If true, the site space will not be shown in the site's navigation.
18649
18674
  required:
18650
18675
  - object
18651
18676
  - id
@@ -21096,6 +21121,9 @@ components:
21096
21121
  $ref: "#/components/schemas/CustomizationHeaderPreset"
21097
21122
  logo:
21098
21123
  $ref: "#/components/schemas/CustomizationThemedURL"
21124
+ primaryLink:
21125
+ description: Destination to open when visitors click the site title/logo in the header.
21126
+ $ref: "#/components/schemas/ContentRef"
21099
21127
  backgroundColor:
21100
21128
  deprecated: true
21101
21129
  description: Color of the background in the header. This value is now deprecated in favour of the new theming colors.