@gitbook/api 0.101.0 → 0.102.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
@@ -4297,6 +4297,20 @@ export interface CustomizationFooterGroup {
4297
4297
  title: string;
4298
4298
  links: CustomizationContentLink[];
4299
4299
  }
4300
+ export interface CustomizationAnnouncement {
4301
+ /** Whether to show the site's announcement. */
4302
+ enabled: boolean;
4303
+ /**
4304
+ * The text content of the announcement.
4305
+ * @minLength 2
4306
+ * @maxLength 128
4307
+ */
4308
+ message: string;
4309
+ /** The content or URL the announcement links to when clicked. */
4310
+ link?: CustomizationContentLink;
4311
+ /** The style of the announcement. Used to style the banner with the right semantic color and enable/disable features like hiding the banner. */
4312
+ style: 'info' | 'warning' | 'danger' | 'success';
4313
+ }
4300
4314
  export declare enum CustomizationThemeMode {
4301
4315
  Light = "light",
4302
4316
  Dark = "dark"
@@ -4385,6 +4399,7 @@ export interface SiteCustomizationSettings {
4385
4399
  /** @maxLength 300 */
4386
4400
  copyright?: string;
4387
4401
  };
4402
+ announcement?: CustomizationAnnouncement;
4388
4403
  /** Customization options for the dark/light theme modes. */
4389
4404
  themes: {
4390
4405
  default: CustomizationThemeMode;
@@ -4577,10 +4592,15 @@ export interface SiteInsightsEventSession {
4577
4592
  /** Referrer of the session */
4578
4593
  referrer: '' | null | URL;
4579
4594
  /**
4580
- * Authentication token of the visitor.
4581
- * This is used to identify the visitor with adaptive content.
4595
+ * Deprecated, use visitorAuthClaims instead.
4596
+ * @deprecated
4582
4597
  */
4583
4598
  visitorAuthToken?: string | null;
4599
+ /**
4600
+ * Claims of the visitor.
4601
+ * This is used to identify the visitor with adaptive content.
4602
+ */
4603
+ visitorAuthClaims?: PlainObject;
4584
4604
  }
4585
4605
  /** Location of the event. */
4586
4606
  export interface SiteInsightsEventLocation {
@@ -10668,6 +10688,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10668
10688
  /** Unicode codepoint or character of the emoji */
10669
10689
  emoji: Emoji;
10670
10690
  } | object | null;
10691
+ announcement?: CustomizationAnnouncement;
10671
10692
  header?: {
10672
10693
  /** The theme preset to use. Set to null to reset the override. */
10673
10694
  preset?: CustomizationHeaderPreset | null;
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.101.0";
268
+ var version = "0.102.0";
269
269
 
270
270
  // src/client.ts
271
271
  var import_event_iterator = __toESM(require_node(), 1);
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.101.0";
175
+ var version = "0.102.0";
176
176
 
177
177
  // src/client.ts
178
178
  var import_event_iterator = __toESM(require_node(), 1);
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.101.0",
7
+ "version": "0.102.0",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "README.md",
package/spec/openapi.json CHANGED
@@ -13411,6 +13411,9 @@
13411
13411
  }
13412
13412
  ]
13413
13413
  },
13414
+ "announcement": {
13415
+ "$ref": "#/components/schemas/CustomizationAnnouncement"
13416
+ },
13414
13417
  "header": {
13415
13418
  "type": "object",
13416
13419
  "properties": {
@@ -29307,6 +29310,40 @@
29307
29310
  "links"
29308
29311
  ]
29309
29312
  },
29313
+ "CustomizationAnnouncement": {
29314
+ "type": "object",
29315
+ "properties": {
29316
+ "enabled": {
29317
+ "description": "Whether to show the site's announcement.",
29318
+ "type": "boolean"
29319
+ },
29320
+ "message": {
29321
+ "description": "The text content of the announcement.",
29322
+ "type": "string",
29323
+ "minLength": 2,
29324
+ "maxLength": 128
29325
+ },
29326
+ "link": {
29327
+ "description": "The content or URL the announcement links to when clicked.",
29328
+ "$ref": "#/components/schemas/CustomizationContentLink"
29329
+ },
29330
+ "style": {
29331
+ "description": "The style of the announcement. Used to style the banner with the right semantic color and enable/disable features like hiding the banner.",
29332
+ "type": "string",
29333
+ "enum": [
29334
+ "info",
29335
+ "warning",
29336
+ "danger",
29337
+ "success"
29338
+ ]
29339
+ }
29340
+ },
29341
+ "required": [
29342
+ "enabled",
29343
+ "message",
29344
+ "style"
29345
+ ]
29346
+ },
29310
29347
  "CustomizationThemeMode": {
29311
29348
  "type": "string",
29312
29349
  "enum": [
@@ -29490,6 +29527,9 @@
29490
29527
  "groups"
29491
29528
  ]
29492
29529
  },
29530
+ "announcement": {
29531
+ "$ref": "#/components/schemas/CustomizationAnnouncement"
29532
+ },
29493
29533
  "themes": {
29494
29534
  "description": "Customization options for the dark/light theme modes.\n",
29495
29535
  "type": "object",
@@ -30084,7 +30124,12 @@
30084
30124
  "visitorAuthToken": {
30085
30125
  "type": "string",
30086
30126
  "nullable": true,
30087
- "description": "Authentication token of the visitor.\nThis is used to identify the visitor with adaptive content.\n"
30127
+ "deprecated": true,
30128
+ "description": "Deprecated, use visitorAuthClaims instead."
30129
+ },
30130
+ "visitorAuthClaims": {
30131
+ "description": "Claims of the visitor.\nThis is used to identify the visitor with adaptive content.\n",
30132
+ "$ref": "#/components/schemas/PlainObject"
30088
30133
  }
30089
30134
  },
30090
30135
  "required": [
package/spec/openapi.yaml CHANGED
@@ -7444,6 +7444,8 @@ paths:
7444
7444
  nullable: true
7445
7445
  properties: {}
7446
7446
  additionalProperties: false
7447
+ announcement:
7448
+ $ref: "#/components/schemas/CustomizationAnnouncement"
7447
7449
  header:
7448
7450
  type: object
7449
7451
  properties:
@@ -17869,6 +17871,32 @@ components:
17869
17871
  required:
17870
17872
  - title
17871
17873
  - links
17874
+ CustomizationAnnouncement:
17875
+ type: object
17876
+ properties:
17877
+ enabled:
17878
+ description: Whether to show the site's announcement.
17879
+ type: boolean
17880
+ message:
17881
+ description: The text content of the announcement.
17882
+ type: string
17883
+ minLength: 2
17884
+ maxLength: 128
17885
+ link:
17886
+ description: The content or URL the announcement links to when clicked.
17887
+ $ref: "#/components/schemas/CustomizationContentLink"
17888
+ style:
17889
+ description: The style of the announcement. Used to style the banner with the right semantic color and enable/disable features like hiding the banner.
17890
+ type: string
17891
+ enum:
17892
+ - info
17893
+ - warning
17894
+ - danger
17895
+ - success
17896
+ required:
17897
+ - enabled
17898
+ - message
17899
+ - style
17872
17900
  CustomizationThemeMode:
17873
17901
  type: string
17874
17902
  enum:
@@ -17994,6 +18022,8 @@ components:
17994
18022
  maxLength: 300
17995
18023
  required:
17996
18024
  - groups
18025
+ announcement:
18026
+ $ref: "#/components/schemas/CustomizationAnnouncement"
17997
18027
  themes:
17998
18028
  description: |
17999
18029
  Customization options for the dark/light theme modes.
@@ -18397,9 +18427,13 @@ components:
18397
18427
  visitorAuthToken:
18398
18428
  type: string
18399
18429
  nullable: true
18430
+ deprecated: true
18431
+ description: Deprecated, use visitorAuthClaims instead.
18432
+ visitorAuthClaims:
18400
18433
  description: |
18401
- Authentication token of the visitor.
18434
+ Claims of the visitor.
18402
18435
  This is used to identify the visitor with adaptive content.
18436
+ $ref: "#/components/schemas/PlainObject"
18403
18437
  required:
18404
18438
  - visitorId
18405
18439
  - sessionId