@nomalism-com/types 0.43.56 → 0.43.58
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 +8 -9
- package/dist/index.js +8 -9
- package/dist/modules/stock/chat/interfaces.d.ts +0 -12
- package/dist/modules/ui/portal/interface.d.ts +18 -11
- package/dist/modules/ui/portal/route.schema.d.ts +0 -1
- package/dist/modules/user/chatSubscribers/interfaces.d.ts +6 -9
- package/dist/modules/user/chatSubscribers/route.schema.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5639,7 +5639,8 @@ var LowerName99 = UpperName99[0].toLowerCase() + UpperName99.substring(1);
|
|
|
5639
5639
|
var route_schema_exports103 = {};
|
|
5640
5640
|
__export(route_schema_exports103, {
|
|
5641
5641
|
createOrUpdateBody: () => createOrUpdateBody2,
|
|
5642
|
-
|
|
5642
|
+
findDocumentHeaderSubscribersQuery: () => findDocumentHeaderSubscribersQuery,
|
|
5643
|
+
findSubscribedDocumentHeadersQuery: () => findSubscribedDocumentHeadersQuery
|
|
5643
5644
|
});
|
|
5644
5645
|
import joi104 from "joi";
|
|
5645
5646
|
var createOrUpdateBodyKeys2 = {
|
|
@@ -5647,11 +5648,15 @@ var createOrUpdateBodyKeys2 = {
|
|
|
5647
5648
|
personas_ids: joi104.array().items(joi104.string().optional()).required()
|
|
5648
5649
|
};
|
|
5649
5650
|
var createOrUpdateBody2 = joi104.object().keys(createOrUpdateBodyKeys2).messages(messages);
|
|
5650
|
-
var
|
|
5651
|
+
var findDocumentHeaderSubscribersQueryKeys = {
|
|
5651
5652
|
owner_id: joi104.string().uuid().required(),
|
|
5652
5653
|
chat_document_header_id: joi104.string().uuid().required()
|
|
5653
5654
|
};
|
|
5654
|
-
var
|
|
5655
|
+
var findDocumentHeaderSubscribersQuery = joi104.object().keys(findDocumentHeaderSubscribersQueryKeys).messages(messages);
|
|
5656
|
+
var findSubscribedDocumentHeadersQueryKeys = {
|
|
5657
|
+
owner_id: joi104.string().uuid().required()
|
|
5658
|
+
};
|
|
5659
|
+
var findSubscribedDocumentHeadersQuery = joi104.object().keys(findSubscribedDocumentHeadersQueryKeys).messages(messages);
|
|
5655
5660
|
|
|
5656
5661
|
// src/modules/stock/tag/interface.ts
|
|
5657
5662
|
var interface_exports57 = {};
|
|
@@ -5875,7 +5880,6 @@ var IPublicDocumentHeaderNoteType = /* @__PURE__ */ ((IPublicDocumentHeaderNoteT
|
|
|
5875
5880
|
var route_schema_exports109 = {};
|
|
5876
5881
|
__export(route_schema_exports109, {
|
|
5877
5882
|
createNoteBody: () => createNoteBody,
|
|
5878
|
-
publicFindByOwnerId: () => publicFindByOwnerId,
|
|
5879
5883
|
updateNoteBody: () => updateNoteBody
|
|
5880
5884
|
});
|
|
5881
5885
|
import joi110 from "joi";
|
|
@@ -5889,11 +5893,6 @@ var updateNoteBodyKeys = {
|
|
|
5889
5893
|
note: joi110.string().required().allow("")
|
|
5890
5894
|
};
|
|
5891
5895
|
var updateNoteBody = joi110.object().keys(updateNoteBodyKeys).messages(messages);
|
|
5892
|
-
var publicFindByOwnerIdParams = {
|
|
5893
|
-
owner_id: joi110.string().uuid().required(),
|
|
5894
|
-
include_closed: joi110.boolean().optional()
|
|
5895
|
-
};
|
|
5896
|
-
var publicFindByOwnerId = joi110.object().keys(publicFindByOwnerIdParams).messages(messages);
|
|
5897
5896
|
|
|
5898
5897
|
// src/modules/stock/googleSheetPool/interface.ts
|
|
5899
5898
|
var interface_exports64 = {};
|
package/dist/index.js
CHANGED
|
@@ -5639,7 +5639,8 @@ var LowerName99 = UpperName99[0].toLowerCase() + UpperName99.substring(1);
|
|
|
5639
5639
|
var route_schema_exports103 = {};
|
|
5640
5640
|
__export(route_schema_exports103, {
|
|
5641
5641
|
createOrUpdateBody: () => createOrUpdateBody2,
|
|
5642
|
-
|
|
5642
|
+
findDocumentHeaderSubscribersQuery: () => findDocumentHeaderSubscribersQuery,
|
|
5643
|
+
findSubscribedDocumentHeadersQuery: () => findSubscribedDocumentHeadersQuery
|
|
5643
5644
|
});
|
|
5644
5645
|
import joi104 from "joi";
|
|
5645
5646
|
var createOrUpdateBodyKeys2 = {
|
|
@@ -5647,11 +5648,15 @@ var createOrUpdateBodyKeys2 = {
|
|
|
5647
5648
|
personas_ids: joi104.array().items(joi104.string().optional()).required()
|
|
5648
5649
|
};
|
|
5649
5650
|
var createOrUpdateBody2 = joi104.object().keys(createOrUpdateBodyKeys2).messages(messages);
|
|
5650
|
-
var
|
|
5651
|
+
var findDocumentHeaderSubscribersQueryKeys = {
|
|
5651
5652
|
owner_id: joi104.string().uuid().required(),
|
|
5652
5653
|
chat_document_header_id: joi104.string().uuid().required()
|
|
5653
5654
|
};
|
|
5654
|
-
var
|
|
5655
|
+
var findDocumentHeaderSubscribersQuery = joi104.object().keys(findDocumentHeaderSubscribersQueryKeys).messages(messages);
|
|
5656
|
+
var findSubscribedDocumentHeadersQueryKeys = {
|
|
5657
|
+
owner_id: joi104.string().uuid().required()
|
|
5658
|
+
};
|
|
5659
|
+
var findSubscribedDocumentHeadersQuery = joi104.object().keys(findSubscribedDocumentHeadersQueryKeys).messages(messages);
|
|
5655
5660
|
|
|
5656
5661
|
// src/modules/stock/tag/interface.ts
|
|
5657
5662
|
var interface_exports57 = {};
|
|
@@ -5875,7 +5880,6 @@ var IPublicDocumentHeaderNoteType = /* @__PURE__ */ ((IPublicDocumentHeaderNoteT
|
|
|
5875
5880
|
var route_schema_exports109 = {};
|
|
5876
5881
|
__export(route_schema_exports109, {
|
|
5877
5882
|
createNoteBody: () => createNoteBody,
|
|
5878
|
-
publicFindByOwnerId: () => publicFindByOwnerId,
|
|
5879
5883
|
updateNoteBody: () => updateNoteBody
|
|
5880
5884
|
});
|
|
5881
5885
|
import joi110 from "joi";
|
|
@@ -5889,11 +5893,6 @@ var updateNoteBodyKeys = {
|
|
|
5889
5893
|
note: joi110.string().required().allow("")
|
|
5890
5894
|
};
|
|
5891
5895
|
var updateNoteBody = joi110.object().keys(updateNoteBodyKeys).messages(messages);
|
|
5892
|
-
var publicFindByOwnerIdParams = {
|
|
5893
|
-
owner_id: joi110.string().uuid().required(),
|
|
5894
|
-
include_closed: joi110.boolean().optional()
|
|
5895
|
-
};
|
|
5896
|
-
var publicFindByOwnerId = joi110.object().keys(publicFindByOwnerIdParams).messages(messages);
|
|
5897
5896
|
|
|
5898
5897
|
// src/modules/stock/googleSheetPool/interface.ts
|
|
5899
5898
|
var interface_exports64 = {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type * as IShared from '../../../shared/interface';
|
|
2
|
-
import type * as ChatSubscriber from '../../user/chatSubscribers/interfaces';
|
|
3
2
|
import { Chat, File } from '../../../shared/entities/stock';
|
|
4
3
|
export type Entity = Chat;
|
|
5
4
|
export declare const Route = "chat";
|
|
@@ -26,16 +25,6 @@ export interface IFindActiveByOwnerIdResponse {
|
|
|
26
25
|
chat: IChatBalloon[];
|
|
27
26
|
last_group_report?: IReport;
|
|
28
27
|
}
|
|
29
|
-
export interface IPublicFindBySubscriberId {
|
|
30
|
-
user_type: 'client' | 'provider';
|
|
31
|
-
owner_id: string;
|
|
32
|
-
chat_document_header_id: string;
|
|
33
|
-
chat: IChatBalloon[];
|
|
34
|
-
persona: ChatSubscriber.IFindChatSubscriberPersona;
|
|
35
|
-
other_personas: ChatSubscriber.IFindChatSubscriberPersona[];
|
|
36
|
-
store_operator_name: string;
|
|
37
|
-
document_total: number;
|
|
38
|
-
}
|
|
39
28
|
export interface ICreateRequest {
|
|
40
29
|
chat_document_header_id: string;
|
|
41
30
|
message: string;
|
|
@@ -59,7 +48,6 @@ export interface IMarkAllClientReadUnreadRequest {
|
|
|
59
48
|
}
|
|
60
49
|
export interface IRepository {
|
|
61
50
|
findByOwnerId(params: IShared.IFindByIdRequest): Promise<IFindActiveByOwnerIdResponse>;
|
|
62
|
-
findBySubscriberId(params: IShared.IFindByIdRequest): Promise<IPublicFindBySubscriberId>;
|
|
63
51
|
create(data: ICreateRequest): Promise<Chat>;
|
|
64
52
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
65
53
|
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import * as IShared from '../../../shared/interface';
|
|
2
|
+
import type { IChatBalloon } from '../../stock/chat/interfaces';
|
|
3
|
+
import type * as ChatSubscriber from '../../user/chatSubscribers/interfaces';
|
|
2
4
|
export interface IPcTags {
|
|
3
5
|
id: string;
|
|
4
6
|
text: string;
|
|
5
7
|
}
|
|
6
|
-
export interface
|
|
7
|
-
|
|
8
|
-
include_closed?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export interface IPublicFindByOwnerIdResponse {
|
|
8
|
+
export interface IPublicDocument {
|
|
9
|
+
chat_subscriber_id: string;
|
|
11
10
|
chat_document_header_id: string;
|
|
12
11
|
label: string;
|
|
13
12
|
emission_date: Date;
|
|
@@ -15,10 +14,18 @@ export interface IPublicFindByOwnerIdResponse {
|
|
|
15
14
|
client_unread: number;
|
|
16
15
|
pc_tags: IPcTags[];
|
|
17
16
|
pc_created_by: string;
|
|
18
|
-
closed
|
|
17
|
+
closed: boolean;
|
|
19
18
|
}
|
|
20
|
-
export interface
|
|
21
|
-
|
|
19
|
+
export interface IPublicFindBySubscriberId {
|
|
20
|
+
user_type: 'client' | 'provider';
|
|
21
|
+
owner_id: string;
|
|
22
|
+
persona: ChatSubscriber.IFindByOwnerResponse;
|
|
23
|
+
chat_document_header_id: string;
|
|
24
|
+
store_operator_name: string;
|
|
25
|
+
document_total: number;
|
|
26
|
+
chat: IChatBalloon[];
|
|
27
|
+
other_personas: ChatSubscriber.IFindByOwnerResponse[];
|
|
28
|
+
documents: IPublicDocument[];
|
|
22
29
|
}
|
|
23
30
|
export declare enum IPublicDocumentHeaderNoteType {
|
|
24
31
|
Provider = "Provider",
|
|
@@ -42,8 +49,8 @@ export interface PublicDocumentHeaderNoteUpdateRequest {
|
|
|
42
49
|
note: string;
|
|
43
50
|
}
|
|
44
51
|
export interface IRepository {
|
|
45
|
-
publicFindBySubscriberId(params:
|
|
46
|
-
|
|
47
|
-
|
|
52
|
+
publicFindBySubscriberId(params: IShared.IFindByIdRequest): Promise<IPublicFindBySubscriberId>;
|
|
53
|
+
publicCreateDocumentHeaderNote: (data: PublicDocumentHeaderNoteCreateRequest[]) => Promise<PublicDocumentHeaderNote[]>;
|
|
54
|
+
publicUpdateDocumentHeaderNote: (selector: IShared.IFindByIdRequest, data: PublicDocumentHeaderNoteUpdateRequest[]) => Promise<PublicDocumentHeaderNote[]>;
|
|
48
55
|
}
|
|
49
56
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -8,10 +8,13 @@ export interface ICreateOrUpdateRequest {
|
|
|
8
8
|
chat_document_header_id: string;
|
|
9
9
|
personas_ids: string[];
|
|
10
10
|
}
|
|
11
|
-
export interface
|
|
11
|
+
export interface IFindDocumentHeaderSubscribersRequest {
|
|
12
12
|
owner_id: string;
|
|
13
13
|
chat_document_header_id: string;
|
|
14
14
|
}
|
|
15
|
+
export interface IFindSubscribedDocumentHeadersRequest {
|
|
16
|
+
owner_id: string;
|
|
17
|
+
}
|
|
15
18
|
export type IFindByOwnerResponse = Pick<Persona, 'external' | 'name' | 'email' | 'telephone'> & Pick<ChatSubscriber, 'id' | 'persona_id' | 'chat_document_header_id'>;
|
|
16
19
|
export interface IFindByIdResponse extends IFindByOwnerResponse {
|
|
17
20
|
subscriptions: {
|
|
@@ -19,17 +22,11 @@ export interface IFindByIdResponse extends IFindByOwnerResponse {
|
|
|
19
22
|
chat_document_header_id: string;
|
|
20
23
|
}[];
|
|
21
24
|
}
|
|
22
|
-
export interface IFindChatSubscriberPersona extends Pick<Persona, 'id' | 'external' | 'name' | 'email' | 'telephone'> {
|
|
23
|
-
contact: boolean;
|
|
24
|
-
}
|
|
25
|
-
export interface IFindChatSubscriberResponse {
|
|
26
|
-
personas: IFindChatSubscriberPersona[];
|
|
27
|
-
}
|
|
28
25
|
export interface IRepository {
|
|
29
26
|
createOrUpdate(data: ICreateOrUpdateRequest): Promise<string>;
|
|
30
27
|
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse>;
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
findDocumentHeaderSubscribers(selector: IFindDocumentHeaderSubscribersRequest): Promise<IFindByOwnerResponse[]>;
|
|
29
|
+
findSubscribedDocumentHeaders(selector: IFindSubscribedDocumentHeadersRequest): Promise<IFindByOwnerResponse[]>;
|
|
33
30
|
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
34
31
|
}
|
|
35
32
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import joi from 'joi';
|
|
2
2
|
export declare const createOrUpdateBody: joi.ObjectSchema<any>;
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const findDocumentHeaderSubscribersQuery: joi.ObjectSchema<any>;
|
|
4
|
+
export declare const findSubscribedDocumentHeadersQuery: joi.ObjectSchema<any>;
|
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.58",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|