@zyacreatives/shared 2.0.59 → 2.0.61

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.
@@ -13,3 +13,4 @@ export * from "./message";
13
13
  export * from "./chat";
14
14
  export * from "./job";
15
15
  export * from "./job-application";
16
+ export * from "./user-strike";
@@ -29,3 +29,4 @@ __exportStar(require("./message"), exports);
29
29
  __exportStar(require("./chat"), exports);
30
30
  __exportStar(require("./job"), exports);
31
31
  __exportStar(require("./job-application"), exports);
32
+ __exportStar(require("./user-strike"), exports);
@@ -0,0 +1,37 @@
1
+ import { z } from "@hono/zod-openapi";
2
+ export declare const UserStrikeEntitySchema: z.ZodObject<{
3
+ userId: z.ZodCUID2;
4
+ strikeCount: z.ZodDefault<z.ZodInt>;
5
+ isSuspended: z.ZodBoolean;
6
+ suspensionExpiresAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
7
+ parentId: z.ZodCUID2;
8
+ parentType: z.ZodOptional<z.ZodEnum<{
9
+ readonly PROJECT: "PROJECT";
10
+ readonly POST: "POST";
11
+ }>>;
12
+ lastReason: z.ZodOptional<z.ZodString>;
13
+ createdAt: z.ZodCoercedDate<unknown>;
14
+ updatedAt: z.ZodCoercedDate<unknown>;
15
+ }, z.core.$strip>;
16
+ export declare const UpsertUserStrikeInputSchema: z.ZodObject<{
17
+ userId: z.ZodCUID2;
18
+ parentId: z.ZodCUID2;
19
+ parentType: z.ZodOptional<z.ZodEnum<{
20
+ readonly PROJECT: "PROJECT";
21
+ readonly POST: "POST";
22
+ }>>;
23
+ }, z.core.$strip>;
24
+ export declare const UpsertUserStrikeOutputSchema: z.ZodObject<{
25
+ userId: z.ZodCUID2;
26
+ strikeCount: z.ZodDefault<z.ZodInt>;
27
+ isSuspended: z.ZodBoolean;
28
+ suspensionExpiresAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
29
+ parentId: z.ZodCUID2;
30
+ parentType: z.ZodOptional<z.ZodEnum<{
31
+ readonly PROJECT: "PROJECT";
32
+ readonly POST: "POST";
33
+ }>>;
34
+ lastReason: z.ZodOptional<z.ZodString>;
35
+ createdAt: z.ZodCoercedDate<unknown>;
36
+ updatedAt: z.ZodCoercedDate<unknown>;
37
+ }, z.core.$strip>;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpsertUserStrikeOutputSchema = exports.UpsertUserStrikeInputSchema = exports.UserStrikeEntitySchema = void 0;
4
+ const zod_openapi_1 = require("@hono/zod-openapi");
5
+ const constants_1 = require("../constants");
6
+ exports.UserStrikeEntitySchema = zod_openapi_1.z.object({
7
+ userId: zod_openapi_1.z.cuid2(),
8
+ strikeCount: zod_openapi_1.z.int().nonnegative().default(0),
9
+ isSuspended: zod_openapi_1.z.boolean(),
10
+ suspensionExpiresAt: zod_openapi_1.z.coerce.date().optional(),
11
+ parentId: zod_openapi_1.z.cuid2(),
12
+ parentType: zod_openapi_1.z.enum(constants_1.ACTIVITY_PARENT_TYPES).optional(),
13
+ lastReason: zod_openapi_1.z.string().optional(),
14
+ createdAt: zod_openapi_1.z.coerce.date(),
15
+ updatedAt: zod_openapi_1.z.coerce.date(),
16
+ });
17
+ exports.UpsertUserStrikeInputSchema = zod_openapi_1.z.object({
18
+ userId: zod_openapi_1.z.cuid2(),
19
+ parentId: zod_openapi_1.z.cuid2(),
20
+ parentType: zod_openapi_1.z.enum(constants_1.ACTIVITY_PARENT_TYPES).optional(),
21
+ });
22
+ exports.UpsertUserStrikeOutputSchema = exports.UserStrikeEntitySchema;
@@ -14,3 +14,4 @@ export * from "./job-application";
14
14
  export * from "./message";
15
15
  export * from "./chat";
16
16
  export * from "./job";
17
+ export * from "./user-strike";
@@ -30,3 +30,4 @@ __exportStar(require("./job-application"), exports);
30
30
  __exportStar(require("./message"), exports);
31
31
  __exportStar(require("./chat"), exports);
32
32
  __exportStar(require("./job"), exports);
33
+ __exportStar(require("./user-strike"), exports);
@@ -0,0 +1,5 @@
1
+ import { z } from "@hono/zod-openapi";
2
+ import { UpsertUserStrikeInputSchema, UserStrikeEntitySchema } from "../schemas/user-strike";
3
+ export type UserStrikeEntity = z.infer<typeof UserStrikeEntitySchema>;
4
+ export type UpsertUserStrikeInput = z.infer<typeof UpsertUserStrikeInputSchema>;
5
+ export type UpsertUserStrikeOutput = UserStrikeEntity;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.0.59",
3
+ "version": "2.0.61",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -13,3 +13,4 @@ export * from "./message";
13
13
  export * from "./chat";
14
14
  export * from "./job";
15
15
  export * from "./job-application";
16
+ export * from "./user-strike";
@@ -218,6 +218,7 @@ export const GetFeedOutputSchema = z.object({
218
218
  nextCursor: z.string().optional(),
219
219
  });
220
220
 
221
+
221
222
  export const SearchPostInputSchema = z.object({
222
223
  string: z
223
224
  .string()
@@ -0,0 +1,21 @@
1
+ import { z } from "@hono/zod-openapi";
2
+ import { ACTIVITY_PARENT_TYPES } from "../constants";
3
+ export const UserStrikeEntitySchema = z.object({
4
+ userId: z.cuid2(),
5
+ strikeCount: z.int().nonnegative().default(0),
6
+ isSuspended: z.boolean(),
7
+ suspensionExpiresAt: z.coerce.date().optional(),
8
+ parentId: z.cuid2(),
9
+ parentType: z.enum(ACTIVITY_PARENT_TYPES).optional(),
10
+ lastReason: z.string().optional(),
11
+ createdAt: z.coerce.date(),
12
+ updatedAt: z.coerce.date(),
13
+ });
14
+
15
+ export const UpsertUserStrikeInputSchema = z.object({
16
+ userId: z.cuid2(),
17
+ parentId: z.cuid2(),
18
+ parentType: z.enum(ACTIVITY_PARENT_TYPES).optional(),
19
+ });
20
+
21
+ export const UpsertUserStrikeOutputSchema = UserStrikeEntitySchema;
@@ -14,3 +14,4 @@ export * from "./job-application";
14
14
  export * from "./message";
15
15
  export * from "./chat";
16
16
  export * from "./job";
17
+ export * from "./user-strike";
@@ -0,0 +1,10 @@
1
+ import { z } from "@hono/zod-openapi";
2
+ import {
3
+ UpsertUserStrikeInputSchema,
4
+ UserStrikeEntitySchema,
5
+ } from "../schemas/user-strike";
6
+ export type UserStrikeEntity = z.infer<typeof UserStrikeEntitySchema>;
7
+
8
+ export type UpsertUserStrikeInput = z.infer<typeof UpsertUserStrikeInputSchema>;
9
+
10
+ export type UpsertUserStrikeOutput = UserStrikeEntity;