@gitbook/api 0.82.0 → 0.83.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
@@ -10645,6 +10645,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10645
10645
  url: URL;
10646
10646
  /** JWT token generated for a visitor auth session */
10647
10647
  visitorAuthToken?: string;
10648
+ /**
10649
+ * When true redirects the user to the authentication/fallback URL if the visitor auth token is invalid
10650
+ * @default false
10651
+ */
10652
+ redirectOnError?: boolean;
10648
10653
  }, params?: RequestParams) => Promise<HttpResponse<PublishedSiteContentLookup, Error | {
10649
10654
  error: {
10650
10655
  /** @format int32 */
package/dist/index.cjs CHANGED
@@ -253,7 +253,7 @@ module.exports = __toCommonJS(src_exports);
253
253
 
254
254
  // package.json
255
255
  var name = "@gitbook/api";
256
- var version = "0.82.0";
256
+ var version = "0.83.0";
257
257
 
258
258
  // src/client.ts
259
259
  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.82.0";
175
+ var version = "0.83.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.82.0",
7
+ "version": "0.83.0",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "README.md",
package/spec/openapi.json CHANGED
@@ -15576,6 +15576,16 @@
15576
15576
  "schema": {
15577
15577
  "type": "string"
15578
15578
  }
15579
+ },
15580
+ {
15581
+ "name": "redirectOnError",
15582
+ "in": "query",
15583
+ "required": false,
15584
+ "description": "When true redirects the user to the authentication/fallback URL if the visitor auth token is invalid",
15585
+ "schema": {
15586
+ "type": "boolean",
15587
+ "default": false
15588
+ }
15579
15589
  }
15580
15590
  ],
15581
15591
  "responses": {
package/spec/openapi.yaml CHANGED
@@ -8721,6 +8721,13 @@ paths:
8721
8721
  description: JWT token generated for a visitor auth session
8722
8722
  schema:
8723
8723
  type: string
8724
+ - name: redirectOnError
8725
+ in: query
8726
+ required: false
8727
+ description: When true redirects the user to the authentication/fallback URL if the visitor auth token is invalid
8728
+ schema:
8729
+ type: boolean
8730
+ default: false
8724
8731
  responses:
8725
8732
  "200":
8726
8733
  description: OK