@floristcloud/api-lib 1.2.48 → 1.2.49
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/build/commands/notification/index.js +1 -0
- package/build/commands/notification/send-chat-message-to-client-s2s.command.js +23 -0
- package/build/enum/notification-type.enum.js +1 -0
- package/commands/notification/index.ts +1 -0
- package/commands/notification/send-chat-message-to-client-s2s.command.ts +25 -0
- package/enum/notification-type.enum.ts +1 -0
- package/package.json +1 -1
|
@@ -15,5 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./send-staff-notification-s2s.command"), exports);
|
|
18
|
+
__exportStar(require("./send-chat-message-to-client-s2s.command"), exports);
|
|
18
19
|
__exportStar(require("./get-notifications-status.query"), exports);
|
|
19
20
|
__exportStar(require("./get-notifications-by-order.query"), exports);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SendChatMessageToClientS2SContractCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const SendChatMessageToClientS2SRequestSchema = zod_1.z.object({
|
|
6
|
+
companyUUID: zod_1.z.string().uuid(),
|
|
7
|
+
recipientUserUUID: zod_1.z.string().uuid(),
|
|
8
|
+
chatId: zod_1.z.string().min(1),
|
|
9
|
+
unreadCount: zod_1.z.number().int().nonnegative().optional(),
|
|
10
|
+
});
|
|
11
|
+
const SendChatMessageToClientS2SResponseSchema = zod_1.z.object({
|
|
12
|
+
data: zod_1.z
|
|
13
|
+
.object({
|
|
14
|
+
notificationUUID: zod_1.z.string().uuid().optional(),
|
|
15
|
+
skipped: zod_1.z.boolean().optional(),
|
|
16
|
+
})
|
|
17
|
+
.optional(),
|
|
18
|
+
});
|
|
19
|
+
var SendChatMessageToClientS2SContractCommand;
|
|
20
|
+
(function (SendChatMessageToClientS2SContractCommand) {
|
|
21
|
+
SendChatMessageToClientS2SContractCommand.RequestSchema = SendChatMessageToClientS2SRequestSchema;
|
|
22
|
+
SendChatMessageToClientS2SContractCommand.ResponseSchema = SendChatMessageToClientS2SResponseSchema;
|
|
23
|
+
})(SendChatMessageToClientS2SContractCommand || (exports.SendChatMessageToClientS2SContractCommand = SendChatMessageToClientS2SContractCommand = {}));
|
|
@@ -9,6 +9,7 @@ var NotificationTypeEnum;
|
|
|
9
9
|
NotificationTypeEnum["CART_EXPIRATION"] = "CART_EXPIRATION";
|
|
10
10
|
NotificationTypeEnum["WRITE_OFF_REJECTED"] = "WRITE_OFF_REJECTED";
|
|
11
11
|
NotificationTypeEnum["CLIENT_MESSAGE_TO_EMPLOYEE"] = "CLIENT_MESSAGE_TO_EMPLOYEE";
|
|
12
|
+
NotificationTypeEnum["CHAT_MESSAGE_TO_CLIENT"] = "CHAT_MESSAGE_TO_CLIENT";
|
|
12
13
|
NotificationTypeEnum["PASSWORD_CHANGED"] = "PASSWORD_CHANGED";
|
|
13
14
|
NotificationTypeEnum["ACCOUNT_DELETION_REQUEST_CREATED"] = "ACCOUNT_DELETION_REQUEST_CREATED";
|
|
14
15
|
NotificationTypeEnum["ACCOUNT_DELETION_REQUEST_APPROVED"] = "ACCOUNT_DELETION_REQUEST_APPROVED";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
const SendChatMessageToClientS2SRequestSchema = z.object({
|
|
4
|
+
companyUUID: z.string().uuid(),
|
|
5
|
+
recipientUserUUID: z.string().uuid(),
|
|
6
|
+
chatId: z.string().min(1),
|
|
7
|
+
unreadCount: z.number().int().nonnegative().optional(),
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
const SendChatMessageToClientS2SResponseSchema = z.object({
|
|
11
|
+
data: z
|
|
12
|
+
.object({
|
|
13
|
+
notificationUUID: z.string().uuid().optional(),
|
|
14
|
+
skipped: z.boolean().optional(),
|
|
15
|
+
})
|
|
16
|
+
.optional(),
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export namespace SendChatMessageToClientS2SContractCommand {
|
|
20
|
+
export const RequestSchema = SendChatMessageToClientS2SRequestSchema;
|
|
21
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
22
|
+
|
|
23
|
+
export const ResponseSchema = SendChatMessageToClientS2SResponseSchema;
|
|
24
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
25
|
+
}
|
|
@@ -5,6 +5,7 @@ export enum NotificationTypeEnum {
|
|
|
5
5
|
CART_EXPIRATION = 'CART_EXPIRATION',
|
|
6
6
|
WRITE_OFF_REJECTED = 'WRITE_OFF_REJECTED',
|
|
7
7
|
CLIENT_MESSAGE_TO_EMPLOYEE = 'CLIENT_MESSAGE_TO_EMPLOYEE',
|
|
8
|
+
CHAT_MESSAGE_TO_CLIENT = 'CHAT_MESSAGE_TO_CLIENT',
|
|
8
9
|
PASSWORD_CHANGED = 'PASSWORD_CHANGED',
|
|
9
10
|
ACCOUNT_DELETION_REQUEST_CREATED = 'ACCOUNT_DELETION_REQUEST_CREATED',
|
|
10
11
|
ACCOUNT_DELETION_REQUEST_APPROVED = 'ACCOUNT_DELETION_REQUEST_APPROVED',
|