@nomalism-com/types 0.43.13 → 0.43.15
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 +28 -43
- package/dist/index.js +28 -43
- package/dist/modules/stock/chat/interfaces.d.ts +10 -21
- package/dist/modules/stock/gmails/interface.d.ts +0 -2
- package/dist/modules/user/chatSubscribers/interfaces.d.ts +2 -6
- package/dist/modules/user/clients/interface.d.ts +0 -2
- package/dist/modules/user/commissioner/interface.d.ts +0 -2
- package/dist/modules/user/persona/interface.d.ts +0 -5
- package/dist/modules/user/providers/interface.d.ts +0 -2
- package/dist/shared/entities/stock.d.ts +0 -1
- package/dist/shared/entities/user.d.ts +0 -6
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -18,7 +18,7 @@ __export(main_exports, {
|
|
|
18
18
|
CLTRoutes: () => route_schema_exports74,
|
|
19
19
|
Channel: () => interfaces_exports36,
|
|
20
20
|
ChannelRoutes: () => route_schema_exports72,
|
|
21
|
-
Chat: () =>
|
|
21
|
+
Chat: () => interfaces_exports2,
|
|
22
22
|
ChatRapidMessage: () => interface_exports53,
|
|
23
23
|
ChatRapidMessageRoutes: () => route_schema_exports99,
|
|
24
24
|
ChatRoutes: () => route_schema_exports5,
|
|
@@ -239,7 +239,7 @@ __export(main_exports, {
|
|
|
239
239
|
VehiclesRoutes: () => route_schema_exports55,
|
|
240
240
|
Workflow: () => interfaces_exports26,
|
|
241
241
|
WorkflowRoutes: () => route_schema_exports56,
|
|
242
|
-
ZipCode: () =>
|
|
242
|
+
ZipCode: () => interfaces_exports,
|
|
243
243
|
ZipCodeRoutes: () => route_schema_exports4,
|
|
244
244
|
documentManagementErrors: () => documentManagementErrors_exports,
|
|
245
245
|
integrationErrors: () => integrationErrors_exports,
|
|
@@ -1025,26 +1025,6 @@ __export(route_schema_exports2, {
|
|
|
1025
1025
|
updateBody: () => updateBody2
|
|
1026
1026
|
});
|
|
1027
1027
|
import joi3 from "joi";
|
|
1028
|
-
|
|
1029
|
-
// src/modules/stock/chat/interfaces.ts
|
|
1030
|
-
var interfaces_exports = {};
|
|
1031
|
-
__export(interfaces_exports, {
|
|
1032
|
-
ChatTypeEnum: () => ChatTypeEnum,
|
|
1033
|
-
LowerName: () => LowerName3,
|
|
1034
|
-
Route: () => Route3,
|
|
1035
|
-
UpperName: () => UpperName3,
|
|
1036
|
-
chatTypes: () => chatTypes
|
|
1037
|
-
});
|
|
1038
|
-
var Route3 = "chat";
|
|
1039
|
-
var UpperName3 = "Chat";
|
|
1040
|
-
var LowerName3 = UpperName3[0].toLowerCase() + UpperName3.substring(1);
|
|
1041
|
-
var ChatTypeEnum = {
|
|
1042
|
-
por_proposta: "por_proposta",
|
|
1043
|
-
global: "global"
|
|
1044
|
-
};
|
|
1045
|
-
var chatTypes = Object.keys(ChatTypeEnum);
|
|
1046
|
-
|
|
1047
|
-
// src/modules/user/clients/route.schema.ts
|
|
1048
1028
|
var createMainPersonaKeys = {
|
|
1049
1029
|
name: joi3.string().allow(null, "").empty("").optional(),
|
|
1050
1030
|
nif: joi3.string().allow(null, "").empty("").optional(),
|
|
@@ -1071,7 +1051,6 @@ var createBodyKeys2 = {
|
|
|
1071
1051
|
};
|
|
1072
1052
|
var createBody2 = joi3.object().keys(createBodyKeys2).messages(messages);
|
|
1073
1053
|
var updateBodyKeys2 = {
|
|
1074
|
-
chat_type: joi3.string().valid(...chatTypes).optional(),
|
|
1075
1054
|
main_persona_id: joi3.string().uuid().optional(),
|
|
1076
1055
|
contact_persona_id: joi3.string().uuid().optional(),
|
|
1077
1056
|
nif: joi3.string().allow(null).optional(),
|
|
@@ -1105,13 +1084,13 @@ var findWithPaginationQuery2 = joi3.object().keys(findWithPaginationQueryKeys2).
|
|
|
1105
1084
|
// src/modules/user/clientType/interface.ts
|
|
1106
1085
|
var interface_exports4 = {};
|
|
1107
1086
|
__export(interface_exports4, {
|
|
1108
|
-
LowerName: () =>
|
|
1109
|
-
Route: () =>
|
|
1110
|
-
UpperName: () =>
|
|
1087
|
+
LowerName: () => LowerName3,
|
|
1088
|
+
Route: () => Route3,
|
|
1089
|
+
UpperName: () => UpperName3
|
|
1111
1090
|
});
|
|
1112
|
-
var
|
|
1113
|
-
var
|
|
1114
|
-
var
|
|
1091
|
+
var Route3 = "client_type";
|
|
1092
|
+
var UpperName3 = "ClientType";
|
|
1093
|
+
var LowerName3 = UpperName3[0].toLowerCase() + UpperName3.substring(1);
|
|
1115
1094
|
|
|
1116
1095
|
// src/modules/user/clientType/route.schema.ts
|
|
1117
1096
|
var route_schema_exports3 = {};
|
|
@@ -1143,15 +1122,15 @@ var clientTypePostSchema = joi4.object().keys({
|
|
|
1143
1122
|
});
|
|
1144
1123
|
|
|
1145
1124
|
// src/modules/user/zipCode/interfaces.ts
|
|
1146
|
-
var
|
|
1147
|
-
__export(
|
|
1148
|
-
LowerName: () =>
|
|
1149
|
-
Route: () =>
|
|
1150
|
-
UpperName: () =>
|
|
1125
|
+
var interfaces_exports = {};
|
|
1126
|
+
__export(interfaces_exports, {
|
|
1127
|
+
LowerName: () => LowerName4,
|
|
1128
|
+
Route: () => Route4,
|
|
1129
|
+
UpperName: () => UpperName4
|
|
1151
1130
|
});
|
|
1152
|
-
var
|
|
1153
|
-
var
|
|
1154
|
-
var
|
|
1131
|
+
var Route4 = "zip_code";
|
|
1132
|
+
var UpperName4 = "ZipCode";
|
|
1133
|
+
var LowerName4 = UpperName4[0].toLowerCase() + UpperName4.substring(1);
|
|
1155
1134
|
|
|
1156
1135
|
// src/modules/user/zipCode/route.schema.ts
|
|
1157
1136
|
var route_schema_exports4 = {};
|
|
@@ -1177,6 +1156,17 @@ var findByPostalCodeBodyKeys = {
|
|
|
1177
1156
|
};
|
|
1178
1157
|
var findByPostalCodeBody = joi5.object().keys(findByPostalCodeBodyKeys).messages(messages);
|
|
1179
1158
|
|
|
1159
|
+
// src/modules/stock/chat/interfaces.ts
|
|
1160
|
+
var interfaces_exports2 = {};
|
|
1161
|
+
__export(interfaces_exports2, {
|
|
1162
|
+
LowerName: () => LowerName5,
|
|
1163
|
+
Route: () => Route5,
|
|
1164
|
+
UpperName: () => UpperName5
|
|
1165
|
+
});
|
|
1166
|
+
var Route5 = "chat";
|
|
1167
|
+
var UpperName5 = "Chat";
|
|
1168
|
+
var LowerName5 = UpperName5[0].toLowerCase() + UpperName5.substring(1);
|
|
1169
|
+
|
|
1180
1170
|
// src/modules/stock/chat/route.schema.ts
|
|
1181
1171
|
var route_schema_exports5 = {};
|
|
1182
1172
|
__export(route_schema_exports5, {
|
|
@@ -1186,7 +1176,6 @@ __export(route_schema_exports5, {
|
|
|
1186
1176
|
});
|
|
1187
1177
|
import joi6 from "joi";
|
|
1188
1178
|
var createBodyKeys5 = {
|
|
1189
|
-
owner_id: joi6.string().uuid().required(),
|
|
1190
1179
|
chat_document_header_id: joi6.string().uuid().required(),
|
|
1191
1180
|
message: joi6.string().required(),
|
|
1192
1181
|
username: joi6.string().required(),
|
|
@@ -1206,7 +1195,7 @@ var updateBodyKeys4 = {
|
|
|
1206
1195
|
};
|
|
1207
1196
|
var updateBody4 = joi6.object().keys(updateBodyKeys4).messages(messages);
|
|
1208
1197
|
var markAllClientReadUnreadParamsKeys = {
|
|
1209
|
-
|
|
1198
|
+
chat_document_header_id: joi6.string().uuid().required(),
|
|
1210
1199
|
client_read: joi6.boolean().required()
|
|
1211
1200
|
};
|
|
1212
1201
|
var markAllClientReadUnreadParams = joi6.object().keys(markAllClientReadUnreadParamsKeys).messages(messages);
|
|
@@ -1250,7 +1239,6 @@ var createBodyKeys6 = {
|
|
|
1250
1239
|
};
|
|
1251
1240
|
var createBody6 = joi7.object().keys(createBodyKeys6).messages(messages);
|
|
1252
1241
|
var updateBodyKeys5 = {
|
|
1253
|
-
chat_type: joi7.string().valid(...chatTypes).optional(),
|
|
1254
1242
|
default_percentage: joi7.number().positive().allow(0).optional(),
|
|
1255
1243
|
main_persona_id: joi7.string().uuid().optional(),
|
|
1256
1244
|
contact_persona_id: joi7.string().uuid().optional(),
|
|
@@ -2794,7 +2782,6 @@ var createBodyKeys26 = {
|
|
|
2794
2782
|
};
|
|
2795
2783
|
var createBody27 = joi38.object().keys(createBodyKeys26).messages(messages);
|
|
2796
2784
|
var updateBodyKeys24 = {
|
|
2797
|
-
chat_type: joi38.string().valid(...chatTypes).optional(),
|
|
2798
2785
|
manufacturer: joi38.boolean().optional(),
|
|
2799
2786
|
inactive: joi38.boolean().optional(),
|
|
2800
2787
|
default_discount: joi38.number().positive().allow(0).max(100).optional(),
|
|
@@ -5669,13 +5656,11 @@ __export(route_schema_exports104, {
|
|
|
5669
5656
|
});
|
|
5670
5657
|
import joi105 from "joi";
|
|
5671
5658
|
var createOrUpdateBodyKeys2 = {
|
|
5672
|
-
owner_id: joi105.string().uuid().required(),
|
|
5673
5659
|
chat_document_header_id: joi105.string().uuid().required(),
|
|
5674
5660
|
personas_ids: joi105.array().items(joi105.string().optional()).required()
|
|
5675
5661
|
};
|
|
5676
5662
|
var createOrUpdateBody2 = joi105.object().keys(createOrUpdateBodyKeys2).messages(messages);
|
|
5677
5663
|
var findByParamsKeys = {
|
|
5678
|
-
owner_id: joi105.string().uuid().required(),
|
|
5679
5664
|
chat_document_header_id: joi105.string().uuid().optional()
|
|
5680
5665
|
};
|
|
5681
5666
|
var findByParams = joi105.object().keys(findByParamsKeys).messages(messages);
|
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ __export(main_exports, {
|
|
|
18
18
|
CLTRoutes: () => route_schema_exports74,
|
|
19
19
|
Channel: () => interfaces_exports36,
|
|
20
20
|
ChannelRoutes: () => route_schema_exports72,
|
|
21
|
-
Chat: () =>
|
|
21
|
+
Chat: () => interfaces_exports2,
|
|
22
22
|
ChatRapidMessage: () => interface_exports53,
|
|
23
23
|
ChatRapidMessageRoutes: () => route_schema_exports99,
|
|
24
24
|
ChatRoutes: () => route_schema_exports5,
|
|
@@ -239,7 +239,7 @@ __export(main_exports, {
|
|
|
239
239
|
VehiclesRoutes: () => route_schema_exports55,
|
|
240
240
|
Workflow: () => interfaces_exports26,
|
|
241
241
|
WorkflowRoutes: () => route_schema_exports56,
|
|
242
|
-
ZipCode: () =>
|
|
242
|
+
ZipCode: () => interfaces_exports,
|
|
243
243
|
ZipCodeRoutes: () => route_schema_exports4,
|
|
244
244
|
documentManagementErrors: () => documentManagementErrors_exports,
|
|
245
245
|
integrationErrors: () => integrationErrors_exports,
|
|
@@ -1025,26 +1025,6 @@ __export(route_schema_exports2, {
|
|
|
1025
1025
|
updateBody: () => updateBody2
|
|
1026
1026
|
});
|
|
1027
1027
|
import joi3 from "joi";
|
|
1028
|
-
|
|
1029
|
-
// src/modules/stock/chat/interfaces.ts
|
|
1030
|
-
var interfaces_exports = {};
|
|
1031
|
-
__export(interfaces_exports, {
|
|
1032
|
-
ChatTypeEnum: () => ChatTypeEnum,
|
|
1033
|
-
LowerName: () => LowerName3,
|
|
1034
|
-
Route: () => Route3,
|
|
1035
|
-
UpperName: () => UpperName3,
|
|
1036
|
-
chatTypes: () => chatTypes
|
|
1037
|
-
});
|
|
1038
|
-
var Route3 = "chat";
|
|
1039
|
-
var UpperName3 = "Chat";
|
|
1040
|
-
var LowerName3 = UpperName3[0].toLowerCase() + UpperName3.substring(1);
|
|
1041
|
-
var ChatTypeEnum = {
|
|
1042
|
-
por_proposta: "por_proposta",
|
|
1043
|
-
global: "global"
|
|
1044
|
-
};
|
|
1045
|
-
var chatTypes = Object.keys(ChatTypeEnum);
|
|
1046
|
-
|
|
1047
|
-
// src/modules/user/clients/route.schema.ts
|
|
1048
1028
|
var createMainPersonaKeys = {
|
|
1049
1029
|
name: joi3.string().allow(null, "").empty("").optional(),
|
|
1050
1030
|
nif: joi3.string().allow(null, "").empty("").optional(),
|
|
@@ -1071,7 +1051,6 @@ var createBodyKeys2 = {
|
|
|
1071
1051
|
};
|
|
1072
1052
|
var createBody2 = joi3.object().keys(createBodyKeys2).messages(messages);
|
|
1073
1053
|
var updateBodyKeys2 = {
|
|
1074
|
-
chat_type: joi3.string().valid(...chatTypes).optional(),
|
|
1075
1054
|
main_persona_id: joi3.string().uuid().optional(),
|
|
1076
1055
|
contact_persona_id: joi3.string().uuid().optional(),
|
|
1077
1056
|
nif: joi3.string().allow(null).optional(),
|
|
@@ -1105,13 +1084,13 @@ var findWithPaginationQuery2 = joi3.object().keys(findWithPaginationQueryKeys2).
|
|
|
1105
1084
|
// src/modules/user/clientType/interface.ts
|
|
1106
1085
|
var interface_exports4 = {};
|
|
1107
1086
|
__export(interface_exports4, {
|
|
1108
|
-
LowerName: () =>
|
|
1109
|
-
Route: () =>
|
|
1110
|
-
UpperName: () =>
|
|
1087
|
+
LowerName: () => LowerName3,
|
|
1088
|
+
Route: () => Route3,
|
|
1089
|
+
UpperName: () => UpperName3
|
|
1111
1090
|
});
|
|
1112
|
-
var
|
|
1113
|
-
var
|
|
1114
|
-
var
|
|
1091
|
+
var Route3 = "client_type";
|
|
1092
|
+
var UpperName3 = "ClientType";
|
|
1093
|
+
var LowerName3 = UpperName3[0].toLowerCase() + UpperName3.substring(1);
|
|
1115
1094
|
|
|
1116
1095
|
// src/modules/user/clientType/route.schema.ts
|
|
1117
1096
|
var route_schema_exports3 = {};
|
|
@@ -1143,15 +1122,15 @@ var clientTypePostSchema = joi4.object().keys({
|
|
|
1143
1122
|
});
|
|
1144
1123
|
|
|
1145
1124
|
// src/modules/user/zipCode/interfaces.ts
|
|
1146
|
-
var
|
|
1147
|
-
__export(
|
|
1148
|
-
LowerName: () =>
|
|
1149
|
-
Route: () =>
|
|
1150
|
-
UpperName: () =>
|
|
1125
|
+
var interfaces_exports = {};
|
|
1126
|
+
__export(interfaces_exports, {
|
|
1127
|
+
LowerName: () => LowerName4,
|
|
1128
|
+
Route: () => Route4,
|
|
1129
|
+
UpperName: () => UpperName4
|
|
1151
1130
|
});
|
|
1152
|
-
var
|
|
1153
|
-
var
|
|
1154
|
-
var
|
|
1131
|
+
var Route4 = "zip_code";
|
|
1132
|
+
var UpperName4 = "ZipCode";
|
|
1133
|
+
var LowerName4 = UpperName4[0].toLowerCase() + UpperName4.substring(1);
|
|
1155
1134
|
|
|
1156
1135
|
// src/modules/user/zipCode/route.schema.ts
|
|
1157
1136
|
var route_schema_exports4 = {};
|
|
@@ -1177,6 +1156,17 @@ var findByPostalCodeBodyKeys = {
|
|
|
1177
1156
|
};
|
|
1178
1157
|
var findByPostalCodeBody = joi5.object().keys(findByPostalCodeBodyKeys).messages(messages);
|
|
1179
1158
|
|
|
1159
|
+
// src/modules/stock/chat/interfaces.ts
|
|
1160
|
+
var interfaces_exports2 = {};
|
|
1161
|
+
__export(interfaces_exports2, {
|
|
1162
|
+
LowerName: () => LowerName5,
|
|
1163
|
+
Route: () => Route5,
|
|
1164
|
+
UpperName: () => UpperName5
|
|
1165
|
+
});
|
|
1166
|
+
var Route5 = "chat";
|
|
1167
|
+
var UpperName5 = "Chat";
|
|
1168
|
+
var LowerName5 = UpperName5[0].toLowerCase() + UpperName5.substring(1);
|
|
1169
|
+
|
|
1180
1170
|
// src/modules/stock/chat/route.schema.ts
|
|
1181
1171
|
var route_schema_exports5 = {};
|
|
1182
1172
|
__export(route_schema_exports5, {
|
|
@@ -1186,7 +1176,6 @@ __export(route_schema_exports5, {
|
|
|
1186
1176
|
});
|
|
1187
1177
|
import joi6 from "joi";
|
|
1188
1178
|
var createBodyKeys5 = {
|
|
1189
|
-
owner_id: joi6.string().uuid().required(),
|
|
1190
1179
|
chat_document_header_id: joi6.string().uuid().required(),
|
|
1191
1180
|
message: joi6.string().required(),
|
|
1192
1181
|
username: joi6.string().required(),
|
|
@@ -1206,7 +1195,7 @@ var updateBodyKeys4 = {
|
|
|
1206
1195
|
};
|
|
1207
1196
|
var updateBody4 = joi6.object().keys(updateBodyKeys4).messages(messages);
|
|
1208
1197
|
var markAllClientReadUnreadParamsKeys = {
|
|
1209
|
-
|
|
1198
|
+
chat_document_header_id: joi6.string().uuid().required(),
|
|
1210
1199
|
client_read: joi6.boolean().required()
|
|
1211
1200
|
};
|
|
1212
1201
|
var markAllClientReadUnreadParams = joi6.object().keys(markAllClientReadUnreadParamsKeys).messages(messages);
|
|
@@ -1250,7 +1239,6 @@ var createBodyKeys6 = {
|
|
|
1250
1239
|
};
|
|
1251
1240
|
var createBody6 = joi7.object().keys(createBodyKeys6).messages(messages);
|
|
1252
1241
|
var updateBodyKeys5 = {
|
|
1253
|
-
chat_type: joi7.string().valid(...chatTypes).optional(),
|
|
1254
1242
|
default_percentage: joi7.number().positive().allow(0).optional(),
|
|
1255
1243
|
main_persona_id: joi7.string().uuid().optional(),
|
|
1256
1244
|
contact_persona_id: joi7.string().uuid().optional(),
|
|
@@ -2794,7 +2782,6 @@ var createBodyKeys26 = {
|
|
|
2794
2782
|
};
|
|
2795
2783
|
var createBody27 = joi38.object().keys(createBodyKeys26).messages(messages);
|
|
2796
2784
|
var updateBodyKeys24 = {
|
|
2797
|
-
chat_type: joi38.string().valid(...chatTypes).optional(),
|
|
2798
2785
|
manufacturer: joi38.boolean().optional(),
|
|
2799
2786
|
inactive: joi38.boolean().optional(),
|
|
2800
2787
|
default_discount: joi38.number().positive().allow(0).max(100).optional(),
|
|
@@ -5669,13 +5656,11 @@ __export(route_schema_exports104, {
|
|
|
5669
5656
|
});
|
|
5670
5657
|
import joi105 from "joi";
|
|
5671
5658
|
var createOrUpdateBodyKeys2 = {
|
|
5672
|
-
owner_id: joi105.string().uuid().required(),
|
|
5673
5659
|
chat_document_header_id: joi105.string().uuid().required(),
|
|
5674
5660
|
personas_ids: joi105.array().items(joi105.string().optional()).required()
|
|
5675
5661
|
};
|
|
5676
5662
|
var createOrUpdateBody2 = joi105.object().keys(createOrUpdateBodyKeys2).messages(messages);
|
|
5677
5663
|
var findByParamsKeys = {
|
|
5678
|
-
owner_id: joi105.string().uuid().required(),
|
|
5679
5664
|
chat_document_header_id: joi105.string().uuid().optional()
|
|
5680
5665
|
};
|
|
5681
5666
|
var findByParams = joi105.object().keys(findByParamsKeys).messages(messages);
|
|
@@ -5,12 +5,6 @@ export type Entity = Chat;
|
|
|
5
5
|
export declare const Route = "chat";
|
|
6
6
|
export declare const UpperName = "Chat";
|
|
7
7
|
export declare const LowerName: string;
|
|
8
|
-
export declare const ChatTypeEnum: {
|
|
9
|
-
por_proposta: 'por_proposta';
|
|
10
|
-
global: 'global';
|
|
11
|
-
};
|
|
12
|
-
export type IChatType = (typeof ChatTypeEnum)[keyof typeof ChatTypeEnum];
|
|
13
|
-
export declare const chatTypes: string[];
|
|
14
8
|
export interface IChatBalloon {
|
|
15
9
|
chat?: Pick<Entity, 'message'> & {
|
|
16
10
|
id?: string;
|
|
@@ -29,12 +23,10 @@ export interface IChatBalloon {
|
|
|
29
23
|
}
|
|
30
24
|
export type IReport = Pick<Entity, 'email_processed' | 'email_delivered' | 'email_opened' | 'email_clicked'>;
|
|
31
25
|
export interface IPublicFindActiveByOwnerIdResponse {
|
|
32
|
-
last_group_report?: IReport;
|
|
33
|
-
owner_id: string;
|
|
34
26
|
chat: IChatBalloon[];
|
|
27
|
+
last_group_report?: IReport;
|
|
35
28
|
}
|
|
36
29
|
export interface IPublicFindBySubscriberId {
|
|
37
|
-
owner_id: string;
|
|
38
30
|
chat_document_header_id: string;
|
|
39
31
|
chat: IChatBalloon[];
|
|
40
32
|
persona: ChatSubscriber.IFindChatSubscriberPersona;
|
|
@@ -42,16 +34,13 @@ export interface IPublicFindBySubscriberId {
|
|
|
42
34
|
document_total: number;
|
|
43
35
|
}
|
|
44
36
|
export interface IPublicClientWebAppFindActiveByOwnerIdResponse {
|
|
45
|
-
owner_id: string;
|
|
46
|
-
chat_type: IChatType;
|
|
47
37
|
user_type: 'client' | 'provider';
|
|
48
38
|
chat: IChatBalloon[];
|
|
49
39
|
personas: ChatSubscriber.IFindChatSubscriberPersona[];
|
|
50
|
-
store_operator_name
|
|
51
|
-
document_total
|
|
40
|
+
store_operator_name: string;
|
|
41
|
+
document_total: number;
|
|
52
42
|
}
|
|
53
43
|
export interface ICreateRequest {
|
|
54
|
-
owner_id: string;
|
|
55
44
|
chat_document_header_id: string;
|
|
56
45
|
message: string;
|
|
57
46
|
username: string;
|
|
@@ -69,19 +58,19 @@ export interface IUpdateRequest {
|
|
|
69
58
|
username?: string;
|
|
70
59
|
}
|
|
71
60
|
export interface IMarkAllClientReadUnreadRequest {
|
|
72
|
-
|
|
61
|
+
chat_document_header_id: string;
|
|
73
62
|
client_read: boolean;
|
|
74
63
|
}
|
|
75
64
|
export interface IRepository {
|
|
76
|
-
findActiveByOwnerId(params: IShared.
|
|
77
|
-
clientWebAppFindActiveByOwnerId(params: IShared.
|
|
78
|
-
findActiveBySubscriberId(params: IShared.
|
|
79
|
-
resendLast(params: IShared.
|
|
65
|
+
findActiveByOwnerId(params: IShared.IFindByIdRequest): Promise<IPublicFindActiveByOwnerIdResponse>;
|
|
66
|
+
clientWebAppFindActiveByOwnerId(params: IShared.IFindByIdRequest): Promise<IPublicClientWebAppFindActiveByOwnerIdResponse>;
|
|
67
|
+
findActiveBySubscriberId(params: IShared.IFindByIdRequest): Promise<IPublicFindBySubscriberId>;
|
|
68
|
+
resendLast(params: IShared.IFindByIdRequest): Promise<void>;
|
|
80
69
|
create(data: ICreateRequest): Promise<Chat>;
|
|
81
70
|
update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
|
|
82
71
|
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
83
|
-
markAllAsRead(params: IShared.
|
|
84
|
-
markAllAsUnread(params: IShared.
|
|
72
|
+
markAllAsRead(params: IShared.IFindByIdRequest): Promise<void>;
|
|
73
|
+
markAllAsUnread(params: IShared.IFindByIdRequest): Promise<void>;
|
|
85
74
|
publicMarkAllClientReadUnread(params: IMarkAllClientReadUnreadRequest): Promise<void>;
|
|
86
75
|
}
|
|
87
76
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as IShared from '../../../shared/interface';
|
|
2
2
|
import { Gmails } from '../../../shared/entities/stock';
|
|
3
|
-
import { IChatType } from '../chat/interfaces';
|
|
4
3
|
export type Entity = Gmails;
|
|
5
4
|
export declare const Route = "gmail";
|
|
6
5
|
export declare const UpperName = "Gmail";
|
|
@@ -18,7 +17,6 @@ export interface IGmailsResponse {
|
|
|
18
17
|
proposals: number[];
|
|
19
18
|
done: Date | null;
|
|
20
19
|
chat_persona_name: string | null;
|
|
21
|
-
chat_type: IChatType | null;
|
|
22
20
|
text_to_chat: string | null;
|
|
23
21
|
proposal_url: string | null;
|
|
24
22
|
gmail_attachments: unknown[] | null;
|
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
import { ChatSubscriber, Persona } from './../../../shared/entities/user';
|
|
2
2
|
import * as IShared from '../../../shared/interface';
|
|
3
|
-
import { IChatType } from '../../stock/chat/interfaces';
|
|
4
3
|
export type Entity = ChatSubscriber;
|
|
5
4
|
export declare const Route = "chat_subscriber";
|
|
6
5
|
export declare const UpperName = "ChatSubscriber";
|
|
7
6
|
export declare const LowerName: string;
|
|
8
7
|
export interface ICreateOrUpdateRequest {
|
|
9
|
-
owner_id: string;
|
|
10
8
|
chat_document_header_id: string;
|
|
11
9
|
personas_ids: string[];
|
|
12
10
|
}
|
|
13
11
|
export interface IFindRequest {
|
|
14
|
-
owner_id: string;
|
|
15
12
|
chat_document_header_id: string;
|
|
16
13
|
}
|
|
17
|
-
export type IFindByOwnerResponse = Pick<Persona, 'external' | 'name' | 'email' | 'telephone'> & Pick<ChatSubscriber, 'id' | 'persona_id' | '
|
|
14
|
+
export type IFindByOwnerResponse = Pick<Persona, 'external' | 'name' | 'email' | 'telephone'> & Pick<ChatSubscriber, 'id' | 'persona_id' | 'chat_document_header_id'>;
|
|
18
15
|
export interface IFindByIdResponse extends IFindByOwnerResponse {
|
|
19
16
|
subscriptions: {
|
|
20
17
|
id: string;
|
|
21
|
-
|
|
18
|
+
chat_document_header_id: string;
|
|
22
19
|
}[];
|
|
23
20
|
}
|
|
24
21
|
export interface IFindChatSubscriberPersona extends Pick<Persona, 'id' | 'external' | 'name' | 'email' | 'telephone'> {
|
|
@@ -26,7 +23,6 @@ export interface IFindChatSubscriberPersona extends Pick<Persona, 'id' | 'extern
|
|
|
26
23
|
}
|
|
27
24
|
export interface IFindChatSubscriberResponse {
|
|
28
25
|
personas: IFindChatSubscriberPersona[];
|
|
29
|
-
chat_type: IChatType;
|
|
30
26
|
}
|
|
31
27
|
export interface IRepository {
|
|
32
28
|
createOrUpdate(data: ICreateOrUpdateRequest): Promise<string>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as IShared from '../../../shared/interface';
|
|
2
2
|
import { Clients, Users, Country, ReasonForExemption, ClientType, SegmentsArea, Language, Vehicles, DeliveryMethods, MaturityDates, PaymentMethods, Persona } from '../../../shared/entities/user';
|
|
3
|
-
import type { IChatType } from '../../stock/chat/interfaces';
|
|
4
3
|
export type Entity = Clients;
|
|
5
4
|
export declare const Route = "client";
|
|
6
5
|
export declare const UpperName = "Clients";
|
|
@@ -54,7 +53,6 @@ export interface ICreateRequest {
|
|
|
54
53
|
default_vehicle_id?: string | null;
|
|
55
54
|
}
|
|
56
55
|
export interface IUpdateRequest {
|
|
57
|
-
chat_type?: IChatType;
|
|
58
56
|
nif?: string | null;
|
|
59
57
|
country_id?: string | null;
|
|
60
58
|
language_id?: string | null;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as IShared from '../../../shared/interface';
|
|
2
2
|
import { type Commissioner, type Users, type Country, type Language, type PaymentMethods, type DeliveryMethods, type MaturityDates, type Vehicles, type Persona, type ReasonForExemption } from '../../../shared/entities/user';
|
|
3
|
-
import type { IChatType } from '../../stock/chat/interfaces';
|
|
4
3
|
export type Entity = Commissioner;
|
|
5
4
|
export declare const Route = "commissioner";
|
|
6
5
|
export declare const UpperName = "Commissioner";
|
|
@@ -39,7 +38,6 @@ export interface ICreateRequest {
|
|
|
39
38
|
default_vehicle_id?: string | null;
|
|
40
39
|
}
|
|
41
40
|
export interface IUpdateRequest {
|
|
42
|
-
chat_type?: IChatType;
|
|
43
41
|
default_percentage?: number;
|
|
44
42
|
main_persona_id?: string;
|
|
45
43
|
contact_persona_id?: string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type * as IShared from '../../../shared/interface';
|
|
2
2
|
import type { Persona, Country, ReasonForExemption } from '../../../shared/entities/user';
|
|
3
|
-
import type { IChatType } from '../../stock/chat/interfaces';
|
|
4
3
|
export type Entity = Persona;
|
|
5
4
|
export declare const Route = "persona";
|
|
6
5
|
export declare const UpperName = "Persona";
|
|
@@ -85,17 +84,14 @@ export interface IFindByEmailResponse {
|
|
|
85
84
|
client?: {
|
|
86
85
|
id: string;
|
|
87
86
|
name: string;
|
|
88
|
-
chat_type: IChatType;
|
|
89
87
|
} | null;
|
|
90
88
|
provider?: {
|
|
91
89
|
id: string;
|
|
92
90
|
name: string;
|
|
93
|
-
chat_type: IChatType;
|
|
94
91
|
} | null;
|
|
95
92
|
commissioner?: {
|
|
96
93
|
id: string;
|
|
97
94
|
name: string;
|
|
98
|
-
chat_type: IChatType;
|
|
99
95
|
} | null;
|
|
100
96
|
}
|
|
101
97
|
export interface IFindClientOrProviderRequest {
|
|
@@ -118,7 +114,6 @@ export interface IFindForGmailRequest {
|
|
|
118
114
|
}
|
|
119
115
|
export interface IFindForGmailResponse {
|
|
120
116
|
chat_persona_name: string;
|
|
121
|
-
chat_type: IChatType;
|
|
122
117
|
}
|
|
123
118
|
export interface IRepository {
|
|
124
119
|
findById(selector: IShared.IFindByIdRequest): Promise<IEntityExtended | null>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as IShared from '../../../shared/interface';
|
|
2
2
|
import { Providers, Users, Country, ReasonForExemption, Language, ProviderType, PaymentMethods, MaturityDates, DeliveryMethods, Vehicles, Persona } from '../../../shared/entities/user';
|
|
3
|
-
import type { IChatType } from '../../stock/chat/interfaces';
|
|
4
3
|
import type { DocumentHeader } from '../../../shared/entities/stock';
|
|
5
4
|
export type Entity = Providers;
|
|
6
5
|
export declare const Route = "provider";
|
|
@@ -53,7 +52,6 @@ export interface ICreateRequest {
|
|
|
53
52
|
personas?: ICreateMainPersona[];
|
|
54
53
|
}
|
|
55
54
|
export interface IUpdateRequest {
|
|
56
|
-
chat_type?: IChatType;
|
|
57
55
|
manufacturer?: boolean;
|
|
58
56
|
inactive?: boolean;
|
|
59
57
|
default_discount?: number;
|
|
@@ -1040,7 +1040,6 @@ export type Gmails = {
|
|
|
1040
1040
|
owner_id: string | null;
|
|
1041
1041
|
document_header_id: string | null;
|
|
1042
1042
|
chat_persona_name: string | null;
|
|
1043
|
-
chat_type: string | null;
|
|
1044
1043
|
action: string | null;
|
|
1045
1044
|
text_to_chat: string | null;
|
|
1046
1045
|
done: Date | null;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IPaymentMethodsSaftCodeEnum } from '../../modules/user/paymentMethods/interfaces';
|
|
2
|
-
import type { IChatType } from '../../modules/stock/chat/interfaces';
|
|
3
2
|
/**
|
|
4
3
|
* Model Users
|
|
5
4
|
*
|
|
@@ -87,7 +86,6 @@ export type UserPermissions = {
|
|
|
87
86
|
*/
|
|
88
87
|
export type Providers = {
|
|
89
88
|
id: string;
|
|
90
|
-
chat_type: IChatType;
|
|
91
89
|
user_id: string;
|
|
92
90
|
main_persona_id: string;
|
|
93
91
|
contact_persona_id: string;
|
|
@@ -159,7 +157,6 @@ export type Language = {
|
|
|
159
157
|
export type Clients = {
|
|
160
158
|
id: string;
|
|
161
159
|
user_id: string;
|
|
162
|
-
chat_type: IChatType;
|
|
163
160
|
main_persona_id: string;
|
|
164
161
|
contact_persona_id: string;
|
|
165
162
|
number: number;
|
|
@@ -249,7 +246,6 @@ export type Shippings = {
|
|
|
249
246
|
export type Commissioner = {
|
|
250
247
|
id: string;
|
|
251
248
|
user_id: string;
|
|
252
|
-
chat_type: IChatType;
|
|
253
249
|
main_persona_id: string;
|
|
254
250
|
contact_persona_id: string;
|
|
255
251
|
number: number;
|
|
@@ -327,7 +323,6 @@ export type ReasonForExemption = {
|
|
|
327
323
|
export type StoreOperator = {
|
|
328
324
|
id: string;
|
|
329
325
|
user_id: string;
|
|
330
|
-
chat_type: IChatType;
|
|
331
326
|
user_position_id: string | null;
|
|
332
327
|
number: number;
|
|
333
328
|
internal_email: string | null;
|
|
@@ -506,7 +501,6 @@ export type Theme = {
|
|
|
506
501
|
export type ChatSubscriber = {
|
|
507
502
|
id: string;
|
|
508
503
|
persona_id: string;
|
|
509
|
-
owner_id: string;
|
|
510
504
|
chat_document_header_id: string;
|
|
511
505
|
created_at: Date;
|
|
512
506
|
updated_at: Date;
|
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.15",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|