@breign/client 1.0.164 → 1.0.166

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.
Files changed (137) hide show
  1. package/dist/apis/InboxApi.d.ts +61 -0
  2. package/dist/apis/InboxApi.js +156 -0
  3. package/dist/apis/KnowledgeApi.d.ts +43 -1
  4. package/dist/apis/KnowledgeApi.js +104 -0
  5. package/dist/apis/ProjectsApi.d.ts +113 -0
  6. package/dist/apis/ProjectsApi.js +278 -0
  7. package/dist/apis/TicketsApi.d.ts +288 -0
  8. package/dist/apis/TicketsApi.js +690 -0
  9. package/dist/apis/index.d.ts +3 -0
  10. package/dist/apis/index.js +3 -0
  11. package/dist/models/AcceptTicketProposalRequestUio.d.ts +72 -0
  12. package/dist/models/AcceptTicketProposalRequestUio.js +64 -0
  13. package/dist/models/ActorRefUio.d.ts +39 -0
  14. package/dist/models/ActorRefUio.js +55 -0
  15. package/dist/models/ActorTypeUio.d.ts +26 -0
  16. package/dist/models/ActorTypeUio.js +52 -0
  17. package/dist/models/AddKnowledgeSiteExclusionRequestUio.d.ts +32 -0
  18. package/dist/models/AddKnowledgeSiteExclusionRequestUio.js +50 -0
  19. package/dist/models/AddKnowledgeSiteExclusionResponseUio.d.ts +44 -0
  20. package/dist/models/AddKnowledgeSiteExclusionResponseUio.js +58 -0
  21. package/dist/models/AgentTicketActivityUio.d.ts +69 -0
  22. package/dist/models/AgentTicketActivityUio.js +75 -0
  23. package/dist/models/AgentTicketCreationUio.d.ts +25 -0
  24. package/dist/models/AgentTicketCreationUio.js +51 -0
  25. package/dist/models/ChatMessageUio.d.ts +7 -0
  26. package/dist/models/ChatMessageUio.js +3 -0
  27. package/dist/models/ConversationTicketProposalUio.d.ts +71 -0
  28. package/dist/models/ConversationTicketProposalUio.js +77 -0
  29. package/dist/models/CreateProjectRequestUio.d.ts +70 -0
  30. package/dist/models/CreateProjectRequestUio.js +66 -0
  31. package/dist/models/CreateTicketArtifactRequestUio.d.ts +44 -0
  32. package/dist/models/CreateTicketArtifactRequestUio.js +56 -0
  33. package/dist/models/CreateTicketArtifactResponseUio.d.ts +40 -0
  34. package/dist/models/CreateTicketArtifactResponseUio.js +56 -0
  35. package/dist/models/CreateTicketEventRequestUio.d.ts +38 -0
  36. package/dist/models/CreateTicketEventRequestUio.js +52 -0
  37. package/dist/models/CreateTicketRequestUio.d.ts +85 -0
  38. package/dist/models/CreateTicketRequestUio.js +71 -0
  39. package/dist/models/FileCreationResponseUio.d.ts +7 -0
  40. package/dist/models/FileCreationResponseUio.js +2 -0
  41. package/dist/models/FileUio.d.ts +7 -0
  42. package/dist/models/FileUio.js +2 -0
  43. package/dist/models/FileWithDownloadUrlUio.d.ts +7 -0
  44. package/dist/models/FileWithDownloadUrlUio.js +2 -0
  45. package/dist/models/InboxCountUio.d.ts +38 -0
  46. package/dist/models/InboxCountUio.js +54 -0
  47. package/dist/models/InboxItemKindUio.d.ts +28 -0
  48. package/dist/models/InboxItemKindUio.js +54 -0
  49. package/dist/models/InboxItemProjectUio.d.ts +44 -0
  50. package/dist/models/InboxItemProjectUio.js +58 -0
  51. package/dist/models/InboxItemStatusUio.d.ts +25 -0
  52. package/dist/models/InboxItemStatusUio.js +51 -0
  53. package/dist/models/InboxItemTicketUio.d.ts +44 -0
  54. package/dist/models/InboxItemTicketUio.js +58 -0
  55. package/dist/models/InboxItemUio.d.ts +107 -0
  56. package/dist/models/InboxItemUio.js +99 -0
  57. package/dist/models/InboxTabUio.d.ts +26 -0
  58. package/dist/models/InboxTabUio.js +52 -0
  59. package/dist/models/KnowledgeFileUio.d.ts +7 -0
  60. package/dist/models/KnowledgeFileUio.js +2 -0
  61. package/dist/models/KnowledgeSiteExclusionsUio.d.ts +32 -0
  62. package/dist/models/KnowledgeSiteExclusionsUio.js +50 -0
  63. package/dist/models/KnowledgeSitePagesRemovalUio.d.ts +38 -0
  64. package/dist/models/KnowledgeSitePagesRemovalUio.js +54 -0
  65. package/dist/models/MemberRefUio.d.ts +39 -0
  66. package/dist/models/MemberRefUio.js +55 -0
  67. package/dist/models/MemberTypeUio.d.ts +25 -0
  68. package/dist/models/MemberTypeUio.js +51 -0
  69. package/dist/models/ProjectActivityUio.d.ts +51 -0
  70. package/dist/models/ProjectActivityUio.js +63 -0
  71. package/dist/models/ProjectAttentionUio.d.ts +50 -0
  72. package/dist/models/ProjectAttentionUio.js +62 -0
  73. package/dist/models/ProjectCountsUio.d.ts +68 -0
  74. package/dist/models/ProjectCountsUio.js +74 -0
  75. package/dist/models/ProjectMemberRoleUio.d.ts +25 -0
  76. package/dist/models/ProjectMemberRoleUio.js +51 -0
  77. package/dist/models/ProjectMemberUio.d.ts +53 -0
  78. package/dist/models/ProjectMemberUio.js +63 -0
  79. package/dist/models/ProjectOverviewUio.d.ts +68 -0
  80. package/dist/models/ProjectOverviewUio.js +76 -0
  81. package/dist/models/ProjectSettingsUio.d.ts +40 -0
  82. package/dist/models/ProjectSettingsUio.js +56 -0
  83. package/dist/models/ProjectSummaryUio.d.ts +128 -0
  84. package/dist/models/ProjectSummaryUio.js +116 -0
  85. package/dist/models/ProjectUio.d.ts +100 -0
  86. package/dist/models/ProjectUio.js +96 -0
  87. package/dist/models/SetProjectMembersRequestUio.d.ts +33 -0
  88. package/dist/models/SetProjectMembersRequestUio.js +51 -0
  89. package/dist/models/SetTicketAssigneesRequestUio.d.ts +40 -0
  90. package/dist/models/SetTicketAssigneesRequestUio.js +54 -0
  91. package/dist/models/StartKnowledgeBaseScrappingRequestUio.d.ts +1 -0
  92. package/dist/models/TicketArtifactDownloadUrlUio.d.ts +32 -0
  93. package/dist/models/TicketArtifactDownloadUrlUio.js +50 -0
  94. package/dist/models/TicketArtifactSourceUio.d.ts +25 -0
  95. package/dist/models/TicketArtifactSourceUio.js +51 -0
  96. package/dist/models/TicketArtifactStatusUio.d.ts +25 -0
  97. package/dist/models/TicketArtifactStatusUio.js +51 -0
  98. package/dist/models/TicketArtifactUio.d.ts +83 -0
  99. package/dist/models/TicketArtifactUio.js +85 -0
  100. package/dist/models/TicketAssigneeInputUio.d.ts +39 -0
  101. package/dist/models/TicketAssigneeInputUio.js +55 -0
  102. package/dist/models/TicketAssigneeStateUio.d.ts +29 -0
  103. package/dist/models/TicketAssigneeStateUio.js +55 -0
  104. package/dist/models/TicketAssigneeUio.d.ts +58 -0
  105. package/dist/models/TicketAssigneeUio.js +68 -0
  106. package/dist/models/TicketBoardColumnUio.d.ts +46 -0
  107. package/dist/models/TicketBoardColumnUio.js +60 -0
  108. package/dist/models/TicketBoardUio.d.ts +33 -0
  109. package/dist/models/TicketBoardUio.js +51 -0
  110. package/dist/models/TicketEventKindUio.d.ts +27 -0
  111. package/dist/models/TicketEventKindUio.js +53 -0
  112. package/dist/models/TicketEventUio.d.ts +78 -0
  113. package/dist/models/TicketEventUio.js +80 -0
  114. package/dist/models/TicketPriorityUio.d.ts +26 -0
  115. package/dist/models/TicketPriorityUio.js +52 -0
  116. package/dist/models/TicketProposalPayloadUio.d.ts +72 -0
  117. package/dist/models/TicketProposalPayloadUio.js +78 -0
  118. package/dist/models/TicketProposalStatusUio.d.ts +27 -0
  119. package/dist/models/TicketProposalStatusUio.js +53 -0
  120. package/dist/models/TicketReviewDecisionUio.d.ts +25 -0
  121. package/dist/models/TicketReviewDecisionUio.js +51 -0
  122. package/dist/models/TicketReviewRequestUio.d.ts +39 -0
  123. package/dist/models/TicketReviewRequestUio.js +53 -0
  124. package/dist/models/TicketStartModeUio.d.ts +25 -0
  125. package/dist/models/TicketStartModeUio.js +51 -0
  126. package/dist/models/TicketStatusUio.d.ts +28 -0
  127. package/dist/models/TicketStatusUio.js +54 -0
  128. package/dist/models/TicketUio.d.ts +163 -0
  129. package/dist/models/TicketUio.js +139 -0
  130. package/dist/models/UpdateProjectRequestUio.d.ts +63 -0
  131. package/dist/models/UpdateProjectRequestUio.js +59 -0
  132. package/dist/models/UpdateTicketRequestUio.d.ts +77 -0
  133. package/dist/models/UpdateTicketRequestUio.js +65 -0
  134. package/dist/models/index.d.ts +56 -0
  135. package/dist/models/index.js +56 -0
  136. package/dist/openapi.json +4942 -2075
  137. package/package.json +1 -1
@@ -0,0 +1,61 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { InboxCountUio, InboxItemUio, InboxTabUio } from '../models/index';
14
+ export interface GetInboxCountRequest {
15
+ organizationId: string;
16
+ }
17
+ export interface ListInboxRequest {
18
+ organizationId: string;
19
+ tab?: InboxTabUio;
20
+ projectId?: string;
21
+ page?: number;
22
+ limit?: number;
23
+ }
24
+ export interface ResolveInboxItemRequest {
25
+ itemId: string;
26
+ }
27
+ /**
28
+ *
29
+ */
30
+ export declare class InboxApi extends runtime.BaseAPI {
31
+ /**
32
+ * Compteurs pour le badge de navigation.
33
+ * Count the pending inbox items
34
+ */
35
+ getInboxCountRaw(requestParameters: GetInboxCountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InboxCountUio>>;
36
+ /**
37
+ * Compteurs pour le badge de navigation.
38
+ * Count the pending inbox items
39
+ */
40
+ getInboxCount(organizationId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InboxCountUio>;
41
+ /**
42
+ * todo : actions en attente (questions, propositions, relectures, feux verts), les plus anciennes d\'abord ; mentions : mentions non traitées ; done : éléments traités, les plus récents d\'abord.
43
+ * List the inbox of the current user
44
+ */
45
+ listInboxRaw(requestParameters: ListInboxRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<InboxItemUio>>>;
46
+ /**
47
+ * todo : actions en attente (questions, propositions, relectures, feux verts), les plus anciennes d\'abord ; mentions : mentions non traitées ; done : éléments traités, les plus récents d\'abord.
48
+ * List the inbox of the current user
49
+ */
50
+ listInbox(organizationId: string, tab?: InboxTabUio, projectId?: string, page?: number, limit?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<InboxItemUio>>;
51
+ /**
52
+ * Marque une mention comme traitée. Les autres éléments se résolvent par leur action (répondre, accepter, relire, donner le feu vert).
53
+ * Mark an inbox item as handled
54
+ */
55
+ resolveInboxItemRaw(requestParameters: ResolveInboxItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InboxItemUio>>;
56
+ /**
57
+ * Marque une mention comme traitée. Les autres éléments se résolvent par leur action (répondre, accepter, relire, donner le feu vert).
58
+ * Mark an inbox item as handled
59
+ */
60
+ resolveInboxItem(itemId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InboxItemUio>;
61
+ }
@@ -0,0 +1,156 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * brain-client
6
+ * Api ands models for brain-app and brain-app
7
+ *
8
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ var desc = Object.getOwnPropertyDescriptor(m, k);
18
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
19
+ desc = { enumerable: true, get: function() { return m[k]; } };
20
+ }
21
+ Object.defineProperty(o, k2, desc);
22
+ }) : (function(o, m, k, k2) {
23
+ if (k2 === undefined) k2 = k;
24
+ o[k2] = m[k];
25
+ }));
26
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
27
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
28
+ }) : function(o, v) {
29
+ o["default"] = v;
30
+ });
31
+ var __importStar = (this && this.__importStar) || (function () {
32
+ var ownKeys = function(o) {
33
+ ownKeys = Object.getOwnPropertyNames || function (o) {
34
+ var ar = [];
35
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
36
+ return ar;
37
+ };
38
+ return ownKeys(o);
39
+ };
40
+ return function (mod) {
41
+ if (mod && mod.__esModule) return mod;
42
+ var result = {};
43
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
44
+ __setModuleDefault(result, mod);
45
+ return result;
46
+ };
47
+ })();
48
+ Object.defineProperty(exports, "__esModule", { value: true });
49
+ exports.InboxApi = void 0;
50
+ const runtime = __importStar(require("../runtime"));
51
+ const index_1 = require("../models/index");
52
+ /**
53
+ *
54
+ */
55
+ class InboxApi extends runtime.BaseAPI {
56
+ /**
57
+ * Compteurs pour le badge de navigation.
58
+ * Count the pending inbox items
59
+ */
60
+ async getInboxCountRaw(requestParameters, initOverrides) {
61
+ if (requestParameters['organizationId'] == null) {
62
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling getInboxCount().');
63
+ }
64
+ const queryParameters = {};
65
+ const headerParameters = {};
66
+ if (this.configuration && this.configuration.apiKey) {
67
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
68
+ }
69
+ const response = await this.request({
70
+ path: `/organizations/{organizationId}/inbox/count`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
71
+ method: 'GET',
72
+ headers: headerParameters,
73
+ query: queryParameters,
74
+ }, initOverrides);
75
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.InboxCountUioFromJSON)(jsonValue));
76
+ }
77
+ /**
78
+ * Compteurs pour le badge de navigation.
79
+ * Count the pending inbox items
80
+ */
81
+ async getInboxCount(organizationId, initOverrides) {
82
+ const response = await this.getInboxCountRaw({ organizationId: organizationId }, initOverrides);
83
+ return await response.value();
84
+ }
85
+ /**
86
+ * todo : actions en attente (questions, propositions, relectures, feux verts), les plus anciennes d\'abord ; mentions : mentions non traitées ; done : éléments traités, les plus récents d\'abord.
87
+ * List the inbox of the current user
88
+ */
89
+ async listInboxRaw(requestParameters, initOverrides) {
90
+ if (requestParameters['organizationId'] == null) {
91
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling listInbox().');
92
+ }
93
+ const queryParameters = {};
94
+ if (requestParameters['tab'] != null) {
95
+ queryParameters['tab'] = requestParameters['tab'];
96
+ }
97
+ if (requestParameters['projectId'] != null) {
98
+ queryParameters['projectId'] = requestParameters['projectId'];
99
+ }
100
+ if (requestParameters['page'] != null) {
101
+ queryParameters['page'] = requestParameters['page'];
102
+ }
103
+ if (requestParameters['limit'] != null) {
104
+ queryParameters['limit'] = requestParameters['limit'];
105
+ }
106
+ const headerParameters = {};
107
+ if (this.configuration && this.configuration.apiKey) {
108
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
109
+ }
110
+ const response = await this.request({
111
+ path: `/organizations/{organizationId}/inbox`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId']))),
112
+ method: 'GET',
113
+ headers: headerParameters,
114
+ query: queryParameters,
115
+ }, initOverrides);
116
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.InboxItemUioFromJSON));
117
+ }
118
+ /**
119
+ * todo : actions en attente (questions, propositions, relectures, feux verts), les plus anciennes d\'abord ; mentions : mentions non traitées ; done : éléments traités, les plus récents d\'abord.
120
+ * List the inbox of the current user
121
+ */
122
+ async listInbox(organizationId, tab, projectId, page, limit, initOverrides) {
123
+ const response = await this.listInboxRaw({ organizationId: organizationId, tab: tab, projectId: projectId, page: page, limit: limit }, initOverrides);
124
+ return await response.value();
125
+ }
126
+ /**
127
+ * Marque une mention comme traitée. Les autres éléments se résolvent par leur action (répondre, accepter, relire, donner le feu vert).
128
+ * Mark an inbox item as handled
129
+ */
130
+ async resolveInboxItemRaw(requestParameters, initOverrides) {
131
+ if (requestParameters['itemId'] == null) {
132
+ throw new runtime.RequiredError('itemId', 'Required parameter "itemId" was null or undefined when calling resolveInboxItem().');
133
+ }
134
+ const queryParameters = {};
135
+ const headerParameters = {};
136
+ if (this.configuration && this.configuration.apiKey) {
137
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
138
+ }
139
+ const response = await this.request({
140
+ path: `/inbox-items/{itemId}/resolve`.replace(`{${"itemId"}}`, encodeURIComponent(String(requestParameters['itemId']))),
141
+ method: 'POST',
142
+ headers: headerParameters,
143
+ query: queryParameters,
144
+ }, initOverrides);
145
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.InboxItemUioFromJSON)(jsonValue));
146
+ }
147
+ /**
148
+ * Marque une mention comme traitée. Les autres éléments se résolvent par leur action (répondre, accepter, relire, donner le feu vert).
149
+ * Mark an inbox item as handled
150
+ */
151
+ async resolveInboxItem(itemId, initOverrides) {
152
+ const response = await this.resolveInboxItemRaw({ itemId: itemId }, initOverrides);
153
+ return await response.value();
154
+ }
155
+ }
156
+ exports.InboxApi = InboxApi;
@@ -10,11 +10,15 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AgentModuleUio, BodyWithMessageUio, CreateKnowledgeBaseRequestUio, CreateKnowledgeBaseResponseUio, DeleteKnowledgeSitePage200ResponseUio, FileCreationResponseUio, FileWithDownloadUrlUio, ImageKnowledgeUio, KnowledgeBaseConfigurationUio, KnowledgeBaseConfigurationUpdateRequestUio, KnowledgeBaseUio, KnowledgeBaseWithFilesUio, KnowledgeFileCreationRequestUio, KnowledgeFileParsingCallbackRequestUio, KnowledgeFileSummaryUio, KnowledgeFileUio, KnowledgeFilesByIdsRequestUio, KnowledgeSitePageUio, PatchKnowledgeBaseRequestUio, PatchKnowledgeFileRequestUio, SearchKnowledgeBase200ResponseInnerUio, SearchKnowledgeBaseRequestUio, StartKnowledgeBaseScrappingRequestUio, SyncKnowledgeSiteScrapping200ResponseUio, SyncKnowledgeSiteScrappingRequestUio, UploadImageToKnowledgeBaseLibrary200ResponseUio, UploadImageToKnowledgeBaseLibraryRequestUio, UploadedStatusUpdateRequestUio } from '../models/index';
13
+ import type { AddKnowledgeSiteExclusionRequestUio, AddKnowledgeSiteExclusionResponseUio, AgentModuleUio, BodyWithMessageUio, CreateKnowledgeBaseRequestUio, CreateKnowledgeBaseResponseUio, DeleteKnowledgeSitePage200ResponseUio, FileCreationResponseUio, FileWithDownloadUrlUio, ImageKnowledgeUio, KnowledgeBaseConfigurationUio, KnowledgeBaseConfigurationUpdateRequestUio, KnowledgeBaseUio, KnowledgeBaseWithFilesUio, KnowledgeFileCreationRequestUio, KnowledgeFileParsingCallbackRequestUio, KnowledgeFileSummaryUio, KnowledgeFileUio, KnowledgeFilesByIdsRequestUio, KnowledgeSiteExclusionsUio, KnowledgeSitePageUio, KnowledgeSitePagesRemovalUio, PatchKnowledgeBaseRequestUio, PatchKnowledgeFileRequestUio, SearchKnowledgeBase200ResponseInnerUio, SearchKnowledgeBaseRequestUio, StartKnowledgeBaseScrappingRequestUio, SyncKnowledgeSiteScrapping200ResponseUio, SyncKnowledgeSiteScrappingRequestUio, UploadImageToKnowledgeBaseLibrary200ResponseUio, UploadImageToKnowledgeBaseLibraryRequestUio, UploadedStatusUpdateRequestUio } from '../models/index';
14
14
  export interface AddFileToKnowledgeBaseRequest {
15
15
  knowledgebaseId: string;
16
16
  knowledgeFileCreationRequestUio: KnowledgeFileCreationRequestUio;
17
17
  }
18
+ export interface AddKnowledgeSiteExclusionRequest {
19
+ fileId: string;
20
+ addKnowledgeSiteExclusionRequestUio: AddKnowledgeSiteExclusionRequestUio;
21
+ }
18
22
  export interface CreateKnowledgeBaseRequest {
19
23
  organizationId: string;
20
24
  createKnowledgeBaseRequestUio: CreateKnowledgeBaseRequestUio;
@@ -36,6 +40,10 @@ export interface DeleteKnowledgeFileRequest {
36
40
  export interface DeleteKnowledgeSitePageRequest {
37
41
  knowledgeSitePageId: string;
38
42
  }
43
+ export interface DeleteKnowledgeSitePagesUnderPathRequest {
44
+ fileId: string;
45
+ pathPrefix: string;
46
+ }
39
47
  export interface GetAgentKnowledgeFilesRequest {
40
48
  agentId: string;
41
49
  searchName?: string;
@@ -94,6 +102,10 @@ export interface PatchKnowledgeFileRequest {
94
102
  fileId: string;
95
103
  patchKnowledgeFileRequestUio: PatchKnowledgeFileRequestUio;
96
104
  }
105
+ export interface RemoveKnowledgeSiteExclusionRequest {
106
+ fileId: string;
107
+ url: string;
108
+ }
97
109
  export interface SearchKnowledgeBaseRequest {
98
110
  knowledgebaseId: string;
99
111
  searchKnowledgeBaseRequestUio: SearchKnowledgeBaseRequestUio;
@@ -141,6 +153,16 @@ export declare class KnowledgeApi extends runtime.BaseAPI {
141
153
  * Add a file to the knowledge base
142
154
  */
143
155
  addFileToKnowledgeBase(knowledgebaseId: string, knowledgeFileCreationRequestUio: KnowledgeFileCreationRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileCreationResponseUio>;
156
+ /**
157
+ * Saves the URL among the site exclusions, which every resync applies, and removes the site pages it covers right away. An exclusion covers the URL and everything below it (`/blog` covers `/blog/a` but not `/blog-news`); an exclusion without a path covers the whole host. Adding a URL already excluded is a no-op.
158
+ * Exclude a page or directory from a scrapped site
159
+ */
160
+ addKnowledgeSiteExclusionRaw(requestParameters: AddKnowledgeSiteExclusionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AddKnowledgeSiteExclusionResponseUio>>;
161
+ /**
162
+ * Saves the URL among the site exclusions, which every resync applies, and removes the site pages it covers right away. An exclusion covers the URL and everything below it (`/blog` covers `/blog/a` but not `/blog-news`); an exclusion without a path covers the whole host. Adding a URL already excluded is a no-op.
163
+ * Exclude a page or directory from a scrapped site
164
+ */
165
+ addKnowledgeSiteExclusion(fileId: string, addKnowledgeSiteExclusionRequestUio: AddKnowledgeSiteExclusionRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AddKnowledgeSiteExclusionResponseUio>;
144
166
  /**
145
167
  * Creates a knowledge base and provisions its vector store collection. `embeddingConfig` est obligatoire lorsque `vectorStoreType` vaut `qdrant`.
146
168
  * Create a knowledge base
@@ -201,6 +223,16 @@ export declare class KnowledgeApi extends runtime.BaseAPI {
201
223
  * Delete a knowledge site page
202
224
  */
203
225
  deleteKnowledgeSitePage(knowledgeSitePageId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteKnowledgeSitePage200ResponseUio>;
226
+ /**
227
+ * Removes every page located in `pathPrefix` or below it, along with its chunks and stored content. The pages are not excluded: the next resync brings them back.
228
+ * Delete the knowledge site pages of a directory
229
+ */
230
+ deleteKnowledgeSitePagesUnderPathRaw(requestParameters: DeleteKnowledgeSitePagesUnderPathRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<KnowledgeSitePagesRemovalUio>>;
231
+ /**
232
+ * Removes every page located in `pathPrefix` or below it, along with its chunks and stored content. The pages are not excluded: the next resync brings them back.
233
+ * Delete the knowledge site pages of a directory
234
+ */
235
+ deleteKnowledgeSitePagesUnderPath(fileId: string, pathPrefix: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<KnowledgeSitePagesRemovalUio>;
204
236
  /**
205
237
  * Returns all knowledge bases attached to the agent and their indexed files.
206
238
  * Get knowledge bases and files for an agent
@@ -379,6 +411,16 @@ export declare class KnowledgeApi extends runtime.BaseAPI {
379
411
  * Update a knowledge file
380
412
  */
381
413
  patchKnowledgeFile(fileId: string, patchKnowledgeFileRequestUio: PatchKnowledgeFileRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BodyWithMessageUio>;
414
+ /**
415
+ * The pages it covered are not scrapped again here: they come back with the next resync.
416
+ * Remove an exclusion from a scrapped site
417
+ */
418
+ removeKnowledgeSiteExclusionRaw(requestParameters: RemoveKnowledgeSiteExclusionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<KnowledgeSiteExclusionsUio>>;
419
+ /**
420
+ * The pages it covered are not scrapped again here: they come back with the next resync.
421
+ * Remove an exclusion from a scrapped site
422
+ */
423
+ removeKnowledgeSiteExclusion(fileId: string, url: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<KnowledgeSiteExclusionsUio>;
382
424
  /**
383
425
  * Run a vector search on a knowledge base and return matching chunks with their source files
384
426
  * Search a knowledge base
@@ -87,6 +87,40 @@ class KnowledgeApi extends runtime.BaseAPI {
87
87
  const response = await this.addFileToKnowledgeBaseRaw({ knowledgebaseId: knowledgebaseId, knowledgeFileCreationRequestUio: knowledgeFileCreationRequestUio }, initOverrides);
88
88
  return await response.value();
89
89
  }
90
+ /**
91
+ * Saves the URL among the site exclusions, which every resync applies, and removes the site pages it covers right away. An exclusion covers the URL and everything below it (`/blog` covers `/blog/a` but not `/blog-news`); an exclusion without a path covers the whole host. Adding a URL already excluded is a no-op.
92
+ * Exclude a page or directory from a scrapped site
93
+ */
94
+ async addKnowledgeSiteExclusionRaw(requestParameters, initOverrides) {
95
+ if (requestParameters['fileId'] == null) {
96
+ throw new runtime.RequiredError('fileId', 'Required parameter "fileId" was null or undefined when calling addKnowledgeSiteExclusion().');
97
+ }
98
+ if (requestParameters['addKnowledgeSiteExclusionRequestUio'] == null) {
99
+ throw new runtime.RequiredError('addKnowledgeSiteExclusionRequestUio', 'Required parameter "addKnowledgeSiteExclusionRequestUio" was null or undefined when calling addKnowledgeSiteExclusion().');
100
+ }
101
+ const queryParameters = {};
102
+ const headerParameters = {};
103
+ headerParameters['Content-Type'] = 'application/json';
104
+ if (this.configuration && this.configuration.apiKey) {
105
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
106
+ }
107
+ const response = await this.request({
108
+ path: `/knowledge-files/{fileId}/scraping-exclusions`.replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters['fileId']))),
109
+ method: 'POST',
110
+ headers: headerParameters,
111
+ query: queryParameters,
112
+ body: (0, index_1.AddKnowledgeSiteExclusionRequestUioToJSON)(requestParameters['addKnowledgeSiteExclusionRequestUio']),
113
+ }, initOverrides);
114
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AddKnowledgeSiteExclusionResponseUioFromJSON)(jsonValue));
115
+ }
116
+ /**
117
+ * Saves the URL among the site exclusions, which every resync applies, and removes the site pages it covers right away. An exclusion covers the URL and everything below it (`/blog` covers `/blog/a` but not `/blog-news`); an exclusion without a path covers the whole host. Adding a URL already excluded is a no-op.
118
+ * Exclude a page or directory from a scrapped site
119
+ */
120
+ async addKnowledgeSiteExclusion(fileId, addKnowledgeSiteExclusionRequestUio, initOverrides) {
121
+ const response = await this.addKnowledgeSiteExclusionRaw({ fileId: fileId, addKnowledgeSiteExclusionRequestUio: addKnowledgeSiteExclusionRequestUio }, initOverrides);
122
+ return await response.value();
123
+ }
90
124
  /**
91
125
  * Creates a knowledge base and provisions its vector store collection. `embeddingConfig` est obligatoire lorsque `vectorStoreType` vaut `qdrant`.
92
126
  * Create a knowledge base
@@ -272,6 +306,41 @@ class KnowledgeApi extends runtime.BaseAPI {
272
306
  const response = await this.deleteKnowledgeSitePageRaw({ knowledgeSitePageId: knowledgeSitePageId }, initOverrides);
273
307
  return await response.value();
274
308
  }
309
+ /**
310
+ * Removes every page located in `pathPrefix` or below it, along with its chunks and stored content. The pages are not excluded: the next resync brings them back.
311
+ * Delete the knowledge site pages of a directory
312
+ */
313
+ async deleteKnowledgeSitePagesUnderPathRaw(requestParameters, initOverrides) {
314
+ if (requestParameters['fileId'] == null) {
315
+ throw new runtime.RequiredError('fileId', 'Required parameter "fileId" was null or undefined when calling deleteKnowledgeSitePagesUnderPath().');
316
+ }
317
+ if (requestParameters['pathPrefix'] == null) {
318
+ throw new runtime.RequiredError('pathPrefix', 'Required parameter "pathPrefix" was null or undefined when calling deleteKnowledgeSitePagesUnderPath().');
319
+ }
320
+ const queryParameters = {};
321
+ if (requestParameters['pathPrefix'] != null) {
322
+ queryParameters['pathPrefix'] = requestParameters['pathPrefix'];
323
+ }
324
+ const headerParameters = {};
325
+ if (this.configuration && this.configuration.apiKey) {
326
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
327
+ }
328
+ const response = await this.request({
329
+ path: `/knowledge-files/{fileId}/knowledge-site-pages`.replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters['fileId']))),
330
+ method: 'DELETE',
331
+ headers: headerParameters,
332
+ query: queryParameters,
333
+ }, initOverrides);
334
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.KnowledgeSitePagesRemovalUioFromJSON)(jsonValue));
335
+ }
336
+ /**
337
+ * Removes every page located in `pathPrefix` or below it, along with its chunks and stored content. The pages are not excluded: the next resync brings them back.
338
+ * Delete the knowledge site pages of a directory
339
+ */
340
+ async deleteKnowledgeSitePagesUnderPath(fileId, pathPrefix, initOverrides) {
341
+ const response = await this.deleteKnowledgeSitePagesUnderPathRaw({ fileId: fileId, pathPrefix: pathPrefix }, initOverrides);
342
+ return await response.value();
343
+ }
275
344
  /**
276
345
  * Returns all knowledge bases attached to the agent and their indexed files.
277
346
  * Get knowledge bases and files for an agent
@@ -800,6 +869,41 @@ class KnowledgeApi extends runtime.BaseAPI {
800
869
  const response = await this.patchKnowledgeFileRaw({ fileId: fileId, patchKnowledgeFileRequestUio: patchKnowledgeFileRequestUio }, initOverrides);
801
870
  return await response.value();
802
871
  }
872
+ /**
873
+ * The pages it covered are not scrapped again here: they come back with the next resync.
874
+ * Remove an exclusion from a scrapped site
875
+ */
876
+ async removeKnowledgeSiteExclusionRaw(requestParameters, initOverrides) {
877
+ if (requestParameters['fileId'] == null) {
878
+ throw new runtime.RequiredError('fileId', 'Required parameter "fileId" was null or undefined when calling removeKnowledgeSiteExclusion().');
879
+ }
880
+ if (requestParameters['url'] == null) {
881
+ throw new runtime.RequiredError('url', 'Required parameter "url" was null or undefined when calling removeKnowledgeSiteExclusion().');
882
+ }
883
+ const queryParameters = {};
884
+ if (requestParameters['url'] != null) {
885
+ queryParameters['url'] = requestParameters['url'];
886
+ }
887
+ const headerParameters = {};
888
+ if (this.configuration && this.configuration.apiKey) {
889
+ headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key"); // ApiKeyAuth authentication
890
+ }
891
+ const response = await this.request({
892
+ path: `/knowledge-files/{fileId}/scraping-exclusions`.replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters['fileId']))),
893
+ method: 'DELETE',
894
+ headers: headerParameters,
895
+ query: queryParameters,
896
+ }, initOverrides);
897
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.KnowledgeSiteExclusionsUioFromJSON)(jsonValue));
898
+ }
899
+ /**
900
+ * The pages it covered are not scrapped again here: they come back with the next resync.
901
+ * Remove an exclusion from a scrapped site
902
+ */
903
+ async removeKnowledgeSiteExclusion(fileId, url, initOverrides) {
904
+ const response = await this.removeKnowledgeSiteExclusionRaw({ fileId: fileId, url: url }, initOverrides);
905
+ return await response.value();
906
+ }
803
907
  /**
804
908
  * Run a vector search on a knowledge base and return matching chunks with their source files
805
909
  * Search a knowledge base
@@ -0,0 +1,113 @@
1
+ /**
2
+ * brain-client
3
+ * Api ands models for brain-app and brain-app
4
+ *
5
+ * The version of the OpenAPI document: 0.0.0-SNAPSHOT
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { CreateProjectRequestUio, ProjectMemberUio, ProjectOverviewUio, ProjectSummaryUio, ProjectUio, SetProjectMembersRequestUio, UpdateProjectRequestUio } from '../models/index';
14
+ export interface CreateProjectRequest {
15
+ organizationId: string;
16
+ createProjectRequestUio: CreateProjectRequestUio;
17
+ }
18
+ export interface GetProjectRequest {
19
+ projectId: string;
20
+ }
21
+ export interface GetProjectOverviewRequest {
22
+ projectId: string;
23
+ }
24
+ export interface ListProjectMembersRequest {
25
+ projectId: string;
26
+ }
27
+ export interface ListProjectsRequest {
28
+ organizationId: string;
29
+ includeArchived?: boolean;
30
+ }
31
+ export interface SetProjectMembersRequest {
32
+ projectId: string;
33
+ setProjectMembersRequestUio: SetProjectMembersRequestUio;
34
+ }
35
+ export interface UpdateProjectRequest {
36
+ projectId: string;
37
+ updateProjectRequestUio: UpdateProjectRequestUio;
38
+ }
39
+ /**
40
+ *
41
+ */
42
+ export declare class ProjectsApi extends runtime.BaseAPI {
43
+ /**
44
+ * Crée un projet ; le créateur en devient owner. La clé doit être unique dans l\'organisation.
45
+ * Create a project
46
+ */
47
+ createProjectRaw(requestParameters: CreateProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProjectUio>>;
48
+ /**
49
+ * Crée un projet ; le créateur en devient owner. La clé doit être unique dans l\'organisation.
50
+ * Create a project
51
+ */
52
+ createProject(organizationId: string, createProjectRequestUio: CreateProjectRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProjectUio>;
53
+ /**
54
+ * Projet et ses réglages.
55
+ * Get a project
56
+ */
57
+ getProjectRaw(requestParameters: GetProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProjectUio>>;
58
+ /**
59
+ * Projet et ses réglages.
60
+ * Get a project
61
+ */
62
+ getProject(projectId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProjectUio>;
63
+ /**
64
+ * Accueil du projet : compteurs par colonne (terminés à part), actions de l\'utilisateur courant, activité des agents et derniers événements.
65
+ * Get the home of a project
66
+ */
67
+ getProjectOverviewRaw(requestParameters: GetProjectOverviewRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProjectOverviewUio>>;
68
+ /**
69
+ * Accueil du projet : compteurs par colonne (terminés à part), actions de l\'utilisateur courant, activité des agents et derniers événements.
70
+ * Get the home of a project
71
+ */
72
+ getProjectOverview(projectId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProjectOverviewUio>;
73
+ /**
74
+ * Humains et agents membres du projet.
75
+ * List the members of a project
76
+ */
77
+ listProjectMembersRaw(requestParameters: ListProjectMembersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ProjectMemberUio>>>;
78
+ /**
79
+ * Humains et agents membres du projet.
80
+ * List the members of a project
81
+ */
82
+ listProjectMembers(projectId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ProjectMemberUio>>;
83
+ /**
84
+ * Projets de l\'organisation visibles par l\'utilisateur courant (membre du projet, ou admin de l\'organisation), avec leurs compteurs, leurs membres et les actions qui l\'attendent.
85
+ * List the projects of an organization
86
+ */
87
+ listProjectsRaw(requestParameters: ListProjectsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ProjectSummaryUio>>>;
88
+ /**
89
+ * Projets de l\'organisation visibles par l\'utilisateur courant (membre du projet, ou admin de l\'organisation), avec leurs compteurs, leurs membres et les actions qui l\'attendent.
90
+ * List the projects of an organization
91
+ */
92
+ listProjects(organizationId: string, includeArchived?: boolean, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ProjectSummaryUio>>;
93
+ /**
94
+ * Remplace la liste des membres ; il doit rester au moins un owner humain.
95
+ * Replace the members of a project
96
+ */
97
+ setProjectMembersRaw(requestParameters: SetProjectMembersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ProjectMemberUio>>>;
98
+ /**
99
+ * Remplace la liste des membres ; il doit rester au moins un owner humain.
100
+ * Replace the members of a project
101
+ */
102
+ setProjectMembers(projectId: string, setProjectMembersRequestUio: SetProjectMembersRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ProjectMemberUio>>;
103
+ /**
104
+ * Mise à jour partielle ; archived à vrai archive le projet.
105
+ * Update a project
106
+ */
107
+ updateProjectRaw(requestParameters: UpdateProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProjectUio>>;
108
+ /**
109
+ * Mise à jour partielle ; archived à vrai archive le projet.
110
+ * Update a project
111
+ */
112
+ updateProject(projectId: string, updateProjectRequestUio: UpdateProjectRequestUio, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProjectUio>;
113
+ }