@gitbook/api 0.182.0 → 0.183.1

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
@@ -416,6 +416,15 @@ export declare enum SiteExternalLinksTarget {
416
416
  Self = "self",
417
417
  Blank = "blank"
418
418
  }
419
+ /** Type of a built-in page action that can be displayed in the page actions menu of a published page. */
420
+ export declare enum CustomizationPageActionType {
421
+ Assistant = "assistant",
422
+ ExternalAi = "external-ai",
423
+ Markdown = "markdown",
424
+ Mcp = "mcp",
425
+ Git = "git",
426
+ Pdf = "pdf"
427
+ }
419
428
  export declare enum CustomizationAIMode {
420
429
  None = "none",
421
430
  Search = "search",
@@ -804,6 +813,7 @@ export declare enum IntegrationScope {
804
813
  SiteScriptInject = "site:script:inject",
805
814
  SiteScriptCookies = "site:script:cookies",
806
815
  SiteVisitorAuth = "site:visitor:auth",
816
+ SiteVisitorClaims = "site:visitor:claims",
807
817
  SiteAdaptiveRead = "site:adaptive:read",
808
818
  SiteAdaptiveWrite = "site:adaptive:write",
809
819
  ConversationsIngest = "conversations:ingest",
@@ -1235,6 +1245,8 @@ export type MergeRule = {
1235
1245
  rule: "custom";
1236
1246
  /** Expression to evaluate */
1237
1247
  expression: Expression;
1248
+ /** Optional message to display when the expression evaluates to false. */
1249
+ message?: string;
1238
1250
  };
1239
1251
  /** The merge rules are composed of individual rules that must all pass. */
1240
1252
  export interface MergeRulesConfigurationRules {
@@ -2548,6 +2560,8 @@ export type ComputedContentSourceRevisionOpenAPI = ComputedContentSourceOpenAPIB
2548
2560
  models: boolean;
2549
2561
  /** Whether to show a link to download the OpenAPI spec. */
2550
2562
  downloadLink?: boolean;
2563
+ /** How GitBook will group generated pages. "by-tag" groups operations under their tag; "by-operation" creates a separate page per operation. Defaults to "by-tag" when absent. */
2564
+ grouping?: "by-tag" | "by-operation";
2551
2565
  };
2552
2566
  };
2553
2567
  export interface TranslationRef {
@@ -2683,6 +2697,16 @@ export type ComputedContentSourceDocumentOpenAPI = ComputedContentSourceOpenAPIB
2683
2697
  doc: "operations" | "info";
2684
2698
  /** @minLength 1 */
2685
2699
  page: string;
2700
+ } | {
2701
+ doc: "operation";
2702
+ /** @minLength 1 */
2703
+ page: string;
2704
+ method: "get" | "post" | "put" | "delete" | "patch" | "options" | "head" | "trace" | "hook";
2705
+ deprecated?: boolean;
2706
+ } | {
2707
+ doc: "tag";
2708
+ /** @minLength 1 */
2709
+ page: string;
2686
2710
  };
2687
2711
  };
2688
2712
  /** Parameters for a document translation computed content source */
@@ -3914,6 +3938,11 @@ export interface Integration {
3914
3938
  * @format uri
3915
3939
  */
3916
3940
  publicEndpoint: string;
3941
+ /**
3942
+ * Public endpoint serving the integration's rendered content (e.g. WebFrames), isolated from the cookie-bearing publicEndpoint origin. Equals publicEndpoint when no separate content origin is configured.
3943
+ * @format uri
3944
+ */
3945
+ publicContentEndpoint: string;
3917
3946
  };
3918
3947
  /** The set of permissions for the integration */
3919
3948
  permissions: {
@@ -4023,6 +4052,11 @@ export interface IntegrationInstallation {
4023
4052
  * @format uri
4024
4053
  */
4025
4054
  publicEndpoint: string;
4055
+ /**
4056
+ * Public endpoint serving the integration's rendered content (e.g. WebFrames), isolated from the cookie-bearing publicEndpoint origin. Equals publicEndpoint when no separate content origin is configured.
4057
+ * @format uri
4058
+ */
4059
+ publicContentEndpoint: string;
4026
4060
  };
4027
4061
  /** External IDs assigned by the integration. */
4028
4062
  externalIds: IntegrationInstallationExternalIds;
@@ -4150,6 +4184,8 @@ export type SpaceContentUpdatedEvent = SpaceEvent & {
4150
4184
  type: "space_content_updated";
4151
4185
  /** Unique identifier of the new content revision */
4152
4186
  revisionId: string;
4187
+ /** Users who updated the content */
4188
+ updatedBy: User[];
4153
4189
  };
4154
4190
  /** Event when a GitSync operation has been completed. */
4155
4191
  export type SpaceGitSyncCompletedEvent = SpaceEvent & {
@@ -4385,6 +4421,11 @@ export interface IntegrationContentInstallationBase {
4385
4421
  * @format uri
4386
4422
  */
4387
4423
  publicEndpoint: string;
4424
+ /**
4425
+ * Public endpoint serving the integration's rendered content (e.g. WebFrames), isolated from the cookie-bearing publicEndpoint origin. Equals publicEndpoint when no separate content origin is configured.
4426
+ * @format uri
4427
+ */
4428
+ publicContentEndpoint: string;
4388
4429
  };
4389
4430
  }
4390
4431
  export type IntegrationSpaceInstallation = IntegrationContentInstallationBase & {
@@ -4501,6 +4542,13 @@ export interface Site {
4501
4542
  createdAt: string;
4502
4543
  adaptiveContent?: SiteAdaptiveContent;
4503
4544
  ads?: SiteAds;
4545
+ /**
4546
+ * Reference to a GitBook space holding the team's writing styleguide.
4547
+ * When present on a site, the editing agent receives the styleguide
4548
+ * table of contents in its system prompt and can fetch sections on
4549
+ * demand to check edits against the rules.
4550
+ */
4551
+ styleguide?: ContentRefSpace;
4504
4552
  /** 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. */
4505
4553
  features: SiteFeature[];
4506
4554
  /** URLs associated with the object */
@@ -4848,6 +4896,8 @@ export interface ContentKitRenderOutputElement {
4848
4896
  element: ContentKitRootElement;
4849
4897
  state: object;
4850
4898
  props: PlainObject;
4899
+ /** Whether the rendered integration UI can receive visitor claims. */
4900
+ canAccessVisitorClaims?: boolean;
4851
4901
  }
4852
4902
  /** Output of completed lifecycle of the component. */
4853
4903
  export interface ContentKitRenderOutputComplete {
@@ -6049,7 +6099,10 @@ export interface SiteCustomizationSettingsBase {
6049
6099
  toggeable: boolean;
6050
6100
  };
6051
6101
  pdf: {
6052
- /** If true, PDF export is enabled for the published site. */
6102
+ /**
6103
+ * Deprecated: use `pageActions.items` instead. If true, PDF export is enabled for the published site. Kept in sync with the presence of `pdf` in `pageActions.items`.
6104
+ * @deprecated
6105
+ */
6053
6106
  enabled: boolean;
6054
6107
  };
6055
6108
  feedback: {
@@ -6066,16 +6119,39 @@ export interface SiteCustomizationSettingsBase {
6066
6119
  enabled: boolean;
6067
6120
  };
6068
6121
  git: {
6069
- /** Whether the published site should show a link to edit the content on the git provider set up in the Git Sync */
6122
+ /**
6123
+ * Deprecated: use `pageActions.items` instead. Whether the published site should show a link to edit the content on the git provider set up in the Git Sync. Kept in sync with the presence of `git` in `pageActions.items`.
6124
+ * @deprecated
6125
+ */
6070
6126
  showEditLink: boolean;
6071
6127
  };
6072
6128
  pageActions: {
6073
- /** Whether actions to open ChatGPT, Anthropic, etc. should be available in the page menu. */
6129
+ /**
6130
+ * Deprecated: use `items` instead. Whether actions to open ChatGPT, Anthropic, etc. should be available in the page menu. Kept in sync with the presence of `external-ai` in `items`.
6131
+ * @deprecated
6132
+ */
6074
6133
  externalAI: boolean;
6075
- /** Whether the copy and open the markdown version of the page should be available in the page menu. */
6134
+ /**
6135
+ * Deprecated: use `items` instead. Whether the copy and open the markdown version of the page should be available in the page menu. Kept in sync with the presence of `markdown` in `items`.
6136
+ * @deprecated
6137
+ */
6076
6138
  markdown: boolean;
6077
- /** Whether an action to connect to the docs using the MCP server should be available in the page menu. */
6139
+ /**
6140
+ * Deprecated: use `items` instead. Whether an action to connect to the docs using the MCP server should be available in the page menu. Kept in sync with the presence of `mcp` in `items`.
6141
+ * @deprecated
6142
+ */
6078
6143
  mcp: boolean;
6144
+ /**
6145
+ * Ordered list of the page actions enabled in the page menu. This is the source of truth for
6146
+ * which actions are enabled and in which order: the position defines the display order, the
6147
+ * first action is the default one, surfaced as the main button on the page, and actions not
6148
+ * present in the list are disabled. When omitted on input, the deprecated `externalAI`,
6149
+ * `markdown`, `mcp`, `pdf` and `git` flags are used to derive the list. The `assistant` action
6150
+ * is governed by the `ai.mode` setting rather than this list: it is always present (prepended
6151
+ * by default if missing, otherwise keeping its position) when the assistant is enabled, and
6152
+ * always absent when it is disabled.
6153
+ */
6154
+ items?: CustomizationPageActionType[];
6079
6155
  };
6080
6156
  externalLinks: {
6081
6157
  /**
@@ -6890,6 +6966,36 @@ export interface AIToolCallGetReusableContent {
6890
6966
  revisionId: string;
6891
6967
  reusableContent: ChangedRevisionReusableContent;
6892
6968
  }
6969
+ export interface AIToolCallGetVariables {
6970
+ tool: "getVariables";
6971
+ /** The ID of the space being accessed. */
6972
+ spaceId: string;
6973
+ /** The revision ID of the space. */
6974
+ revisionId: string;
6975
+ }
6976
+ export interface AIToolCallUpdateVariables {
6977
+ tool: "updateVariables";
6978
+ /** The ID of the space being edited. */
6979
+ spaceId: string;
6980
+ /** The base revision ID used to compare the change in the current conversation. */
6981
+ baseRevisionId: string;
6982
+ /** The page whose variables are being updated. Omitted when updating space variables. */
6983
+ page?: ChangedRevisionPage;
6984
+ }
6985
+ export interface AIToolCallGetTags {
6986
+ tool: "getTags";
6987
+ /** The ID of the space being accessed. */
6988
+ spaceId: string;
6989
+ /** The revision ID of the space. */
6990
+ revisionId: string;
6991
+ }
6992
+ export interface AIToolCallUpdateTags {
6993
+ tool: "updateTags";
6994
+ /** The ID of the space being edited. */
6995
+ spaceId: string;
6996
+ /** The base revision ID used to compare the change in the current conversation. */
6997
+ baseRevisionId: string;
6998
+ }
6893
6999
  export interface AIToolCallCreateChangeRequest {
6894
7000
  tool: "createChangeRequest";
6895
7001
  /** The ID of the space the change request belongs to. */
@@ -6960,7 +7066,7 @@ export interface AIToolCallOther {
6960
7066
  /** Summary of a generic tool call. */
6961
7067
  summary: AIToolCallOtherSummary;
6962
7068
  }
6963
- export type AIToolCall = AIToolCallGetPageContent | AIToolCallGetRecordContent | AIToolCallGetPages | AIToolCallGetReusableContents | AIToolCallSearch | AIToolCallEditPage | AIToolCallCreatePage | AIToolCallDeletePage | AIToolCallRenamePage | AIToolCallMovePage | AIToolCallListModifiedPages | AIToolCallGetPageDiff | AIToolCallCreateReusableContent | AIToolCallEditReusableContent | AIToolCallGetReusableContent | AIToolCallCreateChangeRequest | AIToolCallComment | AIToolCallReplyToComment | AIToolCallSubmitChangeRequestReview | AIToolCallMCP | AIToolCallOther;
7069
+ export type AIToolCall = AIToolCallGetPageContent | AIToolCallGetRecordContent | AIToolCallGetPages | AIToolCallGetReusableContents | AIToolCallSearch | AIToolCallEditPage | AIToolCallCreatePage | AIToolCallDeletePage | AIToolCallRenamePage | AIToolCallMovePage | AIToolCallListModifiedPages | AIToolCallGetPageDiff | AIToolCallCreateReusableContent | AIToolCallEditReusableContent | AIToolCallGetReusableContent | AIToolCallGetVariables | AIToolCallUpdateVariables | AIToolCallGetTags | AIToolCallUpdateTags | AIToolCallCreateChangeRequest | AIToolCallComment | AIToolCallReplyToComment | AIToolCallSubmitChangeRequestReview | AIToolCallMCP | AIToolCallOther;
6964
7070
  export interface Timerange {
6965
7071
  start: Timestamp;
6966
7072
  end: Timestamp;
@@ -7765,7 +7871,7 @@ export interface SiteAdsStats {
7765
7871
  /**
7766
7872
  * The source path to redirect from.
7767
7873
  * @maxLength 512
7768
- * @pattern ^\/(?!\*)(?!.*\*.+)(?:[A-Za-z0-9\-._~]|%[0-9A-Fa-f]{2})+(?:\/(?:[A-Za-z0-9\-._~]|%[0-9A-Fa-f]{2})+)*(?:\/\*|\*)?$
7874
+ * @pattern ^\/(?!\*)(?!.*\*.+)(?:[A-Za-z0-9\-._~+]|%[0-9A-Fa-f]{2})+(?:\/(?:[A-Za-z0-9\-._~+]|%[0-9A-Fa-f]{2})+)*(?:\/\*|\*)?$
7769
7875
  */
7770
7876
  export type SiteRedirectSourcePath = string;
7771
7877
  export interface SiteRedirectDestinationSiteSection {
@@ -11705,7 +11811,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11705
11811
  */
11706
11812
  queueIntegrationTask: (integrationName: string, data: {
11707
11813
  /** Payload for the integration task */
11708
- task: object;
11814
+ task: Record<string, string>;
11709
11815
  /**
11710
11816
  * Number of seconds to wait before executing the task, defaults to 0
11711
11817
  * @min 0
@@ -13907,7 +14013,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13907
14013
  /** Localized string value with a 128 character limit, keyed by locale. Contains overrides for non-default languages only. */
13908
14014
  localizedTitle?: LocalizedString128;
13909
14015
  icon?: Icon | null;
13910
- /** Whether the site section group is draft and not live. */
14016
+ /** 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. */
13911
14017
  draft?: boolean;
13912
14018
  }, params?: RequestParams) => Promise<HttpResponse<SiteSectionGroup, any>>;
13913
14019
  /**
@@ -13983,7 +14089,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13983
14089
  /** 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. */
13984
14090
  condition?: Expression | null;
13985
14091
  icon?: Icon | null;
13986
- /** Whether the site section is draft and not live. */
14092
+ /** 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. */
13987
14093
  draft?: boolean;
13988
14094
  description?: SiteSectionDescription | null;
13989
14095
  /** Localized string value with a 256 character limit, keyed by locale. Contains overrides for non-default languages only. */
@@ -14683,7 +14789,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
14683
14789
  spaceId?: string;
14684
14790
  /** 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. */
14685
14791
  hidden?: boolean;
14686
- /** Whether the site space should be kept in draft mode. Setting it to false makes the site space live. */
14792
+ /** 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. */
14687
14793
  draft?: boolean;
14688
14794
  }, params?: RequestParams) => Promise<HttpResponse<SiteSpace, any>>;
14689
14795
  /**
@@ -15166,6 +15272,38 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15166
15272
  message: string;
15167
15273
  };
15168
15274
  }>>;
15275
+ /**
15276
+ * @description Ensures the site has a site-owned styleguide backing space and returns a reference to it.
15277
+ *
15278
+ * @tags sites
15279
+ * @name CreateSiteStyleguideById
15280
+ * @summary Create or return a site's styleguide
15281
+ * @request POST:/orgs/{organizationId}/sites/{siteId}/styleguide
15282
+ * @secure
15283
+ */
15284
+ createSiteStyleguideById: (organizationId: EntityId, siteId: string, params?: RequestParams) => Promise<HttpResponse<ContentRefSpace, {
15285
+ error: {
15286
+ /** @format int32 */
15287
+ code: 404;
15288
+ message: string;
15289
+ };
15290
+ }>>;
15291
+ /**
15292
+ * @description Clears the site's styleguide reference and soft-deletes the space.
15293
+ *
15294
+ * @tags sites
15295
+ * @name DeleteSiteStyleguideById
15296
+ * @summary Delete a site's styleguide
15297
+ * @request DELETE:/orgs/{organizationId}/sites/{siteId}/styleguide
15298
+ * @secure
15299
+ */
15300
+ deleteSiteStyleguideById: (organizationId: EntityId, siteId: string, params?: RequestParams) => Promise<HttpResponse<void, {
15301
+ error: {
15302
+ /** @format int32 */
15303
+ code: 404;
15304
+ message: string;
15305
+ };
15306
+ }>>;
15169
15307
  /**
15170
15308
  * No description
15171
15309
  *
@@ -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;
@@ -132,6 +132,7 @@ export declare const CUSTOMIZATION_DEFAULT_THEME_MODE_ENUM: ["light", "dark", "s
132
132
  export declare const CUSTOMIZATION_AIMODE_ENUM: ["none", "search", "assistant"];
133
133
  export declare const CUSTOMIZATION_SUGGESTED_QUESTION_MAX_LENGTH = 64;
134
134
  export declare const CUSTOMIZATION_SUGGESTED_QUESTION_MIN_LENGTH = 3;
135
+ export declare const CUSTOMIZATION_PAGE_ACTION_TYPE_ENUM: ["assistant", "external-ai", "markdown", "mcp", "git", "pdf"];
135
136
  export declare const SITE_EXTERNAL_LINKS_TARGET_ENUM: ["self", "blank"];
136
137
  export declare const SITE_SOCIAL_ACCOUNT_PLATFORM_ENUM: ["twitter", "instagram", "facebook", "linkedin", "github", "discord", "slack", "youtube", "tiktok", "reddit", "bluesky", "mastodon", "threads", "medium"];
137
138
  export declare const SITE_SOCIAL_ACCOUNT_HANDLE_MAX_LENGTH = 128;
@@ -178,7 +179,7 @@ export declare const SITE_INSIGHTS_VISITOR_OS_ENUM: ["windows", "macos", "linux"
178
179
  export declare const SITE_INSIGHTS_QUERY_OPERATOR_ENUM: ["in", "notIn", "greaterThan", "greaterThanOrEqual", "lessThan", "lessThanOrEqual"];
179
180
  export declare const SITE_INSIGHTS_QUERY_RANGE_PRESET_ENUM: ["lastYear", "last3Months", "last30Days", "last7Days", "last24Hours"];
180
181
  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})+)*(?:\\/\\*|\\*)?$";
182
+ 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
183
  export declare const SITE_MCP_SERVER_NAME_MAX_LENGTH = 100;
183
184
  export declare const SITE_MCP_SERVER_NAME_MIN_LENGTH = 1;
184
185
  export declare const SITE_MCP_SERVER_TRANSPORT_ENUM: ["sse", "http"];
package/dist/index.cjs CHANGED
@@ -254,6 +254,7 @@ __export(src_exports, {
254
254
  CUSTOMIZATION_ICONS_STYLE_ENUM: () => CUSTOMIZATION_ICONS_STYLE_ENUM,
255
255
  CUSTOMIZATION_LINKS_STYLE_ENUM: () => CUSTOMIZATION_LINKS_STYLE_ENUM,
256
256
  CUSTOMIZATION_LOCALE_ENUM: () => CUSTOMIZATION_LOCALE_ENUM,
257
+ CUSTOMIZATION_PAGE_ACTION_TYPE_ENUM: () => CUSTOMIZATION_PAGE_ACTION_TYPE_ENUM,
257
258
  CUSTOMIZATION_SEARCH_STYLE_ENUM: () => CUSTOMIZATION_SEARCH_STYLE_ENUM,
258
259
  CUSTOMIZATION_SIDEBAR_BACKGROUND_STYLE_ENUM: () => CUSTOMIZATION_SIDEBAR_BACKGROUND_STYLE_ENUM,
259
260
  CUSTOMIZATION_SIDEBAR_LIST_STYLE_ENUM: () => CUSTOMIZATION_SIDEBAR_LIST_STYLE_ENUM,
@@ -294,6 +295,7 @@ __export(src_exports, {
294
295
  CustomizationIconsStyle: () => CustomizationIconsStyle,
295
296
  CustomizationLinksStyle: () => CustomizationLinksStyle,
296
297
  CustomizationLocale: () => CustomizationLocale,
298
+ CustomizationPageActionType: () => CustomizationPageActionType,
297
299
  CustomizationSearchStyle: () => CustomizationSearchStyle,
298
300
  CustomizationSidebarBackgroundStyle: () => CustomizationSidebarBackgroundStyle,
299
301
  CustomizationSidebarListStyle: () => CustomizationSidebarListStyle,
@@ -521,7 +523,7 @@ module.exports = __toCommonJS(src_exports);
521
523
 
522
524
  // package.json
523
525
  var name = "@gitbook/api";
524
- var version = "0.182.0";
526
+ var version = "0.183.1";
525
527
 
526
528
  // src/client.ts
527
529
  var import_event_iterator = __toESM(require_node(), 1);
@@ -1045,6 +1047,15 @@ var SiteExternalLinksTarget = /* @__PURE__ */ ((SiteExternalLinksTarget2) => {
1045
1047
  SiteExternalLinksTarget2["Blank"] = "blank";
1046
1048
  return SiteExternalLinksTarget2;
1047
1049
  })(SiteExternalLinksTarget || {});
1050
+ var CustomizationPageActionType = /* @__PURE__ */ ((CustomizationPageActionType2) => {
1051
+ CustomizationPageActionType2["Assistant"] = "assistant";
1052
+ CustomizationPageActionType2["ExternalAi"] = "external-ai";
1053
+ CustomizationPageActionType2["Markdown"] = "markdown";
1054
+ CustomizationPageActionType2["Mcp"] = "mcp";
1055
+ CustomizationPageActionType2["Git"] = "git";
1056
+ CustomizationPageActionType2["Pdf"] = "pdf";
1057
+ return CustomizationPageActionType2;
1058
+ })(CustomizationPageActionType || {});
1048
1059
  var CustomizationAIMode = /* @__PURE__ */ ((CustomizationAIMode2) => {
1049
1060
  CustomizationAIMode2["None"] = "none";
1050
1061
  CustomizationAIMode2["Search"] = "search";
@@ -1399,6 +1410,7 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
1399
1410
  IntegrationScope2["SiteScriptInject"] = "site:script:inject";
1400
1411
  IntegrationScope2["SiteScriptCookies"] = "site:script:cookies";
1401
1412
  IntegrationScope2["SiteVisitorAuth"] = "site:visitor:auth";
1413
+ IntegrationScope2["SiteVisitorClaims"] = "site:visitor:claims";
1402
1414
  IntegrationScope2["SiteAdaptiveRead"] = "site:adaptive:read";
1403
1415
  IntegrationScope2["SiteAdaptiveWrite"] = "site:adaptive:write";
1404
1416
  IntegrationScope2["ConversationsIngest"] = "conversations:ingest";
@@ -4321,6 +4333,19 @@ var Api = class extends HttpClient {
4321
4333
  format: "json",
4322
4334
  ...params
4323
4335
  }),
4336
+ createSiteStyleguideById: (organizationId, siteId, params = {}) => this.request({
4337
+ path: `/orgs/${organizationId}/sites/${siteId}/styleguide`,
4338
+ method: "POST",
4339
+ secure: true,
4340
+ format: "json",
4341
+ ...params
4342
+ }),
4343
+ deleteSiteStyleguideById: (organizationId, siteId, params = {}) => this.request({
4344
+ path: `/orgs/${organizationId}/sites/${siteId}/styleguide`,
4345
+ method: "DELETE",
4346
+ secure: true,
4347
+ ...params
4348
+ }),
4324
4349
  trackEventsInSiteById: (organizationId, siteId, data, params = {}) => this.request({
4325
4350
  path: `/orgs/${organizationId}/sites/${siteId}/insights/events`,
4326
4351
  method: "POST",
@@ -4733,7 +4758,7 @@ var INTEGRATION_DESCRIPTION_MAX_LENGTH = 100;
4733
4758
  var INTEGRATION_SUMMARY_MAX_LENGTH = 2048;
4734
4759
  var INTEGRATION_TARGET_ENUM = ["all", "site", "space", "organization"];
4735
4760
  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"];
4761
+ 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
4762
  var INTEGRATION_CATEGORY_ENUM = ["analytics", "collaboration", "content", "gitsync", "marketing", "visitor-auth", "other"];
4738
4763
  var INTEGRATION_PROPERTY_TITLE_MAX_LENGTH = 50;
4739
4764
  var INTEGRATION_PROPERTY_TITLE_MIN_LENGTH = 2;
@@ -4804,6 +4829,7 @@ var CUSTOMIZATION_DEFAULT_THEME_MODE_ENUM = ["light", "dark", "system"];
4804
4829
  var CUSTOMIZATION_AIMODE_ENUM = ["none", "search", "assistant"];
4805
4830
  var CUSTOMIZATION_SUGGESTED_QUESTION_MAX_LENGTH = 64;
4806
4831
  var CUSTOMIZATION_SUGGESTED_QUESTION_MIN_LENGTH = 3;
4832
+ var CUSTOMIZATION_PAGE_ACTION_TYPE_ENUM = ["assistant", "external-ai", "markdown", "mcp", "git", "pdf"];
4807
4833
  var SITE_EXTERNAL_LINKS_TARGET_ENUM = ["self", "blank"];
4808
4834
  var SITE_SOCIAL_ACCOUNT_PLATFORM_ENUM = ["twitter", "instagram", "facebook", "linkedin", "github", "discord", "slack", "youtube", "tiktok", "reddit", "bluesky", "mastodon", "threads", "medium"];
4809
4835
  var SITE_SOCIAL_ACCOUNT_HANDLE_MAX_LENGTH = 128;
@@ -4850,7 +4876,7 @@ var SITE_INSIGHTS_VISITOR_OS_ENUM = ["windows", "macos", "linux", "android", "io
4850
4876
  var SITE_INSIGHTS_QUERY_OPERATOR_ENUM = ["in", "notIn", "greaterThan", "greaterThanOrEqual", "lessThan", "lessThanOrEqual"];
4851
4877
  var SITE_INSIGHTS_QUERY_RANGE_PRESET_ENUM = ["lastYear", "last3Months", "last30Days", "last7Days", "last24Hours"];
4852
4878
  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})+)*(?:\\/\\*|\\*)?$";
4879
+ 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
4880
  var SITE_MCP_SERVER_NAME_MAX_LENGTH = 100;
4855
4881
  var SITE_MCP_SERVER_NAME_MIN_LENGTH = 1;
4856
4882
  var SITE_MCP_SERVER_TRANSPORT_ENUM = ["sse", "http"];
@@ -5024,6 +5050,7 @@ var GitBookAPI = class extends Api {
5024
5050
  CUSTOMIZATION_ICONS_STYLE_ENUM,
5025
5051
  CUSTOMIZATION_LINKS_STYLE_ENUM,
5026
5052
  CUSTOMIZATION_LOCALE_ENUM,
5053
+ CUSTOMIZATION_PAGE_ACTION_TYPE_ENUM,
5027
5054
  CUSTOMIZATION_SEARCH_STYLE_ENUM,
5028
5055
  CUSTOMIZATION_SIDEBAR_BACKGROUND_STYLE_ENUM,
5029
5056
  CUSTOMIZATION_SIDEBAR_LIST_STYLE_ENUM,
@@ -5064,6 +5091,7 @@ var GitBookAPI = class extends Api {
5064
5091
  CustomizationIconsStyle,
5065
5092
  CustomizationLinksStyle,
5066
5093
  CustomizationLocale,
5094
+ CustomizationPageActionType,
5067
5095
  CustomizationSearchStyle,
5068
5096
  CustomizationSidebarBackgroundStyle,
5069
5097
  CustomizationSidebarListStyle,
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.182.0";
175
+ var version = "0.183.1";
176
176
 
177
177
  // src/client.ts
178
178
  var import_event_iterator = __toESM(require_node(), 1);
@@ -696,6 +696,15 @@ var SiteExternalLinksTarget = /* @__PURE__ */ ((SiteExternalLinksTarget2) => {
696
696
  SiteExternalLinksTarget2["Blank"] = "blank";
697
697
  return SiteExternalLinksTarget2;
698
698
  })(SiteExternalLinksTarget || {});
699
+ var CustomizationPageActionType = /* @__PURE__ */ ((CustomizationPageActionType2) => {
700
+ CustomizationPageActionType2["Assistant"] = "assistant";
701
+ CustomizationPageActionType2["ExternalAi"] = "external-ai";
702
+ CustomizationPageActionType2["Markdown"] = "markdown";
703
+ CustomizationPageActionType2["Mcp"] = "mcp";
704
+ CustomizationPageActionType2["Git"] = "git";
705
+ CustomizationPageActionType2["Pdf"] = "pdf";
706
+ return CustomizationPageActionType2;
707
+ })(CustomizationPageActionType || {});
699
708
  var CustomizationAIMode = /* @__PURE__ */ ((CustomizationAIMode2) => {
700
709
  CustomizationAIMode2["None"] = "none";
701
710
  CustomizationAIMode2["Search"] = "search";
@@ -1050,6 +1059,7 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
1050
1059
  IntegrationScope2["SiteScriptInject"] = "site:script:inject";
1051
1060
  IntegrationScope2["SiteScriptCookies"] = "site:script:cookies";
1052
1061
  IntegrationScope2["SiteVisitorAuth"] = "site:visitor:auth";
1062
+ IntegrationScope2["SiteVisitorClaims"] = "site:visitor:claims";
1053
1063
  IntegrationScope2["SiteAdaptiveRead"] = "site:adaptive:read";
1054
1064
  IntegrationScope2["SiteAdaptiveWrite"] = "site:adaptive:write";
1055
1065
  IntegrationScope2["ConversationsIngest"] = "conversations:ingest";
@@ -3972,6 +3982,19 @@ var Api = class extends HttpClient {
3972
3982
  format: "json",
3973
3983
  ...params
3974
3984
  }),
3985
+ createSiteStyleguideById: (organizationId, siteId, params = {}) => this.request({
3986
+ path: `/orgs/${organizationId}/sites/${siteId}/styleguide`,
3987
+ method: "POST",
3988
+ secure: true,
3989
+ format: "json",
3990
+ ...params
3991
+ }),
3992
+ deleteSiteStyleguideById: (organizationId, siteId, params = {}) => this.request({
3993
+ path: `/orgs/${organizationId}/sites/${siteId}/styleguide`,
3994
+ method: "DELETE",
3995
+ secure: true,
3996
+ ...params
3997
+ }),
3975
3998
  trackEventsInSiteById: (organizationId, siteId, data, params = {}) => this.request({
3976
3999
  path: `/orgs/${organizationId}/sites/${siteId}/insights/events`,
3977
4000
  method: "POST",
@@ -4384,7 +4407,7 @@ var INTEGRATION_DESCRIPTION_MAX_LENGTH = 100;
4384
4407
  var INTEGRATION_SUMMARY_MAX_LENGTH = 2048;
4385
4408
  var INTEGRATION_TARGET_ENUM = ["all", "site", "space", "organization"];
4386
4409
  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"];
4410
+ 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
4411
  var INTEGRATION_CATEGORY_ENUM = ["analytics", "collaboration", "content", "gitsync", "marketing", "visitor-auth", "other"];
4389
4412
  var INTEGRATION_PROPERTY_TITLE_MAX_LENGTH = 50;
4390
4413
  var INTEGRATION_PROPERTY_TITLE_MIN_LENGTH = 2;
@@ -4455,6 +4478,7 @@ var CUSTOMIZATION_DEFAULT_THEME_MODE_ENUM = ["light", "dark", "system"];
4455
4478
  var CUSTOMIZATION_AIMODE_ENUM = ["none", "search", "assistant"];
4456
4479
  var CUSTOMIZATION_SUGGESTED_QUESTION_MAX_LENGTH = 64;
4457
4480
  var CUSTOMIZATION_SUGGESTED_QUESTION_MIN_LENGTH = 3;
4481
+ var CUSTOMIZATION_PAGE_ACTION_TYPE_ENUM = ["assistant", "external-ai", "markdown", "mcp", "git", "pdf"];
4458
4482
  var SITE_EXTERNAL_LINKS_TARGET_ENUM = ["self", "blank"];
4459
4483
  var SITE_SOCIAL_ACCOUNT_PLATFORM_ENUM = ["twitter", "instagram", "facebook", "linkedin", "github", "discord", "slack", "youtube", "tiktok", "reddit", "bluesky", "mastodon", "threads", "medium"];
4460
4484
  var SITE_SOCIAL_ACCOUNT_HANDLE_MAX_LENGTH = 128;
@@ -4501,7 +4525,7 @@ var SITE_INSIGHTS_VISITOR_OS_ENUM = ["windows", "macos", "linux", "android", "io
4501
4525
  var SITE_INSIGHTS_QUERY_OPERATOR_ENUM = ["in", "notIn", "greaterThan", "greaterThanOrEqual", "lessThan", "lessThanOrEqual"];
4502
4526
  var SITE_INSIGHTS_QUERY_RANGE_PRESET_ENUM = ["lastYear", "last3Months", "last30Days", "last7Days", "last24Hours"];
4503
4527
  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})+)*(?:\\/\\*|\\*)?$";
4528
+ 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
4529
  var SITE_MCP_SERVER_NAME_MAX_LENGTH = 100;
4506
4530
  var SITE_MCP_SERVER_NAME_MIN_LENGTH = 1;
4507
4531
  var SITE_MCP_SERVER_TRANSPORT_ENUM = ["sse", "http"];
@@ -4674,6 +4698,7 @@ export {
4674
4698
  CUSTOMIZATION_ICONS_STYLE_ENUM,
4675
4699
  CUSTOMIZATION_LINKS_STYLE_ENUM,
4676
4700
  CUSTOMIZATION_LOCALE_ENUM,
4701
+ CUSTOMIZATION_PAGE_ACTION_TYPE_ENUM,
4677
4702
  CUSTOMIZATION_SEARCH_STYLE_ENUM,
4678
4703
  CUSTOMIZATION_SIDEBAR_BACKGROUND_STYLE_ENUM,
4679
4704
  CUSTOMIZATION_SIDEBAR_LIST_STYLE_ENUM,
@@ -4714,6 +4739,7 @@ export {
4714
4739
  CustomizationIconsStyle,
4715
4740
  CustomizationLinksStyle,
4716
4741
  CustomizationLocale,
4742
+ CustomizationPageActionType,
4717
4743
  CustomizationSearchStyle,
4718
4744
  CustomizationSidebarBackgroundStyle,
4719
4745
  CustomizationSidebarListStyle,
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.182.0",
7
+ "version": "0.183.1",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "README.md",