@nomalism-com/types 0.43.57 → 0.43.59
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 -3
- package/dist/index.js +8 -3
- package/dist/modules/ui/portal/interface.d.ts +15 -9
- package/dist/modules/user/chatSubscribers/interfaces.d.ts +11 -9
- package/dist/modules/user/chatSubscribers/route.schema.d.ts +2 -1
- package/dist/shared/interface.d.ts +2 -2
- 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 = {};
|
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 = {};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as IShared from '../../../shared/interface';
|
|
2
2
|
import type { IChatBalloon } from '../../stock/chat/interfaces';
|
|
3
|
+
import type { IDocumentTypeUserType } from '../../supply/documentType/interfaces';
|
|
3
4
|
import type * as ChatSubscriber from '../../user/chatSubscribers/interfaces';
|
|
4
5
|
export interface IPcTags {
|
|
5
6
|
id: string;
|
|
6
7
|
text: string;
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
+
interface IPublicOtherDocument {
|
|
9
10
|
chat_subscriber_id: string;
|
|
10
11
|
chat_document_header_id: string;
|
|
11
12
|
label: string;
|
|
@@ -14,18 +15,22 @@ export interface IPublicDocument {
|
|
|
14
15
|
client_unread: number;
|
|
15
16
|
pc_tags: IPcTags[];
|
|
16
17
|
pc_created_by: string;
|
|
17
|
-
closed
|
|
18
|
+
closed: boolean;
|
|
18
19
|
}
|
|
19
|
-
|
|
20
|
-
user_type: 'client' | 'provider';
|
|
21
|
-
owner_id: string;
|
|
22
|
-
persona: ChatSubscriber.IFindByOwnerResponse;
|
|
20
|
+
interface IPublicDocument {
|
|
23
21
|
chat_document_header_id: string;
|
|
22
|
+
document_name: string;
|
|
24
23
|
store_operator_name: string;
|
|
25
|
-
|
|
24
|
+
user_type: IDocumentTypeUserType;
|
|
25
|
+
document_total: number | null;
|
|
26
|
+
other_personas: ChatSubscriber.IPersona[];
|
|
27
|
+
}
|
|
28
|
+
export interface IPublicFindBySubscriberId {
|
|
29
|
+
owner_id: string;
|
|
30
|
+
document?: IPublicDocument;
|
|
31
|
+
persona?: ChatSubscriber.IPersona;
|
|
26
32
|
chat: IChatBalloon[];
|
|
27
|
-
|
|
28
|
-
documents: IPublicDocument[];
|
|
33
|
+
documents: IPublicOtherDocument[];
|
|
29
34
|
}
|
|
30
35
|
export declare enum IPublicDocumentHeaderNoteType {
|
|
31
36
|
Provider = "Provider",
|
|
@@ -54,3 +59,4 @@ export interface IRepository {
|
|
|
54
59
|
publicUpdateDocumentHeaderNote: (selector: IShared.IFindByIdRequest, data: PublicDocumentHeaderNoteUpdateRequest[]) => Promise<PublicDocumentHeaderNote[]>;
|
|
55
60
|
}
|
|
56
61
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
62
|
+
export {};
|
|
@@ -8,21 +8,23 @@ 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
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
export interface IFindSubscribedDocumentHeadersRequest {
|
|
16
|
+
owner_id: string;
|
|
17
|
+
}
|
|
18
|
+
export type IPersona = Pick<Persona, 'external' | 'name' | 'email' | 'telephone'>;
|
|
19
|
+
export type IEntityWithPersona = Pick<ChatSubscriber, 'id' | 'persona_id' | 'chat_document_header_id'> & IPersona;
|
|
20
|
+
export interface IEntityWithPersonaAndSubscriptions extends IEntityWithPersona {
|
|
21
|
+
subscriptions: Pick<Entity, 'id' | 'chat_document_header_id'>[];
|
|
21
22
|
}
|
|
22
23
|
export interface IRepository {
|
|
24
|
+
findDocumentHeaderSubscribers(selector: IFindDocumentHeaderSubscribersRequest): Promise<IEntityWithPersona[]>;
|
|
25
|
+
findSubscribedDocumentHeaders(selector: IFindSubscribedDocumentHeadersRequest): Promise<IEntityWithPersonaAndSubscriptions>;
|
|
26
|
+
findById(selector: IShared.IFindByIdRequest): Promise<IEntityWithPersonaAndSubscriptions>;
|
|
23
27
|
createOrUpdate(data: ICreateOrUpdateRequest): Promise<string>;
|
|
24
|
-
findById(selector: IShared.IFindByIdRequest): Promise<IFindByIdResponse>;
|
|
25
|
-
findByOwner(selector: IFindRequest): Promise<IFindByOwnerResponse[]>;
|
|
26
28
|
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
27
29
|
}
|
|
28
30
|
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>;
|
|
@@ -7,10 +7,10 @@ import type { IScheduleType } from '../modules/supply/schedule/interface';
|
|
|
7
7
|
import type { IWarningType } from '../modules/supply/documentHeader/interfaces';
|
|
8
8
|
import type { IChat, IEmail, IEncomenda, IMultimedia, IMultimediaSummary, IPostgresBackup, IPrint, IProjectInfo, IProposta, IServiceLogs, IServiceStatus, IStock, ITask } from '../modules/view/adminPanel/interfaces';
|
|
9
9
|
import type * as ErrorLog from '../modules/view/errorLog/interfaces';
|
|
10
|
-
import type * as ChatSubscriber from '../modules/user/chatSubscribers/interfaces';
|
|
11
10
|
import type { File } from './entities/stock';
|
|
12
11
|
import type { ProjectInfo } from './entities/integration';
|
|
13
12
|
import type { IAttachment } from '../modules/supply/externalDocumentHeader/interface';
|
|
13
|
+
import type { Persona } from './entities/user';
|
|
14
14
|
export { messages };
|
|
15
15
|
type CreatedAt = 'created_at';
|
|
16
16
|
type UpdatedAt = 'updated_at';
|
|
@@ -285,7 +285,7 @@ export type IBrokerTopicPayload = {
|
|
|
285
285
|
warningErrors: string[];
|
|
286
286
|
};
|
|
287
287
|
[IBrokerTopic.dispatch_chat_message]: {
|
|
288
|
-
to: [Pick<
|
|
288
|
+
to: [Pick<Persona, 'email' | 'name' | 'telephone'>];
|
|
289
289
|
reply_url: string;
|
|
290
290
|
owner_id: string;
|
|
291
291
|
document_header_id: string | null;
|
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.59",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|