@gitbook/api 0.181.0 → 0.183.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
@@ -804,6 +804,7 @@ export declare enum IntegrationScope {
804
804
  SiteScriptInject = "site:script:inject",
805
805
  SiteScriptCookies = "site:script:cookies",
806
806
  SiteVisitorAuth = "site:visitor:auth",
807
+ SiteVisitorClaims = "site:visitor:claims",
807
808
  SiteAdaptiveRead = "site:adaptive:read",
808
809
  SiteAdaptiveWrite = "site:adaptive:write",
809
810
  ConversationsIngest = "conversations:ingest",
@@ -1235,6 +1236,8 @@ export type MergeRule = {
1235
1236
  rule: "custom";
1236
1237
  /** Expression to evaluate */
1237
1238
  expression: Expression;
1239
+ /** Optional message to display when the expression evaluates to false. */
1240
+ message?: string;
1238
1241
  };
1239
1242
  /** The merge rules are composed of individual rules that must all pass. */
1240
1243
  export interface MergeRulesConfigurationRules {
@@ -2240,6 +2243,8 @@ export interface DocumentBlockTabsItem {
2240
2243
  nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration)[];
2241
2244
  data: {
2242
2245
  title?: string;
2246
+ /** Name of the icon */
2247
+ icon?: Icon;
2243
2248
  };
2244
2249
  meta?: {
2245
2250
  /** Unique ID to be used in an URL for the block. */
@@ -2639,6 +2644,8 @@ export interface RevisionPageLayoutOptions {
2639
2644
  metadata: boolean;
2640
2645
  /** Should the tags be visible on the page? */
2641
2646
  tags: boolean;
2647
+ /** Should the page actions be visible on the page? */
2648
+ actions: boolean;
2642
2649
  }
2643
2650
  export interface RevisionPageDocumentCover {
2644
2651
  /** Content reference pointing to the source image. */
@@ -4146,6 +4153,8 @@ export type SpaceContentUpdatedEvent = SpaceEvent & {
4146
4153
  type: "space_content_updated";
4147
4154
  /** Unique identifier of the new content revision */
4148
4155
  revisionId: string;
4156
+ /** Users who updated the content */
4157
+ updatedBy: User[];
4149
4158
  };
4150
4159
  /** Event when a GitSync operation has been completed. */
4151
4160
  export type SpaceGitSyncCompletedEvent = SpaceEvent & {
@@ -4222,6 +4231,8 @@ export type FetchPublishedScriptEvent = SiteEvent & {
4222
4231
  export type FetchVisitorAuthenticationEvent = SiteEvent & {
4223
4232
  type: "fetch_visitor_authentication";
4224
4233
  location?: string;
4234
+ /** Whitelisted search parameters from the visitor authentication request. */
4235
+ searchParams?: Record<string, string>;
4225
4236
  /** The visitor authentication action to resolve. If omitted, integrations resolve to the existing login redirect. */
4226
4237
  action?: "logout";
4227
4238
  };
@@ -4495,6 +4506,13 @@ export interface Site {
4495
4506
  createdAt: string;
4496
4507
  adaptiveContent?: SiteAdaptiveContent;
4497
4508
  ads?: SiteAds;
4509
+ /**
4510
+ * Reference to a GitBook space holding the team's writing styleguide.
4511
+ * When present on a site, the editing agent receives the styleguide
4512
+ * table of contents in its system prompt and can fetch sections on
4513
+ * demand to check edits against the rules.
4514
+ */
4515
+ styleguide?: ContentRefSpace;
4498
4516
  /** A list of all premium features enabled on this site. For each feature we list the plan they belong to and whether the feature is frozen. A frozen feature is still enabled but cannot be changed or modified. */
4499
4517
  features: SiteFeature[];
4500
4518
  /** URLs associated with the object */
@@ -4842,6 +4860,8 @@ export interface ContentKitRenderOutputElement {
4842
4860
  element: ContentKitRootElement;
4843
4861
  state: object;
4844
4862
  props: PlainObject;
4863
+ /** Whether the rendered integration UI can receive visitor claims. */
4864
+ canAccessVisitorClaims?: boolean;
4845
4865
  }
4846
4866
  /** Output of completed lifecycle of the component. */
4847
4867
  export interface ContentKitRenderOutputComplete {
@@ -6884,6 +6904,22 @@ export interface AIToolCallGetReusableContent {
6884
6904
  revisionId: string;
6885
6905
  reusableContent: ChangedRevisionReusableContent;
6886
6906
  }
6907
+ export interface AIToolCallGetVariables {
6908
+ tool: "getVariables";
6909
+ /** The ID of the space being accessed. */
6910
+ spaceId: string;
6911
+ /** The revision ID of the space. */
6912
+ revisionId: string;
6913
+ }
6914
+ export interface AIToolCallUpdateVariables {
6915
+ tool: "updateVariables";
6916
+ /** The ID of the space being edited. */
6917
+ spaceId: string;
6918
+ /** The base revision ID used to compare the change in the current conversation. */
6919
+ baseRevisionId: string;
6920
+ /** The page whose variables are being updated. Omitted when updating space variables. */
6921
+ page?: ChangedRevisionPage;
6922
+ }
6887
6923
  export interface AIToolCallCreateChangeRequest {
6888
6924
  tool: "createChangeRequest";
6889
6925
  /** The ID of the space the change request belongs to. */
@@ -6954,7 +6990,7 @@ export interface AIToolCallOther {
6954
6990
  /** Summary of a generic tool call. */
6955
6991
  summary: AIToolCallOtherSummary;
6956
6992
  }
6957
- export type AIToolCall = AIToolCallGetPageContent | AIToolCallGetRecordContent | AIToolCallGetPages | AIToolCallGetReusableContents | AIToolCallSearch | AIToolCallEditPage | AIToolCallCreatePage | AIToolCallDeletePage | AIToolCallRenamePage | AIToolCallMovePage | AIToolCallListModifiedPages | AIToolCallGetPageDiff | AIToolCallCreateReusableContent | AIToolCallEditReusableContent | AIToolCallGetReusableContent | AIToolCallCreateChangeRequest | AIToolCallComment | AIToolCallReplyToComment | AIToolCallSubmitChangeRequestReview | AIToolCallMCP | AIToolCallOther;
6993
+ export type AIToolCall = AIToolCallGetPageContent | AIToolCallGetRecordContent | AIToolCallGetPages | AIToolCallGetReusableContents | AIToolCallSearch | AIToolCallEditPage | AIToolCallCreatePage | AIToolCallDeletePage | AIToolCallRenamePage | AIToolCallMovePage | AIToolCallListModifiedPages | AIToolCallGetPageDiff | AIToolCallCreateReusableContent | AIToolCallEditReusableContent | AIToolCallGetReusableContent | AIToolCallGetVariables | AIToolCallUpdateVariables | AIToolCallCreateChangeRequest | AIToolCallComment | AIToolCallReplyToComment | AIToolCallSubmitChangeRequestReview | AIToolCallMCP | AIToolCallOther;
6958
6994
  export interface Timerange {
6959
6995
  start: Timestamp;
6960
6996
  end: Timestamp;
@@ -7759,7 +7795,7 @@ export interface SiteAdsStats {
7759
7795
  /**
7760
7796
  * The source path to redirect from.
7761
7797
  * @maxLength 512
7762
- * @pattern ^\/(?!\*)(?!.*\*.+)(?:[A-Za-z0-9\-._~]|%[0-9A-Fa-f]{2})+(?:\/(?:[A-Za-z0-9\-._~]|%[0-9A-Fa-f]{2})+)*(?:\/\*|\*)?$
7798
+ * @pattern ^\/(?!\*)(?!.*\*.+)(?:[A-Za-z0-9\-._~+]|%[0-9A-Fa-f]{2})+(?:\/(?:[A-Za-z0-9\-._~+]|%[0-9A-Fa-f]{2})+)*(?:\/\*|\*)?$
7763
7799
  */
7764
7800
  export type SiteRedirectSourcePath = string;
7765
7801
  export interface SiteRedirectDestinationSiteSection {
@@ -13901,7 +13937,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13901
13937
  /** Localized string value with a 128 character limit, keyed by locale. Contains overrides for non-default languages only. */
13902
13938
  localizedTitle?: LocalizedString128;
13903
13939
  icon?: Icon | null;
13904
- /** Whether the site section group is draft and not live. */
13940
+ /** Whether the site section group should be kept in draft mode. Setting it to true makes the site section group draft. Setting it to false makes the site section group live. */
13905
13941
  draft?: boolean;
13906
13942
  }, params?: RequestParams) => Promise<HttpResponse<SiteSectionGroup, any>>;
13907
13943
  /**
@@ -13977,7 +14013,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13977
14013
  /** Conditional expression used to evaluate whether the site section should be shown to the site's visitor (should evaluate to a boolean). If not set, the condition will remain unchanged. If set to null, the condition will be removed. */
13978
14014
  condition?: Expression | null;
13979
14015
  icon?: Icon | null;
13980
- /** Whether the site section is draft and not live. */
14016
+ /** Whether the site section should be kept in draft mode. Setting it to true makes the site section draft. Setting it to false makes the site section live. */
13981
14017
  draft?: boolean;
13982
14018
  description?: SiteSectionDescription | null;
13983
14019
  /** Localized string value with a 256 character limit, keyed by locale. Contains overrides for non-default languages only. */
@@ -14677,7 +14713,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
14677
14713
  spaceId?: string;
14678
14714
  /** 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. */
14679
14715
  hidden?: boolean;
14680
- /** Whether the site space should be kept in draft mode. Setting it to false makes the site space live. */
14716
+ /** Whether the site space should be kept in draft mode. Setting it to true makes the site space draft. Setting it to false makes the site space live. */
14681
14717
  draft?: boolean;
14682
14718
  }, params?: RequestParams) => Promise<HttpResponse<SiteSpace, any>>;
14683
14719
  /**
@@ -15160,6 +15196,38 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15160
15196
  message: string;
15161
15197
  };
15162
15198
  }>>;
15199
+ /**
15200
+ * @description Ensures the site has a site-owned styleguide backing space and returns a reference to it.
15201
+ *
15202
+ * @tags sites
15203
+ * @name CreateSiteStyleguideById
15204
+ * @summary Create or return a site's styleguide
15205
+ * @request POST:/orgs/{organizationId}/sites/{siteId}/styleguide
15206
+ * @secure
15207
+ */
15208
+ createSiteStyleguideById: (organizationId: EntityId, siteId: string, params?: RequestParams) => Promise<HttpResponse<ContentRefSpace, {
15209
+ error: {
15210
+ /** @format int32 */
15211
+ code: 404;
15212
+ message: string;
15213
+ };
15214
+ }>>;
15215
+ /**
15216
+ * @description Clears the site's styleguide reference and soft-deletes the space.
15217
+ *
15218
+ * @tags sites
15219
+ * @name DeleteSiteStyleguideById
15220
+ * @summary Delete a site's styleguide
15221
+ * @request DELETE:/orgs/{organizationId}/sites/{siteId}/styleguide
15222
+ * @secure
15223
+ */
15224
+ deleteSiteStyleguideById: (organizationId: EntityId, siteId: string, params?: RequestParams) => Promise<HttpResponse<void, {
15225
+ error: {
15226
+ /** @format int32 */
15227
+ code: 404;
15228
+ message: string;
15229
+ };
15230
+ }>>;
15163
15231
  /**
15164
15232
  * No description
15165
15233
  *
@@ -61,7 +61,7 @@ export declare const INTEGRATION_DESCRIPTION_MAX_LENGTH = 100;
61
61
  export declare const INTEGRATION_SUMMARY_MAX_LENGTH = 2048;
62
62
  export declare const INTEGRATION_TARGET_ENUM: ["all", "site", "space", "organization"];
63
63
  export declare const INTEGRATION_VISIBILITY_ENUM: ["public", "private", "unlisted"];
64
- export declare const INTEGRATION_SCOPE_ENUM: ["space:content:read", "space:content:write", "space:metadata:read", "space:metadata:write", "space:git:sync", "page:feedback:read", "site:metadata:read", "site:views:read", "site:script:inject", "site:script:cookies", "site:visitor:auth", "site:adaptive:read", "site:adaptive:write", "conversations:ingest", "openapi:read", "openapi:write"];
64
+ export declare const INTEGRATION_SCOPE_ENUM: ["space:content:read", "space:content:write", "space:metadata:read", "space:metadata:write", "space:git:sync", "page:feedback:read", "site:metadata:read", "site:views:read", "site:script:inject", "site:script:cookies", "site:visitor:auth", "site:visitor:claims", "site:adaptive:read", "site:adaptive:write", "conversations:ingest", "openapi:read", "openapi:write"];
65
65
  export declare const INTEGRATION_CATEGORY_ENUM: ["analytics", "collaboration", "content", "gitsync", "marketing", "visitor-auth", "other"];
66
66
  export declare const INTEGRATION_PROPERTY_TITLE_MAX_LENGTH = 50;
67
67
  export declare const INTEGRATION_PROPERTY_TITLE_MIN_LENGTH = 2;
@@ -178,7 +178,7 @@ export declare const SITE_INSIGHTS_VISITOR_OS_ENUM: ["windows", "macos", "linux"
178
178
  export declare const SITE_INSIGHTS_QUERY_OPERATOR_ENUM: ["in", "notIn", "greaterThan", "greaterThanOrEqual", "lessThan", "lessThanOrEqual"];
179
179
  export declare const SITE_INSIGHTS_QUERY_RANGE_PRESET_ENUM: ["lastYear", "last3Months", "last30Days", "last7Days", "last24Hours"];
180
180
  export declare const SITE_REDIRECT_SOURCE_PATH_MAX_LENGTH = 512;
181
- export declare const SITE_REDIRECT_SOURCE_PATH_PATTERN = "^\\/(?!\\*)(?!.*\\*.+)(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+(?:\\/(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+)*(?:\\/\\*|\\*)?$";
181
+ export declare const SITE_REDIRECT_SOURCE_PATH_PATTERN = "^\\/(?!\\*)(?!.*\\*.+)(?:[A-Za-z0-9\\-._~+]|%[0-9A-Fa-f]{2})+(?:\\/(?:[A-Za-z0-9\\-._~+]|%[0-9A-Fa-f]{2})+)*(?:\\/\\*|\\*)?$";
182
182
  export declare const SITE_MCP_SERVER_NAME_MAX_LENGTH = 100;
183
183
  export declare const SITE_MCP_SERVER_NAME_MIN_LENGTH = 1;
184
184
  export declare const SITE_MCP_SERVER_TRANSPORT_ENUM: ["sse", "http"];
package/dist/index.cjs CHANGED
@@ -521,7 +521,7 @@ module.exports = __toCommonJS(src_exports);
521
521
 
522
522
  // package.json
523
523
  var name = "@gitbook/api";
524
- var version = "0.181.0";
524
+ var version = "0.183.0";
525
525
 
526
526
  // src/client.ts
527
527
  var import_event_iterator = __toESM(require_node(), 1);
@@ -1399,6 +1399,7 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
1399
1399
  IntegrationScope2["SiteScriptInject"] = "site:script:inject";
1400
1400
  IntegrationScope2["SiteScriptCookies"] = "site:script:cookies";
1401
1401
  IntegrationScope2["SiteVisitorAuth"] = "site:visitor:auth";
1402
+ IntegrationScope2["SiteVisitorClaims"] = "site:visitor:claims";
1402
1403
  IntegrationScope2["SiteAdaptiveRead"] = "site:adaptive:read";
1403
1404
  IntegrationScope2["SiteAdaptiveWrite"] = "site:adaptive:write";
1404
1405
  IntegrationScope2["ConversationsIngest"] = "conversations:ingest";
@@ -4321,6 +4322,19 @@ var Api = class extends HttpClient {
4321
4322
  format: "json",
4322
4323
  ...params
4323
4324
  }),
4325
+ createSiteStyleguideById: (organizationId, siteId, params = {}) => this.request({
4326
+ path: `/orgs/${organizationId}/sites/${siteId}/styleguide`,
4327
+ method: "POST",
4328
+ secure: true,
4329
+ format: "json",
4330
+ ...params
4331
+ }),
4332
+ deleteSiteStyleguideById: (organizationId, siteId, params = {}) => this.request({
4333
+ path: `/orgs/${organizationId}/sites/${siteId}/styleguide`,
4334
+ method: "DELETE",
4335
+ secure: true,
4336
+ ...params
4337
+ }),
4324
4338
  trackEventsInSiteById: (organizationId, siteId, data, params = {}) => this.request({
4325
4339
  path: `/orgs/${organizationId}/sites/${siteId}/insights/events`,
4326
4340
  method: "POST",
@@ -4733,7 +4747,7 @@ var INTEGRATION_DESCRIPTION_MAX_LENGTH = 100;
4733
4747
  var INTEGRATION_SUMMARY_MAX_LENGTH = 2048;
4734
4748
  var INTEGRATION_TARGET_ENUM = ["all", "site", "space", "organization"];
4735
4749
  var INTEGRATION_VISIBILITY_ENUM = ["public", "private", "unlisted"];
4736
- var INTEGRATION_SCOPE_ENUM = ["space:content:read", "space:content:write", "space:metadata:read", "space:metadata:write", "space:git:sync", "page:feedback:read", "site:metadata:read", "site:views:read", "site:script:inject", "site:script:cookies", "site:visitor:auth", "site:adaptive:read", "site:adaptive:write", "conversations:ingest", "openapi:read", "openapi:write"];
4750
+ var INTEGRATION_SCOPE_ENUM = ["space:content:read", "space:content:write", "space:metadata:read", "space:metadata:write", "space:git:sync", "page:feedback:read", "site:metadata:read", "site:views:read", "site:script:inject", "site:script:cookies", "site:visitor:auth", "site:visitor:claims", "site:adaptive:read", "site:adaptive:write", "conversations:ingest", "openapi:read", "openapi:write"];
4737
4751
  var INTEGRATION_CATEGORY_ENUM = ["analytics", "collaboration", "content", "gitsync", "marketing", "visitor-auth", "other"];
4738
4752
  var INTEGRATION_PROPERTY_TITLE_MAX_LENGTH = 50;
4739
4753
  var INTEGRATION_PROPERTY_TITLE_MIN_LENGTH = 2;
@@ -4850,7 +4864,7 @@ var SITE_INSIGHTS_VISITOR_OS_ENUM = ["windows", "macos", "linux", "android", "io
4850
4864
  var SITE_INSIGHTS_QUERY_OPERATOR_ENUM = ["in", "notIn", "greaterThan", "greaterThanOrEqual", "lessThan", "lessThanOrEqual"];
4851
4865
  var SITE_INSIGHTS_QUERY_RANGE_PRESET_ENUM = ["lastYear", "last3Months", "last30Days", "last7Days", "last24Hours"];
4852
4866
  var SITE_REDIRECT_SOURCE_PATH_MAX_LENGTH = 512;
4853
- var SITE_REDIRECT_SOURCE_PATH_PATTERN = "^\\/(?!\\*)(?!.*\\*.+)(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+(?:\\/(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+)*(?:\\/\\*|\\*)?$";
4867
+ var SITE_REDIRECT_SOURCE_PATH_PATTERN = "^\\/(?!\\*)(?!.*\\*.+)(?:[A-Za-z0-9\\-._~+]|%[0-9A-Fa-f]{2})+(?:\\/(?:[A-Za-z0-9\\-._~+]|%[0-9A-Fa-f]{2})+)*(?:\\/\\*|\\*)?$";
4854
4868
  var SITE_MCP_SERVER_NAME_MAX_LENGTH = 100;
4855
4869
  var SITE_MCP_SERVER_NAME_MIN_LENGTH = 1;
4856
4870
  var SITE_MCP_SERVER_TRANSPORT_ENUM = ["sse", "http"];
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.181.0";
175
+ var version = "0.183.0";
176
176
 
177
177
  // src/client.ts
178
178
  var import_event_iterator = __toESM(require_node(), 1);
@@ -1050,6 +1050,7 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
1050
1050
  IntegrationScope2["SiteScriptInject"] = "site:script:inject";
1051
1051
  IntegrationScope2["SiteScriptCookies"] = "site:script:cookies";
1052
1052
  IntegrationScope2["SiteVisitorAuth"] = "site:visitor:auth";
1053
+ IntegrationScope2["SiteVisitorClaims"] = "site:visitor:claims";
1053
1054
  IntegrationScope2["SiteAdaptiveRead"] = "site:adaptive:read";
1054
1055
  IntegrationScope2["SiteAdaptiveWrite"] = "site:adaptive:write";
1055
1056
  IntegrationScope2["ConversationsIngest"] = "conversations:ingest";
@@ -3972,6 +3973,19 @@ var Api = class extends HttpClient {
3972
3973
  format: "json",
3973
3974
  ...params
3974
3975
  }),
3976
+ createSiteStyleguideById: (organizationId, siteId, params = {}) => this.request({
3977
+ path: `/orgs/${organizationId}/sites/${siteId}/styleguide`,
3978
+ method: "POST",
3979
+ secure: true,
3980
+ format: "json",
3981
+ ...params
3982
+ }),
3983
+ deleteSiteStyleguideById: (organizationId, siteId, params = {}) => this.request({
3984
+ path: `/orgs/${organizationId}/sites/${siteId}/styleguide`,
3985
+ method: "DELETE",
3986
+ secure: true,
3987
+ ...params
3988
+ }),
3975
3989
  trackEventsInSiteById: (organizationId, siteId, data, params = {}) => this.request({
3976
3990
  path: `/orgs/${organizationId}/sites/${siteId}/insights/events`,
3977
3991
  method: "POST",
@@ -4384,7 +4398,7 @@ var INTEGRATION_DESCRIPTION_MAX_LENGTH = 100;
4384
4398
  var INTEGRATION_SUMMARY_MAX_LENGTH = 2048;
4385
4399
  var INTEGRATION_TARGET_ENUM = ["all", "site", "space", "organization"];
4386
4400
  var INTEGRATION_VISIBILITY_ENUM = ["public", "private", "unlisted"];
4387
- var INTEGRATION_SCOPE_ENUM = ["space:content:read", "space:content:write", "space:metadata:read", "space:metadata:write", "space:git:sync", "page:feedback:read", "site:metadata:read", "site:views:read", "site:script:inject", "site:script:cookies", "site:visitor:auth", "site:adaptive:read", "site:adaptive:write", "conversations:ingest", "openapi:read", "openapi:write"];
4401
+ var INTEGRATION_SCOPE_ENUM = ["space:content:read", "space:content:write", "space:metadata:read", "space:metadata:write", "space:git:sync", "page:feedback:read", "site:metadata:read", "site:views:read", "site:script:inject", "site:script:cookies", "site:visitor:auth", "site:visitor:claims", "site:adaptive:read", "site:adaptive:write", "conversations:ingest", "openapi:read", "openapi:write"];
4388
4402
  var INTEGRATION_CATEGORY_ENUM = ["analytics", "collaboration", "content", "gitsync", "marketing", "visitor-auth", "other"];
4389
4403
  var INTEGRATION_PROPERTY_TITLE_MAX_LENGTH = 50;
4390
4404
  var INTEGRATION_PROPERTY_TITLE_MIN_LENGTH = 2;
@@ -4501,7 +4515,7 @@ var SITE_INSIGHTS_VISITOR_OS_ENUM = ["windows", "macos", "linux", "android", "io
4501
4515
  var SITE_INSIGHTS_QUERY_OPERATOR_ENUM = ["in", "notIn", "greaterThan", "greaterThanOrEqual", "lessThan", "lessThanOrEqual"];
4502
4516
  var SITE_INSIGHTS_QUERY_RANGE_PRESET_ENUM = ["lastYear", "last3Months", "last30Days", "last7Days", "last24Hours"];
4503
4517
  var SITE_REDIRECT_SOURCE_PATH_MAX_LENGTH = 512;
4504
- var SITE_REDIRECT_SOURCE_PATH_PATTERN = "^\\/(?!\\*)(?!.*\\*.+)(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+(?:\\/(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+)*(?:\\/\\*|\\*)?$";
4518
+ var SITE_REDIRECT_SOURCE_PATH_PATTERN = "^\\/(?!\\*)(?!.*\\*.+)(?:[A-Za-z0-9\\-._~+]|%[0-9A-Fa-f]{2})+(?:\\/(?:[A-Za-z0-9\\-._~+]|%[0-9A-Fa-f]{2})+)*(?:\\/\\*|\\*)?$";
4505
4519
  var SITE_MCP_SERVER_NAME_MAX_LENGTH = 100;
4506
4520
  var SITE_MCP_SERVER_NAME_MIN_LENGTH = 1;
4507
4521
  var SITE_MCP_SERVER_TRANSPORT_ENUM = ["sse", "http"];
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.181.0",
7
+ "version": "0.183.0",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "README.md",
package/spec/openapi.json CHANGED
@@ -31,9 +31,6 @@
31
31
  {
32
32
  "user-staff": []
33
33
  },
34
- {
35
- "user-internal-or-staff": []
36
- },
37
34
  {
38
35
  "integration": []
39
36
  },
@@ -11754,11 +11751,6 @@
11754
11751
  "tags": [
11755
11752
  "sites"
11756
11753
  ],
11757
- "security": [
11758
- {
11759
- "user": []
11760
- }
11761
- ],
11762
11754
  "parameters": [
11763
11755
  {
11764
11756
  "$ref": "#/components/parameters/organizationId"
@@ -13195,7 +13187,7 @@
13195
13187
  },
13196
13188
  "draft": {
13197
13189
  "type": "boolean",
13198
- "description": "Whether the site section group is draft and not live."
13190
+ "description": "Whether the site section group should be kept in draft mode. Setting it to true makes the site section group draft. Setting it to false makes the site section group live."
13199
13191
  }
13200
13192
  }
13201
13193
  }
@@ -13461,7 +13453,7 @@
13461
13453
  },
13462
13454
  "draft": {
13463
13455
  "type": "boolean",
13464
- "description": "Whether the site section is draft and not live."
13456
+ "description": "Whether the site section should be kept in draft mode. Setting it to true makes the site section draft. Setting it to false makes the site section live."
13465
13457
  },
13466
13458
  "description": {
13467
13459
  "oneOf": [
@@ -15849,7 +15841,7 @@
15849
15841
  },
15850
15842
  "draft": {
15851
15843
  "type": "boolean",
15852
- "description": "Whether the site space should be kept in draft mode. Setting it to false makes the site space live."
15844
+ "description": "Whether the site space should be kept in draft mode. Setting it to true makes the site space draft. Setting it to false makes the site space live."
15853
15845
  }
15854
15846
  }
15855
15847
  }
@@ -17275,6 +17267,73 @@
17275
17267
  }
17276
17268
  }
17277
17269
  },
17270
+ "/orgs/{organizationId}/sites/{siteId}/styleguide": {
17271
+ "post": {
17272
+ "operationId": "createSiteStyleguideById",
17273
+ "summary": "Create or return a site's styleguide",
17274
+ "description": "Ensures the site has a site-owned styleguide backing space and returns\na reference to it.\n",
17275
+ "tags": [
17276
+ "sites"
17277
+ ],
17278
+ "security": [
17279
+ {
17280
+ "user": []
17281
+ }
17282
+ ],
17283
+ "parameters": [
17284
+ {
17285
+ "$ref": "#/components/parameters/organizationId"
17286
+ },
17287
+ {
17288
+ "$ref": "#/components/parameters/siteId"
17289
+ }
17290
+ ],
17291
+ "responses": {
17292
+ "200": {
17293
+ "description": "Styleguide created or already exists.",
17294
+ "content": {
17295
+ "application/json": {
17296
+ "schema": {
17297
+ "$ref": "#/components/schemas/ContentRefSpace"
17298
+ }
17299
+ }
17300
+ }
17301
+ },
17302
+ "404": {
17303
+ "$ref": "#/components/responses/NotFoundError"
17304
+ }
17305
+ }
17306
+ },
17307
+ "delete": {
17308
+ "operationId": "deleteSiteStyleguideById",
17309
+ "summary": "Delete a site's styleguide",
17310
+ "description": "Clears the site's styleguide reference and soft-deletes the space.\n",
17311
+ "tags": [
17312
+ "sites"
17313
+ ],
17314
+ "security": [
17315
+ {
17316
+ "user": []
17317
+ }
17318
+ ],
17319
+ "parameters": [
17320
+ {
17321
+ "$ref": "#/components/parameters/organizationId"
17322
+ },
17323
+ {
17324
+ "$ref": "#/components/parameters/siteId"
17325
+ }
17326
+ ],
17327
+ "responses": {
17328
+ "204": {
17329
+ "description": "Styleguide deleted."
17330
+ },
17331
+ "404": {
17332
+ "$ref": "#/components/responses/NotFoundError"
17333
+ }
17334
+ }
17335
+ }
17336
+ },
17278
17337
  "/orgs/{organizationId}/sites/{siteId}/insights/events": {
17279
17338
  "post": {
17280
17339
  "operationId": "trackEventsInSiteById",
@@ -18564,7 +18623,10 @@
18564
18623
  ],
18565
18624
  "security": [
18566
18625
  {
18567
- "user-internal-or-staff": []
18626
+ "user-internal": []
18627
+ },
18628
+ {
18629
+ "user-staff": []
18568
18630
  }
18569
18631
  ],
18570
18632
  "parameters": [
@@ -19527,10 +19589,6 @@
19527
19589
  "type": "http",
19528
19590
  "scheme": "bearer"
19529
19591
  },
19530
- "user-internal-or-staff": {
19531
- "type": "http",
19532
- "scheme": "bearer"
19533
- },
19534
19592
  "integration": {
19535
19593
  "type": "http",
19536
19594
  "scheme": "bearer"
@@ -20550,6 +20608,10 @@
20550
20608
  },
20551
20609
  "expression": {
20552
20610
  "$ref": "#/components/schemas/Expression"
20611
+ },
20612
+ "message": {
20613
+ "type": "string",
20614
+ "description": "Optional message to display when the expression evaluates to false."
20553
20615
  }
20554
20616
  },
20555
20617
  "required": [
@@ -24819,6 +24881,9 @@
24819
24881
  "properties": {
24820
24882
  "title": {
24821
24883
  "type": "string"
24884
+ },
24885
+ "icon": {
24886
+ "$ref": "#/components/schemas/Icon"
24822
24887
  }
24823
24888
  }
24824
24889
  },
@@ -26632,6 +26697,10 @@
26632
26697
  "tags": {
26633
26698
  "type": "boolean",
26634
26699
  "description": "Should the tags be visible on the page?"
26700
+ },
26701
+ "actions": {
26702
+ "type": "boolean",
26703
+ "description": "Should the page actions be visible on the page?"
26635
26704
  }
26636
26705
  },
26637
26706
  "required": [
@@ -26644,7 +26713,8 @@
26644
26713
  "outline",
26645
26714
  "pagination",
26646
26715
  "metadata",
26647
- "tags"
26716
+ "tags",
26717
+ "actions"
26648
26718
  ]
26649
26719
  },
26650
26720
  "RevisionPageDocumentCover": {
@@ -30184,6 +30254,7 @@
30184
30254
  "site:script:inject",
30185
30255
  "site:script:cookies",
30186
30256
  "site:visitor:auth",
30257
+ "site:visitor:claims",
30187
30258
  "site:adaptive:read",
30188
30259
  "site:adaptive:write",
30189
30260
  "conversations:ingest",
@@ -31356,11 +31427,19 @@
31356
31427
  "revisionId": {
31357
31428
  "type": "string",
31358
31429
  "description": "Unique identifier of the new content revision"
31430
+ },
31431
+ "updatedBy": {
31432
+ "type": "array",
31433
+ "description": "Users who updated the content",
31434
+ "items": {
31435
+ "$ref": "#/components/schemas/User"
31436
+ }
31359
31437
  }
31360
31438
  },
31361
31439
  "required": [
31362
31440
  "type",
31363
- "revisionId"
31441
+ "revisionId",
31442
+ "updatedBy"
31364
31443
  ]
31365
31444
  }
31366
31445
  ]
@@ -31612,6 +31691,13 @@
31612
31691
  "location": {
31613
31692
  "type": "string"
31614
31693
  },
31694
+ "searchParams": {
31695
+ "type": "object",
31696
+ "additionalProperties": {
31697
+ "type": "string"
31698
+ },
31699
+ "description": "Whitelisted search parameters from the visitor authentication request."
31700
+ },
31615
31701
  "action": {
31616
31702
  "type": "string",
31617
31703
  "enum": [
@@ -32615,6 +32701,10 @@
32615
32701
  "ads": {
32616
32702
  "$ref": "#/components/schemas/SiteAds"
32617
32703
  },
32704
+ "styleguide": {
32705
+ "$ref": "#/components/schemas/ContentRefSpace",
32706
+ "description": "Reference to a GitBook space holding the team's writing styleguide.\nWhen present on a site, the editing agent receives the styleguide\ntable of contents in its system prompt and can fetch sections on\ndemand to check edits against the rules.\n"
32707
+ },
32618
32708
  "features": {
32619
32709
  "description": "A list of all premium features enabled on this site. For each feature we list the plan they belong to and whether the feature is frozen. A frozen feature is still enabled but cannot be changed or modified.\n",
32620
32710
  "type": "array",
@@ -33981,6 +34071,10 @@
33981
34071
  },
33982
34072
  "props": {
33983
34073
  "$ref": "#/components/schemas/PlainObject"
34074
+ },
34075
+ "canAccessVisitorClaims": {
34076
+ "type": "boolean",
34077
+ "description": "Whether the rendered integration UI can receive visitor claims."
33984
34078
  }
33985
34079
  },
33986
34080
  "required": [
@@ -40388,6 +40482,58 @@
40388
40482
  "revisionId"
40389
40483
  ]
40390
40484
  },
40485
+ "AIToolCallGetVariables": {
40486
+ "type": "object",
40487
+ "properties": {
40488
+ "tool": {
40489
+ "type": "string",
40490
+ "enum": [
40491
+ "getVariables"
40492
+ ]
40493
+ },
40494
+ "spaceId": {
40495
+ "type": "string",
40496
+ "description": "The ID of the space being accessed."
40497
+ },
40498
+ "revisionId": {
40499
+ "type": "string",
40500
+ "description": "The revision ID of the space."
40501
+ }
40502
+ },
40503
+ "required": [
40504
+ "tool",
40505
+ "spaceId",
40506
+ "revisionId"
40507
+ ]
40508
+ },
40509
+ "AIToolCallUpdateVariables": {
40510
+ "type": "object",
40511
+ "properties": {
40512
+ "tool": {
40513
+ "type": "string",
40514
+ "enum": [
40515
+ "updateVariables"
40516
+ ]
40517
+ },
40518
+ "spaceId": {
40519
+ "type": "string",
40520
+ "description": "The ID of the space being edited."
40521
+ },
40522
+ "baseRevisionId": {
40523
+ "type": "string",
40524
+ "description": "The base revision ID used to compare the change in the current conversation."
40525
+ },
40526
+ "page": {
40527
+ "description": "The page whose variables are being updated. Omitted when updating space variables.",
40528
+ "$ref": "#/components/schemas/ChangedRevisionPage"
40529
+ }
40530
+ },
40531
+ "required": [
40532
+ "tool",
40533
+ "spaceId",
40534
+ "baseRevisionId"
40535
+ ]
40536
+ },
40391
40537
  "AIToolCallCreateChangeRequest": {
40392
40538
  "type": "object",
40393
40539
  "properties": {
@@ -40650,6 +40796,12 @@
40650
40796
  {
40651
40797
  "$ref": "#/components/schemas/AIToolCallGetReusableContent"
40652
40798
  },
40799
+ {
40800
+ "$ref": "#/components/schemas/AIToolCallGetVariables"
40801
+ },
40802
+ {
40803
+ "$ref": "#/components/schemas/AIToolCallUpdateVariables"
40804
+ },
40653
40805
  {
40654
40806
  "$ref": "#/components/schemas/AIToolCallCreateChangeRequest"
40655
40807
  },
@@ -44662,7 +44814,7 @@
44662
44814
  "type": "string",
44663
44815
  "description": "The source path to redirect from.",
44664
44816
  "maxLength": 512,
44665
- "pattern": "^\\/(?!\\*)(?!.*\\*.+)(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+(?:\\/(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+)*(?:\\/\\*|\\*)?$"
44817
+ "pattern": "^\\/(?!\\*)(?!.*\\*.+)(?:[A-Za-z0-9\\-._~+]|%[0-9A-Fa-f]{2})+(?:\\/(?:[A-Za-z0-9\\-._~+]|%[0-9A-Fa-f]{2})+)*(?:\\/\\*|\\*)?$"
44666
44818
  },
44667
44819
  "SiteRedirectDestinationSiteSection": {
44668
44820
  "type": "object",