@epam/ai-dial-chat-api-client 1.3.0-dev.249 → 1.3.0-dev.253

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.
@@ -10,7 +10,11 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { CreateProjectResponseDto, ListProjectsResponseDto, ProjectDetailsDto, UpdateProjectResponseDto } from '../models/index';
13
+ import type { AttachGenerationDto, ConversationResponseDto, CreateConversationDto, CreateProjectResponseDto, ListProjectsResponseDto, ProjectConversationListResponseDto, ProjectDetailsDto, RenameConversationBodyDto, RenameConversationResponseDto, SaveConversationBodyDto, SendCompletionDto, StopCompletionDto, UpdateProjectResponseDto } from '../models/index';
14
+ export interface AttachToProjectGenerationRequest {
15
+ id: string;
16
+ attachGenerationDto: AttachGenerationDto;
17
+ }
14
18
  export interface CreateProjectRequest {
15
19
  name: string;
16
20
  description?: string;
@@ -18,10 +22,18 @@ export interface CreateProjectRequest {
18
22
  fileNames?: string;
19
23
  files?: Array<Blob>;
20
24
  }
25
+ export interface CreateProjectConversationRequest {
26
+ id: string;
27
+ createConversationDto: CreateConversationDto;
28
+ }
21
29
  export interface DeleteProjectRequest {
22
30
  id: string;
23
31
  ifMatch: string;
24
32
  }
33
+ export interface DeleteProjectConversationRequest {
34
+ id: string;
35
+ conversationName: string;
36
+ }
25
37
  export interface DownloadProjectRequest {
26
38
  id: string;
27
39
  }
@@ -32,6 +44,33 @@ export interface DownloadProjectFileRequest {
32
44
  export interface GetProjectRequest {
33
45
  id: string;
34
46
  }
47
+ export interface GetProjectConversationRequest {
48
+ id: string;
49
+ conversationName: string;
50
+ }
51
+ export interface ListProjectConversationsRequest {
52
+ id: string;
53
+ limit?: number;
54
+ offset?: number;
55
+ }
56
+ export interface RenameProjectConversationRequest {
57
+ id: string;
58
+ conversationName: string;
59
+ renameConversationBodyDto: RenameConversationBodyDto;
60
+ }
61
+ export interface SaveProjectConversationRequest {
62
+ id: string;
63
+ conversationName: string;
64
+ saveConversationBodyDto: SaveConversationBodyDto;
65
+ }
66
+ export interface StopProjectCompletionRequest {
67
+ id: string;
68
+ stopCompletionDto: StopCompletionDto;
69
+ }
70
+ export interface StreamProjectCompletionRequest {
71
+ id: string;
72
+ sendCompletionDto: SendCompletionDto;
73
+ }
35
74
  export interface UpdateProjectRequest {
36
75
  id: string;
37
76
  ifMatch: string;
@@ -46,6 +85,16 @@ export interface UpdateProjectRequest {
46
85
  *
47
86
  */
48
87
  export declare class ProjectsApi extends runtime.BaseAPI {
88
+ /**
89
+ * Replays the active generation of a project conversation as SSE, exactly as `POST /api/v1/conversations/completions/attach` does.
90
+ * Attach to a generation of a project conversation
91
+ */
92
+ attachToProjectGenerationRaw(requestParameters: AttachToProjectGenerationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>;
93
+ /**
94
+ * Replays the active generation of a project conversation as SSE, exactly as `POST /api/v1/conversations/completions/attach` does.
95
+ * Attach to a generation of a project conversation
96
+ */
97
+ attachToProjectGeneration(requestParameters: AttachToProjectGenerationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
49
98
  /**
50
99
  * Creates a project at the root of the session user\'s bucket in one atomic, create-only DIAL Core call. The BFF writes PROJECT.md (YAML frontmatter with name and description, instructions as the body) and each context file under context/. Name, file names, types, per-file size, total size and file count are validated first; every domain rejection carries a ProjectCreateErrorCode.
51
100
  * Create a project
@@ -57,15 +106,33 @@ export declare class ProjectsApi extends runtime.BaseAPI {
57
106
  */
58
107
  createProject(requestParameters: CreateProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateProjectResponseDto>;
59
108
  /**
60
- * Deletes the project only if it is still the version named by `If-Match`, then removes it from the caller\'s pins. Only a project in the caller\'s own bucket can be deleted.
109
+ * Creates a conversation inside the project from its first message, as `POST /api/v1/conversations` does at the top level.
110
+ * Create a project conversation
111
+ */
112
+ createProjectConversationRaw(requestParameters: CreateProjectConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationResponseDto>>;
113
+ /**
114
+ * Creates a conversation inside the project from its first message, as `POST /api/v1/conversations` does at the top level.
115
+ * Create a project conversation
116
+ */
117
+ createProjectConversation(requestParameters: CreateProjectConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationResponseDto>;
118
+ /**
119
+ * Deletes the project, its conversations included, only if its content is still the `contentVersion` named by `If-Match`, then removes it from the caller\'s pins. Only a project in the caller\'s own bucket can be deleted.
61
120
  * Delete a project
62
121
  */
63
122
  deleteProjectRaw(requestParameters: DeleteProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
64
123
  /**
65
- * Deletes the project only if it is still the version named by `If-Match`, then removes it from the caller\'s pins. Only a project in the caller\'s own bucket can be deleted.
124
+ * Deletes the project, its conversations included, only if its content is still the `contentVersion` named by `If-Match`, then removes it from the caller\'s pins. Only a project in the caller\'s own bucket can be deleted.
66
125
  * Delete a project
67
126
  */
68
127
  deleteProject(requestParameters: DeleteProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
128
+ /**
129
+ * Delete a project conversation
130
+ */
131
+ deleteProjectConversationRaw(requestParameters: DeleteProjectConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
132
+ /**
133
+ * Delete a project conversation
134
+ */
135
+ deleteProjectConversation(requestParameters: DeleteProjectConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
69
136
  /**
70
137
  * Streams DIAL Core\'s archive of the whole project (`PROJECT.md` and `context/`) as an attachment.
71
138
  * Download a project as a ZIP archive
@@ -96,6 +163,24 @@ export declare class ProjectsApi extends runtime.BaseAPI {
96
163
  * Get a project
97
164
  */
98
165
  getProject(requestParameters: GetProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProjectDetailsDto>;
166
+ /**
167
+ * Get a project conversation
168
+ */
169
+ getProjectConversationRaw(requestParameters: GetProjectConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationResponseDto>>;
170
+ /**
171
+ * Get a project conversation
172
+ */
173
+ getProjectConversation(requestParameters: GetProjectConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationResponseDto>;
174
+ /**
175
+ * Lists the conversations stored in the project\'s `conversations/` folder, newest first, with their titles and authors.
176
+ * List a project\'s conversations
177
+ */
178
+ listProjectConversationsRaw(requestParameters: ListProjectConversationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProjectConversationListResponseDto>>;
179
+ /**
180
+ * Lists the conversations stored in the project\'s `conversations/` folder, newest first, with their titles and authors.
181
+ * List a project\'s conversations
182
+ */
183
+ listProjectConversations(requestParameters: ListProjectConversationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProjectConversationListResponseDto>;
99
184
  /**
100
185
  * Returns every DIAL project visible to the session user: the user\'s own bucket, the public (organization) bucket, and projects shared with the user, merged and de-duplicated by id. The BFF follows DIAL Core paging itself, so the list is complete up to a per-source page cap. A failing source is omitted; the request fails only when both bucket listings fail.
101
186
  * List projects
@@ -107,12 +192,50 @@ export declare class ProjectsApi extends runtime.BaseAPI {
107
192
  */
108
193
  listProjects(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListProjectsResponseDto>;
109
194
  /**
110
- * Saves the name, description, instructions and context of a project in one conditional DIAL Core write: the BFF rebuilds PROJECT.md, keeps every stored context file not listed in `removedFileNames`, adds the `files` parts and writes the whole project with `If-Match`. A different name then moves the project in its folder and keeps the caller\'s pin. Only a project in the caller\'s own bucket can be saved. Every domain rejection carries a ProjectCreateErrorCode.
195
+ * Rewrites the conversation\'s display name; its file name does not change.
196
+ * Rename a project conversation
197
+ */
198
+ renameProjectConversationRaw(requestParameters: RenameProjectConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RenameConversationResponseDto>>;
199
+ /**
200
+ * Rewrites the conversation\'s display name; its file name does not change.
201
+ * Rename a project conversation
202
+ */
203
+ renameProjectConversation(requestParameters: RenameProjectConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RenameConversationResponseDto>;
204
+ /**
205
+ * Overwrites the conversation body, never over a pending background answer, as `PUT /api/v1/conversations` does.
206
+ * Save a project conversation
207
+ */
208
+ saveProjectConversationRaw(requestParameters: SaveProjectConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ConversationResponseDto>>;
209
+ /**
210
+ * Overwrites the conversation body, never over a pending background answer, as `PUT /api/v1/conversations` does.
211
+ * Save a project conversation
212
+ */
213
+ saveProjectConversation(requestParameters: SaveProjectConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ConversationResponseDto>;
214
+ /**
215
+ * Stop a generation of a project conversation
216
+ */
217
+ stopProjectCompletionRaw(requestParameters: StopProjectCompletionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
218
+ /**
219
+ * Stop a generation of a project conversation
220
+ */
221
+ stopProjectCompletion(requestParameters: StopProjectCompletionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
222
+ /**
223
+ * Streams a completion as SSE exactly as `POST /api/v1/conversations/completions` does, with the `x-project-id` header on the model call and nothing else added to the request.
224
+ * Stream a completion of a project conversation
225
+ */
226
+ streamProjectCompletionRaw(requestParameters: StreamProjectCompletionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>;
227
+ /**
228
+ * Streams a completion as SSE exactly as `POST /api/v1/conversations/completions` does, with the `x-project-id` header on the model call and nothing else added to the request.
229
+ * Stream a completion of a project conversation
230
+ */
231
+ streamProjectCompletion(requestParameters: StreamProjectCompletionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
232
+ /**
233
+ * Saves the name, description, instructions and context of a project in one conditional DIAL Core write: the BFF rebuilds PROJECT.md, keeps every stored context file not listed in `removedFileNames`, adds the `files` parts, carries the stored conversations over, and writes the whole project conditioned on the fresh snapshot\'s ETag, retrying a concurrent conversation write while `If-Match` still names the `contentVersion`. A different name then moves the project in its folder and keeps the caller\'s pin. Only a project in the caller\'s own bucket can be saved. Every domain rejection carries a ProjectCreateErrorCode.
111
234
  * Save a project edit
112
235
  */
113
236
  updateProjectRaw(requestParameters: UpdateProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdateProjectResponseDto>>;
114
237
  /**
115
- * Saves the name, description, instructions and context of a project in one conditional DIAL Core write: the BFF rebuilds PROJECT.md, keeps every stored context file not listed in `removedFileNames`, adds the `files` parts and writes the whole project with `If-Match`. A different name then moves the project in its folder and keeps the caller\'s pin. Only a project in the caller\'s own bucket can be saved. Every domain rejection carries a ProjectCreateErrorCode.
238
+ * Saves the name, description, instructions and context of a project in one conditional DIAL Core write: the BFF rebuilds PROJECT.md, keeps every stored context file not listed in `removedFileNames`, adds the `files` parts, carries the stored conversations over, and writes the whole project conditioned on the fresh snapshot\'s ETag, retrying a concurrent conversation write while `If-Match` still names the `contentVersion`. A different name then moves the project in its folder and keeps the caller\'s pin. Only a project in the caller\'s own bucket can be saved. Every domain rejection carries a ProjectCreateErrorCode.
116
239
  * Save a project edit
117
240
  */
118
241
  updateProject(requestParameters: UpdateProjectRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateProjectResponseDto>;
@@ -1 +1 @@
1
- {"version":3,"file":"ProjectsApi.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/apis/ProjectsApi.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,OAAO,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EACV,wBAAwB,EACxB,uBAAuB,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CAAC,IAAI,CAAC;IAIhB;;;OAGG;IACG,0BAA0B,CAC9B,iBAAiB,EAAE,8BAA8B,EACjD,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAsDvC;;;OAGG;IACG,uBAAuB,CAC3B,iBAAiB,EAAE,8BAA8B,EACjD,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,MAAM,CAAC;IAQlB;;;OAGG;IACG,gBAAgB,CACpB,iBAAiB,EAAE,oBAAoB,EACvC,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,wBAAwB,CAAC,CAAC;IAuGzD;;;OAGG;IACG,aAAa,CACjB,iBAAiB,EAAE,oBAAoB,EACvC,aAAa,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,oBAAoB,GACzD,OAAO,CAAC,wBAAwB,CAAC;CAOrC"}
@@ -19,6 +19,51 @@ const runtime = require("../runtime");
19
19
  *
20
20
  */
21
21
  class ProjectsApi extends runtime.BaseAPI {
22
+ /**
23
+ * Replays the active generation of a project conversation as SSE, exactly as `POST /api/v1/conversations/completions/attach` does.
24
+ * Attach to a generation of a project conversation
25
+ */
26
+ async attachToProjectGenerationRaw(requestParameters, initOverrides) {
27
+ if (requestParameters['id'] == null) {
28
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling attachToProjectGeneration().');
29
+ }
30
+ if (requestParameters['attachGenerationDto'] == null) {
31
+ throw new runtime.RequiredError('attachGenerationDto', 'Required parameter "attachGenerationDto" was null or undefined when calling attachToProjectGeneration().');
32
+ }
33
+ const queryParameters = {};
34
+ const headerParameters = {};
35
+ headerParameters['Content-Type'] = 'application/json';
36
+ if (this.configuration && this.configuration.accessToken) {
37
+ const token = this.configuration.accessToken;
38
+ const tokenString = await token('bearer', []);
39
+ if (tokenString) {
40
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
41
+ }
42
+ }
43
+ let urlPath = `/api/v1/projects/{id}/conversations/completions/attach`;
44
+ urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id'])));
45
+ const response = await this.request({
46
+ path: urlPath,
47
+ method: 'POST',
48
+ headers: headerParameters,
49
+ query: queryParameters,
50
+ body: requestParameters['attachGenerationDto'],
51
+ }, initOverrides);
52
+ if (this.isJsonMime(response.headers.get('content-type'))) {
53
+ return new runtime.JSONApiResponse(response);
54
+ }
55
+ else {
56
+ return new runtime.TextApiResponse(response);
57
+ }
58
+ }
59
+ /**
60
+ * Replays the active generation of a project conversation as SSE, exactly as `POST /api/v1/conversations/completions/attach` does.
61
+ * Attach to a generation of a project conversation
62
+ */
63
+ async attachToProjectGeneration(requestParameters, initOverrides) {
64
+ const response = await this.attachToProjectGenerationRaw(requestParameters, initOverrides);
65
+ return await response.value();
66
+ }
22
67
  /**
23
68
  * Creates a project at the root of the session user\'s bucket in one atomic, create-only DIAL Core call. The BFF writes PROJECT.md (YAML frontmatter with name and description, instructions as the body) and each context file under context/. Name, file names, types, per-file size, total size and file count are validated first; every domain rejection carries a ProjectCreateErrorCode.
24
69
  * Create a project
@@ -87,7 +132,47 @@ class ProjectsApi extends runtime.BaseAPI {
87
132
  return await response.value();
88
133
  }
89
134
  /**
90
- * Deletes the project only if it is still the version named by `If-Match`, then removes it from the caller\'s pins. Only a project in the caller\'s own bucket can be deleted.
135
+ * Creates a conversation inside the project from its first message, as `POST /api/v1/conversations` does at the top level.
136
+ * Create a project conversation
137
+ */
138
+ async createProjectConversationRaw(requestParameters, initOverrides) {
139
+ if (requestParameters['id'] == null) {
140
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling createProjectConversation().');
141
+ }
142
+ if (requestParameters['createConversationDto'] == null) {
143
+ throw new runtime.RequiredError('createConversationDto', 'Required parameter "createConversationDto" was null or undefined when calling createProjectConversation().');
144
+ }
145
+ const queryParameters = {};
146
+ const headerParameters = {};
147
+ headerParameters['Content-Type'] = 'application/json';
148
+ if (this.configuration && this.configuration.accessToken) {
149
+ const token = this.configuration.accessToken;
150
+ const tokenString = await token('bearer', []);
151
+ if (tokenString) {
152
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
153
+ }
154
+ }
155
+ let urlPath = `/api/v1/projects/{id}/conversations`;
156
+ urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id'])));
157
+ const response = await this.request({
158
+ path: urlPath,
159
+ method: 'POST',
160
+ headers: headerParameters,
161
+ query: queryParameters,
162
+ body: requestParameters['createConversationDto'],
163
+ }, initOverrides);
164
+ return new runtime.JSONApiResponse(response);
165
+ }
166
+ /**
167
+ * Creates a conversation inside the project from its first message, as `POST /api/v1/conversations` does at the top level.
168
+ * Create a project conversation
169
+ */
170
+ async createProjectConversation(requestParameters, initOverrides) {
171
+ const response = await this.createProjectConversationRaw(requestParameters, initOverrides);
172
+ return await response.value();
173
+ }
174
+ /**
175
+ * Deletes the project, its conversations included, only if its content is still the `contentVersion` named by `If-Match`, then removes it from the caller\'s pins. Only a project in the caller\'s own bucket can be deleted.
91
176
  * Delete a project
92
177
  */
93
178
  async deleteProjectRaw(requestParameters, initOverrides) {
@@ -120,12 +205,48 @@ class ProjectsApi extends runtime.BaseAPI {
120
205
  return new runtime.VoidApiResponse(response);
121
206
  }
122
207
  /**
123
- * Deletes the project only if it is still the version named by `If-Match`, then removes it from the caller\'s pins. Only a project in the caller\'s own bucket can be deleted.
208
+ * Deletes the project, its conversations included, only if its content is still the `contentVersion` named by `If-Match`, then removes it from the caller\'s pins. Only a project in the caller\'s own bucket can be deleted.
124
209
  * Delete a project
125
210
  */
126
211
  async deleteProject(requestParameters, initOverrides) {
127
212
  await this.deleteProjectRaw(requestParameters, initOverrides);
128
213
  }
214
+ /**
215
+ * Delete a project conversation
216
+ */
217
+ async deleteProjectConversationRaw(requestParameters, initOverrides) {
218
+ if (requestParameters['id'] == null) {
219
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteProjectConversation().');
220
+ }
221
+ if (requestParameters['conversationName'] == null) {
222
+ throw new runtime.RequiredError('conversationName', 'Required parameter "conversationName" was null or undefined when calling deleteProjectConversation().');
223
+ }
224
+ const queryParameters = {};
225
+ const headerParameters = {};
226
+ if (this.configuration && this.configuration.accessToken) {
227
+ const token = this.configuration.accessToken;
228
+ const tokenString = await token('bearer', []);
229
+ if (tokenString) {
230
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
231
+ }
232
+ }
233
+ let urlPath = `/api/v1/projects/{id}/conversations/{conversationName}`;
234
+ urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id'])));
235
+ urlPath = urlPath.replace(`{${'conversationName'}}`, encodeURIComponent(String(requestParameters['conversationName'])));
236
+ const response = await this.request({
237
+ path: urlPath,
238
+ method: 'DELETE',
239
+ headers: headerParameters,
240
+ query: queryParameters,
241
+ }, initOverrides);
242
+ return new runtime.VoidApiResponse(response);
243
+ }
244
+ /**
245
+ * Delete a project conversation
246
+ */
247
+ async deleteProjectConversation(requestParameters, initOverrides) {
248
+ await this.deleteProjectConversationRaw(requestParameters, initOverrides);
249
+ }
129
250
  /**
130
251
  * Streams DIAL Core\'s archive of the whole project (`PROJECT.md` and `context/`) as an attachment.
131
252
  * Download a project as a ZIP archive
@@ -235,6 +356,84 @@ class ProjectsApi extends runtime.BaseAPI {
235
356
  const response = await this.getProjectRaw(requestParameters, initOverrides);
236
357
  return await response.value();
237
358
  }
359
+ /**
360
+ * Get a project conversation
361
+ */
362
+ async getProjectConversationRaw(requestParameters, initOverrides) {
363
+ if (requestParameters['id'] == null) {
364
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getProjectConversation().');
365
+ }
366
+ if (requestParameters['conversationName'] == null) {
367
+ throw new runtime.RequiredError('conversationName', 'Required parameter "conversationName" was null or undefined when calling getProjectConversation().');
368
+ }
369
+ const queryParameters = {};
370
+ const headerParameters = {};
371
+ if (this.configuration && this.configuration.accessToken) {
372
+ const token = this.configuration.accessToken;
373
+ const tokenString = await token('bearer', []);
374
+ if (tokenString) {
375
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
376
+ }
377
+ }
378
+ let urlPath = `/api/v1/projects/{id}/conversations/{conversationName}`;
379
+ urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id'])));
380
+ urlPath = urlPath.replace(`{${'conversationName'}}`, encodeURIComponent(String(requestParameters['conversationName'])));
381
+ const response = await this.request({
382
+ path: urlPath,
383
+ method: 'GET',
384
+ headers: headerParameters,
385
+ query: queryParameters,
386
+ }, initOverrides);
387
+ return new runtime.JSONApiResponse(response);
388
+ }
389
+ /**
390
+ * Get a project conversation
391
+ */
392
+ async getProjectConversation(requestParameters, initOverrides) {
393
+ const response = await this.getProjectConversationRaw(requestParameters, initOverrides);
394
+ return await response.value();
395
+ }
396
+ /**
397
+ * Lists the conversations stored in the project\'s `conversations/` folder, newest first, with their titles and authors.
398
+ * List a project\'s conversations
399
+ */
400
+ async listProjectConversationsRaw(requestParameters, initOverrides) {
401
+ if (requestParameters['id'] == null) {
402
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling listProjectConversations().');
403
+ }
404
+ const queryParameters = {};
405
+ if (requestParameters['limit'] != null) {
406
+ queryParameters['limit'] = requestParameters['limit'];
407
+ }
408
+ if (requestParameters['offset'] != null) {
409
+ queryParameters['offset'] = requestParameters['offset'];
410
+ }
411
+ const headerParameters = {};
412
+ if (this.configuration && this.configuration.accessToken) {
413
+ const token = this.configuration.accessToken;
414
+ const tokenString = await token('bearer', []);
415
+ if (tokenString) {
416
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
417
+ }
418
+ }
419
+ let urlPath = `/api/v1/projects/{id}/conversations`;
420
+ urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id'])));
421
+ const response = await this.request({
422
+ path: urlPath,
423
+ method: 'GET',
424
+ headers: headerParameters,
425
+ query: queryParameters,
426
+ }, initOverrides);
427
+ return new runtime.JSONApiResponse(response);
428
+ }
429
+ /**
430
+ * Lists the conversations stored in the project\'s `conversations/` folder, newest first, with their titles and authors.
431
+ * List a project\'s conversations
432
+ */
433
+ async listProjectConversations(requestParameters, initOverrides) {
434
+ const response = await this.listProjectConversationsRaw(requestParameters, initOverrides);
435
+ return await response.value();
436
+ }
238
437
  /**
239
438
  * Returns every DIAL project visible to the session user: the user\'s own bucket, the public (organization) bucket, and projects shared with the user, merged and de-duplicated by id. The BFF follows DIAL Core paging itself, so the list is complete up to a per-source page cap. A failing source is omitted; the request fails only when both bucket listings fail.
240
439
  * List projects
@@ -267,7 +466,177 @@ class ProjectsApi extends runtime.BaseAPI {
267
466
  return await response.value();
268
467
  }
269
468
  /**
270
- * Saves the name, description, instructions and context of a project in one conditional DIAL Core write: the BFF rebuilds PROJECT.md, keeps every stored context file not listed in `removedFileNames`, adds the `files` parts and writes the whole project with `If-Match`. A different name then moves the project in its folder and keeps the caller\'s pin. Only a project in the caller\'s own bucket can be saved. Every domain rejection carries a ProjectCreateErrorCode.
469
+ * Rewrites the conversation\'s display name; its file name does not change.
470
+ * Rename a project conversation
471
+ */
472
+ async renameProjectConversationRaw(requestParameters, initOverrides) {
473
+ if (requestParameters['id'] == null) {
474
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling renameProjectConversation().');
475
+ }
476
+ if (requestParameters['conversationName'] == null) {
477
+ throw new runtime.RequiredError('conversationName', 'Required parameter "conversationName" was null or undefined when calling renameProjectConversation().');
478
+ }
479
+ if (requestParameters['renameConversationBodyDto'] == null) {
480
+ throw new runtime.RequiredError('renameConversationBodyDto', 'Required parameter "renameConversationBodyDto" was null or undefined when calling renameProjectConversation().');
481
+ }
482
+ const queryParameters = {};
483
+ const headerParameters = {};
484
+ headerParameters['Content-Type'] = 'application/json';
485
+ if (this.configuration && this.configuration.accessToken) {
486
+ const token = this.configuration.accessToken;
487
+ const tokenString = await token('bearer', []);
488
+ if (tokenString) {
489
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
490
+ }
491
+ }
492
+ let urlPath = `/api/v1/projects/{id}/conversations/{conversationName}`;
493
+ urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id'])));
494
+ urlPath = urlPath.replace(`{${'conversationName'}}`, encodeURIComponent(String(requestParameters['conversationName'])));
495
+ const response = await this.request({
496
+ path: urlPath,
497
+ method: 'PATCH',
498
+ headers: headerParameters,
499
+ query: queryParameters,
500
+ body: requestParameters['renameConversationBodyDto'],
501
+ }, initOverrides);
502
+ return new runtime.JSONApiResponse(response);
503
+ }
504
+ /**
505
+ * Rewrites the conversation\'s display name; its file name does not change.
506
+ * Rename a project conversation
507
+ */
508
+ async renameProjectConversation(requestParameters, initOverrides) {
509
+ const response = await this.renameProjectConversationRaw(requestParameters, initOverrides);
510
+ return await response.value();
511
+ }
512
+ /**
513
+ * Overwrites the conversation body, never over a pending background answer, as `PUT /api/v1/conversations` does.
514
+ * Save a project conversation
515
+ */
516
+ async saveProjectConversationRaw(requestParameters, initOverrides) {
517
+ if (requestParameters['id'] == null) {
518
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling saveProjectConversation().');
519
+ }
520
+ if (requestParameters['conversationName'] == null) {
521
+ throw new runtime.RequiredError('conversationName', 'Required parameter "conversationName" was null or undefined when calling saveProjectConversation().');
522
+ }
523
+ if (requestParameters['saveConversationBodyDto'] == null) {
524
+ throw new runtime.RequiredError('saveConversationBodyDto', 'Required parameter "saveConversationBodyDto" was null or undefined when calling saveProjectConversation().');
525
+ }
526
+ const queryParameters = {};
527
+ const headerParameters = {};
528
+ headerParameters['Content-Type'] = 'application/json';
529
+ if (this.configuration && this.configuration.accessToken) {
530
+ const token = this.configuration.accessToken;
531
+ const tokenString = await token('bearer', []);
532
+ if (tokenString) {
533
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
534
+ }
535
+ }
536
+ let urlPath = `/api/v1/projects/{id}/conversations/{conversationName}`;
537
+ urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id'])));
538
+ urlPath = urlPath.replace(`{${'conversationName'}}`, encodeURIComponent(String(requestParameters['conversationName'])));
539
+ const response = await this.request({
540
+ path: urlPath,
541
+ method: 'PUT',
542
+ headers: headerParameters,
543
+ query: queryParameters,
544
+ body: requestParameters['saveConversationBodyDto'],
545
+ }, initOverrides);
546
+ return new runtime.JSONApiResponse(response);
547
+ }
548
+ /**
549
+ * Overwrites the conversation body, never over a pending background answer, as `PUT /api/v1/conversations` does.
550
+ * Save a project conversation
551
+ */
552
+ async saveProjectConversation(requestParameters, initOverrides) {
553
+ const response = await this.saveProjectConversationRaw(requestParameters, initOverrides);
554
+ return await response.value();
555
+ }
556
+ /**
557
+ * Stop a generation of a project conversation
558
+ */
559
+ async stopProjectCompletionRaw(requestParameters, initOverrides) {
560
+ if (requestParameters['id'] == null) {
561
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling stopProjectCompletion().');
562
+ }
563
+ if (requestParameters['stopCompletionDto'] == null) {
564
+ throw new runtime.RequiredError('stopCompletionDto', 'Required parameter "stopCompletionDto" was null or undefined when calling stopProjectCompletion().');
565
+ }
566
+ const queryParameters = {};
567
+ const headerParameters = {};
568
+ headerParameters['Content-Type'] = 'application/json';
569
+ if (this.configuration && this.configuration.accessToken) {
570
+ const token = this.configuration.accessToken;
571
+ const tokenString = await token('bearer', []);
572
+ if (tokenString) {
573
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
574
+ }
575
+ }
576
+ let urlPath = `/api/v1/projects/{id}/conversations/completions/stop`;
577
+ urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id'])));
578
+ const response = await this.request({
579
+ path: urlPath,
580
+ method: 'POST',
581
+ headers: headerParameters,
582
+ query: queryParameters,
583
+ body: requestParameters['stopCompletionDto'],
584
+ }, initOverrides);
585
+ return new runtime.VoidApiResponse(response);
586
+ }
587
+ /**
588
+ * Stop a generation of a project conversation
589
+ */
590
+ async stopProjectCompletion(requestParameters, initOverrides) {
591
+ await this.stopProjectCompletionRaw(requestParameters, initOverrides);
592
+ }
593
+ /**
594
+ * Streams a completion as SSE exactly as `POST /api/v1/conversations/completions` does, with the `x-project-id` header on the model call and nothing else added to the request.
595
+ * Stream a completion of a project conversation
596
+ */
597
+ async streamProjectCompletionRaw(requestParameters, initOverrides) {
598
+ if (requestParameters['id'] == null) {
599
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling streamProjectCompletion().');
600
+ }
601
+ if (requestParameters['sendCompletionDto'] == null) {
602
+ throw new runtime.RequiredError('sendCompletionDto', 'Required parameter "sendCompletionDto" was null or undefined when calling streamProjectCompletion().');
603
+ }
604
+ const queryParameters = {};
605
+ const headerParameters = {};
606
+ headerParameters['Content-Type'] = 'application/json';
607
+ if (this.configuration && this.configuration.accessToken) {
608
+ const token = this.configuration.accessToken;
609
+ const tokenString = await token('bearer', []);
610
+ if (tokenString) {
611
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
612
+ }
613
+ }
614
+ let urlPath = `/api/v1/projects/{id}/conversations/completions`;
615
+ urlPath = urlPath.replace(`{${'id'}}`, encodeURIComponent(String(requestParameters['id'])));
616
+ const response = await this.request({
617
+ path: urlPath,
618
+ method: 'POST',
619
+ headers: headerParameters,
620
+ query: queryParameters,
621
+ body: requestParameters['sendCompletionDto'],
622
+ }, initOverrides);
623
+ if (this.isJsonMime(response.headers.get('content-type'))) {
624
+ return new runtime.JSONApiResponse(response);
625
+ }
626
+ else {
627
+ return new runtime.TextApiResponse(response);
628
+ }
629
+ }
630
+ /**
631
+ * Streams a completion as SSE exactly as `POST /api/v1/conversations/completions` does, with the `x-project-id` header on the model call and nothing else added to the request.
632
+ * Stream a completion of a project conversation
633
+ */
634
+ async streamProjectCompletion(requestParameters, initOverrides) {
635
+ const response = await this.streamProjectCompletionRaw(requestParameters, initOverrides);
636
+ return await response.value();
637
+ }
638
+ /**
639
+ * Saves the name, description, instructions and context of a project in one conditional DIAL Core write: the BFF rebuilds PROJECT.md, keeps every stored context file not listed in `removedFileNames`, adds the `files` parts, carries the stored conversations over, and writes the whole project conditioned on the fresh snapshot\'s ETag, retrying a concurrent conversation write while `If-Match` still names the `contentVersion`. A different name then moves the project in its folder and keeps the caller\'s pin. Only a project in the caller\'s own bucket can be saved. Every domain rejection carries a ProjectCreateErrorCode.
271
640
  * Save a project edit
272
641
  */
273
642
  async updateProjectRaw(requestParameters, initOverrides) {
@@ -339,7 +708,7 @@ class ProjectsApi extends runtime.BaseAPI {
339
708
  return new runtime.JSONApiResponse(response);
340
709
  }
341
710
  /**
342
- * Saves the name, description, instructions and context of a project in one conditional DIAL Core write: the BFF rebuilds PROJECT.md, keeps every stored context file not listed in `removedFileNames`, adds the `files` parts and writes the whole project with `If-Match`. A different name then moves the project in its folder and keeps the caller\'s pin. Only a project in the caller\'s own bucket can be saved. Every domain rejection carries a ProjectCreateErrorCode.
711
+ * Saves the name, description, instructions and context of a project in one conditional DIAL Core write: the BFF rebuilds PROJECT.md, keeps every stored context file not listed in `removedFileNames`, adds the `files` parts, carries the stored conversations over, and writes the whole project conditioned on the fresh snapshot\'s ETag, retrying a concurrent conversation write while `If-Match` still names the `contentVersion`. A different name then moves the project in its folder and keeps the caller\'s pin. Only a project in the caller\'s own bucket can be saved. Every domain rejection carries a ProjectCreateErrorCode.
343
712
  * Save a project edit
344
713
  */
345
714
  async updateProject(requestParameters, initOverrides) {