@zyacreatives/shared 2.2.25 → 2.2.26
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/constants.d.ts +6 -0
- package/dist/constants.js +6 -1
- package/dist/schemas/chat.d.ts +32 -0
- package/dist/schemas/chat.js +5 -0
- package/package.json +1 -1
- package/src/constants.ts +9 -2
- package/src/schemas/chat.ts +5 -0
package/dist/constants.d.ts
CHANGED
|
@@ -177,6 +177,11 @@ export declare const JOB_STATUS: {
|
|
|
177
177
|
readonly ARCHIVED: "ARCHIVED";
|
|
178
178
|
readonly DELETED: "DELETED";
|
|
179
179
|
};
|
|
180
|
+
export declare const MESSAGE_REQUEST_STATUS: {
|
|
181
|
+
readonly PENDING: "PENDING";
|
|
182
|
+
readonly ACCEPTED: "ACCEPTED";
|
|
183
|
+
readonly DECLINED: "DECLINED";
|
|
184
|
+
};
|
|
180
185
|
export declare const PROJECT_STATUS: {
|
|
181
186
|
readonly ACTIVE: "ACTIVE";
|
|
182
187
|
readonly DRAFT: "DRAFT";
|
|
@@ -239,6 +244,7 @@ export declare const VENTURE_STAGES: {
|
|
|
239
244
|
readonly EXIT: "Exit";
|
|
240
245
|
};
|
|
241
246
|
export type NotificationType = (typeof NOTIFICATION_TYPES)[keyof typeof NOTIFICATION_TYPES];
|
|
247
|
+
export type MessageRequestStatus = (typeof MESSAGE_REQUEST_STATUS)[keyof typeof MESSAGE_REQUEST_STATUS];
|
|
242
248
|
export type ApplicationStatus = (typeof APPLICATION_STATUS)[keyof typeof APPLICATION_STATUS];
|
|
243
249
|
export type ActivityType = (typeof ACTIVITY_TYPES)[keyof typeof ACTIVITY_TYPES];
|
|
244
250
|
export type PostBadgeType = (typeof POST_BADGE_TYPES)[keyof typeof POST_BADGE_TYPES];
|
package/dist/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ANALYTICS_EVENTS = exports.DEFAULT_DISCIPLINES = exports.API_ROUTES = exports.VENTURE_STAGES = exports.NOTIFICATION_TYPES = exports.APPLICATION_STATUS = exports.LINK_TYPES = exports.ACTIVITY_TYPES = exports.POST_BADGE_TYPES = exports.PROJECT_STATUS = exports.JOB_STATUS = exports.WAGES_CURRENCY = exports.GIG_TYPE = exports.MESSAGE_TYPES = exports.JOB_LOCATIONS = exports.JOB_SECTIONS = exports.WAGE_TYPES = exports.JOB_AVAILABILITY_TYPES = exports.EMPLOYMENT_TYPE = exports.WORK_MODE = exports.JOB_TYPE = exports.POST_TYPES = exports.ACTIVITY_PARENT_TYPES = exports.INVESTOR_VERIFICATION_DOCUMENT_TYPES = exports.INVESTOR_VERIFICATION_DOCUMENT_STATUSES = exports.GEOGRAPHIC_FOCUS = exports.INVESTMENT_SIZES = exports.INVESTOR_TYPES = exports.ONBOARDING_PAGES = exports.EXPERIENCE_LEVELS = exports.CLIENT_TYPES = exports.USER_STATUSES = exports.ROLES = void 0;
|
|
3
|
+
exports.ANALYTICS_EVENTS = exports.DEFAULT_DISCIPLINES = exports.API_ROUTES = exports.VENTURE_STAGES = exports.NOTIFICATION_TYPES = exports.APPLICATION_STATUS = exports.LINK_TYPES = exports.ACTIVITY_TYPES = exports.POST_BADGE_TYPES = exports.PROJECT_STATUS = exports.MESSAGE_REQUEST_STATUS = exports.JOB_STATUS = exports.WAGES_CURRENCY = exports.GIG_TYPE = exports.MESSAGE_TYPES = exports.JOB_LOCATIONS = exports.JOB_SECTIONS = exports.WAGE_TYPES = exports.JOB_AVAILABILITY_TYPES = exports.EMPLOYMENT_TYPE = exports.WORK_MODE = exports.JOB_TYPE = exports.POST_TYPES = exports.ACTIVITY_PARENT_TYPES = exports.INVESTOR_VERIFICATION_DOCUMENT_TYPES = exports.INVESTOR_VERIFICATION_DOCUMENT_STATUSES = exports.GEOGRAPHIC_FOCUS = exports.INVESTMENT_SIZES = exports.INVESTOR_TYPES = exports.ONBOARDING_PAGES = exports.EXPERIENCE_LEVELS = exports.CLIENT_TYPES = exports.USER_STATUSES = exports.ROLES = void 0;
|
|
4
4
|
exports.ROLES = {
|
|
5
5
|
CREATIVE: "CREATIVE",
|
|
6
6
|
BRAND: "BRAND",
|
|
@@ -179,6 +179,11 @@ exports.JOB_STATUS = {
|
|
|
179
179
|
ARCHIVED: "ARCHIVED",
|
|
180
180
|
DELETED: "DELETED",
|
|
181
181
|
};
|
|
182
|
+
exports.MESSAGE_REQUEST_STATUS = {
|
|
183
|
+
PENDING: "PENDING",
|
|
184
|
+
ACCEPTED: "ACCEPTED",
|
|
185
|
+
DECLINED: "DECLINED",
|
|
186
|
+
};
|
|
182
187
|
exports.PROJECT_STATUS = {
|
|
183
188
|
ACTIVE: "ACTIVE",
|
|
184
189
|
DRAFT: "DRAFT",
|
package/dist/schemas/chat.d.ts
CHANGED
|
@@ -3,6 +3,14 @@ export declare const BaseChatEntitySchema: z.ZodObject<{
|
|
|
3
3
|
id: z.ZodCUID2;
|
|
4
4
|
senderId: z.ZodCUID2;
|
|
5
5
|
receiverId: z.ZodCUID2;
|
|
6
|
+
isMessageRequest: z.ZodDefault<z.ZodBoolean>;
|
|
7
|
+
messageRequestStatus: z.ZodDefault<z.ZodEnum<{
|
|
8
|
+
readonly PENDING: "PENDING";
|
|
9
|
+
readonly ACCEPTED: "ACCEPTED";
|
|
10
|
+
readonly DECLINED: "DECLINED";
|
|
11
|
+
}>>;
|
|
12
|
+
acceptedAt: z.ZodCoercedDate<unknown>;
|
|
13
|
+
declinedAt: z.ZodCoercedDate<unknown>;
|
|
6
14
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
7
15
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
8
16
|
deletedAt: z.ZodCoercedDate<unknown>;
|
|
@@ -11,6 +19,14 @@ export declare const ChatEntitySchema: z.ZodObject<{
|
|
|
11
19
|
id: z.ZodCUID2;
|
|
12
20
|
senderId: z.ZodCUID2;
|
|
13
21
|
receiverId: z.ZodCUID2;
|
|
22
|
+
isMessageRequest: z.ZodDefault<z.ZodBoolean>;
|
|
23
|
+
messageRequestStatus: z.ZodDefault<z.ZodEnum<{
|
|
24
|
+
readonly PENDING: "PENDING";
|
|
25
|
+
readonly ACCEPTED: "ACCEPTED";
|
|
26
|
+
readonly DECLINED: "DECLINED";
|
|
27
|
+
}>>;
|
|
28
|
+
acceptedAt: z.ZodCoercedDate<unknown>;
|
|
29
|
+
declinedAt: z.ZodCoercedDate<unknown>;
|
|
14
30
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
15
31
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
16
32
|
deletedAt: z.ZodCoercedDate<unknown>;
|
|
@@ -30,6 +46,14 @@ export declare const CreateChatOutputSchema: z.ZodObject<{
|
|
|
30
46
|
id: z.ZodCUID2;
|
|
31
47
|
senderId: z.ZodCUID2;
|
|
32
48
|
receiverId: z.ZodCUID2;
|
|
49
|
+
isMessageRequest: z.ZodDefault<z.ZodBoolean>;
|
|
50
|
+
messageRequestStatus: z.ZodDefault<z.ZodEnum<{
|
|
51
|
+
readonly PENDING: "PENDING";
|
|
52
|
+
readonly ACCEPTED: "ACCEPTED";
|
|
53
|
+
readonly DECLINED: "DECLINED";
|
|
54
|
+
}>>;
|
|
55
|
+
acceptedAt: z.ZodCoercedDate<unknown>;
|
|
56
|
+
declinedAt: z.ZodCoercedDate<unknown>;
|
|
33
57
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
34
58
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
35
59
|
deletedAt: z.ZodCoercedDate<unknown>;
|
|
@@ -41,6 +65,14 @@ export declare const GetChatsOutputSchema: z.ZodArray<z.ZodObject<{
|
|
|
41
65
|
id: z.ZodCUID2;
|
|
42
66
|
senderId: z.ZodCUID2;
|
|
43
67
|
receiverId: z.ZodCUID2;
|
|
68
|
+
isMessageRequest: z.ZodDefault<z.ZodBoolean>;
|
|
69
|
+
messageRequestStatus: z.ZodDefault<z.ZodEnum<{
|
|
70
|
+
readonly PENDING: "PENDING";
|
|
71
|
+
readonly ACCEPTED: "ACCEPTED";
|
|
72
|
+
readonly DECLINED: "DECLINED";
|
|
73
|
+
}>>;
|
|
74
|
+
acceptedAt: z.ZodCoercedDate<unknown>;
|
|
75
|
+
declinedAt: z.ZodCoercedDate<unknown>;
|
|
44
76
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
45
77
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
46
78
|
deletedAt: z.ZodCoercedDate<unknown>;
|
package/dist/schemas/chat.js
CHANGED
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetChatsOutputSchema = exports.ChatIdSchema = exports.CreateChatOutputSchema = exports.CreateChatInputSchema = exports.ChatEntitySchema = exports.BaseChatEntitySchema = void 0;
|
|
4
4
|
const zod_openapi_1 = require("@hono/zod-openapi");
|
|
5
|
+
const constants_1 = require("../constants");
|
|
5
6
|
exports.BaseChatEntitySchema = zod_openapi_1.z.object({
|
|
6
7
|
id: zod_openapi_1.z.cuid2(),
|
|
7
8
|
senderId: zod_openapi_1.z.cuid2(),
|
|
8
9
|
receiverId: zod_openapi_1.z.cuid2(),
|
|
10
|
+
isMessageRequest: zod_openapi_1.z.boolean().default(true),
|
|
11
|
+
messageRequestStatus: zod_openapi_1.z.enum(constants_1.MESSAGE_REQUEST_STATUS).default("PENDING"),
|
|
12
|
+
acceptedAt: zod_openapi_1.z.coerce.date(),
|
|
13
|
+
declinedAt: zod_openapi_1.z.coerce.date(),
|
|
9
14
|
createdAt: zod_openapi_1.z.coerce.date(),
|
|
10
15
|
updatedAt: zod_openapi_1.z.coerce.date(),
|
|
11
16
|
deletedAt: zod_openapi_1.z.coerce.date(),
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED
|
@@ -200,6 +200,12 @@ export const JOB_STATUS = {
|
|
|
200
200
|
DELETED: "DELETED",
|
|
201
201
|
} as const;
|
|
202
202
|
|
|
203
|
+
export const MESSAGE_REQUEST_STATUS = {
|
|
204
|
+
PENDING: "PENDING",
|
|
205
|
+
ACCEPTED: "ACCEPTED",
|
|
206
|
+
DECLINED: "DECLINED",
|
|
207
|
+
} as const;
|
|
208
|
+
|
|
203
209
|
export const PROJECT_STATUS = {
|
|
204
210
|
ACTIVE: "ACTIVE",
|
|
205
211
|
DRAFT: "DRAFT",
|
|
@@ -270,7 +276,8 @@ export const VENTURE_STAGES = {
|
|
|
270
276
|
|
|
271
277
|
export type NotificationType =
|
|
272
278
|
(typeof NOTIFICATION_TYPES)[keyof typeof NOTIFICATION_TYPES];
|
|
273
|
-
|
|
279
|
+
export type MessageRequestStatus =
|
|
280
|
+
(typeof MESSAGE_REQUEST_STATUS)[keyof typeof MESSAGE_REQUEST_STATUS];
|
|
274
281
|
export type ApplicationStatus =
|
|
275
282
|
(typeof APPLICATION_STATUS)[keyof typeof APPLICATION_STATUS];
|
|
276
283
|
export type ActivityType = (typeof ACTIVITY_TYPES)[keyof typeof ACTIVITY_TYPES];
|
|
@@ -312,7 +319,7 @@ export type InvestorVerificationDocumentType =
|
|
|
312
319
|
export type VentureStage = (typeof VENTURE_STAGES)[keyof typeof VENTURE_STAGES];
|
|
313
320
|
export type ProjectStatus =
|
|
314
321
|
(typeof PROJECT_STATUS)[keyof typeof PROJECT_STATUS];
|
|
315
|
-
|
|
322
|
+
|
|
316
323
|
export const API_ROUTES = {
|
|
317
324
|
healthCheck: "/health",
|
|
318
325
|
username: {
|
package/src/schemas/chat.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
|
+
import { MESSAGE_REQUEST_STATUS } from "../constants";
|
|
2
3
|
|
|
3
4
|
export const BaseChatEntitySchema = z.object({
|
|
4
5
|
id: z.cuid2(),
|
|
5
6
|
senderId: z.cuid2(),
|
|
6
7
|
receiverId: z.cuid2(),
|
|
8
|
+
isMessageRequest: z.boolean().default(true),
|
|
9
|
+
messageRequestStatus: z.enum(MESSAGE_REQUEST_STATUS).default("PENDING"),
|
|
10
|
+
acceptedAt: z.coerce.date(),
|
|
11
|
+
declinedAt: z.coerce.date(),
|
|
7
12
|
createdAt: z.coerce.date(),
|
|
8
13
|
updatedAt: z.coerce.date(),
|
|
9
14
|
deletedAt: z.coerce.date(),
|