@nomalism-com/api 0.45.7 → 0.45.9
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/index.js
CHANGED
|
@@ -4208,6 +4208,10 @@ var Repository119 = class {
|
|
|
4208
4208
|
const response = await this.api.post(`${this.route}identify_language`, body);
|
|
4209
4209
|
return response.data;
|
|
4210
4210
|
}
|
|
4211
|
+
async identifyAndTranslate(body) {
|
|
4212
|
+
const response = await this.api.post(`${this.route}identify_and_translate`, body);
|
|
4213
|
+
return response.data;
|
|
4214
|
+
}
|
|
4211
4215
|
};
|
|
4212
4216
|
|
|
4213
4217
|
// src/modules/integration/patchNotes.ts
|
|
@@ -7,4 +7,5 @@ export default class Repository implements Nomalism.LLM.IRepository {
|
|
|
7
7
|
prompt(data: Nomalism.LLM.IPromptRequest, { onChunk, onDone, onError }: Nomalism.LLM.IPromptResponse): Nomalism.LLM.IPromptAbortController;
|
|
8
8
|
translate(body: Nomalism.LLM.ITranslateRequest): Promise<string>;
|
|
9
9
|
identifyLanguage(body: Nomalism.LLM.IIdentifyLanguageRequest): Promise<string>;
|
|
10
|
+
identifyAndTranslate(body: Nomalism.LLM.ITranslateRequest): Promise<Nomalism.LLM.IIdentifyAndTranslateResponse>;
|
|
10
11
|
}
|
|
@@ -1,58 +1,7 @@
|
|
|
1
1
|
import type Nomalism from '@nomalism-com/types';
|
|
2
2
|
import type { IModuleConstructor } from '../../main';
|
|
3
|
-
export
|
|
4
|
-
type: 'chat.translation.updated';
|
|
5
|
-
chat_id: string;
|
|
6
|
-
translation: string;
|
|
7
|
-
target_language_id: string;
|
|
8
|
-
} | {
|
|
9
|
-
type: 'chat.message.created';
|
|
10
|
-
balloon: Nomalism.Chat.IChatBalloon;
|
|
11
|
-
} | {
|
|
12
|
-
type: 'chat.message.updated';
|
|
13
|
-
chat_id: string;
|
|
14
|
-
patch: Partial<NonNullable<Nomalism.Chat.IChatBalloon['chat']>>;
|
|
15
|
-
} | {
|
|
16
|
-
type: 'chat.message.deleted';
|
|
17
|
-
chat_id: string;
|
|
18
|
-
} | {
|
|
19
|
-
type: 'chat.file.deleted';
|
|
20
|
-
file_id: string;
|
|
21
|
-
} | {
|
|
22
|
-
type: 'chat.read_state.updated';
|
|
23
|
-
chat_document_header_id: string;
|
|
24
|
-
client_read: boolean;
|
|
25
|
-
chat_id?: string;
|
|
26
|
-
file_id?: string;
|
|
27
|
-
} | {
|
|
28
|
-
type: 'chat.tags.updated';
|
|
29
|
-
chat_document_header_id: string;
|
|
30
|
-
tags: Nomalism.Portal.ITags[];
|
|
31
|
-
} | {
|
|
32
|
-
type: 'persona.updated';
|
|
33
|
-
persona: NonNullable<Nomalism.Portal.IPublicFindBySubscriberId['persona']>;
|
|
34
|
-
} | {
|
|
35
|
-
type: 'document.updated';
|
|
36
|
-
document: Nomalism.Portal.IPublicDocument;
|
|
37
|
-
} | {
|
|
38
|
-
type: 'ping';
|
|
39
|
-
} | {
|
|
40
|
-
type: 'pong';
|
|
41
|
-
};
|
|
42
|
-
interface ChatSocketOptions {
|
|
43
|
-
token: string;
|
|
44
|
-
onEvent: (evt: ChatSocketEvent) => void;
|
|
45
|
-
onOpen?: () => void;
|
|
46
|
-
onReconnect?: () => void;
|
|
47
|
-
onClose?: () => void;
|
|
48
|
-
onAuthUnverified?: () => void;
|
|
49
|
-
}
|
|
50
|
-
interface ChatSocketHandle {
|
|
51
|
-
close: () => void;
|
|
52
|
-
}
|
|
53
|
-
export default class Service {
|
|
3
|
+
export default class Service implements Nomalism.WebSocket.IClient {
|
|
54
4
|
route: string;
|
|
55
5
|
constructor({ route }: IModuleConstructor);
|
|
56
|
-
openChatSocket({ token, onEvent, onOpen, onReconnect, onClose, onAuthUnverified, }: ChatSocketOptions): ChatSocketHandle;
|
|
6
|
+
openChatSocket({ token, onEvent, onOpen, onReconnect, onClose, onAuthUnverified, }: Nomalism.WebSocket.ChatSocketOptions): Nomalism.WebSocket.ChatSocketHandle;
|
|
57
7
|
}
|
|
58
|
-
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nomalism-com/api",
|
|
3
3
|
"description": "A nomalism API package for performing HTTP requests on API endpoints",
|
|
4
|
-
"version": "0.45.
|
|
4
|
+
"version": "0.45.9",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"prepack": "npm run lint && npm run build"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@nomalism-com/types": "^0.45.
|
|
26
|
+
"@nomalism-com/types": "^0.45.11",
|
|
27
27
|
"axios": "^1.16.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|