@zyacreatives/shared 2.0.58 → 2.0.60

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.
@@ -107,8 +107,7 @@ exports.CreatePostInputSchema = zod_openapi_1.z.object({
107
107
  order: zod_openapi_1.z
108
108
  .number()
109
109
  .int({ message: "File order must be an integer" })
110
- .min(1, { message: "File order must be at least 1" })
111
- .max(20, { message: "File order cannot exceed 20" })
110
+ .max(10, { message: "File order cannot exceed 10" })
112
111
  .default(1),
113
112
  }))
114
113
  .max(10, { message: "Cannot attach more than 10 files" })
@@ -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;
@@ -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.58",
3
+ "version": "2.0.60",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -121,8 +121,8 @@ export const CreatePostInputSchema = z.object({
121
121
  order: z
122
122
  .number()
123
123
  .int({ message: "File order must be an integer" })
124
- .min(1, { message: "File order must be at least 1" })
125
- .max(20, { message: "File order cannot exceed 20" })
124
+
125
+ .max(10, { message: "File order cannot exceed 10" })
126
126
  .default(1),
127
127
  })
128
128
  )
@@ -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;
@@ -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;