@nomalism-com/types 0.40.84 → 0.40.86

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.
@@ -5,7 +5,15 @@ export interface IPromptRequest {
5
5
  owner_id: string;
6
6
  document_header_id: string;
7
7
  }
8
+ export interface IPromptResponse {
9
+ onChunk: (text: string) => void;
10
+ onDone?: () => void;
11
+ onError?: (err: unknown) => void;
12
+ }
13
+ export interface IPromptAbortController {
14
+ abort(): void;
15
+ }
8
16
  export interface IRepository {
9
- prompt: (data: IPromptRequest, onChunk: (chunk: string) => void) => Promise<void>;
17
+ prompt: (data: IPromptRequest, response: IPromptResponse) => Promise<IPromptAbortController>;
10
18
  }
11
19
  export type IController = IShared.IEntityWithUserToken<IRepository>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nomalism-com/types",
3
3
  "description": "A nomalism package with all necessary types and validations for developing APIs",
4
- "version": "0.40.84",
4
+ "version": "0.40.86",
5
5
  "author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",