@nomalism-com/types 0.43.74 → 0.43.76
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.cjs
CHANGED
|
@@ -1177,6 +1177,7 @@ var route_schema_exports5 = {};
|
|
|
1177
1177
|
__export(route_schema_exports5, {
|
|
1178
1178
|
createBody: () => createBody5,
|
|
1179
1179
|
markAllClientReadUnreadParams: () => markAllClientReadUnreadParams,
|
|
1180
|
+
translateBody: () => translateBody,
|
|
1180
1181
|
updateBody: () => updateBody4
|
|
1181
1182
|
});
|
|
1182
1183
|
import joi6 from "joi";
|
|
@@ -1204,6 +1205,11 @@ var markAllClientReadUnreadParamsKeys = {
|
|
|
1204
1205
|
client_read: joi6.boolean().required()
|
|
1205
1206
|
};
|
|
1206
1207
|
var markAllClientReadUnreadParams = joi6.object().keys(markAllClientReadUnreadParamsKeys).messages(messages);
|
|
1208
|
+
var translateBody = joi6.object().keys({
|
|
1209
|
+
chat_id: joi6.string().uuid().required(),
|
|
1210
|
+
target_language_id: joi6.string().uuid().required(),
|
|
1211
|
+
message: joi6.string().required()
|
|
1212
|
+
}).messages(messages);
|
|
1207
1213
|
|
|
1208
1214
|
// src/modules/user/commissioner/interface.ts
|
|
1209
1215
|
var interface_exports5 = {};
|
package/dist/index.js
CHANGED
|
@@ -1177,6 +1177,7 @@ var route_schema_exports5 = {};
|
|
|
1177
1177
|
__export(route_schema_exports5, {
|
|
1178
1178
|
createBody: () => createBody5,
|
|
1179
1179
|
markAllClientReadUnreadParams: () => markAllClientReadUnreadParams,
|
|
1180
|
+
translateBody: () => translateBody,
|
|
1180
1181
|
updateBody: () => updateBody4
|
|
1181
1182
|
});
|
|
1182
1183
|
import joi6 from "joi";
|
|
@@ -1204,6 +1205,11 @@ var markAllClientReadUnreadParamsKeys = {
|
|
|
1204
1205
|
client_read: joi6.boolean().required()
|
|
1205
1206
|
};
|
|
1206
1207
|
var markAllClientReadUnreadParams = joi6.object().keys(markAllClientReadUnreadParamsKeys).messages(messages);
|
|
1208
|
+
var translateBody = joi6.object().keys({
|
|
1209
|
+
chat_id: joi6.string().uuid().required(),
|
|
1210
|
+
target_language_id: joi6.string().uuid().required(),
|
|
1211
|
+
message: joi6.string().required()
|
|
1212
|
+
}).messages(messages);
|
|
1207
1213
|
|
|
1208
1214
|
// src/modules/user/commissioner/interface.ts
|
|
1209
1215
|
var interface_exports5 = {};
|
|
@@ -47,6 +47,11 @@ export interface IMarkAllClientReadUnreadRequest {
|
|
|
47
47
|
chat_document_header_id: string;
|
|
48
48
|
client_read: boolean;
|
|
49
49
|
}
|
|
50
|
+
export interface ITranslateRequest {
|
|
51
|
+
chat_id: string;
|
|
52
|
+
target_language_id: string;
|
|
53
|
+
message: string;
|
|
54
|
+
}
|
|
50
55
|
export interface IRepository {
|
|
51
56
|
findByOwnerId(params: IShared.IFindByIdRequest): Promise<IFindActiveByOwnerIdResponse>;
|
|
52
57
|
create(data: ICreateRequest): Promise<Chat>;
|
|
@@ -56,5 +61,6 @@ export interface IRepository {
|
|
|
56
61
|
markAllAsUnread(params: IShared.IFindByIdRequest): Promise<void>;
|
|
57
62
|
publicMarkAllClientReadUnread(params: IMarkAllClientReadUnreadRequest): Promise<void>;
|
|
58
63
|
resendLast(params: IShared.IFindByIdRequest): Promise<void>;
|
|
64
|
+
translate(data: ITranslateRequest): Promise<string>;
|
|
59
65
|
}
|
|
60
66
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import joi from 'joi';
|
|
2
|
+
import { ITranslateRequest } from './interfaces';
|
|
2
3
|
export declare const createBody: joi.ObjectSchema<any>;
|
|
3
4
|
export declare const updateBody: joi.ObjectSchema<any>;
|
|
4
5
|
export declare const markAllClientReadUnreadParams: joi.ObjectSchema<any>;
|
|
6
|
+
export declare const translateBody: joi.ObjectSchema<ITranslateRequest>;
|
|
@@ -143,12 +143,11 @@ export type Country = {
|
|
|
143
143
|
export type Language = {
|
|
144
144
|
id: string;
|
|
145
145
|
name: string;
|
|
146
|
+
native_name: string;
|
|
147
|
+
iso_code: string;
|
|
148
|
+
short_list: boolean;
|
|
146
149
|
created_at: Date;
|
|
147
150
|
updated_at: Date;
|
|
148
|
-
created_by: string;
|
|
149
|
-
updated_by: string;
|
|
150
|
-
origin_id: string | null;
|
|
151
|
-
external_id: string | null;
|
|
152
151
|
};
|
|
153
152
|
/**
|
|
154
153
|
* Model Clients
|
|
@@ -11,6 +11,7 @@ import type { File } from './entities/stock';
|
|
|
11
11
|
import type { ProjectInfo } from './entities/integration';
|
|
12
12
|
import type { IAttachment } from '../modules/supply/externalDocumentHeader/interface';
|
|
13
13
|
import type { Persona } from './entities/user';
|
|
14
|
+
import type { ITranslateRequest } from '../modules/stock/chat/interfaces';
|
|
14
15
|
export { messages };
|
|
15
16
|
type CreatedAt = 'created_at';
|
|
16
17
|
type UpdatedAt = 'updated_at';
|
|
@@ -295,11 +296,7 @@ export type IBrokerTopicPayload = {
|
|
|
295
296
|
email_subject?: string;
|
|
296
297
|
created_by: string;
|
|
297
298
|
};
|
|
298
|
-
[IBrokerTopic.translate_chat_message]:
|
|
299
|
-
chat_id: string;
|
|
300
|
-
target_language_id: string;
|
|
301
|
-
message: string;
|
|
302
|
-
};
|
|
299
|
+
[IBrokerTopic.translate_chat_message]: ITranslateRequest;
|
|
303
300
|
[IBrokerTopic.create_site_proposal]: ProjectInfo;
|
|
304
301
|
[IBrokerTopic.verification_email]: {
|
|
305
302
|
email: string;
|
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.43.
|
|
4
|
+
"version": "0.43.76",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|