@gitbook/api 0.116.0 → 0.117.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
@@ -1105,8 +1105,9 @@ export interface DocumentBlockColumn {
1105
1105
  object: 'block';
1106
1106
  type: 'column';
1107
1107
  key?: string;
1108
- nodes: DocumentBlocksEssentials[];
1108
+ nodes: (DocumentBlocksEssentials | DocumentBlockImages)[];
1109
1109
  isVoid?: false;
1110
+ data: object;
1110
1111
  }
1111
1112
  export interface DocumentBlockColumns {
1112
1113
  object: 'block';
@@ -1750,6 +1751,8 @@ export interface Organization {
1750
1751
  createContent: boolean;
1751
1752
  /** Can the user create new OpenAPI specifications. */
1752
1753
  createOpenAPISpec: boolean;
1754
+ /** Can the user ingest conversations in the organization. */
1755
+ ingestConversations: boolean;
1753
1756
  /** Can the user view the billing details of the organization. */
1754
1757
  viewBilling: boolean;
1755
1758
  /** Can the user list the members of the organization. */
@@ -1979,10 +1982,6 @@ export interface ContentReferenceUsage {
1979
1982
  /** Pages locations where a link to the target is found. */
1980
1983
  locationReferences: ContentLocation[];
1981
1984
  }
1982
- export interface CreateChangeRequest {
1983
- /** Subject of the change-request */
1984
- subject?: string;
1985
- }
1986
1985
  /** Status of a change request review. */
1987
1986
  export declare enum ChangeRequestReviewStatus {
1988
1987
  ChangesRequested = "changes-requested",
@@ -2402,7 +2401,8 @@ export declare enum IntegrationScope {
2402
2401
  SiteAdaptiveRead = "site:adaptive:read",
2403
2402
  SiteAdaptiveWrite = "site:adaptive:write",
2404
2403
  OpenapiRead = "openapi:read",
2405
- OpenapiWrite = "openapi:write"
2404
+ OpenapiWrite = "openapi:write",
2405
+ ConversationsIngest = "conversations:ingest"
2406
2406
  }
2407
2407
  /** Permissions that should be granted to the integration */
2408
2408
  export type IntegrationScopes = IntegrationScope[];
@@ -4267,6 +4267,200 @@ export interface OpenAPISpecContent {
4267
4267
  filesystem: object;
4268
4268
  url: URL;
4269
4269
  }
4270
+ export interface ConversationsIssuesCluster {
4271
+ object: 'issues-cluster';
4272
+ /** The ID of the conversations issues cluster */
4273
+ id: string;
4274
+ /** The label of the conversations issues cluster */
4275
+ label: string;
4276
+ createdAt: Timestamp;
4277
+ updatedAt: Timestamp;
4278
+ /** Name of the icon */
4279
+ icon: Icon;
4280
+ /** The summary of the conversations issues cluster */
4281
+ summary: string;
4282
+ /**
4283
+ * The weekly pulse of the conversations issues cluster for the past 3 months
4284
+ * @maxItems 13
4285
+ * @minItems 13
4286
+ */
4287
+ weeklyPulse: number[];
4288
+ sources: Record<string, number>;
4289
+ /** The stats of the conversations issues cluster */
4290
+ stats: {
4291
+ /** The number of issues in the conversations issues cluster */
4292
+ issues: number;
4293
+ /** The number of conversations in the conversations issues cluster */
4294
+ conversations: number;
4295
+ /** The number of tasks in the conversations issues cluster */
4296
+ tasksTotal: number;
4297
+ /** The number of tasks in the backlog in the conversations issues cluster */
4298
+ tasksBacklog: number;
4299
+ /** The number of tasks done in the conversations issues cluster */
4300
+ tasksStarted: number;
4301
+ /** The number of tasks completed in the conversations issues cluster */
4302
+ tasksCompleted: number;
4303
+ /** The number of tasks canceled in the conversations issues cluster */
4304
+ tasksCancelled: number;
4305
+ };
4306
+ /** URLs associated with the conversations issues cluster */
4307
+ urls: {
4308
+ /**
4309
+ * URL of the conversations issues cluster in the API
4310
+ * @format uri
4311
+ */
4312
+ location: string;
4313
+ /**
4314
+ * URL of the conversations issues cluster in the application
4315
+ * @format uri
4316
+ */
4317
+ app: string;
4318
+ };
4319
+ }
4320
+ export interface ConversationIssue {
4321
+ object: 'conversation-issue';
4322
+ /** The ID of the conversation issue */
4323
+ id: string;
4324
+ /** The title of the conversation issue */
4325
+ title: string;
4326
+ /** The summary of the conversation issue */
4327
+ summary: string;
4328
+ createdAt: Timestamp;
4329
+ ingestedAt: Timestamp;
4330
+ /** The ID of the conversation the issue belongs to */
4331
+ conversation: string;
4332
+ /** The ID of the cluster the issue has been linked to */
4333
+ cluster?: string;
4334
+ /** URLs associated with the conversation issue */
4335
+ urls: {
4336
+ /**
4337
+ * URL of the conversation issue in the API
4338
+ * @format uri
4339
+ */
4340
+ location: string;
4341
+ };
4342
+ }
4343
+ /** Integration source */
4344
+ export type ConversationSource = string | 'email';
4345
+ export interface Conversation {
4346
+ object: 'conversation';
4347
+ /** The ID of the conversation */
4348
+ id: string;
4349
+ /** The subject of the conversation */
4350
+ subject?: string;
4351
+ createdAt: Timestamp;
4352
+ processedAt?: Timestamp;
4353
+ /** Integration source */
4354
+ source: ConversationSource;
4355
+ /** URLs associated with the conversation */
4356
+ urls: {
4357
+ /**
4358
+ * URL of the conversation in the API
4359
+ * @format uri
4360
+ */
4361
+ location: string;
4362
+ /**
4363
+ * URL of the conversation in the source
4364
+ * @format uri
4365
+ */
4366
+ source?: string;
4367
+ };
4368
+ }
4369
+ export interface ConversationMetadata {
4370
+ /** URL to the conversation */
4371
+ url?: string;
4372
+ attributes?: Record<string, string>;
4373
+ /** Date of the conversation creation */
4374
+ createdAt?: Timestamp;
4375
+ }
4376
+ /** A message posted in the conversation by a user or a team member. */
4377
+ export interface ConversationPartMessage {
4378
+ type: 'message';
4379
+ role: 'user' | 'assistant' | 'team-member';
4380
+ /** Markdown or HTML body of the message. */
4381
+ body: string;
4382
+ }
4383
+ export type ConversationPart = ConversationPartMessage;
4384
+ export interface ConversationInput {
4385
+ /**
4386
+ * The unique identifier for the conversation, relative to the source in which it was created.
4387
+ * @minLength 1
4388
+ * @maxLength 255
4389
+ */
4390
+ id: string;
4391
+ metadata?: ConversationMetadata;
4392
+ /**
4393
+ * The subject of the conversation.
4394
+ * @maxLength 512
4395
+ */
4396
+ subject?: string;
4397
+ parts: ConversationPart[];
4398
+ }
4399
+ /** State and settings of the agent */
4400
+ export interface AgentsSetupState {
4401
+ /** The email address of the agent. Emails can be forwarded to it to ingest conversations. */
4402
+ email: string;
4403
+ /** The stats of the agent. */
4404
+ stats: {
4405
+ /** The number of tasks in the backlog. */
4406
+ backlogTasks: number;
4407
+ /** The number of tasks in progress. */
4408
+ startedTasks: number;
4409
+ /** The number of tasks that have been completed. */
4410
+ completedTasks: number;
4411
+ /** The number of tasks that have been canceled. */
4412
+ canceledTasks: number;
4413
+ /** The number of conversations the agent has indexed. */
4414
+ conversations: number;
4415
+ /** The number of issues the agent has indexed. */
4416
+ issues: number;
4417
+ /** The number of issues clusters the agent has indexed. */
4418
+ issuesClusters: number;
4419
+ sources: Record<string, number>;
4420
+ };
4421
+ /** The settings for the agent. */
4422
+ settings: object;
4423
+ }
4424
+ /** The status of the agent task. - `backlog`: The task has not been started yet, a human should review its specification. - `started`: The task is open, a change request is associated with it. - `completed`: The task is completed. - `canceled`: The task has been canceled by a human. */
4425
+ export declare enum AgentTaskStatus {
4426
+ Backlog = "backlog",
4427
+ Started = "started",
4428
+ Completed = "completed",
4429
+ Canceled = "canceled"
4430
+ }
4431
+ export interface AgentTask {
4432
+ object: 'agent-task';
4433
+ /** The ID of the agent task */
4434
+ id: string;
4435
+ /** The title of the agent task */
4436
+ title: string;
4437
+ /** The description of the agent task */
4438
+ description: string;
4439
+ instructions: JSONDocument;
4440
+ /** The status of the agent task. - `backlog`: The task has not been started yet, a human should review its specification. - `started`: The task is open, a change request is associated with it. - `completed`: The task is completed. - `canceled`: The task has been canceled by a human. */
4441
+ status: AgentTaskStatus;
4442
+ createdAt: Timestamp;
4443
+ updatedAt: Timestamp;
4444
+ /** ID of the cluster the agent task is associated with. */
4445
+ cluster?: string;
4446
+ /** ID of the space the agent task will act on. */
4447
+ space: string;
4448
+ /** ID of the change request the agent task is associated with. */
4449
+ changeRequest?: string;
4450
+ /** URLs associated with the agent task */
4451
+ urls: {
4452
+ /**
4453
+ * URL of the agent task in the API
4454
+ * @format uri
4455
+ */
4456
+ location: string;
4457
+ /**
4458
+ * URL of the agent task in the application
4459
+ * @format uri
4460
+ */
4461
+ app: string;
4462
+ };
4463
+ }
4270
4464
  /**
4271
4465
  * Title of the translation settings
4272
4466
  * @minLength 1
@@ -6446,8 +6640,22 @@ export interface TranslationSettingsChannel {
6446
6640
  channel: 'translation-settings';
6447
6641
  translation: string;
6448
6642
  }
6643
+ /** Subscription channel for an agent task. */
6644
+ export interface AgentTaskChannel {
6645
+ channel: 'agent-task';
6646
+ /** The ID of the organization. */
6647
+ organization: string;
6648
+ /** The ID of the agent task. */
6649
+ agentTask: string;
6650
+ }
6651
+ /** Subscription channel for agent tasks. */
6652
+ export interface AgentTasksChannel {
6653
+ channel: 'agent-tasks';
6654
+ /** The ID of the organization. */
6655
+ organization: string;
6656
+ }
6449
6657
  /** Channel to subscribe to for realtime updates. */
6450
- export type SubscriptionChannel = SpaceInfoChannel | SpaceContentChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceCustomFieldsChannel | SpaceContentRefsChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | UserAPITokensChannel | UserOrganizationsChannel | UserProfileChannel | ChangeRequestChannel | ChangeRequestsChannel | ChangeRequestReviewsChannel | ChangeRequestContentRefsChannel | CollectionChannel | CollectionPublishingCustomizationChannel | OrganizationInfoChannel | OrganizationInviteLinksChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationSAMLChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationCollectionsChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | OrganizationSitesChannel | OrganizationAIIndexationChannel | OrganizationOpenAPISpecsChannel | OrganizationTranslationSettingsChannel | OrganizationCustomFontsChannel | SpaceCommentsChannel | ChangeRequestCommentsChannel | CommentInfoChannel | CommentReplyInfoChannel | CommentRepliesChannel | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel | IntegrationSiteInstallationChannel | IntegrationSiteInstallationsChannel | PublishedContentSiteChannel | SiteRedirectsChannel | SiteChannel | SiteCustomizationChannel | SiteIntegrationsChannel | SiteSpaceChannel | SiteSpaceCustomizationChannel | SiteStructureChannel | SiteAdaptiveSchemaChannel | SitePublishingAuthChannel | SiteShareLinksChannel | SiteShareLinkChannel | SiteSectionChannel | CustomHostnameChannel | GitSyncSettingsChannel | GitSyncOperationChannel | OpenAPISpecChannel | SubdomainChannel | TranslationSettingsChannel;
6658
+ export type SubscriptionChannel = SpaceInfoChannel | SpaceContentChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceCustomFieldsChannel | SpaceContentRefsChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | UserAPITokensChannel | UserOrganizationsChannel | UserProfileChannel | ChangeRequestChannel | ChangeRequestsChannel | ChangeRequestReviewsChannel | ChangeRequestContentRefsChannel | CollectionChannel | CollectionPublishingCustomizationChannel | OrganizationInfoChannel | OrganizationInviteLinksChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationSAMLChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationCollectionsChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | OrganizationSitesChannel | OrganizationAIIndexationChannel | OrganizationOpenAPISpecsChannel | OrganizationTranslationSettingsChannel | OrganizationCustomFontsChannel | SpaceCommentsChannel | ChangeRequestCommentsChannel | CommentInfoChannel | CommentReplyInfoChannel | CommentRepliesChannel | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel | IntegrationSiteInstallationChannel | IntegrationSiteInstallationsChannel | PublishedContentSiteChannel | SiteRedirectsChannel | SiteChannel | SiteCustomizationChannel | SiteIntegrationsChannel | SiteSpaceChannel | SiteSpaceCustomizationChannel | SiteStructureChannel | SiteAdaptiveSchemaChannel | SitePublishingAuthChannel | SiteShareLinksChannel | SiteShareLinkChannel | SiteSectionChannel | CustomHostnameChannel | GitSyncSettingsChannel | GitSyncOperationChannel | OpenAPISpecChannel | SubdomainChannel | TranslationSettingsChannel | AgentTaskChannel | AgentTasksChannel;
6451
6659
  export interface GitSyncOperationChannelData {
6452
6660
  channel: 'space-gitsync-operation';
6453
6661
  data: GitSyncOperation;
@@ -6624,44 +6832,6 @@ export interface AgentStreamState {
6624
6832
  state: AgentState;
6625
6833
  }
6626
6834
  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
- }
6665
6835
  export type RequestSpaceTrackPageView = SpaceTrackPageView;
6666
6836
  export type RequestSiteTrackPageView = SiteTrackPageView;
6667
6837
  export type RequestPublishIntegration = PublishIntegration;
@@ -6674,7 +6844,6 @@ export type RequestImportGitRepository = ImportGitRepository;
6674
6844
  export type RequestExportToGitRepository = ExportToGitRepository;
6675
6845
  export type RequestImportContent = ImportContent;
6676
6846
  export type RequestCreateSpace = CreateSpace;
6677
- export type RequestCreateChangeRequest = CreateChangeRequest;
6678
6847
  export type RequestRenderIntegrationUI = RenderIntegrationUI;
6679
6848
  export type RequestUpdateContentPublishingAuth = UpdateContentPublishingAuth;
6680
6849
  export type RequestCreateOrganization = CreateOrganization;
@@ -7503,7 +7672,12 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7503
7672
  * @request POST:/spaces/{spaceId}/change-requests
7504
7673
  * @secure
7505
7674
  */
7506
- createChangeRequest: (spaceId: string, data: CreateChangeRequest, params?: RequestParams) => Promise<HttpResponse<ChangeRequest, any>>;
7675
+ createChangeRequest: (spaceId: string, data: {
7676
+ /** Subject of the change-request */
7677
+ subject?: string;
7678
+ /** ID of the agent task to implement */
7679
+ agentTaskId?: string;
7680
+ }, params?: RequestParams) => Promise<HttpResponse<ChangeRequest, any>>;
7507
7681
  /**
7508
7682
  * No description
7509
7683
  *
@@ -8990,6 +9164,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
8990
9164
  contentSources?: boolean;
8991
9165
  /** If defined, only list integrations owned by the given organization. */
8992
9166
  owner?: string;
9167
+ /** Filter the integrations by scope */
9168
+ scope?: IntegrationScope;
8993
9169
  }, params?: RequestParams) => Promise<HttpResponse<List & {
8994
9170
  items: Integration[];
8995
9171
  }, any>>;
@@ -10560,6 +10736,163 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10560
10736
  message: string;
10561
10737
  };
10562
10738
  }>>;
10739
+ /**
10740
+ * No description
10741
+ *
10742
+ * @tags agents
10743
+ * @name ListConversationsIssuesClusters
10744
+ * @summary List conversations issues clusters
10745
+ * @request GET:/orgs/{organizationId}/conversations-clusters
10746
+ * @secure
10747
+ */
10748
+ listConversationsIssuesClusters: (organizationId: string, query?: {
10749
+ /** Identifier of the page results to fetch. */
10750
+ page?: string;
10751
+ /**
10752
+ * The number of results per page
10753
+ * @min 0
10754
+ * @max 1000
10755
+ */
10756
+ limit?: number;
10757
+ /**
10758
+ * An order for the items in the list
10759
+ * @default "desc"
10760
+ */
10761
+ order?: "asc" | "desc";
10762
+ /** @default "updatedAt" */
10763
+ orderBy?: "updatedAt" | "issues" | "conversations" | "tasksTotal" | "tasksBacklog" | "tasksStarted";
10764
+ /** Filter by status */
10765
+ status?: "pending" | "analysing";
10766
+ }, params?: RequestParams) => Promise<HttpResponse<List & {
10767
+ items: ConversationsIssuesCluster[];
10768
+ }, {
10769
+ error: {
10770
+ /** @format int32 */
10771
+ code: 404;
10772
+ message: string;
10773
+ };
10774
+ }>>;
10775
+ /**
10776
+ * No description
10777
+ *
10778
+ * @tags agents
10779
+ * @name GetConversationsIssuesCluster
10780
+ * @summary Get a conversations issues cluster by its identifier
10781
+ * @request GET:/orgs/{organizationId}/conversations-clusters/{clusterId}
10782
+ * @secure
10783
+ */
10784
+ getConversationsIssuesCluster: (organizationId: string, clusterId: string, params?: RequestParams) => Promise<HttpResponse<ConversationsIssuesCluster, any>>;
10785
+ /**
10786
+ * No description
10787
+ *
10788
+ * @tags agents
10789
+ * @name ListConversationsIssuesInCluster
10790
+ * @summary List conversations issues in a cluster
10791
+ * @request GET:/orgs/{organizationId}/conversations-clusters/{clusterId}/issues
10792
+ * @secure
10793
+ */
10794
+ listConversationsIssuesInCluster: (organizationId: string, clusterId: string, query?: {
10795
+ /** Identifier of the page results to fetch. */
10796
+ page?: string;
10797
+ /**
10798
+ * The number of results per page
10799
+ * @min 0
10800
+ * @max 1000
10801
+ */
10802
+ limit?: number;
10803
+ }, params?: RequestParams) => Promise<HttpResponse<List & {
10804
+ items: {
10805
+ issue: ConversationIssue;
10806
+ conversation: Conversation;
10807
+ }[];
10808
+ }, {
10809
+ error: {
10810
+ /** @format int32 */
10811
+ code: 404;
10812
+ message: string;
10813
+ };
10814
+ }>>;
10815
+ /**
10816
+ * No description
10817
+ *
10818
+ * @tags conversations
10819
+ * @name IngestConversation
10820
+ * @summary Ingest conversations
10821
+ * @request POST:/orgs/{organizationId}/conversations
10822
+ * @secure
10823
+ */
10824
+ ingestConversation: (organizationId: string, data: ConversationInput | ConversationInput[], params?: RequestParams) => Promise<HttpResponse<void, any>>;
10825
+ /**
10826
+ * @description Get the state of the agent.
10827
+ *
10828
+ * @tags agents, critical
10829
+ * @name GetAgentSetupState
10830
+ * @summary Get the agents setup state
10831
+ * @request GET:/orgs/{organizationId}/agents-setup
10832
+ * @secure
10833
+ */
10834
+ getAgentSetupState: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<AgentsSetupState, any>>;
10835
+ /**
10836
+ * No description
10837
+ *
10838
+ * @tags agents
10839
+ * @name ListAgentTasks
10840
+ * @summary List agent tasks
10841
+ * @request GET:/orgs/{organizationId}/agent-tasks
10842
+ * @secure
10843
+ */
10844
+ listAgentTasks: (organizationId: string, query?: {
10845
+ /** Identifier of the page results to fetch. */
10846
+ page?: string;
10847
+ /**
10848
+ * The number of results per page
10849
+ * @min 0
10850
+ * @max 1000
10851
+ */
10852
+ limit?: number;
10853
+ /** The ID of the conversations issues cluster to filter the agent tasks by */
10854
+ cluster?: string;
10855
+ /** The ID of the space to filter the agent tasks by */
10856
+ space?: string;
10857
+ /** The statuses of the agent tasks to filter by */
10858
+ status?: AgentTaskStatus[];
10859
+ }, params?: RequestParams) => Promise<HttpResponse<List & {
10860
+ items: AgentTask[];
10861
+ }, {
10862
+ error: {
10863
+ /** @format int32 */
10864
+ code: 404;
10865
+ message: string;
10866
+ };
10867
+ }>>;
10868
+ /**
10869
+ * No description
10870
+ *
10871
+ * @tags agents
10872
+ * @name GetAgentTask
10873
+ * @summary Get an agent task by its identifier
10874
+ * @request GET:/orgs/{organizationId}/agent-tasks/{agentTaskId}
10875
+ * @secure
10876
+ */
10877
+ getAgentTask: (organizationId: string, agentTaskId: string, params?: RequestParams) => Promise<HttpResponse<AgentTask, {
10878
+ error: {
10879
+ /** @format int32 */
10880
+ code: 404;
10881
+ message: string;
10882
+ };
10883
+ }>>;
10884
+ /**
10885
+ * No description
10886
+ *
10887
+ * @tags agents
10888
+ * @name UpdateAgentTask
10889
+ * @summary Update an agent task by its identifier
10890
+ * @request PATCH:/orgs/{organizationId}/agent-tasks/{agentTaskId}
10891
+ * @secure
10892
+ */
10893
+ updateAgentTask: (organizationId: string, agentTaskId: string, data: {
10894
+ status: "backlog" | "started" | "canceled";
10895
+ }, params?: RequestParams) => Promise<HttpResponse<AgentTask, any>>;
10563
10896
  /**
10564
10897
  * No description
10565
10898
  *
package/dist/index.cjs CHANGED
@@ -268,7 +268,7 @@ module.exports = __toCommonJS(src_exports);
268
268
 
269
269
  // package.json
270
270
  var name = "@gitbook/api";
271
- var version = "0.116.0";
271
+ var version = "0.117.0";
272
272
 
273
273
  // src/client.ts
274
274
  var import_event_iterator = __toESM(require_node(), 1);
@@ -595,6 +595,7 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
595
595
  IntegrationScope2["SiteAdaptiveWrite"] = "site:adaptive:write";
596
596
  IntegrationScope2["OpenapiRead"] = "openapi:read";
597
597
  IntegrationScope2["OpenapiWrite"] = "openapi:write";
598
+ IntegrationScope2["ConversationsIngest"] = "conversations:ingest";
598
599
  return IntegrationScope2;
599
600
  })(IntegrationScope || {});
600
601
  var IntegrationCategory = /* @__PURE__ */ ((IntegrationCategory2) => {
@@ -703,6 +704,13 @@ var SAMLProviderStatus = /* @__PURE__ */ ((SAMLProviderStatus2) => {
703
704
  SAMLProviderStatus2["Pending"] = "pending";
704
705
  return SAMLProviderStatus2;
705
706
  })(SAMLProviderStatus || {});
707
+ var AgentTaskStatus = /* @__PURE__ */ ((AgentTaskStatus2) => {
708
+ AgentTaskStatus2["Backlog"] = "backlog";
709
+ AgentTaskStatus2["Started"] = "started";
710
+ AgentTaskStatus2["Completed"] = "completed";
711
+ AgentTaskStatus2["Canceled"] = "canceled";
712
+ return AgentTaskStatus2;
713
+ })(AgentTaskStatus || {});
706
714
  var StorageUploadKind = /* @__PURE__ */ ((StorageUploadKind2) => {
707
715
  StorageUploadKind2["CustomizationFont"] = "customization_font";
708
716
  return StorageUploadKind2;
@@ -1000,14 +1008,6 @@ var AgentStatus = /* @__PURE__ */ ((AgentStatus2) => {
1000
1008
  AgentStatus2["Errored"] = "errored";
1001
1009
  return AgentStatus2;
1002
1010
  })(AgentStatus || {});
1003
- var AgentTaskStatus = /* @__PURE__ */ ((AgentTaskStatus2) => {
1004
- AgentTaskStatus2["Backlog"] = "backlog";
1005
- AgentTaskStatus2["InProgress"] = "in-progress";
1006
- AgentTaskStatus2["InReview"] = "in-review";
1007
- AgentTaskStatus2["Done"] = "done";
1008
- AgentTaskStatus2["Rejected"] = "rejected";
1009
- return AgentTaskStatus2;
1010
- })(AgentTaskStatus || {});
1011
1011
  var ContentType = /* @__PURE__ */ ((ContentType2) => {
1012
1012
  ContentType2["Json"] = "application/json";
1013
1013
  ContentType2["FormData"] = "multipart/form-data";
@@ -2846,6 +2846,68 @@ var Api = class extends HttpClient {
2846
2846
  format: "json",
2847
2847
  ...params
2848
2848
  }),
2849
+ listConversationsIssuesClusters: (organizationId, query, params = {}) => this.request({
2850
+ path: `/orgs/${organizationId}/conversations-clusters`,
2851
+ method: "GET",
2852
+ query,
2853
+ secure: true,
2854
+ format: "json",
2855
+ ...params
2856
+ }),
2857
+ getConversationsIssuesCluster: (organizationId, clusterId, params = {}) => this.request({
2858
+ path: `/orgs/${organizationId}/conversations-clusters/${clusterId}`,
2859
+ method: "GET",
2860
+ secure: true,
2861
+ format: "json",
2862
+ ...params
2863
+ }),
2864
+ listConversationsIssuesInCluster: (organizationId, clusterId, query, params = {}) => this.request({
2865
+ path: `/orgs/${organizationId}/conversations-clusters/${clusterId}/issues`,
2866
+ method: "GET",
2867
+ query,
2868
+ secure: true,
2869
+ format: "json",
2870
+ ...params
2871
+ }),
2872
+ ingestConversation: (organizationId, data, params = {}) => this.request({
2873
+ path: `/orgs/${organizationId}/conversations`,
2874
+ method: "POST",
2875
+ body: data,
2876
+ secure: true,
2877
+ type: "application/json" /* Json */,
2878
+ ...params
2879
+ }),
2880
+ getAgentSetupState: (organizationId, params = {}) => this.request({
2881
+ path: `/orgs/${organizationId}/agents-setup`,
2882
+ method: "GET",
2883
+ secure: true,
2884
+ format: "json",
2885
+ ...params
2886
+ }),
2887
+ listAgentTasks: (organizationId, query, params = {}) => this.request({
2888
+ path: `/orgs/${organizationId}/agent-tasks`,
2889
+ method: "GET",
2890
+ query,
2891
+ secure: true,
2892
+ format: "json",
2893
+ ...params
2894
+ }),
2895
+ getAgentTask: (organizationId, agentTaskId, params = {}) => this.request({
2896
+ path: `/orgs/${organizationId}/agent-tasks/${agentTaskId}`,
2897
+ method: "GET",
2898
+ secure: true,
2899
+ format: "json",
2900
+ ...params
2901
+ }),
2902
+ updateAgentTask: (organizationId, agentTaskId, data, params = {}) => this.request({
2903
+ path: `/orgs/${organizationId}/agent-tasks/${agentTaskId}`,
2904
+ method: "PATCH",
2905
+ body: data,
2906
+ secure: true,
2907
+ type: "application/json" /* Json */,
2908
+ format: "json",
2909
+ ...params
2910
+ }),
2849
2911
  listTranslationSettings: (organizationId, query, params = {}) => this.request({
2850
2912
  path: `/orgs/${organizationId}/translations`,
2851
2913
  method: "GET",