@nomalism-com/types 0.42.8 → 0.43.10
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 +15 -9
- package/dist/index.js +15 -9
- package/dist/modules/integration/emailTemplate/interfaces.d.ts +4 -0
- package/dist/modules/stock/chat/interfaces.d.ts +2 -2
- package/dist/modules/supply/documentHeader/interfaces.d.ts +2 -0
- package/dist/modules/user/chatSubscribers/interfaces.d.ts +3 -3
- package/dist/shared/entities/stock.d.ts +3 -3
- package/dist/shared/entities/user.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1187,14 +1187,14 @@ __export(route_schema_exports5, {
|
|
|
1187
1187
|
import joi6 from "joi";
|
|
1188
1188
|
var createBodyKeys5 = {
|
|
1189
1189
|
owner_id: joi6.string().uuid().required(),
|
|
1190
|
-
|
|
1190
|
+
chat_document_header_id: joi6.string().uuid().allow(null).required(),
|
|
1191
1191
|
message: joi6.string().required(),
|
|
1192
1192
|
username: joi6.string().required(),
|
|
1193
1193
|
is_customer: joi6.boolean().default(false).optional()
|
|
1194
1194
|
};
|
|
1195
1195
|
var createBody5 = joi6.object().keys(createBodyKeys5).messages(messages);
|
|
1196
1196
|
var updateBodyKeys4 = {
|
|
1197
|
-
|
|
1197
|
+
chat_document_header_id: joi6.string().uuid().optional(),
|
|
1198
1198
|
message: joi6.string().optional(),
|
|
1199
1199
|
email_processed: joi6.boolean().optional(),
|
|
1200
1200
|
email_delivered: joi6.boolean().optional(),
|
|
@@ -1462,6 +1462,7 @@ var createBodyKeys9 = {
|
|
|
1462
1462
|
google_sheet_id: joi10.string().allow(null).optional(),
|
|
1463
1463
|
external_pdf_link: joi10.string().allow(null).optional(),
|
|
1464
1464
|
sent: joi10.boolean().optional(),
|
|
1465
|
+
chat_document_header_id: joi10.string().uuid().allow(null).optional(),
|
|
1465
1466
|
owner_id: joi10.string().uuid().required(),
|
|
1466
1467
|
owner_number: joi10.number().required(),
|
|
1467
1468
|
owner_name: joi10.string().required(),
|
|
@@ -1557,6 +1558,7 @@ var updateBodyKeys8 = {
|
|
|
1557
1558
|
google_sheet_id: joi10.string().allow(null).optional(),
|
|
1558
1559
|
pdf_link: joi10.string().allow(null).optional(),
|
|
1559
1560
|
sent: joi10.boolean().optional(),
|
|
1561
|
+
chat_document_header_id: joi10.string().uuid().allow(null).optional(),
|
|
1560
1562
|
owner_id: joi10.string().uuid().optional(),
|
|
1561
1563
|
owner_number: joi10.number().integer().positive().optional(),
|
|
1562
1564
|
owner_name: joi10.string().optional(),
|
|
@@ -4914,6 +4916,8 @@ __export(route_schema_exports86, {
|
|
|
4914
4916
|
import joi87 from "joi";
|
|
4915
4917
|
var createBodyKeys55 = {
|
|
4916
4918
|
name: joi87.string().required(),
|
|
4919
|
+
to: joi87.string().required(),
|
|
4920
|
+
subject: joi87.string().required(),
|
|
4917
4921
|
body: joi87.string().required(),
|
|
4918
4922
|
attachments: joi87.array().items(
|
|
4919
4923
|
joi87.object().keys({
|
|
@@ -4926,21 +4930,23 @@ var createBodyKeys55 = {
|
|
|
4926
4930
|
var createBody56 = joi87.object().keys(createBodyKeys55).messages(messages);
|
|
4927
4931
|
var updateBodyKeys51 = {
|
|
4928
4932
|
name: joi87.string().optional(),
|
|
4933
|
+
to: joi87.string().optional(),
|
|
4934
|
+
subject: joi87.string().optional(),
|
|
4929
4935
|
body: joi87.string().optional()
|
|
4930
4936
|
};
|
|
4931
4937
|
var updateBody51 = joi87.object().keys(updateBodyKeys51).messages(messages);
|
|
4932
4938
|
var sendBodyKeys = {
|
|
4933
4939
|
owner_id: joi87.string().uuid().allow(null).required(),
|
|
4934
|
-
to: joi87.
|
|
4935
|
-
name: joi87.string().allow("", null).default("").required(),
|
|
4936
|
-
address: joi87.string().email({ tlds: { allow: false } }).required()
|
|
4937
|
-
}).required(),
|
|
4938
|
-
from: joi87.array().items(
|
|
4940
|
+
to: joi87.array().items(
|
|
4939
4941
|
joi87.object().keys({
|
|
4940
4942
|
name: joi87.string().allow("", null).default("").required(),
|
|
4941
4943
|
address: joi87.string().email({ tlds: { allow: false } }).required()
|
|
4942
4944
|
})
|
|
4943
4945
|
).required(),
|
|
4946
|
+
from: joi87.object().keys({
|
|
4947
|
+
name: joi87.string().allow("", null).default("").required(),
|
|
4948
|
+
address: joi87.string().email({ tlds: { allow: false } }).required()
|
|
4949
|
+
}).required(),
|
|
4944
4950
|
cc: joi87.array().items(
|
|
4945
4951
|
joi87.object().keys({
|
|
4946
4952
|
name: joi87.string().allow("", null).default("").required(),
|
|
@@ -5664,13 +5670,13 @@ __export(route_schema_exports104, {
|
|
|
5664
5670
|
import joi105 from "joi";
|
|
5665
5671
|
var createOrUpdateBodyKeys2 = {
|
|
5666
5672
|
owner_id: joi105.string().uuid().required(),
|
|
5667
|
-
|
|
5673
|
+
chat_document_header_id: joi105.string().uuid().required(),
|
|
5668
5674
|
personas_ids: joi105.array().items(joi105.string().optional()).required()
|
|
5669
5675
|
};
|
|
5670
5676
|
var createOrUpdateBody2 = joi105.object().keys(createOrUpdateBodyKeys2).messages(messages);
|
|
5671
5677
|
var findByParamsKeys = {
|
|
5672
5678
|
owner_id: joi105.string().uuid().required(),
|
|
5673
|
-
|
|
5679
|
+
chat_document_header_id: joi105.string().uuid().optional()
|
|
5674
5680
|
};
|
|
5675
5681
|
var findByParams = joi105.object().keys(findByParamsKeys).messages(messages);
|
|
5676
5682
|
|
package/dist/index.js
CHANGED
|
@@ -1187,14 +1187,14 @@ __export(route_schema_exports5, {
|
|
|
1187
1187
|
import joi6 from "joi";
|
|
1188
1188
|
var createBodyKeys5 = {
|
|
1189
1189
|
owner_id: joi6.string().uuid().required(),
|
|
1190
|
-
|
|
1190
|
+
chat_document_header_id: joi6.string().uuid().allow(null).required(),
|
|
1191
1191
|
message: joi6.string().required(),
|
|
1192
1192
|
username: joi6.string().required(),
|
|
1193
1193
|
is_customer: joi6.boolean().default(false).optional()
|
|
1194
1194
|
};
|
|
1195
1195
|
var createBody5 = joi6.object().keys(createBodyKeys5).messages(messages);
|
|
1196
1196
|
var updateBodyKeys4 = {
|
|
1197
|
-
|
|
1197
|
+
chat_document_header_id: joi6.string().uuid().optional(),
|
|
1198
1198
|
message: joi6.string().optional(),
|
|
1199
1199
|
email_processed: joi6.boolean().optional(),
|
|
1200
1200
|
email_delivered: joi6.boolean().optional(),
|
|
@@ -1462,6 +1462,7 @@ var createBodyKeys9 = {
|
|
|
1462
1462
|
google_sheet_id: joi10.string().allow(null).optional(),
|
|
1463
1463
|
external_pdf_link: joi10.string().allow(null).optional(),
|
|
1464
1464
|
sent: joi10.boolean().optional(),
|
|
1465
|
+
chat_document_header_id: joi10.string().uuid().allow(null).optional(),
|
|
1465
1466
|
owner_id: joi10.string().uuid().required(),
|
|
1466
1467
|
owner_number: joi10.number().required(),
|
|
1467
1468
|
owner_name: joi10.string().required(),
|
|
@@ -1557,6 +1558,7 @@ var updateBodyKeys8 = {
|
|
|
1557
1558
|
google_sheet_id: joi10.string().allow(null).optional(),
|
|
1558
1559
|
pdf_link: joi10.string().allow(null).optional(),
|
|
1559
1560
|
sent: joi10.boolean().optional(),
|
|
1561
|
+
chat_document_header_id: joi10.string().uuid().allow(null).optional(),
|
|
1560
1562
|
owner_id: joi10.string().uuid().optional(),
|
|
1561
1563
|
owner_number: joi10.number().integer().positive().optional(),
|
|
1562
1564
|
owner_name: joi10.string().optional(),
|
|
@@ -4914,6 +4916,8 @@ __export(route_schema_exports86, {
|
|
|
4914
4916
|
import joi87 from "joi";
|
|
4915
4917
|
var createBodyKeys55 = {
|
|
4916
4918
|
name: joi87.string().required(),
|
|
4919
|
+
to: joi87.string().required(),
|
|
4920
|
+
subject: joi87.string().required(),
|
|
4917
4921
|
body: joi87.string().required(),
|
|
4918
4922
|
attachments: joi87.array().items(
|
|
4919
4923
|
joi87.object().keys({
|
|
@@ -4926,21 +4930,23 @@ var createBodyKeys55 = {
|
|
|
4926
4930
|
var createBody56 = joi87.object().keys(createBodyKeys55).messages(messages);
|
|
4927
4931
|
var updateBodyKeys51 = {
|
|
4928
4932
|
name: joi87.string().optional(),
|
|
4933
|
+
to: joi87.string().optional(),
|
|
4934
|
+
subject: joi87.string().optional(),
|
|
4929
4935
|
body: joi87.string().optional()
|
|
4930
4936
|
};
|
|
4931
4937
|
var updateBody51 = joi87.object().keys(updateBodyKeys51).messages(messages);
|
|
4932
4938
|
var sendBodyKeys = {
|
|
4933
4939
|
owner_id: joi87.string().uuid().allow(null).required(),
|
|
4934
|
-
to: joi87.
|
|
4935
|
-
name: joi87.string().allow("", null).default("").required(),
|
|
4936
|
-
address: joi87.string().email({ tlds: { allow: false } }).required()
|
|
4937
|
-
}).required(),
|
|
4938
|
-
from: joi87.array().items(
|
|
4940
|
+
to: joi87.array().items(
|
|
4939
4941
|
joi87.object().keys({
|
|
4940
4942
|
name: joi87.string().allow("", null).default("").required(),
|
|
4941
4943
|
address: joi87.string().email({ tlds: { allow: false } }).required()
|
|
4942
4944
|
})
|
|
4943
4945
|
).required(),
|
|
4946
|
+
from: joi87.object().keys({
|
|
4947
|
+
name: joi87.string().allow("", null).default("").required(),
|
|
4948
|
+
address: joi87.string().email({ tlds: { allow: false } }).required()
|
|
4949
|
+
}).required(),
|
|
4944
4950
|
cc: joi87.array().items(
|
|
4945
4951
|
joi87.object().keys({
|
|
4946
4952
|
name: joi87.string().allow("", null).default("").required(),
|
|
@@ -5664,13 +5670,13 @@ __export(route_schema_exports104, {
|
|
|
5664
5670
|
import joi105 from "joi";
|
|
5665
5671
|
var createOrUpdateBodyKeys2 = {
|
|
5666
5672
|
owner_id: joi105.string().uuid().required(),
|
|
5667
|
-
|
|
5673
|
+
chat_document_header_id: joi105.string().uuid().required(),
|
|
5668
5674
|
personas_ids: joi105.array().items(joi105.string().optional()).required()
|
|
5669
5675
|
};
|
|
5670
5676
|
var createOrUpdateBody2 = joi105.object().keys(createOrUpdateBodyKeys2).messages(messages);
|
|
5671
5677
|
var findByParamsKeys = {
|
|
5672
5678
|
owner_id: joi105.string().uuid().required(),
|
|
5673
|
-
|
|
5679
|
+
chat_document_header_id: joi105.string().uuid().optional()
|
|
5674
5680
|
};
|
|
5675
5681
|
var findByParams = joi105.object().keys(findByParamsKeys).messages(messages);
|
|
5676
5682
|
|
|
@@ -14,12 +14,16 @@ export interface ICreateAttachments {
|
|
|
14
14
|
}
|
|
15
15
|
export interface ICreateRequest {
|
|
16
16
|
name: string;
|
|
17
|
+
to: string;
|
|
18
|
+
subject: string;
|
|
17
19
|
body: string;
|
|
18
20
|
attachments: ICreateAttachments[];
|
|
19
21
|
key: string;
|
|
20
22
|
}
|
|
21
23
|
export interface IUpdateRequest {
|
|
22
24
|
name?: string;
|
|
25
|
+
to?: string;
|
|
26
|
+
subject?: string;
|
|
23
27
|
body?: string;
|
|
24
28
|
}
|
|
25
29
|
export interface ISendRequest {
|
|
@@ -52,13 +52,13 @@ export interface IPublicClientWebAppFindActiveByOwnerIdResponse {
|
|
|
52
52
|
}
|
|
53
53
|
export interface ICreateRequest {
|
|
54
54
|
owner_id: string;
|
|
55
|
-
|
|
55
|
+
chat_document_header_id: string;
|
|
56
56
|
message: string;
|
|
57
57
|
username: string;
|
|
58
58
|
is_customer: boolean;
|
|
59
59
|
}
|
|
60
60
|
export interface IUpdateRequest {
|
|
61
|
-
|
|
61
|
+
chat_document_header_id?: string;
|
|
62
62
|
message?: string;
|
|
63
63
|
email_processed?: boolean;
|
|
64
64
|
email_delivered?: boolean;
|
|
@@ -61,6 +61,7 @@ export interface ICreateRequest {
|
|
|
61
61
|
external_pdf_link?: string | null;
|
|
62
62
|
google_sheet_id?: string | null;
|
|
63
63
|
sent?: boolean;
|
|
64
|
+
chat_document_header_id?: string | null;
|
|
64
65
|
owner_id: string;
|
|
65
66
|
owner_number: number;
|
|
66
67
|
owner_name: string;
|
|
@@ -138,6 +139,7 @@ export interface IUpdateRequest {
|
|
|
138
139
|
google_sheet_id?: string | null;
|
|
139
140
|
pdf_link?: string | null;
|
|
140
141
|
sent?: boolean;
|
|
142
|
+
chat_document_header_id?: string | null;
|
|
141
143
|
owner_id?: string;
|
|
142
144
|
owner_number?: number;
|
|
143
145
|
owner_name?: string;
|
|
@@ -7,14 +7,14 @@ export declare const UpperName = "ChatSubscriber";
|
|
|
7
7
|
export declare const LowerName: string;
|
|
8
8
|
export interface ICreateOrUpdateRequest {
|
|
9
9
|
owner_id: string;
|
|
10
|
-
|
|
10
|
+
chat_document_header_id: string;
|
|
11
11
|
personas_ids: string[];
|
|
12
12
|
}
|
|
13
13
|
export interface IFindRequest {
|
|
14
14
|
owner_id: string;
|
|
15
|
-
|
|
15
|
+
chat_document_header_id: string;
|
|
16
16
|
}
|
|
17
|
-
export type IFindByOwnerResponse = Pick<Persona, 'external' | 'name' | 'email' | 'telephone'> & Pick<ChatSubscriber, 'id' | 'persona_id' | 'owner_id' | '
|
|
17
|
+
export type IFindByOwnerResponse = Pick<Persona, 'external' | 'name' | 'email' | 'telephone'> & Pick<ChatSubscriber, 'id' | 'persona_id' | 'owner_id' | 'chat_document_header_id'>;
|
|
18
18
|
export interface IFindByIdResponse extends IFindByOwnerResponse {
|
|
19
19
|
subscriptions: {
|
|
20
20
|
id: string;
|
|
@@ -29,8 +29,7 @@ export type AccountCode = {
|
|
|
29
29
|
*/
|
|
30
30
|
export type Chat = {
|
|
31
31
|
id: string;
|
|
32
|
-
|
|
33
|
-
document_header_id: string;
|
|
32
|
+
chat_document_header_id: string;
|
|
34
33
|
message: string;
|
|
35
34
|
email_processed: boolean;
|
|
36
35
|
email_delivered: boolean;
|
|
@@ -275,6 +274,7 @@ export type DocumentHeader = {
|
|
|
275
274
|
pdf_link: string | null;
|
|
276
275
|
google_sheet_id: string | null;
|
|
277
276
|
emission_date: Date;
|
|
277
|
+
chat_document_header_id: string | null;
|
|
278
278
|
external_pdf_link: string | null;
|
|
279
279
|
external_data: unknown;
|
|
280
280
|
owner_id: string;
|
|
@@ -734,7 +734,7 @@ export type File = {
|
|
|
734
734
|
id: string;
|
|
735
735
|
title: string;
|
|
736
736
|
owner_id: string;
|
|
737
|
-
|
|
737
|
+
chat_document_header_id: string | null;
|
|
738
738
|
multimedia_id: string;
|
|
739
739
|
filename: string;
|
|
740
740
|
is_customer: boolean;
|
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.
|
|
4
|
+
"version": "0.43.10",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@swc/core": "^1.15.11",
|
|
33
|
-
"@types/node": "^24.10.
|
|
33
|
+
"@types/node": "^24.10.12",
|
|
34
34
|
"@typescript-eslint/eslint-plugin": "^8.54.0",
|
|
35
35
|
"@typescript-eslint/parser": "^8.54.0",
|
|
36
36
|
"eslint": "^9.39.2",
|