@nomalism-com/types 0.40.26 → 0.40.28
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
|
@@ -1197,6 +1197,7 @@ var updateBodyKeys4 = {
|
|
|
1197
1197
|
email_opened: joi6.boolean().optional(),
|
|
1198
1198
|
email_clicked: joi6.boolean().optional(),
|
|
1199
1199
|
read: joi6.boolean().optional(),
|
|
1200
|
+
client_read: joi6.boolean().optional(),
|
|
1200
1201
|
username: joi6.string().optional()
|
|
1201
1202
|
};
|
|
1202
1203
|
var updateBody4 = joi6.object().keys(updateBodyKeys4).messages(messages);
|
package/dist/index.js
CHANGED
|
@@ -1197,6 +1197,7 @@ var updateBodyKeys4 = {
|
|
|
1197
1197
|
email_opened: joi6.boolean().optional(),
|
|
1198
1198
|
email_clicked: joi6.boolean().optional(),
|
|
1199
1199
|
read: joi6.boolean().optional(),
|
|
1200
|
+
client_read: joi6.boolean().optional(),
|
|
1200
1201
|
username: joi6.string().optional()
|
|
1201
1202
|
};
|
|
1202
1203
|
var updateBody4 = joi6.object().keys(updateBodyKeys4).messages(messages);
|
|
@@ -15,10 +15,12 @@ export interface IChatBalloon {
|
|
|
15
15
|
chat?: Pick<Entity, 'message'> & {
|
|
16
16
|
id?: string;
|
|
17
17
|
read?: boolean;
|
|
18
|
+
client_read?: Date;
|
|
18
19
|
};
|
|
19
20
|
file?: Pick<File, 'multimedia_id' | 'filename'> & {
|
|
20
21
|
id?: string;
|
|
21
22
|
read?: boolean;
|
|
23
|
+
client_read?: Date;
|
|
22
24
|
};
|
|
23
25
|
created_at: Date;
|
|
24
26
|
created_by: string;
|
|
@@ -30,6 +32,7 @@ export interface IPublicFindActiveByOwnerIdResponse {
|
|
|
30
32
|
last_group_report?: IReport;
|
|
31
33
|
owner_id?: string;
|
|
32
34
|
chat: IChatBalloon[];
|
|
35
|
+
client_unread_count: number;
|
|
33
36
|
}
|
|
34
37
|
export interface ICreateRequest {
|
|
35
38
|
owner_id: string;
|
|
@@ -46,15 +49,21 @@ export interface IUpdateRequest {
|
|
|
46
49
|
email_opened?: boolean;
|
|
47
50
|
email_clicked?: boolean;
|
|
48
51
|
read?: boolean;
|
|
52
|
+
client_read?: boolean;
|
|
49
53
|
username?: string;
|
|
50
54
|
}
|
|
55
|
+
export interface IMarkAllRequest {
|
|
56
|
+
owner_id: string;
|
|
57
|
+
read: boolean;
|
|
58
|
+
client_read: boolean;
|
|
59
|
+
}
|
|
51
60
|
export interface IRepository {
|
|
52
61
|
findActiveByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IPublicFindActiveByOwnerIdResponse>;
|
|
53
62
|
resendLast(params: IShared.IFindByOwnerIdRequest): Promise<void>;
|
|
54
63
|
create(data: ICreateRequest): Promise<Chat>;
|
|
55
64
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
56
65
|
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
57
|
-
markAllAsRead(params:
|
|
58
|
-
markAllAsUnread(params:
|
|
66
|
+
markAllAsRead(params: IMarkAllRequest): Promise<void>;
|
|
67
|
+
markAllAsUnread(params: IMarkAllRequest): Promise<void>;
|
|
59
68
|
}
|
|
60
69
|
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.
|
|
4
|
+
"version": "0.40.28",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|