@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.
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.js +1 -0
- package/dist/schemas/user-strike.d.ts +37 -0
- package/dist/schemas/user-strike.js +22 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/user-strike.d.ts +5 -0
- package/dist/types/user-strike.js +2 -0
- package/package.json +1 -1
- package/src/schemas/index.ts +1 -0
- package/src/schemas/post.ts +1 -0
- package/src/schemas/user-strike.ts +21 -0
- package/src/types/index.ts +1 -0
- package/src/types/user-strike.ts +10 -0
package/dist/schemas/index.d.ts
CHANGED
package/dist/schemas/index.js
CHANGED
|
@@ -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;
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -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;
|
package/package.json
CHANGED
package/src/schemas/index.ts
CHANGED
package/src/schemas/post.ts
CHANGED
|
@@ -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;
|
package/src/types/index.ts
CHANGED
|
@@ -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;
|