@gitbook/api 0.182.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 {
@@ -4150,6 +4153,8 @@ export type SpaceContentUpdatedEvent = SpaceEvent & {
4150
4153
  type: "space_content_updated";
4151
4154
  /** Unique identifier of the new content revision */
4152
4155
  revisionId: string;
4156
+ /** Users who updated the content */
4157
+ updatedBy: User[];
4153
4158
  };
4154
4159
  /** Event when a GitSync operation has been completed. */
4155
4160
  export type SpaceGitSyncCompletedEvent = SpaceEvent & {
@@ -4501,6 +4506,13 @@ export interface Site {
4501
4506
  createdAt: string;
4502
4507
  adaptiveContent?: SiteAdaptiveContent;
4503
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;
4504
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. */
4505
4517
  features: SiteFeature[];
4506
4518
  /** URLs associated with the object */
@@ -4848,6 +4860,8 @@ export interface ContentKitRenderOutputElement {
4848
4860
  element: ContentKitRootElement;
4849
4861
  state: object;
4850
4862
  props: PlainObject;
4863
+ /** Whether the rendered integration UI can receive visitor claims. */
4864
+ canAccessVisitorClaims?: boolean;
4851
4865
  }
4852
4866
  /** Output of completed lifecycle of the component. */
4853
4867
  export interface ContentKitRenderOutputComplete {
@@ -6890,6 +6904,22 @@ export interface AIToolCallGetReusableContent {
6890
6904
  revisionId: string;
6891
6905
  reusableContent: ChangedRevisionReusableContent;
6892
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
+ }
6893
6923
  export interface AIToolCallCreateChangeRequest {
6894
6924
  tool: "createChangeRequest";
6895
6925
  /** The ID of the space the change request belongs to. */
@@ -6960,7 +6990,7 @@ export interface AIToolCallOther {
6960
6990
  /** Summary of a generic tool call. */
6961
6991
  summary: AIToolCallOtherSummary;
6962
6992
  }
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;
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;
6964
6994
  export interface Timerange {
6965
6995
  start: Timestamp;
6966
6996
  end: Timestamp;
@@ -7765,7 +7795,7 @@ export interface SiteAdsStats {
7765
7795
  /**
7766
7796
  * The source path to redirect from.
7767
7797
  * @maxLength 512
7768
- * @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})+)*(?:\/\*|\*)?$
7769
7799
  */
7770
7800
  export type SiteRedirectSourcePath = string;
7771
7801
  export interface SiteRedirectDestinationSiteSection {
@@ -13907,7 +13937,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13907
13937
  /** Localized string value with a 128 character limit, keyed by locale. Contains overrides for non-default languages only. */
13908
13938
  localizedTitle?: LocalizedString128;
13909
13939
  icon?: Icon | null;
13910
- /** 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. */
13911
13941
  draft?: boolean;
13912
13942
  }, params?: RequestParams) => Promise<HttpResponse<SiteSectionGroup, any>>;
13913
13943
  /**
@@ -13983,7 +14013,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13983
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. */
13984
14014
  condition?: Expression | null;
13985
14015
  icon?: Icon | null;
13986
- /** 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. */
13987
14017
  draft?: boolean;
13988
14018
  description?: SiteSectionDescription | null;
13989
14019
  /** Localized string value with a 256 character limit, keyed by locale. Contains overrides for non-default languages only. */
@@ -14683,7 +14713,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
14683
14713
  spaceId?: string;
14684
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. */
14685
14715
  hidden?: boolean;
14686
- /** 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. */
14687
14717
  draft?: boolean;
14688
14718
  }, params?: RequestParams) => Promise<HttpResponse<SiteSpace, any>>;
14689
14719
  /**
@@ -15166,6 +15196,38 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15166
15196
  message: string;
15167
15197
  };
15168
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
+ }>>;
15169
15231
  /**
15170
15232
  * No description
15171
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.182.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.182.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.182.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
  },
@@ -13190,7 +13187,7 @@
13190
13187
  },
13191
13188
  "draft": {
13192
13189
  "type": "boolean",
13193
- "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."
13194
13191
  }
13195
13192
  }
13196
13193
  }
@@ -13456,7 +13453,7 @@
13456
13453
  },
13457
13454
  "draft": {
13458
13455
  "type": "boolean",
13459
- "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."
13460
13457
  },
13461
13458
  "description": {
13462
13459
  "oneOf": [
@@ -15844,7 +15841,7 @@
15844
15841
  },
15845
15842
  "draft": {
15846
15843
  "type": "boolean",
15847
- "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."
15848
15845
  }
15849
15846
  }
15850
15847
  }
@@ -17270,6 +17267,73 @@
17270
17267
  }
17271
17268
  }
17272
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
+ },
17273
17337
  "/orgs/{organizationId}/sites/{siteId}/insights/events": {
17274
17338
  "post": {
17275
17339
  "operationId": "trackEventsInSiteById",
@@ -18559,7 +18623,10 @@
18559
18623
  ],
18560
18624
  "security": [
18561
18625
  {
18562
- "user-internal-or-staff": []
18626
+ "user-internal": []
18627
+ },
18628
+ {
18629
+ "user-staff": []
18563
18630
  }
18564
18631
  ],
18565
18632
  "parameters": [
@@ -19522,10 +19589,6 @@
19522
19589
  "type": "http",
19523
19590
  "scheme": "bearer"
19524
19591
  },
19525
- "user-internal-or-staff": {
19526
- "type": "http",
19527
- "scheme": "bearer"
19528
- },
19529
19592
  "integration": {
19530
19593
  "type": "http",
19531
19594
  "scheme": "bearer"
@@ -20545,6 +20608,10 @@
20545
20608
  },
20546
20609
  "expression": {
20547
20610
  "$ref": "#/components/schemas/Expression"
20611
+ },
20612
+ "message": {
20613
+ "type": "string",
20614
+ "description": "Optional message to display when the expression evaluates to false."
20548
20615
  }
20549
20616
  },
20550
20617
  "required": [
@@ -30187,6 +30254,7 @@
30187
30254
  "site:script:inject",
30188
30255
  "site:script:cookies",
30189
30256
  "site:visitor:auth",
30257
+ "site:visitor:claims",
30190
30258
  "site:adaptive:read",
30191
30259
  "site:adaptive:write",
30192
30260
  "conversations:ingest",
@@ -31359,11 +31427,19 @@
31359
31427
  "revisionId": {
31360
31428
  "type": "string",
31361
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
+ }
31362
31437
  }
31363
31438
  },
31364
31439
  "required": [
31365
31440
  "type",
31366
- "revisionId"
31441
+ "revisionId",
31442
+ "updatedBy"
31367
31443
  ]
31368
31444
  }
31369
31445
  ]
@@ -32625,6 +32701,10 @@
32625
32701
  "ads": {
32626
32702
  "$ref": "#/components/schemas/SiteAds"
32627
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
+ },
32628
32708
  "features": {
32629
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",
32630
32710
  "type": "array",
@@ -33991,6 +34071,10 @@
33991
34071
  },
33992
34072
  "props": {
33993
34073
  "$ref": "#/components/schemas/PlainObject"
34074
+ },
34075
+ "canAccessVisitorClaims": {
34076
+ "type": "boolean",
34077
+ "description": "Whether the rendered integration UI can receive visitor claims."
33994
34078
  }
33995
34079
  },
33996
34080
  "required": [
@@ -40398,6 +40482,58 @@
40398
40482
  "revisionId"
40399
40483
  ]
40400
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
+ },
40401
40537
  "AIToolCallCreateChangeRequest": {
40402
40538
  "type": "object",
40403
40539
  "properties": {
@@ -40660,6 +40796,12 @@
40660
40796
  {
40661
40797
  "$ref": "#/components/schemas/AIToolCallGetReusableContent"
40662
40798
  },
40799
+ {
40800
+ "$ref": "#/components/schemas/AIToolCallGetVariables"
40801
+ },
40802
+ {
40803
+ "$ref": "#/components/schemas/AIToolCallUpdateVariables"
40804
+ },
40663
40805
  {
40664
40806
  "$ref": "#/components/schemas/AIToolCallCreateChangeRequest"
40665
40807
  },
@@ -44672,7 +44814,7 @@
44672
44814
  "type": "string",
44673
44815
  "description": "The source path to redirect from.",
44674
44816
  "maxLength": 512,
44675
- "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})+)*(?:\\/\\*|\\*)?$"
44676
44818
  },
44677
44819
  "SiteRedirectDestinationSiteSection": {
44678
44820
  "type": "object",