@gitbook/api 0.189.0 → 0.191.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
@@ -54,16 +54,6 @@ export declare enum GitSyncOperationDirection {
54
54
  Export = "export",
55
55
  Import = "import"
56
56
  }
57
- /**
58
- * * `running`: The operation is still running
59
- * * `failure`: The operation failed
60
- * * `success`: The operation was successful
61
- */
62
- export declare enum GitSyncOperationState {
63
- Running = "running",
64
- Failure = "failure",
65
- Success = "success"
66
- }
67
57
  /** The type of semantic change. */
68
58
  export declare enum RevisionSemanticChangeType {
69
59
  PageCreated = "page_created",
@@ -342,6 +332,10 @@ export declare enum SiteQuestionType {
342
332
  Reference = "reference",
343
333
  Unknown = "unknown"
344
334
  }
335
+ /** Findings source filter matching evidence coming from site questions. */
336
+ export declare enum SiteTriageFilterQuestions {
337
+ Questions = "questions"
338
+ }
345
339
  /** Estimated end-user severity of a site finding. */
346
340
  export declare enum SiteFindingSeverity {
347
341
  Low = "low",
@@ -854,7 +848,6 @@ export declare enum IntegrationCategory {
854
848
  Analytics = "analytics",
855
849
  Collaboration = "collaboration",
856
850
  Content = "content",
857
- Gitsync = "gitsync",
858
851
  Marketing = "marketing",
859
852
  VisitorAuth = "visitor-auth",
860
853
  Other = "other"
@@ -1002,6 +995,18 @@ export declare enum MemberRole {
1002
995
  Comment = "comment",
1003
996
  Read = "read"
1004
997
  }
998
+ /**
999
+ * * `running`: The operation is still running
1000
+ * * `failure`: The operation failed
1001
+ * * `success`: The operation was successful
1002
+ * * `timeout`: The operation timed out
1003
+ */
1004
+ export declare enum GitSyncOperationState {
1005
+ Running = "running",
1006
+ Failure = "failure",
1007
+ Success = "success",
1008
+ Timeout = "timeout"
1009
+ }
1005
1010
  /** The provider of the Git Sync installation. */
1006
1011
  export declare enum GitSyncProvider {
1007
1012
  Github = "github",
@@ -1285,6 +1290,16 @@ export interface GitSyncState {
1285
1290
  installationId?: string;
1286
1291
  /** The URL to the repository tree, used when rendering public content. */
1287
1292
  url?: string;
1293
+ /** The latest operation on the Git Sync installation. */
1294
+ operation?: {
1295
+ /**
1296
+ * * `running`: The operation is still running
1297
+ * * `failure`: The operation failed
1298
+ * * `success`: The operation was successful
1299
+ * * `timeout`: The operation timed out
1300
+ */
1301
+ state: GitSyncOperationState;
1302
+ };
1288
1303
  /** When the Git provider details were last updated */
1289
1304
  updatedAt?: Timestamp;
1290
1305
  }
@@ -1539,7 +1554,10 @@ export interface ImportGitRepository {
1539
1554
  force?: boolean;
1540
1555
  /** If true, the import will generate a revision without updating the space primary content. */
1541
1556
  standalone?: boolean;
1542
- /** Optional metadata to store on the space about the Git provider */
1557
+ /**
1558
+ * Optional metadata to store on the space about the Git provider
1559
+ * @deprecated
1560
+ */
1543
1561
  gitInfo?: UpdateSpaceGitInfo;
1544
1562
  }
1545
1563
  export interface ExportToGitRepository {
@@ -1563,7 +1581,12 @@ export interface ExportToGitRepository {
1563
1581
  /** The timestamp of the event that triggered this export. It ensures that Git sync import and export operations are executed in the same order on GitBook and on the remote repository. */
1564
1582
  timestamp?: Timestamp;
1565
1583
  force?: boolean;
1566
- /** Optional metadata to store on the space about the Git provider */
1584
+ /** If true, the export will be done in a standalone mode, meaning that the exported content will not be linked to the Git repository. This is useful for creating a snapshot of the space's content. */
1585
+ standalone?: boolean;
1586
+ /**
1587
+ * Optional metadata to store on the space about the Git provider
1588
+ * @deprecated
1589
+ */
1567
1590
  gitInfo?: UpdateSpaceGitInfo;
1568
1591
  }
1569
1592
  export type InviteUsersAndTeams = ({
@@ -1646,6 +1669,11 @@ export interface RevisionPageBase {
1646
1669
  createdAt?: Timestamp;
1647
1670
  /** When the page was last edited. Only present if page has been edited at least once. */
1648
1671
  updatedAt?: Timestamp;
1672
+ /**
1673
+ * Adaptive-content condition controlling whether the page is shown to a visitor. Only present when the page has a condition set, and only returned when the API is called with a user, user-internal or OAuth token (never with a site/content token).
1674
+ * @minLength 1
1675
+ */
1676
+ condition?: string;
1649
1677
  }
1650
1678
  export interface MarkdownDocument {
1651
1679
  /**
@@ -2102,6 +2130,11 @@ export interface DocumentBlockPrompt {
2102
2130
  /** Name of the icon */
2103
2131
  icon?: Icon;
2104
2132
  openInAIProviders?: boolean;
2133
+ /**
2134
+ * Controls how much of the prompt content is visible by default.
2135
+ * @default "hidden"
2136
+ */
2137
+ defaultExpanded?: "hidden" | "partial" | "full";
2105
2138
  };
2106
2139
  /**
2107
2140
  * @maxItems 1
@@ -3243,24 +3276,45 @@ export interface PostCommentReplySchema {
3243
3276
  export type ChangeRequestUserContributor = UserContributor & {
3244
3277
  actionType: "edit" | "comment";
3245
3278
  };
3279
+ /** Page metadata that can be set when inserting or updating a page through a change request. When a markdown document is provided on the same operation, the values read from its frontmatter take precedence over these fields. */
3280
+ export interface RevisionPageUpdate {
3281
+ /**
3282
+ * Title of the page.
3283
+ * @minLength 1
3284
+ */
3285
+ title?: string;
3286
+ /** Emoji of the page. Set to an empty string to remove it. */
3287
+ emoji?: Emoji;
3288
+ /** Icon of the page. Set to an empty string to remove it. */
3289
+ icon?: Icon;
3290
+ /** Description of the page. */
3291
+ description?: string;
3292
+ /** If true, the page is not displayed in the navigation, while still being accessible. */
3293
+ hidden?: boolean;
3294
+ /** If true, the page is not indexable in the search and ask features. */
3295
+ noIndex?: boolean;
3296
+ /** If true, the page is not indexable by search engine robots. */
3297
+ noRobotsIndex?: boolean;
3298
+ /** Adaptive-content condition controlling whether the page is shown to a visitor. Set to an empty string to remove the condition. */
3299
+ condition?: string;
3300
+ }
3246
3301
  /**
3247
- * Replace the document of an existing page with another document.
3302
+ * Update an existing page. Its document and/or its metadata (title, icon, description, visibility, adaptive-content condition) can be changed.
3248
3303
  * @example {"operation":"update_page","page":"page_id","document":{"markdown":"# Hello World\n\nThis is a markdown document linking to [another page](/pages/page_id).\n"}}
3249
3304
  */
3250
- export interface ChangeRequestContentChangeUpdatePage {
3305
+ export type ChangeRequestContentChangeUpdatePage = RevisionPageUpdate & {
3251
3306
  operation: "update_page";
3252
- /** ID of the page whose content should be updated. */
3307
+ /** ID of the page to update. */
3253
3308
  page: string;
3254
- document: Document;
3255
- }
3309
+ /** New document for the page. When provided as markdown, its frontmatter is read to update the page metadata. Omit to update only the metadata fields. */
3310
+ document?: Document;
3311
+ };
3256
3312
  /**
3257
3313
  * Insert a new page into the change request.
3258
3314
  * @example {"operation":"insert_page","title":"New page","document":{"markdown":"# New page\n\nThis is a new page.\n"}}
3259
3315
  */
3260
- export interface ChangeRequestContentChangeInsertPage {
3316
+ export type ChangeRequestContentChangeInsertPage = RevisionPageUpdate & {
3261
3317
  operation: "insert_page";
3262
- /** Title of the new page. */
3263
- title: string;
3264
3318
  /** ID of the parent page to insert the new page into. If omitted, the page is inserted as a root page. */
3265
3319
  into?: string;
3266
3320
  /**
@@ -3268,8 +3322,9 @@ export interface ChangeRequestContentChangeInsertPage {
3268
3322
  * @min 0
3269
3323
  */
3270
3324
  at?: number;
3325
+ /** Document for the new page. When provided as markdown, its frontmatter is read to set the page metadata. */
3271
3326
  document: Document;
3272
- }
3327
+ };
3273
3328
  /**
3274
3329
  * Delete an existing page (and its subpages) from the change request.
3275
3330
  * @example {"operation":"delete_page","page":"page_id"}
@@ -5959,6 +6014,8 @@ export interface GitSyncInstallationSetupCommon {
5959
6014
  * @default false
5960
6015
  */
5961
6016
  previewExternalBranches?: boolean;
6017
+ /** Agent instruction files GitBook should always export at the repository root. */
6018
+ agentInstructions?: ("agents" | "claude")[];
5962
6019
  /** Which side should be treated as the source of truth when Git Sync is configured. */
5963
6020
  priority?: GitSyncInstallationPriority;
5964
6021
  }
@@ -6441,6 +6498,19 @@ export type SiteSearchScope = {
6441
6498
  mode: "default";
6442
6499
  /** The ID of the site space that must always be included in the search results. The language of this site space will be used to match other site spaces with the same language, if applicable. */
6443
6500
  currentSiteSpace?: string;
6501
+ /**
6502
+ * Must not be provided when searching the entire default scope. To restrict the search to a subset of the default scope, provide `restrictTo` along with `currentSiteSpace`.
6503
+ * @minLength 2
6504
+ * @maxLength 1
6505
+ */
6506
+ restrictTo?: string;
6507
+ } | {
6508
+ /** Search a subset of the default scope of the site, relative to the current site space. */
6509
+ mode: "default";
6510
+ /** The ID of the site space the search is made from. The language of this site space will be used to match other site spaces with the same language, if applicable. */
6511
+ currentSiteSpace: string;
6512
+ /** Restrict the search to a subset of the default scope. With `currentSiteSpace`, only the current site space is searched. With `otherSiteSpaces`, the current site space is excluded and only the other site spaces in the default scope are searched. */
6513
+ restrictTo: "currentSiteSpace" | "otherSiteSpaces";
6444
6514
  } | {
6445
6515
  /** Only search in the provided site spaces. */
6446
6516
  mode: "specific";
@@ -6467,6 +6537,11 @@ export interface SearchRecordResult {
6467
6537
  */
6468
6538
  url: string;
6469
6539
  }
6540
+ /**
6541
+ * The end goal the agent is trying to accomplish on behalf of the user. Unlike the immediate query, the goal describes the broader task or outcome the agent is working towards.
6542
+ * @maxLength 1024
6543
+ */
6544
+ export type AgentGoal = string;
6470
6545
  /** Identifiers for a GitBook site session, used for analytics and adaptive content. */
6471
6546
  export interface SiteInsightsSession {
6472
6547
  /** GitBook's unique identifier of the visitor. */
@@ -6475,7 +6550,7 @@ export interface SiteInsightsSession {
6475
6550
  sessionId: string;
6476
6551
  }
6477
6552
  /** Integration source */
6478
- export type ContextConnector = string | "builtin:email" | "builtin:api" | "builtin:website" | "builtin:youtube" | "builtin:github-discussions" | "builtin:github-issues" | "builtin:intercom" | "builtin:zendesk" | "builtin:zoho-desk" | "builtin:pylon" | "builtin:linear" | "builtin:jira";
6553
+ export type ContextConnector = string | "builtin:email" | "builtin:api" | "builtin:website" | "builtin:youtube" | "builtin:github-discussions" | "builtin:github-issues" | "builtin:intercom" | "builtin:front" | "builtin:zendesk" | "builtin:zoho-desk" | "builtin:freshdesk" | "builtin:pylon" | "builtin:hubspot" | "builtin:linear" | "builtin:jira";
6479
6554
  /**
6480
6555
  * Title for the context record
6481
6556
  * @minLength 1
@@ -6568,6 +6643,12 @@ export interface SiteScan {
6568
6643
  location: string;
6569
6644
  };
6570
6645
  }
6646
+ /**
6647
+ * Findings source filter matching evidence coming from a given connection,
6648
+ * encoded as `connection:<connectionId>`.
6649
+ * @pattern ^connection:.+$
6650
+ */
6651
+ export type SiteTriageFilterConnections = string;
6571
6652
  /**
6572
6653
  * Short finding title
6573
6654
  * @maxLength 256
@@ -6783,6 +6864,12 @@ export type ContextConnectorSetup = {
6783
6864
  /** @minLength 1 */
6784
6865
  token: string;
6785
6866
  };
6867
+ } | {
6868
+ connector: "builtin:front";
6869
+ setupSettings: {
6870
+ /** @minLength 1 */
6871
+ token: string;
6872
+ };
6786
6873
  } | {
6787
6874
  connector: "builtin:zendesk";
6788
6875
  setupSettings: {
@@ -6813,12 +6900,32 @@ export type ContextConnectorSetup = {
6813
6900
  /** @minLength 1 */
6814
6901
  refreshToken: string;
6815
6902
  };
6903
+ } | {
6904
+ connector: "builtin:freshdesk";
6905
+ setupSettings: {
6906
+ /**
6907
+ * Freshdesk domain hosting the account, e.g. `mycompany.freshdesk.com` or just `mycompany`. Tickets and the API are scoped by this domain.
6908
+ * @minLength 1
6909
+ */
6910
+ domain: string;
6911
+ /**
6912
+ * Freshdesk API key with permission to read tickets. Sent as HTTP Basic auth and redacted when read back.
6913
+ * @minLength 1
6914
+ */
6915
+ apiKey: string;
6916
+ };
6816
6917
  } | {
6817
6918
  connector: "builtin:pylon";
6818
6919
  setupSettings: {
6819
6920
  /** @minLength 1 */
6820
6921
  token: string;
6821
6922
  };
6923
+ } | {
6924
+ connector: "builtin:hubspot";
6925
+ setupSettings: {
6926
+ /** @minLength 1 */
6927
+ token: string;
6928
+ };
6822
6929
  } | {
6823
6930
  connector: "builtin:linear";
6824
6931
  setupSettings: {
@@ -7337,7 +7444,8 @@ export interface AIAttachmentFile {
7337
7444
  url: URL;
7338
7445
  /** Name of the file. */
7339
7446
  filename: string;
7340
- contentType: "application/pdf";
7447
+ /** MIME type of the file. Must be a file type supported by the underlying model (see the OpenAI file-inputs documentation). */
7448
+ contentType: string;
7341
7449
  }
7342
7450
  export type AIAttachment = AIAttachmentImage | AIAttachmentFile;
7343
7451
  /** Context about the current user sending a message. */
@@ -7348,6 +7456,13 @@ export interface AIMessageContext {
7348
7456
  /** ID of the current page. */
7349
7457
  pageId: string;
7350
7458
  };
7459
+ /** Comments on the content the user is referring to in the message. */
7460
+ comments?: {
7461
+ /** ID of the comment. */
7462
+ id: string;
7463
+ /** Snapshot of the comment for display. */
7464
+ content?: string;
7465
+ }[];
7351
7466
  /** Range of the current selection in a document. */
7352
7467
  selection?: {
7353
7468
  anchorKey: string | null;
@@ -8768,6 +8883,7 @@ export interface GitSyncOperation {
8768
8883
  * * `running`: The operation is still running
8769
8884
  * * `failure`: The operation failed
8770
8885
  * * `success`: The operation was successful
8886
+ * * `timeout`: The operation timed out
8771
8887
  */
8772
8888
  state: GitSyncOperationState;
8773
8889
  direction: GitSyncOperationDirection;
@@ -10289,16 +10405,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10289
10405
  message: string;
10290
10406
  };
10291
10407
  }>>;
10292
- /**
10293
- * No description
10294
- *
10295
- * @tags space-git
10296
- * @name DeleteLegacyGitInstallation
10297
- * @summary Remove the legacy Git Sync installation from the space to be able to upgrade it to use the new Git integrations
10298
- * @request DELETE:/spaces/{spaceId}/git/legacy-installation
10299
- * @secure
10300
- */
10301
- deleteLegacyGitInstallation: (spaceId: EntityId, params?: RequestParams) => Promise<HttpResponse<void, any>>;
10302
10408
  /**
10303
10409
  * No description
10304
10410
  *
@@ -11190,7 +11296,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11190
11296
  computed?: boolean;
11191
11297
  }, params?: RequestParams) => Promise<HttpResponse<Revision, any>>;
11192
11298
  /**
11193
- * @description Applies an ordered array of content changes (up to 50) to the change request atomically, creating a single new revision. Changes are applied sequentially; if any single change is invalid the entire batch is rejected and no revision is created. Use this to create, update, move, or delete pages within a change request before merging to live. This is the primary way to programmatically author content in a change request.
11299
+ * @description Applies an ordered array of content changes (up to 50) to the change request atomically, creating a single new revision. Changes are applied sequentially; if any single change is invalid the entire batch is rejected and no revision is created. Use this to create, update, move, or delete pages within a change request before merging to live. This is the primary way to programmatically author content in a change request. When page content is provided as markdown, links to other pages are resolved against the change request's current page tree. You can link a page by: - Page ID — `/pages/<pageId>` (also `/pages/<pageId>#anchor`). - Page slug path — `/pages/<slug>` for a top-level page, or `/pages/<parent-slug>/<slug>` for a nested page (e.g. `/pages/guides/getting-started`). - Markdown file path — the path the page would have in Git: `/pages/<slug>.md` for a page, or `/pages/<slug>/README.md` for a page that has child pages. The space's root page is `/pages/README.md`. - Relative markdown link — resolved against the page being edited, e.g. `./sibling.md`, `../other.md`, or `../README.md` (the parent page). Folder-style links without an extension (e.g. `./section`) resolve to that folder's page. External URLs (`https://…`) are kept as-is. A link that does not match any page in the change request is left as plain text rather than causing the request to fail.
11194
11300
  *
11195
11301
  * @tags change-request-content
11196
11302
  * @name UpdateChangeRequestContent
@@ -12994,7 +13100,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12994
13100
  *
12995
13101
  * @tags organization-members
12996
13102
  * @name RemoveMemberFromOrganizationById
12997
- * @summary Delete an organization member
13103
+ * @summary Remove an organization member or request an organization admin to do it
12998
13104
  * @request DELETE:/orgs/{organizationId}/members/{userId}
12999
13105
  * @secure
13000
13106
  */
@@ -14995,6 +15101,31 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
14995
15101
  }, params?: RequestParams) => Promise<HttpResponse<List & {
14996
15102
  items: (SearchSpaceResult | SearchRecordResult)[];
14997
15103
  }, any>>;
15104
+ /**
15105
+ * @description Submit feedback from an AI agent about the content of the site, such as outdated, incorrect or missing content encountered while helping a user.
15106
+ *
15107
+ * @tags site-insights
15108
+ * @name SubmitSiteAgentFeedback
15109
+ * @summary Submit agent feedback for a site
15110
+ * @request POST:/orgs/{organizationId}/sites/{siteId}/agent-feedback
15111
+ * @secure
15112
+ */
15113
+ submitSiteAgentFeedback: (organizationId: EntityId, siteId: string, data: {
15114
+ /**
15115
+ * The feedback about the content of the site.
15116
+ * @minLength 1
15117
+ * @maxLength 2048
15118
+ */
15119
+ feedback: string;
15120
+ /** The end goal the agent is trying to accomplish on behalf of the user, giving the context the agent was working towards when it encountered the issue. */
15121
+ goal?: AgentGoal;
15122
+ /** URL of the content the feedback is about. */
15123
+ url: URL;
15124
+ /** ID of the space the feedback is about. */
15125
+ spaceId: string;
15126
+ /** ID of the page the feedback is about. */
15127
+ pageId: string;
15128
+ }, params?: RequestParams) => Promise<HttpResponse<void, any>>;
14998
15129
  /**
14999
15130
  * @description The response is streamed.
15000
15131
  *
@@ -15010,11 +15141,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15010
15141
  /** You may optionally provide additional information about the context of the question. This doesn't affect the scope of the search, but GitBook may use this information to provide a better answer. Generally speaking, you should provide as much context as possible. */
15011
15142
  context?: {
15012
15143
  siteSpaceId?: string;
15013
- /**
15014
- * The end goal the agent is trying to accomplish on behalf of the user. Unlike the question, which is the immediate query, the goal describes the broader task or outcome the agent is working towards. GitBook uses this to steer the answer towards what is ultimately useful for that goal.
15015
- * @maxLength 1024
15016
- */
15017
- goal?: string;
15144
+ /** The end goal the agent is trying to accomplish on behalf of the user. Unlike the question, which is the immediate query, the goal describes the broader task or outcome the agent is working towards. GitBook uses this to steer the answer towards what is ultimately useful for that goal. */
15145
+ goal?: AgentGoal;
15018
15146
  };
15019
15147
  scope: SiteSearchScope;
15020
15148
  /** Identifiers for a GitBook site session, used for analytics and adaptive content. */
@@ -15115,19 +15243,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15115
15243
  }, params?: RequestParams) => Promise<HttpResponse<List & {
15116
15244
  items: SiteScan[];
15117
15245
  }, any>>;
15118
- /**
15119
- * No description
15120
- *
15121
- * @tags site-context
15122
- * @name CreateSiteScan
15123
- * @summary Enqueue a new site scan
15124
- * @request POST:/orgs/{organizationId}/sites/{siteId}/scans
15125
- * @secure
15126
- */
15127
- createSiteScan: (organizationId: EntityId, siteId: string, data: {
15128
- /** The site topic ID to scan. */
15129
- topic: string;
15130
- }, params?: RequestParams) => Promise<HttpResponse<SiteScan, any>>;
15131
15246
  /**
15132
15247
  * No description
15133
15248
  *
@@ -15166,6 +15281,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
15166
15281
  severity?: SiteFindingSeverity;
15167
15282
  /** Filter findings that have at least one associated change request. */
15168
15283
  hasChangeRequests?: boolean;
15284
+ /** Filter findings by the source of their evidence. Each entry is either `connection:<connectionId>` (findings with at least one piece of evidence coming from the given connection) or `questions` (findings with at least one piece of evidence coming from a site question). When multiple entries are given, findings matching any of them are returned. */
15285
+ source?: (SiteTriageFilterQuestions | SiteTriageFilterConnections)[];
15169
15286
  }, params?: RequestParams) => Promise<HttpResponse<List & {
15170
15287
  items: SiteFinding[];
15171
15288
  }, any>>;
@@ -10,6 +10,7 @@ export declare const EXPRESSION_MIN_LENGTH = 0;
10
10
  export declare const TRANSLATION_LANGUAGE_ENUM: ["en", "fr", "de", "es", "it", "pt", "pt-br", "ru", "ja", "zh", "zh-tw", "yue", "ko", "ar", "hi", "nl", "pl", "tr", "sv", "no", "da", "fi", "el", "cs", "hu", "ro", "th", "vi", "id", "ms", "he", "uk", "sk", "bg", "hr", "lt", "lv", "et", "sl"];
11
11
  export declare const GIT_SYNC_INSTALLATION_STATUS_ENUM: ["unauthenticated", "active", "pending"];
12
12
  export declare const GIT_SYNC_PROVIDER_ENUM: ["github", "gitlab", "github-legacy"];
13
+ export declare const GIT_SYNC_OPERATION_STATE_ENUM: ["running", "failure", "success", "timeout"];
13
14
  export declare const MEMBER_ROLE_ENUM: ["admin", "create", "edit", "review", "comment", "read"];
14
15
  export declare const ORGANIZATION_TEAM_TITLE_MAX_LENGTH = 64;
15
16
  export declare const ORGANIZATION_TEAM_TITLE_MIN_LENGTH = 1;
@@ -40,7 +41,7 @@ export declare const INTEGRATION_SUMMARY_MAX_LENGTH = 2048;
40
41
  export declare const INTEGRATION_TARGET_ENUM: ["all", "site", "space", "organization"];
41
42
  export declare const INTEGRATION_VISIBILITY_ENUM: ["public", "private", "unlisted"];
42
43
  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"];
43
- export declare const INTEGRATION_CATEGORY_ENUM: ["analytics", "collaboration", "content", "gitsync", "marketing", "visitor-auth", "other"];
44
+ export declare const INTEGRATION_CATEGORY_ENUM: ["analytics", "collaboration", "content", "marketing", "visitor-auth", "other"];
44
45
  export declare const INTEGRATION_PROPERTY_TITLE_MAX_LENGTH = 50;
45
46
  export declare const INTEGRATION_PROPERTY_TITLE_MIN_LENGTH = 2;
46
47
  export declare const ORGANIZATION_TITLE_MAX_LENGTH = 255;
@@ -139,6 +140,7 @@ export declare const SITE_SOCIAL_ACCOUNT_HANDLE_MAX_LENGTH = 128;
139
140
  export declare const SITE_SOCIAL_ACCOUNT_HANDLE_MIN_LENGTH = 1;
140
141
  export declare const SHARE_LINK_NAME_MAX_LENGTH = 50;
141
142
  export declare const SHARE_LINK_NAME_MIN_LENGTH = 0;
143
+ export declare const AGENT_GOAL_MAX_LENGTH = 1024;
142
144
  export declare const CONTEXT_RECORD_TYPE_ENUM: ["ticket", "document"];
143
145
  export declare const CONTEXT_RECORD_TITLE_MAX_LENGTH = 256;
144
146
  export declare const CONTEXT_RECORD_TITLE_MIN_LENGTH = 1;
@@ -147,6 +149,8 @@ export declare const SITE_SCAN_STATUS_ENUM: ["pending", "running", "done", "fail
147
149
  export declare const SITE_FINDING_STATUS_ENUM: ["candidate", "open", "done", "canceled"];
148
150
  export declare const SITE_FINDING_TYPE_ENUM: ["content-outdated", "content-incorrect", "content-gap", "other"];
149
151
  export declare const SITE_FINDING_SEVERITY_ENUM: ["low", "medium", "high"];
152
+ export declare const SITE_TRIAGE_FILTER_QUESTIONS_ENUM: ["questions"];
153
+ export declare const SITE_TRIAGE_FILTER_CONNECTIONS_PATTERN = "^connection:.+$";
150
154
  export declare const SITE_FINDING_TITLE_MAX_LENGTH = 256;
151
155
  export declare const SITE_QUESTION_TYPE_ENUM: ["exploring", "how-to", "troubleshooting", "reference", "unknown"];
152
156
  export declare const CONTEXT_CONNECTION_LABEL_MAX_LENGTH = 128;
@@ -199,7 +203,6 @@ export declare const SHA256_MAX_LENGTH = 64;
199
203
  export declare const SHA256_MIN_LENGTH = 64;
200
204
  export declare const GIT_BOOK_USERS_ENUM: ["gitbook:agent"];
201
205
  export declare const REVISION_SEMANTIC_CHANGE_TYPE_ENUM: ["page_created", "page_edited", "page_deleted", "page_moved", "file_created", "file_edited", "file_deleted", "custom_fields_edited", "tag_created", "tag_deleted", "tag_edited"];
202
- export declare const GIT_SYNC_OPERATION_STATE_ENUM: ["running", "failure", "success"];
203
206
  export declare const GIT_SYNC_OPERATION_DIRECTION_ENUM: ["export", "import"];
204
207
  export declare const GIT_SYNC_OPERATION_STAGE_ENUM: ["repo_fetch", "config_check", "content_process", "finalize"];
205
208
  export declare const GIT_SYNC_SITE_CUSTOMIZATION_FONT_SOURCE_MIN_LENGTH = 1;
package/dist/index.cjs CHANGED
@@ -179,6 +179,7 @@ var require_node = __commonJS({
179
179
  // src/index.ts
180
180
  var src_exports = {};
181
181
  __export(src_exports, {
182
+ AGENT_GOAL_MAX_LENGTH: () => AGENT_GOAL_MAX_LENGTH,
182
183
  AGENT_STATUS_ENUM: () => AGENT_STATUS_ENUM,
183
184
  AIMESSAGE_ROLE_ENUM: () => AIMESSAGE_ROLE_ENUM,
184
185
  AIMESSAGE_STEP_PHASE_ENUM: () => AIMESSAGE_STEP_PHASE_ENUM,
@@ -461,6 +462,8 @@ __export(src_exports, {
461
462
  SITE_SPACE_PATH_MIN_LENGTH: () => SITE_SPACE_PATH_MIN_LENGTH,
462
463
  SITE_TITLE_MAX_LENGTH: () => SITE_TITLE_MAX_LENGTH,
463
464
  SITE_TITLE_MIN_LENGTH: () => SITE_TITLE_MIN_LENGTH,
465
+ SITE_TRIAGE_FILTER_CONNECTIONS_PATTERN: () => SITE_TRIAGE_FILTER_CONNECTIONS_PATTERN,
466
+ SITE_TRIAGE_FILTER_QUESTIONS_ENUM: () => SITE_TRIAGE_FILTER_QUESTIONS_ENUM,
464
467
  SITE_TYPE_ENUM: () => SITE_TYPE_ENUM,
465
468
  SITE_VISIBILITY_ENUM: () => SITE_VISIBILITY_ENUM,
466
469
  SPACE_EDIT_MODE_ENUM: () => SPACE_EDIT_MODE_ENUM,
@@ -502,6 +505,7 @@ __export(src_exports, {
502
505
  SiteSettingsFindingChangeRequests: () => SiteSettingsFindingChangeRequests,
503
506
  SiteSettingsScanTopics: () => SiteSettingsScanTopics,
504
507
  SiteSocialAccountPlatform: () => SiteSocialAccountPlatform,
508
+ SiteTriageFilterQuestions: () => SiteTriageFilterQuestions,
505
509
  SiteType: () => SiteType,
506
510
  SiteVisibility: () => SiteVisibility,
507
511
  SpaceEditMode: () => SpaceEditMode,
@@ -524,7 +528,7 @@ module.exports = __toCommonJS(src_exports);
524
528
 
525
529
  // package.json
526
530
  var name = "@gitbook/api";
527
- var version = "0.189.0";
531
+ var version = "0.191.0";
528
532
 
529
533
  // src/client.ts
530
534
  var import_event_iterator = __toESM(require_node(), 1);
@@ -684,12 +688,6 @@ var GitSyncOperationDirection = /* @__PURE__ */ ((GitSyncOperationDirection2) =>
684
688
  GitSyncOperationDirection2["Import"] = "import";
685
689
  return GitSyncOperationDirection2;
686
690
  })(GitSyncOperationDirection || {});
687
- var GitSyncOperationState = /* @__PURE__ */ ((GitSyncOperationState2) => {
688
- GitSyncOperationState2["Running"] = "running";
689
- GitSyncOperationState2["Failure"] = "failure";
690
- GitSyncOperationState2["Success"] = "success";
691
- return GitSyncOperationState2;
692
- })(GitSyncOperationState || {});
693
691
  var RevisionSemanticChangeType = /* @__PURE__ */ ((RevisionSemanticChangeType2) => {
694
692
  RevisionSemanticChangeType2["PageCreated"] = "page_created";
695
693
  RevisionSemanticChangeType2["PageEdited"] = "page_edited";
@@ -986,6 +984,10 @@ var SiteQuestionType = /* @__PURE__ */ ((SiteQuestionType2) => {
986
984
  SiteQuestionType2["Unknown"] = "unknown";
987
985
  return SiteQuestionType2;
988
986
  })(SiteQuestionType || {});
987
+ var SiteTriageFilterQuestions = /* @__PURE__ */ ((SiteTriageFilterQuestions2) => {
988
+ SiteTriageFilterQuestions2["Questions"] = "questions";
989
+ return SiteTriageFilterQuestions2;
990
+ })(SiteTriageFilterQuestions || {});
989
991
  var SiteFindingSeverity = /* @__PURE__ */ ((SiteFindingSeverity2) => {
990
992
  SiteFindingSeverity2["Low"] = "low";
991
993
  SiteFindingSeverity2["Medium"] = "medium";
@@ -1451,7 +1453,6 @@ var IntegrationCategory = /* @__PURE__ */ ((IntegrationCategory2) => {
1451
1453
  IntegrationCategory2["Analytics"] = "analytics";
1452
1454
  IntegrationCategory2["Collaboration"] = "collaboration";
1453
1455
  IntegrationCategory2["Content"] = "content";
1454
- IntegrationCategory2["Gitsync"] = "gitsync";
1455
1456
  IntegrationCategory2["Marketing"] = "marketing";
1456
1457
  IntegrationCategory2["VisitorAuth"] = "visitor-auth";
1457
1458
  IntegrationCategory2["Other"] = "other";
@@ -1592,6 +1593,13 @@ var MemberRole = /* @__PURE__ */ ((MemberRole2) => {
1592
1593
  MemberRole2["Read"] = "read";
1593
1594
  return MemberRole2;
1594
1595
  })(MemberRole || {});
1596
+ var GitSyncOperationState = /* @__PURE__ */ ((GitSyncOperationState2) => {
1597
+ GitSyncOperationState2["Running"] = "running";
1598
+ GitSyncOperationState2["Failure"] = "failure";
1599
+ GitSyncOperationState2["Success"] = "success";
1600
+ GitSyncOperationState2["Timeout"] = "timeout";
1601
+ return GitSyncOperationState2;
1602
+ })(GitSyncOperationState || {});
1595
1603
  var GitSyncProvider = /* @__PURE__ */ ((GitSyncProvider2) => {
1596
1604
  GitSyncProvider2["Github"] = "github";
1597
1605
  GitSyncProvider2["Gitlab"] = "gitlab";
@@ -2002,12 +2010,6 @@ var Api = class extends HttpClient {
2002
2010
  format: "json",
2003
2011
  ...params
2004
2012
  }),
2005
- deleteLegacyGitInstallation: (spaceId, params = {}) => this.request({
2006
- path: `/spaces/${spaceId}/git/legacy-installation`,
2007
- method: "DELETE",
2008
- secure: true,
2009
- ...params
2010
- }),
2011
2013
  inviteToSpace: (spaceId, data, params = {}) => this.request({
2012
2014
  path: `/spaces/${spaceId}/permissions`,
2013
2015
  method: "POST",
@@ -3911,6 +3913,14 @@ var Api = class extends HttpClient {
3911
3913
  format: "json",
3912
3914
  ...params
3913
3915
  }),
3916
+ submitSiteAgentFeedback: (organizationId, siteId, data, params = {}) => this.request({
3917
+ path: `/orgs/${organizationId}/sites/${siteId}/agent-feedback`,
3918
+ method: "POST",
3919
+ body: data,
3920
+ secure: true,
3921
+ type: "application/json" /* Json */,
3922
+ ...params
3923
+ }),
3914
3924
  streamAskInSite: (organizationId, siteId, data, query, params = {}) => this.streamRequest({
3915
3925
  path: `/orgs/${organizationId}/sites/${siteId}/ask`,
3916
3926
  method: "POST",
@@ -3958,15 +3968,6 @@ var Api = class extends HttpClient {
3958
3968
  format: "json",
3959
3969
  ...params
3960
3970
  }),
3961
- createSiteScan: (organizationId, siteId, data, params = {}) => this.request({
3962
- path: `/orgs/${organizationId}/sites/${siteId}/scans`,
3963
- method: "POST",
3964
- body: data,
3965
- secure: true,
3966
- type: "application/json" /* Json */,
3967
- format: "json",
3968
- ...params
3969
- }),
3970
3971
  getSiteScanById: (organizationId, siteId, siteScanId, params = {}) => this.request({
3971
3972
  path: `/orgs/${organizationId}/sites/${siteId}/scans/${siteScanId}`,
3972
3973
  method: "GET",
@@ -4699,6 +4700,7 @@ var EXPRESSION_MIN_LENGTH = 0;
4699
4700
  var TRANSLATION_LANGUAGE_ENUM = ["en", "fr", "de", "es", "it", "pt", "pt-br", "ru", "ja", "zh", "zh-tw", "yue", "ko", "ar", "hi", "nl", "pl", "tr", "sv", "no", "da", "fi", "el", "cs", "hu", "ro", "th", "vi", "id", "ms", "he", "uk", "sk", "bg", "hr", "lt", "lv", "et", "sl"];
4700
4701
  var GIT_SYNC_INSTALLATION_STATUS_ENUM = ["unauthenticated", "active", "pending"];
4701
4702
  var GIT_SYNC_PROVIDER_ENUM = ["github", "gitlab", "github-legacy"];
4703
+ var GIT_SYNC_OPERATION_STATE_ENUM = ["running", "failure", "success", "timeout"];
4702
4704
  var MEMBER_ROLE_ENUM = ["admin", "create", "edit", "review", "comment", "read"];
4703
4705
  var ORGANIZATION_TEAM_TITLE_MAX_LENGTH = 64;
4704
4706
  var ORGANIZATION_TEAM_TITLE_MIN_LENGTH = 1;
@@ -4729,7 +4731,7 @@ var INTEGRATION_SUMMARY_MAX_LENGTH = 2048;
4729
4731
  var INTEGRATION_TARGET_ENUM = ["all", "site", "space", "organization"];
4730
4732
  var INTEGRATION_VISIBILITY_ENUM = ["public", "private", "unlisted"];
4731
4733
  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"];
4732
- var INTEGRATION_CATEGORY_ENUM = ["analytics", "collaboration", "content", "gitsync", "marketing", "visitor-auth", "other"];
4734
+ var INTEGRATION_CATEGORY_ENUM = ["analytics", "collaboration", "content", "marketing", "visitor-auth", "other"];
4733
4735
  var INTEGRATION_PROPERTY_TITLE_MAX_LENGTH = 50;
4734
4736
  var INTEGRATION_PROPERTY_TITLE_MIN_LENGTH = 2;
4735
4737
  var ORGANIZATION_TITLE_MAX_LENGTH = 255;
@@ -4828,6 +4830,7 @@ var SITE_SOCIAL_ACCOUNT_HANDLE_MAX_LENGTH = 128;
4828
4830
  var SITE_SOCIAL_ACCOUNT_HANDLE_MIN_LENGTH = 1;
4829
4831
  var SHARE_LINK_NAME_MAX_LENGTH = 50;
4830
4832
  var SHARE_LINK_NAME_MIN_LENGTH = 0;
4833
+ var AGENT_GOAL_MAX_LENGTH = 1024;
4831
4834
  var CONTEXT_RECORD_TYPE_ENUM = ["ticket", "document"];
4832
4835
  var CONTEXT_RECORD_TITLE_MAX_LENGTH = 256;
4833
4836
  var CONTEXT_RECORD_TITLE_MIN_LENGTH = 1;
@@ -4836,6 +4839,8 @@ var SITE_SCAN_STATUS_ENUM = ["pending", "running", "done", "failed"];
4836
4839
  var SITE_FINDING_STATUS_ENUM = ["candidate", "open", "done", "canceled"];
4837
4840
  var SITE_FINDING_TYPE_ENUM = ["content-outdated", "content-incorrect", "content-gap", "other"];
4838
4841
  var SITE_FINDING_SEVERITY_ENUM = ["low", "medium", "high"];
4842
+ var SITE_TRIAGE_FILTER_QUESTIONS_ENUM = ["questions"];
4843
+ var SITE_TRIAGE_FILTER_CONNECTIONS_PATTERN = "^connection:.+$";
4839
4844
  var SITE_FINDING_TITLE_MAX_LENGTH = 256;
4840
4845
  var SITE_QUESTION_TYPE_ENUM = ["exploring", "how-to", "troubleshooting", "reference", "unknown"];
4841
4846
  var CONTEXT_CONNECTION_LABEL_MAX_LENGTH = 128;
@@ -4888,7 +4893,6 @@ var SHA256_MAX_LENGTH = 64;
4888
4893
  var SHA256_MIN_LENGTH = 64;
4889
4894
  var GIT_BOOK_USERS_ENUM = ["gitbook:agent"];
4890
4895
  var REVISION_SEMANTIC_CHANGE_TYPE_ENUM = ["page_created", "page_edited", "page_deleted", "page_moved", "file_created", "file_edited", "file_deleted", "custom_fields_edited", "tag_created", "tag_deleted", "tag_edited"];
4891
- var GIT_SYNC_OPERATION_STATE_ENUM = ["running", "failure", "success"];
4892
4896
  var GIT_SYNC_OPERATION_DIRECTION_ENUM = ["export", "import"];
4893
4897
  var GIT_SYNC_OPERATION_STAGE_ENUM = ["repo_fetch", "config_check", "content_process", "finalize"];
4894
4898
  var GIT_SYNC_SITE_CUSTOMIZATION_FONT_SOURCE_MIN_LENGTH = 1;
@@ -4970,6 +4974,7 @@ var GitBookAPI = class extends Api {
4970
4974
  };
4971
4975
  // Annotate the CommonJS export names for ESM import in node:
4972
4976
  0 && (module.exports = {
4977
+ AGENT_GOAL_MAX_LENGTH,
4973
4978
  AGENT_STATUS_ENUM,
4974
4979
  AIMESSAGE_ROLE_ENUM,
4975
4980
  AIMESSAGE_STEP_PHASE_ENUM,
@@ -5252,6 +5257,8 @@ var GitBookAPI = class extends Api {
5252
5257
  SITE_SPACE_PATH_MIN_LENGTH,
5253
5258
  SITE_TITLE_MAX_LENGTH,
5254
5259
  SITE_TITLE_MIN_LENGTH,
5260
+ SITE_TRIAGE_FILTER_CONNECTIONS_PATTERN,
5261
+ SITE_TRIAGE_FILTER_QUESTIONS_ENUM,
5255
5262
  SITE_TYPE_ENUM,
5256
5263
  SITE_VISIBILITY_ENUM,
5257
5264
  SPACE_EDIT_MODE_ENUM,
@@ -5293,6 +5300,7 @@ var GitBookAPI = class extends Api {
5293
5300
  SiteSettingsFindingChangeRequests,
5294
5301
  SiteSettingsScanTopics,
5295
5302
  SiteSocialAccountPlatform,
5303
+ SiteTriageFilterQuestions,
5296
5304
  SiteType,
5297
5305
  SiteVisibility,
5298
5306
  SpaceEditMode,