@gitbook/api 0.114.0 → 0.116.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
@@ -48,6 +48,11 @@ export type UserAPITokenExtended = UserAPIToken & {
48
48
  /** The actual token value. */
49
49
  token: string;
50
50
  };
51
+ /**
52
+ * @format uri
53
+ * @maxLength 2048
54
+ */
55
+ export type URL = string;
51
56
  /**
52
57
  * Title of the space
53
58
  * @maxLength 50
@@ -86,11 +91,6 @@ export declare enum SpaceEditMode {
86
91
  Live = "live",
87
92
  Locked = "locked"
88
93
  }
89
- /**
90
- * @format uri
91
- * @maxLength 2048
92
- */
93
- export type URL = string;
94
94
  /** The provider of the Git Sync installation. */
95
95
  export declare enum GitSyncProvider {
96
96
  Github = "github",
@@ -1101,7 +1101,24 @@ export interface DocumentBlockStepper {
1101
1101
  isVoid?: false;
1102
1102
  data?: object;
1103
1103
  }
1104
- export type DocumentBlock = DocumentBlockParagraph | DocumentBlockHeading | DocumentBlockListOrdered | DocumentBlockListUnordered | DocumentBlockListTasks | DocumentBlockListItem | DocumentBlockDivider | DocumentBlockQuote | DocumentBlockHint | DocumentBlockImages | DocumentBlockImage | DocumentBlockFile | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockCode | DocumentBlockCodeLine | DocumentBlockMath | DocumentBlockExpandable | DocumentBlockTabs | DocumentBlockTabsItem | DocumentBlockTable | DocumentBlockOpenAPI | DocumentBlockOpenAPIOperation | DocumentBlockOpenAPISchemas | DocumentBlockOpenAPIWebhook | DocumentBlockContentRef | DocumentBlockIntegration | DocumentBlockReusableContent | DocumentBlockStepper | DocumentBlockStepperStep;
1104
+ export interface DocumentBlockColumn {
1105
+ object: 'block';
1106
+ type: 'column';
1107
+ key?: string;
1108
+ nodes: DocumentBlocksEssentials[];
1109
+ isVoid?: false;
1110
+ }
1111
+ export interface DocumentBlockColumns {
1112
+ object: 'block';
1113
+ type: 'columns';
1114
+ key?: string;
1115
+ data: {
1116
+ fullWidth?: boolean;
1117
+ };
1118
+ nodes: DocumentBlockColumn[];
1119
+ isVoid: false;
1120
+ }
1121
+ export type DocumentBlock = DocumentBlockParagraph | DocumentBlockHeading | DocumentBlockListOrdered | DocumentBlockListUnordered | DocumentBlockListTasks | DocumentBlockListItem | DocumentBlockDivider | DocumentBlockQuote | DocumentBlockHint | DocumentBlockImages | DocumentBlockImage | DocumentBlockFile | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockCode | DocumentBlockCodeLine | DocumentBlockMath | DocumentBlockExpandable | DocumentBlockTabs | DocumentBlockTabsItem | DocumentBlockTable | DocumentBlockOpenAPI | DocumentBlockOpenAPIOperation | DocumentBlockOpenAPISchemas | DocumentBlockOpenAPIWebhook | DocumentBlockContentRef | DocumentBlockIntegration | DocumentBlockReusableContent | DocumentBlockStepper | DocumentBlockStepperStep | DocumentBlockColumns | DocumentBlockColumn;
1105
1122
  export interface DocumentInlineMention {
1106
1123
  object: 'inline';
1107
1124
  type: 'mention';
@@ -2153,25 +2170,6 @@ export interface UserContributor {
2153
2170
  count: number;
2154
2171
  user: User;
2155
2172
  }
2156
- /**
2157
- * The status of the session.
2158
- * - pending: The session is pending for input from the user.
2159
- * - running: The session is being processed by GitBook.
2160
- * - failed: The session processing has failed.
2161
- */
2162
- export declare enum ChangeRequestBrainstormStatus {
2163
- Pending = "pending",
2164
- Failed = "failed",
2165
- Running = "running"
2166
- }
2167
- export declare enum ChangeRequestBrainstormActor {
2168
- User = "user",
2169
- Agent = "agent"
2170
- }
2171
- export interface ChangeRequestBrainstormContext {
2172
- /** Path of the page the user is currently viewing. */
2173
- page: string;
2174
- }
2175
2173
  export declare enum RevisionPageType {
2176
2174
  Document = "document",
2177
2175
  Group = "group",
@@ -2184,111 +2182,6 @@ export interface ChangedRevisionPage {
2184
2182
  title: string;
2185
2183
  path?: string;
2186
2184
  }
2187
- export type ChangeRequestBrainstormLog = {
2188
- tool: 'get-page';
2189
- intent: string;
2190
- page: ChangedRevisionPage;
2191
- } | {
2192
- tool: 'search-keyword';
2193
- intent: string;
2194
- query: string;
2195
- } | {
2196
- tool: 'search-semantic';
2197
- intent: string;
2198
- query: string;
2199
- } | {
2200
- tool: 'create-page';
2201
- page: ChangedRevisionPage;
2202
- } | {
2203
- tool: 'delete-page';
2204
- page: ChangedRevisionPage;
2205
- } | {
2206
- tool: 'edit-page';
2207
- page: ChangedRevisionPage;
2208
- };
2209
- /**
2210
- * The status of the plan.
2211
- * - pending: The task is pending for input from the user.
2212
- * - running: The task is being processed by GitBook.
2213
- * - failed: The task processing has failed.
2214
- * - completed: The task has been completed.
2215
- */
2216
- export declare enum ChangeRequestBrainstormPlanStatus {
2217
- Pending = "pending",
2218
- Failed = "failed",
2219
- Running = "running",
2220
- Completed = "completed"
2221
- }
2222
- /**
2223
- * @minLength 1
2224
- * @maxLength 100
2225
- */
2226
- export type ChangeRequestBrainstormPlanStepTitle = string;
2227
- export declare enum ChangeRequestBrainstormPlanStepStatus {
2228
- Pending = "pending",
2229
- Succeeded = "succeeded",
2230
- Failed = "failed",
2231
- Running = "running"
2232
- }
2233
- export interface ChangeRequestBrainstormPlanStep {
2234
- title: ChangeRequestBrainstormPlanStepTitle;
2235
- status: ChangeRequestBrainstormPlanStepStatus;
2236
- instruction: JSONDocument;
2237
- /** Logs related to the implementation phase of the step. */
2238
- implementation?: {
2239
- /** A summary of the execution phase. */
2240
- summary?: JSONDocument;
2241
- /** Logs related to the execution phase of the step. */
2242
- logs: ChangeRequestBrainstormLog[];
2243
- };
2244
- }
2245
- export interface ChangeRequestBrainstormPlan {
2246
- /**
2247
- * The status of the plan.
2248
- * - pending: The task is pending for input from the user.
2249
- * - running: The task is being processed by GitBook.
2250
- * - failed: The task processing has failed.
2251
- * - completed: The task has been completed.
2252
- */
2253
- status: ChangeRequestBrainstormPlanStatus;
2254
- /** The title of the plan. */
2255
- title: string;
2256
- /** The steps of the plan to execute the plan. */
2257
- steps: ChangeRequestBrainstormPlanStep[];
2258
- context?: ChangeRequestBrainstormContext;
2259
- }
2260
- export interface ChangeRequestBrainstormAttachmentPlan {
2261
- type: 'plan';
2262
- plan: ChangeRequestBrainstormPlan;
2263
- }
2264
- export interface ChangeRequestBrainstormAttachmentMessage {
2265
- type: 'message';
2266
- suggestions: string[];
2267
- }
2268
- export type ChangeRequestBrainstormAttachment = ChangeRequestBrainstormAttachmentPlan | ChangeRequestBrainstormAttachmentMessage;
2269
- export interface ChangeRequestBrainstormMessage {
2270
- /** The unique identifier of the chat message. */
2271
- id: string;
2272
- actor: ChangeRequestBrainstormActor;
2273
- message: JSONDocument;
2274
- context?: ChangeRequestBrainstormContext;
2275
- /** Logs related to the processing of the message. */
2276
- logs?: ChangeRequestBrainstormLog[];
2277
- attachment?: ChangeRequestBrainstormAttachment;
2278
- }
2279
- export interface ChangeRequestBrainstormSession {
2280
- /** The unique identifier of the session. */
2281
- id: string;
2282
- /**
2283
- * The status of the session.
2284
- * - pending: The session is pending for input from the user.
2285
- * - running: The session is being processed by GitBook.
2286
- * - failed: The session processing has failed.
2287
- */
2288
- status: ChangeRequestBrainstormStatus;
2289
- /** Conversation messages related to the brainstorming phase of the task. */
2290
- messages: ChangeRequestBrainstormMessage[];
2291
- }
2292
2185
  export interface RevisionSemanticChangePageCreated {
2293
2186
  type: 'page_created';
2294
2187
  page: ChangedRevisionPage;
@@ -2444,6 +2337,25 @@ export interface UpdateCommentReplySchema {
2444
2337
  /** Reactions to remove from the comment. */
2445
2338
  removedReactions?: string[];
2446
2339
  }
2340
+ export interface OrganizationMember {
2341
+ /** Type of Object, always equals to "member" */
2342
+ object: 'member';
2343
+ /** Unique identifier for the user. */
2344
+ id: string;
2345
+ /** The role of a member in an organization, null for guests */
2346
+ role: MemberRoleOrGuest;
2347
+ user: User;
2348
+ /** Whatever the membership of this user is disabled and prevent them from accessing content. */
2349
+ disabled: boolean;
2350
+ /** Date at which the user joined the organization. */
2351
+ joinedAt: Timestamp;
2352
+ /** Date at which the user was last seen active in the organization. */
2353
+ lastSeenAt?: Timestamp;
2354
+ /** Whether the user can login with SSO. */
2355
+ sso: boolean;
2356
+ spaces: number;
2357
+ teams: number;
2358
+ }
2447
2359
  /**
2448
2360
  * Title of the integration
2449
2361
  * @minLength 2
@@ -3211,6 +3123,16 @@ export declare enum SiteType {
3211
3123
  * @maxLength 128
3212
3124
  */
3213
3125
  export type SiteTitle = string;
3126
+ export interface CustomizationThemedURL {
3127
+ light: URL;
3128
+ dark: URL;
3129
+ }
3130
+ export type CustomizationFavicon = {
3131
+ icon: CustomizationThemedURL;
3132
+ } | {
3133
+ /** Unicode codepoint or character of the emoji */
3134
+ emoji: Emoji;
3135
+ } | object;
3214
3136
  /**
3215
3137
  * Custom hostname for the site, for e.g. docs.mycompany.com
3216
3138
  * @maxLength 512
@@ -3313,6 +3235,7 @@ export interface Site {
3313
3235
  type: SiteType;
3314
3236
  /** Title of the site */
3315
3237
  title: SiteTitle;
3238
+ icon?: CustomizationFavicon | null;
3316
3239
  /** Custom hostname for the site, for e.g. docs.mycompany.com */
3317
3240
  hostname?: SiteHostname;
3318
3241
  /** Basename for the site. For e.g. api */
@@ -3869,25 +3792,6 @@ export interface OrganizationAllContent {
3869
3792
  /** List of soft-deleted spaces. */
3870
3793
  deletedSpaces: OrganizationAllSpace[];
3871
3794
  }
3872
- export interface OrganizationMember {
3873
- /** Type of Object, always equals to "member" */
3874
- object: 'member';
3875
- /** Unique identifier for the user. */
3876
- id: string;
3877
- /** The role of a member in an organization, null for guests */
3878
- role: MemberRoleOrGuest;
3879
- user: User;
3880
- /** Whatever the membership of this user is disabled and prevent them from accessing content. */
3881
- disabled: boolean;
3882
- /** Date at which the user joined the organization. */
3883
- joinedAt: Timestamp;
3884
- /** Date at which the user was last seen active in the organization. */
3885
- lastSeenAt?: Timestamp;
3886
- /** Whether the user can login with SSO. */
3887
- sso: boolean;
3888
- spaces: number;
3889
- teams: number;
3890
- }
3891
3795
  /** Permission of a member in a content. */
3892
3796
  export interface MemberContentPermission {
3893
3797
  /**
@@ -4129,11 +4033,6 @@ export interface CreateSpace {
4129
4033
  title?: string;
4130
4034
  /** Unicode codepoint or character of the emoji */
4131
4035
  emoji?: Emoji;
4132
- /**
4133
- * Private spaces are no longer supported by GitBook.
4134
- * @deprecated
4135
- */
4136
- private?: boolean;
4137
4036
  /** ID of a parent collection */
4138
4037
  parent?: string;
4139
4038
  }
@@ -4146,6 +4045,15 @@ export type SAMLProviderLabel = string;
4146
4045
  export type SAMLProviderEntityID = string;
4147
4046
  /** @maxLength 10000 */
4148
4047
  export type SAMLProviderCertificate = string;
4048
+ /**
4049
+ * Status of the provider.
4050
+ * - `active`: The provider is active and can be used to authenticate users.
4051
+ * - `pending`: The provider is pending and is not yet fully configured.
4052
+ */
4053
+ export declare enum SAMLProviderStatus {
4054
+ Active = "active",
4055
+ Pending = "pending"
4056
+ }
4149
4057
  export interface OrganizationSAMLProvider {
4150
4058
  /** Type of Object, always equals to "saml-provider" */
4151
4059
  object: 'saml-provider';
@@ -4160,6 +4068,12 @@ export interface OrganizationSAMLProvider {
4160
4068
  defaultRole: MemberRoleOrGuest;
4161
4069
  /** Date at which the provider was created. */
4162
4070
  createdAt: Timestamp;
4071
+ /**
4072
+ * Status of the provider.
4073
+ * - `active`: The provider is active and can be used to authenticate users.
4074
+ * - `pending`: The provider is pending and is not yet fully configured.
4075
+ */
4076
+ status: SAMLProviderStatus;
4163
4077
  /** Metadata about the service provider. */
4164
4078
  service: {
4165
4079
  /**
@@ -4484,9 +4398,6 @@ export type BillingOperationPreviewResponse = {
4484
4398
  /** User must checkout to complete the operation. */
4485
4399
  type: 'checkout';
4486
4400
  invoice?: BillingInvoicePreview;
4487
- } | {
4488
- /** User cannot proceed with the operation due to lack of permissions. */
4489
- type: 'no-permissions';
4490
4401
  } | {
4491
4402
  /** User needs to go through the legacy upgrade flow. */
4492
4403
  type: 'legacy-upgrade';
@@ -4494,7 +4405,7 @@ export type BillingOperationPreviewResponse = {
4494
4405
  plan: BillingProduct;
4495
4406
  invoice?: BillingInvoicePreview;
4496
4407
  };
4497
- export type Properties = Record<string, {
4408
+ export type SiteAdaptiveJSONSchemaClaimsProperties = {
4498
4409
  type: 'boolean';
4499
4410
  description: string;
4500
4411
  } | {
@@ -4504,27 +4415,24 @@ export type Properties = Record<string, {
4504
4415
  } | {
4505
4416
  type: 'object';
4506
4417
  description: string;
4507
- properties: Properties;
4418
+ properties: Record<string, SiteAdaptiveJSONSchemaClaimsProperties>;
4508
4419
  additionalProperties: false;
4509
- }>;
4420
+ };
4510
4421
  /** JSON schema describing the expected attributes of an Adaptive site schema. */
4511
4422
  export interface SiteAdaptiveJSONSchema {
4512
4423
  $schema?: 'http://json-schema.org/draft-07/schema#';
4513
4424
  $id?: string;
4514
4425
  type: 'object';
4515
- properties: Record<string, {
4516
- type: 'boolean';
4517
- description: string;
4518
- } | {
4519
- type: 'string';
4520
- enum: string[];
4521
- description: string;
4522
- } | {
4523
- type: 'object';
4524
- description: string;
4525
- properties: Properties;
4526
- additionalProperties: false;
4527
- }>;
4426
+ properties: {
4427
+ /** Unsigned claims of the site visitor. */
4428
+ unsigned?: {
4429
+ type: 'object';
4430
+ description: 'Unsigned claims of the site visitor.';
4431
+ properties: Record<string, SiteAdaptiveJSONSchemaClaimsProperties>;
4432
+ additionalProperties: false;
4433
+ };
4434
+ [key: string]: any;
4435
+ };
4528
4436
  additionalProperties: false;
4529
4437
  }
4530
4438
  export interface SiteAdaptiveSchema {
@@ -4641,10 +4549,6 @@ export declare enum CustomizationLocale {
4641
4549
  No = "no",
4642
4550
  PtBr = "pt-br"
4643
4551
  }
4644
- export interface CustomizationThemedURL {
4645
- light: URL;
4646
- dark: URL;
4647
- }
4648
4552
  /**
4649
4553
  * The header preset to use for the site. This is a legacy setting and the site styling theme should be used instead.
4650
4554
  * @deprecated
@@ -4749,12 +4653,7 @@ export interface SiteCustomizationSettings {
4749
4653
  /** Language for the UI element */
4750
4654
  locale: CustomizationLocale;
4751
4655
  };
4752
- favicon: {
4753
- icon: CustomizationThemedURL;
4754
- } | {
4755
- /** Unicode codepoint or character of the emoji */
4756
- emoji: Emoji;
4757
- } | object;
4656
+ favicon: CustomizationFavicon;
4758
4657
  header: {
4759
4658
  /** The header preset to use for the site. This is a legacy setting and the site styling theme should be used instead. */
4760
4659
  preset: CustomizationHeaderPreset;
@@ -4892,10 +4791,10 @@ export type SitePublishingAuth = (VisitorAuthCustomBackend | VisitorAuthIntegrat
4892
4791
  };
4893
4792
  export type SitePublishingAuthUpdate = (VisitorAuthCustomBackend | VisitorAuthIntegrationBackend) & {
4894
4793
  /**
4895
- * A fallback URL that will be used if authentication fails.
4794
+ * A fallback URL that will be used if authentication fails. If not provided, the fallback URL will not be changed. If set to null, the fallback URL will be unset.
4896
4795
  * @format uri
4897
4796
  */
4898
- fallbackURL?: string;
4797
+ fallbackURL?: string | null;
4899
4798
  };
4900
4799
  export type SiteSearchScope = {
4901
4800
  /** Search across all sections of a site, only including the default content of each section. This scope is wide and shallow. You may optionally specify a list of additional site spaces to search in alongside the default content. */
@@ -4959,6 +4858,7 @@ export interface UserSitePermission {
4959
4858
  }
4960
4859
  export declare enum AIMessageRole {
4961
4860
  User = "user",
4861
+ Assistant = "assistant",
4962
4862
  Developer = "developer"
4963
4863
  }
4964
4864
  /** Attachment to attach search results to a message. */
@@ -4986,10 +4886,22 @@ export interface AIMessageAttachmentPages {
4986
4886
  spaceId: string;
4987
4887
  }
4988
4888
  export type AIMessageAttachment = AIMessageAttachmentSearch | AIMessageAttachmentVisitorProfile | AIMessageAttachmentPage | AIMessageAttachmentPages;
4889
+ /** Context about the current user sending a message. */
4890
+ export interface AIMessageContext {
4891
+ location?: {
4892
+ /** ID of the current space. */
4893
+ spaceId: string;
4894
+ /** ID of the current page. */
4895
+ pageId: string;
4896
+ };
4897
+ }
4898
+ /** Input version of an AI message. */
4989
4899
  export interface AIMessageInput {
4990
4900
  role: AIMessageRole;
4991
4901
  content: string | JSONDocument;
4992
4902
  attachments?: AIMessageAttachment[];
4903
+ /** Context about the current user sending a message. */
4904
+ context?: AIMessageContext;
4993
4905
  }
4994
4906
  /** Indicate that the AI should response with a JSON object corresponding to the provided schema. */
4995
4907
  export interface AIOutputObject {
@@ -5020,18 +4932,26 @@ export interface AIToolCapabilities {
5020
4932
  /** Message emitted by the server to indicate the end of the AI response. It contains the ID of the response to be referenced for followup requests. */
5021
4933
  export interface AIStreamResponseFinish {
5022
4934
  type: 'response_finish';
4935
+ /** The ID of the message that this event is composing. */
4936
+ messageId: string;
5023
4937
  /** The ID of the response */
5024
4938
  responseId: string;
5025
4939
  }
5026
4940
  /** Message emitted by the server to indicate the latest block of the document. The block can either be a new block or an update to the previous block. */
5027
4941
  export interface AIStreamResponseDocument {
5028
4942
  type: 'response_document';
4943
+ /** The ID of the message that this event is composing. */
4944
+ messageId: string;
4945
+ /** The index of the step of the message that this event is composing. */
4946
+ stepIndex: number;
5029
4947
  operation: 'insert' | 'update';
5030
- blocks: DocumentBlock[];
4948
+ blocks: DocumentBlocksTopLevels[];
5031
4949
  }
5032
4950
  /** Message emitted by the server to indicate a chunk of the JSON object response. */
5033
4951
  export interface AIStreamResponseObject {
5034
4952
  type: 'response_object';
4953
+ /** The ID of the message that this event is composing. */
4954
+ messageId: string;
5035
4955
  /** The chunk of the JSON object response */
5036
4956
  jsonChunk: string;
5037
4957
  }
@@ -5066,10 +4986,77 @@ export interface AIToolCallSearch {
5066
4986
  query: string;
5067
4987
  results: AIToolCallSearchResult[];
5068
4988
  }
5069
- export type AIToolCall = AIToolCallGetPageContent | AIToolCallGetPages | AIToolCallSearch;
4989
+ export interface AIToolCallEditPage {
4990
+ tool: 'editPage';
4991
+ /** The ID of the space being edited. */
4992
+ spaceId: string;
4993
+ page: ChangedRevisionPage;
4994
+ }
4995
+ export interface AIToolCallCreatePage {
4996
+ tool: 'createPage';
4997
+ /** The ID of the space being edited. */
4998
+ spaceId: string;
4999
+ page: ChangedRevisionPage;
5000
+ }
5001
+ export interface AIToolCallDeletePage {
5002
+ tool: 'deletePage';
5003
+ /** The ID of the space being edited. */
5004
+ spaceId: string;
5005
+ page: ChangedRevisionPage;
5006
+ }
5007
+ export interface AIToolCallRenamePage {
5008
+ tool: 'renamePage';
5009
+ /** The ID of the space being edited. */
5010
+ spaceId: string;
5011
+ page: ChangedRevisionPage;
5012
+ /** The new title of the page. */
5013
+ title: string;
5014
+ }
5015
+ export interface AIToolCallMovePage {
5016
+ tool: 'movePage';
5017
+ /** The ID of the space being edited. */
5018
+ spaceId: string;
5019
+ page: ChangedRevisionPage;
5020
+ to?: ChangedRevisionPage;
5021
+ /**
5022
+ * Indicates how the page was moved relative to the "to" page.
5023
+ * - `within`: moved as the last child of the target page (or to the root when `to` is omitted)
5024
+ * - `before`: moved directly before the target page
5025
+ * - `after`: moved directly after the target page
5026
+ */
5027
+ moveType: 'within' | 'before' | 'after';
5028
+ }
5029
+ export interface AIToolCallListModifiedPages {
5030
+ tool: 'listModifiedPages';
5031
+ /** The ID of the space being accessed. */
5032
+ spaceId: string;
5033
+ }
5034
+ export interface AIToolCallGetPageDiff {
5035
+ tool: 'getPageDiff';
5036
+ /** The ID of the space being accessed. */
5037
+ spaceId: string;
5038
+ page: ChangedRevisionPage;
5039
+ }
5040
+ export interface AIToolCallCreateAgentTask {
5041
+ tool: 'createAgentTask';
5042
+ /** The ID of the space the task belongs to. */
5043
+ spaceId: string;
5044
+ action: 'create' | 'update';
5045
+ task: {
5046
+ /** The unique identifier of the task. */
5047
+ id: string;
5048
+ /** The title of the task. */
5049
+ title: string;
5050
+ };
5051
+ }
5052
+ export type AIToolCall = AIToolCallGetPageContent | AIToolCallGetPages | AIToolCallSearch | AIToolCallEditPage | AIToolCallCreatePage | AIToolCallDeletePage | AIToolCallRenamePage | AIToolCallMovePage | AIToolCallListModifiedPages | AIToolCallGetPageDiff | AIToolCallCreateAgentTask;
5070
5053
  /** Message emitted by the server to indicate that the AI has called a tool. */
5071
5054
  export interface AIStreamResponseToolCall {
5072
5055
  type: 'response_tool_call';
5056
+ /** The ID of the message that this event is composing. */
5057
+ messageId: string;
5058
+ /** The index of the step of the message that this event is composing. */
5059
+ stepIndex: number;
5073
5060
  toolCall: AIToolCall;
5074
5061
  }
5075
5062
  export type AIStreamResponse = AIStreamResponseFinish | AIStreamResponseDocument | AIStreamResponseObject | AIStreamResponseToolCall;
@@ -5557,7 +5544,7 @@ export interface SiteAdsStats {
5557
5544
  /**
5558
5545
  * The source path to redirect from.
5559
5546
  * @maxLength 512
5560
- * @pattern ^/[a-zA-Z0-9-_.\/]+[a-zA-Z0-9-_.]$
5547
+ * @pattern ^\/(?:[A-Za-z0-9\-._~]|%[0-9A-Fa-f]{2})+(?:\/(?:[A-Za-z0-9\-._~]|%[0-9A-Fa-f]{2})+)*$
5561
5548
  */
5562
5549
  export type SiteRedirectSourcePath = string;
5563
5550
  export interface SiteRedirectDestinationSiteSection {
@@ -5827,6 +5814,12 @@ export type PublishedSiteContentLookup = {
5827
5814
  target: 'application' | 'content' | 'external';
5828
5815
  redirect: URL;
5829
5816
  } | PublishedSiteContent;
5817
+ /** An object that describes the payload of site visitor info. It can include a jwt token with signed claims and/or a record of its unsigned claims. */
5818
+ export interface SiteVisitorPayload {
5819
+ /** JWT token generated for a visitor auth session. */
5820
+ jwtToken?: string;
5821
+ unsignedClaims?: PlainObject;
5822
+ }
5830
5823
  /**
5831
5824
  * @minLength 64
5832
5825
  * @maxLength 64
@@ -6512,12 +6505,7 @@ export interface CustomizationSettings {
6512
6505
  /** Inherit locale from the parent collection. */
6513
6506
  inherit: boolean;
6514
6507
  };
6515
- favicon: {
6516
- icon: CustomizationThemedURL;
6517
- } | {
6518
- /** Unicode codepoint or character of the emoji */
6519
- emoji: Emoji;
6520
- } | object;
6508
+ favicon: CustomizationFavicon;
6521
6509
  header: {
6522
6510
  /** The header preset to use for the site. This is a legacy setting and the site styling theme should be used instead. */
6523
6511
  preset: CustomizationHeaderPreset;
@@ -6587,6 +6575,93 @@ export interface Seat {
6587
6575
  /** @format date-time */
6588
6576
  updatedAt: string;
6589
6577
  }
6578
+ /** A step in a message from the AI agent. */
6579
+ export interface AIMessageStep {
6580
+ content: JSONDocument;
6581
+ toolCalls?: AIToolCall[];
6582
+ }
6583
+ export interface AIMessage {
6584
+ id: string;
6585
+ role: AIMessageRole;
6586
+ steps: AIMessageStep[];
6587
+ }
6588
+ /** Request to reset the chat. */
6589
+ export interface AgentRequestReset {
6590
+ type: 'reset';
6591
+ }
6592
+ /** Request to post a message to the agent. */
6593
+ export interface AgentRequestPostMessage {
6594
+ type: 'post_message';
6595
+ /** Input version of an AI message. */
6596
+ message: AIMessageInput;
6597
+ }
6598
+ /** Payload to send to the agent. */
6599
+ export type AgentRequest = AgentRequestReset | AgentRequestPostMessage;
6600
+ /** Payload emitted by the agent to reset the messages. */
6601
+ export interface AgentStreamMessages {
6602
+ type: 'messages';
6603
+ operation: 'append' | 'replace';
6604
+ messages: AIMessage[];
6605
+ }
6606
+ /** Payload emitted by the agent with a partial message. */
6607
+ export interface AgentStreamMessageResponse {
6608
+ type: 'message_response';
6609
+ response: AIStreamResponse;
6610
+ }
6611
+ export declare enum AgentStatus {
6612
+ Idle = "idle",
6613
+ Processing = "processing",
6614
+ Errored = "errored"
6615
+ }
6616
+ export interface AgentState {
6617
+ status: AgentStatus;
6618
+ /** A list of response suggestions for the user to select from. */
6619
+ suggestions: string[];
6620
+ }
6621
+ /** Payload emitted by the agent with its current state. */
6622
+ export interface AgentStreamState {
6623
+ type: 'state';
6624
+ state: AgentState;
6625
+ }
6626
+ export type AgentStream = AgentStreamMessages | AgentStreamMessageResponse | AgentStreamState;
6627
+ export interface ConversationMetadata {
6628
+ /** URL to the conversation */
6629
+ url?: string;
6630
+ attributes?: Record<string, string>;
6631
+ /** Date of the conversation creation */
6632
+ createdAt?: Timestamp;
6633
+ }
6634
+ /** A message posted in the conversation by a user or a team member. */
6635
+ export interface ConversationPartMessage {
6636
+ type: 'message';
6637
+ role: 'user' | 'assistant' | 'team-member';
6638
+ /** Markdown or HTML body of the message. */
6639
+ body: string;
6640
+ }
6641
+ export type ConversationPart = ConversationPartMessage;
6642
+ export interface ConversationInput {
6643
+ /**
6644
+ * The unique identifier for the conversation, relative to the source in which it was created.
6645
+ * @minLength 1
6646
+ * @maxLength 255
6647
+ */
6648
+ id: string;
6649
+ metadata?: ConversationMetadata;
6650
+ /**
6651
+ * The subject of the conversation.
6652
+ * @maxLength 512
6653
+ */
6654
+ subject?: string;
6655
+ parts: ConversationPart[];
6656
+ }
6657
+ /** The status of the agent task. - `backlog`: The task has not been started yet, a human should review its specification. - `in-progress`: The task is in progress. - `in-review`: The task is completed, a human should review the result. - `done`: The task is completed. - `rejected`: The task has been rejected by a human. */
6658
+ export declare enum AgentTaskStatus {
6659
+ Backlog = "backlog",
6660
+ InProgress = "in-progress",
6661
+ InReview = "in-review",
6662
+ Done = "done",
6663
+ Rejected = "rejected"
6664
+ }
6590
6665
  export type RequestSpaceTrackPageView = SpaceTrackPageView;
6591
6666
  export type RequestSiteTrackPageView = SiteTrackPageView;
6592
6667
  export type RequestPublishIntegration = PublishIntegration;
@@ -6726,6 +6801,30 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6726
6801
  message: string;
6727
6802
  };
6728
6803
  }>>;
6804
+ /**
6805
+ * @description Update a GitBook account's details.
6806
+ *
6807
+ * @tags users, critical
6808
+ * @name UpdateUserById
6809
+ * @summary Update a user by its ID
6810
+ * @request PATCH:/users/{userId}
6811
+ * @secure
6812
+ */
6813
+ updateUserById: (userId: string, data: {
6814
+ /**
6815
+ * Full name for the user
6816
+ * @minLength 1
6817
+ * @maxLength 64
6818
+ */
6819
+ displayName?: string;
6820
+ photoURL?: URL;
6821
+ }, params?: RequestParams) => Promise<HttpResponse<User, {
6822
+ error: {
6823
+ /** @format int32 */
6824
+ code: 404;
6825
+ message: string;
6826
+ };
6827
+ }>>;
6729
6828
  };
6730
6829
  spaces: {
6731
6830
  /**
@@ -7247,7 +7346,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7247
7346
  /**
7248
7347
  * No description
7249
7348
  *
7250
- * @tags space-content, links
7349
+ * @tags space-content, links, critical
7251
7350
  * @name ListPageLinksInSpace
7252
7351
  * @summary List all space page links
7253
7352
  * @request GET:/spaces/{spaceId}/content/page/{pageId}/links
@@ -7577,7 +7676,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7577
7676
  /**
7578
7677
  * No description
7579
7678
  *
7580
- * @tags change-requests-links, links
7679
+ * @tags change-requests-links, links, critical
7581
7680
  * @name ListChangeRequestLinks
7582
7681
  * @summary List all change request links
7583
7682
  * @request GET:/spaces/{spaceId}/change-requests/{changeRequestId}/links
@@ -7642,6 +7741,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7642
7741
  status?: "all" | "open" | "resolved";
7643
7742
  /** The target page of the comment */
7644
7743
  targetPage?: string;
7744
+ /** User IDs to filter queried comments on */
7745
+ authors?: string[];
7645
7746
  }, params?: RequestParams) => Promise<HttpResponse<List & {
7646
7747
  items: Comment[];
7647
7748
  }, any>>;
@@ -7928,7 +8029,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7928
8029
  /**
7929
8030
  * No description
7930
8031
  *
7931
- * @tags change-request-content
8032
+ * @tags change-request-content, critical
7932
8033
  * @name ListPageLinksInChangeRequest
7933
8034
  * @summary List all change request links
7934
8035
  * @request GET:/spaces/{spaceId}/change-requests/{changeRequestId}/content/page/{pageId}/links
@@ -8232,7 +8333,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8232
8333
  /**
8233
8334
  * No description
8234
8335
  *
8235
- * @tags space-comments
8336
+ * @tags space-comments, critical
8236
8337
  * @name ListCommentsInSpace
8237
8338
  * @summary List all space comments
8238
8339
  * @request GET:/spaces/{spaceId}/comments
@@ -8261,6 +8362,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8261
8362
  format?: "document" | "markdown";
8262
8363
  /** The target page of the comment */
8263
8364
  targetPage?: string;
8365
+ /** User IDs to filter queried comments on */
8366
+ authors?: string[];
8264
8367
  }, params?: RequestParams) => Promise<HttpResponse<List & {
8265
8368
  items: Comment[];
8266
8369
  }, any>>;
@@ -8373,6 +8476,48 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8373
8476
  * @secure
8374
8477
  */
8375
8478
  deleteCommentReplyInSpace: (spaceId: string, commentId: string, commentReplyId: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
8479
+ /**
8480
+ * No description
8481
+ *
8482
+ * @tags space-comments, critical
8483
+ * @name ListCommentersInSpace
8484
+ * @summary List all users who commented in a space
8485
+ * @request GET:/spaces/{spaceId}/commenters
8486
+ * @secure
8487
+ */
8488
+ listCommentersInSpace: (spaceId: string, query?: {
8489
+ /** Identifier of the page results to fetch. */
8490
+ page?: string;
8491
+ /**
8492
+ * The number of results per page
8493
+ * @min 0
8494
+ * @max 1000
8495
+ */
8496
+ limit?: number;
8497
+ }, params?: RequestParams) => Promise<HttpResponse<List & {
8498
+ items: OrganizationMember[];
8499
+ }, any>>;
8500
+ /**
8501
+ * No description
8502
+ *
8503
+ * @tags change-request-comments, critical
8504
+ * @name ListCommentersInChangeRequest
8505
+ * @summary List all users who commented in a CR
8506
+ * @request GET:/spaces/{spaceId}/change-requests/{changeRequestId}/commenters
8507
+ * @secure
8508
+ */
8509
+ listCommentersInChangeRequest: (spaceId: string, changeRequestId: string, query?: {
8510
+ /** Identifier of the page results to fetch. */
8511
+ page?: string;
8512
+ /**
8513
+ * The number of results per page
8514
+ * @min 0
8515
+ * @max 1000
8516
+ */
8517
+ limit?: number;
8518
+ }, params?: RequestParams) => Promise<HttpResponse<List & {
8519
+ items: OrganizationMember[];
8520
+ }, any>>;
8376
8521
  /**
8377
8522
  * No description
8378
8523
  *
@@ -8484,7 +8629,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8484
8629
  /**
8485
8630
  * No description
8486
8631
  *
8487
- * @tags spaces, links
8632
+ * @tags spaces, links, critical
8488
8633
  * @name ListSpaceLinks
8489
8634
  * @summary Get all links in a space including their status and location where they appear.
8490
8635
  * @request GET:/spaces/{spaceId}/links
@@ -9371,7 +9516,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
9371
9516
  /**
9372
9517
  * No description
9373
9518
  *
9374
- * @tags organizations
9519
+ * @tags organizations, critical
9375
9520
  * @name ListOrganizationsForAuthenticatedUser
9376
9521
  * @summary Get the list of organizations for the currently authenticated user
9377
9522
  * @request GET:/orgs
@@ -9472,7 +9617,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
9472
9617
  /**
9473
9618
  * No description
9474
9619
  *
9475
- * @tags organization-members
9620
+ * @tags organization-members, critical
9476
9621
  * @name GetMemberInOrganizationById
9477
9622
  * @summary Get an organization member by its ID
9478
9623
  * @request GET:/orgs/{organizationId}/members/{userId}
@@ -11501,12 +11646,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11501
11646
  locale: CustomizationLocale | null;
11502
11647
  };
11503
11648
  /** The favicon to use. Set to null to reset the override. */
11504
- favicon?: {
11505
- icon: CustomizationThemedURL;
11506
- } | {
11507
- /** Unicode codepoint or character of the emoji */
11508
- emoji: Emoji;
11509
- } | object | null;
11649
+ favicon?: CustomizationFavicon | null;
11510
11650
  announcement?: CustomizationAnnouncement;
11511
11651
  header?: {
11512
11652
  /** The theme preset to use. Set to null to reset the override. */
@@ -11700,6 +11840,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11700
11840
  streamAiResponseInSite: (organizationId: string, siteId: string, data: {
11701
11841
  /** The ID of the previous response to continue from */
11702
11842
  previousResponseId?: string;
11843
+ /** Instructions for the AI */
11844
+ instructions?: string;
11703
11845
  input: AIMessageInput[];
11704
11846
  output: AIOutputFormat;
11705
11847
  model?: AIModel;
@@ -12012,6 +12154,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12012
12154
  * @name GetPublishedContentByUrl
12013
12155
  * @summary Resolve a URL of a published content.
12014
12156
  * @request GET:/urls/published
12157
+ * @deprecated
12015
12158
  * @secure
12016
12159
  */
12017
12160
  getPublishedContentByUrl: (query: {
@@ -12031,6 +12174,32 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12031
12174
  message: string;
12032
12175
  };
12033
12176
  }>>;
12177
+ /**
12178
+ * No description
12179
+ *
12180
+ * @tags urls
12181
+ * @name ResolvePublishedContentByUrl
12182
+ * @summary Resolve a URL of a published content.
12183
+ * @request POST:/urls/published
12184
+ * @secure
12185
+ */
12186
+ resolvePublishedContentByUrl: (data: {
12187
+ /** URL to resolve */
12188
+ url: URL;
12189
+ /**
12190
+ * When true redirects the user to the authentication/fallback URL if the visitor auth token is invalid
12191
+ * @default false
12192
+ */
12193
+ redirectOnError?: boolean;
12194
+ /** An object that describes the payload of site visitor info. It can include a jwt token with signed claims and/or a record of its unsigned claims. */
12195
+ visitor?: SiteVisitorPayload;
12196
+ }, params?: RequestParams) => Promise<HttpResponse<PublishedSiteContentLookup, {
12197
+ error: {
12198
+ /** @format int32 */
12199
+ code: 404;
12200
+ message: string;
12201
+ };
12202
+ }>>;
12034
12203
  };
12035
12204
  }
12036
12205
  export {};