@nomalism-com/types 0.40.72 → 0.40.74
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
|
@@ -4295,6 +4295,7 @@ var createBodyKeys52 = {
|
|
|
4295
4295
|
};
|
|
4296
4296
|
var createBody53 = joi76.object().keys(createBodyKeys52).xor("provider_id", "client_id", "commissioner_id", "store_operator_id").messages(messages);
|
|
4297
4297
|
var updateBodyKeys50 = {
|
|
4298
|
+
external: joi76.boolean().optional(),
|
|
4298
4299
|
name: joi76.string().allow(null, "").optional(),
|
|
4299
4300
|
nif: joi76.string().allow(null, "").optional(),
|
|
4300
4301
|
street: joi76.string().allow(null, "").optional(),
|
package/dist/index.js
CHANGED
|
@@ -4295,6 +4295,7 @@ var createBodyKeys52 = {
|
|
|
4295
4295
|
};
|
|
4296
4296
|
var createBody53 = joi76.object().keys(createBodyKeys52).xor("provider_id", "client_id", "commissioner_id", "store_operator_id").messages(messages);
|
|
4297
4297
|
var updateBodyKeys50 = {
|
|
4298
|
+
external: joi76.boolean().optional(),
|
|
4298
4299
|
name: joi76.string().allow(null, "").optional(),
|
|
4299
4300
|
nif: joi76.string().allow(null, "").optional(),
|
|
4300
4301
|
street: joi76.string().allow(null, "").optional(),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type * as IShared from '../../../shared/interface';
|
|
2
2
|
import type * as Persona from '../../user/persona/interface';
|
|
3
|
+
import type * as ChatSubscriber from '../../user/chatSubscribers/interfaces';
|
|
3
4
|
import { Chat, File } from '../../../shared/entities/stock';
|
|
4
5
|
export type Entity = Chat;
|
|
5
6
|
export declare const Route = "chat";
|
|
@@ -34,6 +35,14 @@ export interface IPublicFindActiveByOwnerIdResponse {
|
|
|
34
35
|
document_header_id?: string;
|
|
35
36
|
chat: IChatBalloon[];
|
|
36
37
|
}
|
|
38
|
+
export interface IPublicClientWebAppFindActiveByOwnerIdResponse {
|
|
39
|
+
personas: ChatSubscriber.IFindChatSubscriberResponse[];
|
|
40
|
+
last_group_report?: IReport;
|
|
41
|
+
owner_id?: string;
|
|
42
|
+
store_operator_name?: string | null;
|
|
43
|
+
document_header_id?: string;
|
|
44
|
+
chat: IChatBalloon[];
|
|
45
|
+
}
|
|
37
46
|
export interface ICreateRequest {
|
|
38
47
|
owner_id: string;
|
|
39
48
|
document_header_id: string;
|
|
@@ -58,6 +67,7 @@ export interface IMarkAllClientReadUnreadRequest {
|
|
|
58
67
|
}
|
|
59
68
|
export interface IRepository {
|
|
60
69
|
findActiveByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IPublicFindActiveByOwnerIdResponse>;
|
|
70
|
+
clientWebbAppFindActiveByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IPublicFindActiveByOwnerIdResponse>;
|
|
61
71
|
findActiveBySubscriberId(params: IShared.IFindByOwnerIdRequest): Promise<IPublicFindActiveByOwnerIdResponse>;
|
|
62
72
|
resendLast(params: IShared.IFindByOwnerIdRequest): Promise<void>;
|
|
63
73
|
create(data: ICreateRequest): Promise<Chat>;
|
|
@@ -19,10 +19,15 @@ export interface IFindResponse extends Pick<Persona, 'external' | 'name' | 'emai
|
|
|
19
19
|
owner_id?: ChatSubscriber['owner_id'];
|
|
20
20
|
document_header_id?: ChatSubscriber['document_header_id'];
|
|
21
21
|
}
|
|
22
|
+
export interface IFindChatSubscriberResponse extends Pick<Persona, 'external' | 'name' | 'email' | 'telephone'> {
|
|
23
|
+
id?: ChatSubscriber['id'];
|
|
24
|
+
persona_id: ChatSubscriber['persona_id'];
|
|
25
|
+
}
|
|
22
26
|
export interface IRepository {
|
|
23
27
|
createOrUpdate(data: ICreateOrUpdateRequest): Promise<void>;
|
|
24
28
|
findById(selector: IShared.IFindByIdRequest): Promise<IFindResponse>;
|
|
25
29
|
findByOwner(selector: IFindRequest): Promise<IFindResponse[]>;
|
|
30
|
+
clientWebAppFindByOwner(selector: IShared.IFindByOwnerIdRequest): Promise<IFindChatSubscriberResponse[]>;
|
|
26
31
|
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
27
32
|
}
|
|
28
33
|
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.74",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|