@floristcloud/api-lib 1.2.47 → 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/commands/product/generate-product-qr.query.js +3 -3
- 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/commands/product/generate-product-qr.query.ts +3 -3
- 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 = {}));
|
|
@@ -3,8 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.GenerateProductQrContractQuery = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const GenerateProductQrRequestSchema = zod_1.z.object({
|
|
6
|
-
|
|
7
|
-
count: zod_1.z.coerce.number().default(20).optional(),
|
|
6
|
+
productUUIDs: zod_1.z.array(zod_1.z.string().uuid()).min(1).max(100),
|
|
8
7
|
});
|
|
9
8
|
const GenerateProductQrResponseSchema = zod_1.z.object({
|
|
10
9
|
message: zod_1.z.string().optional(),
|
|
@@ -16,8 +15,9 @@ const GenerateProductQrResponseSchema = zod_1.z.object({
|
|
|
16
15
|
grower: zod_1.z.string().nullable(),
|
|
17
16
|
barcode: zod_1.z.string().nullable(),
|
|
18
17
|
qrCode: zod_1.z.string(),
|
|
18
|
+
quantity: zod_1.z.number(),
|
|
19
|
+
multiplicity: zod_1.z.number(),
|
|
19
20
|
})),
|
|
20
|
-
total: zod_1.z.number(),
|
|
21
21
|
}),
|
|
22
22
|
});
|
|
23
23
|
var GenerateProductQrContractQuery;
|
|
@@ -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
|
+
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
3
|
const GenerateProductQrRequestSchema = z.object({
|
|
4
|
-
|
|
5
|
-
count: z.coerce.number().default(20).optional(),
|
|
4
|
+
productUUIDs: z.array(z.string().uuid()).min(1).max(100),
|
|
6
5
|
});
|
|
7
6
|
|
|
8
7
|
const GenerateProductQrResponseSchema = z.object({
|
|
@@ -16,9 +15,10 @@ const GenerateProductQrResponseSchema = z.object({
|
|
|
16
15
|
grower: z.string().nullable(),
|
|
17
16
|
barcode: z.string().nullable(),
|
|
18
17
|
qrCode: z.string(),
|
|
18
|
+
quantity: z.number(),
|
|
19
|
+
multiplicity: z.number(),
|
|
19
20
|
}),
|
|
20
21
|
),
|
|
21
|
-
total: z.number(),
|
|
22
22
|
}),
|
|
23
23
|
});
|
|
24
24
|
|
|
@@ -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',
|