@the-inkwell/shared 0.2.315 → 0.2.316
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.
|
@@ -164,14 +164,38 @@ export declare const AdminFileSelectSchema: import("drizzle-zod").BuildSchema<"s
|
|
|
164
164
|
}, {}, {}>;
|
|
165
165
|
}, undefined, undefined>;
|
|
166
166
|
export declare const AdminFileParamsSchema: z.ZodObject<{
|
|
167
|
-
id: z.
|
|
168
|
-
personId: z.ZodOptional<z.ZodUUID>;
|
|
167
|
+
id: z.ZodUUID;
|
|
169
168
|
}, {
|
|
170
169
|
out: {};
|
|
171
170
|
in: {};
|
|
172
171
|
}>;
|
|
172
|
+
export declare const AdminFileListQuerySchema: z.ZodObject<{
|
|
173
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
174
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
175
|
+
sort: z.ZodOptional<z.ZodObject<{
|
|
176
|
+
field: z.ZodString;
|
|
177
|
+
direction: z.ZodEnum<{
|
|
178
|
+
asc: "asc";
|
|
179
|
+
desc: "desc";
|
|
180
|
+
}>;
|
|
181
|
+
}, z.core.$strip>>;
|
|
182
|
+
filter: z.ZodOptional<z.ZodObject<{
|
|
183
|
+
personId: z.ZodOptional<z.ZodUUID>;
|
|
184
|
+
category: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
185
|
+
OTHER: "OTHER";
|
|
186
|
+
RESUME: "RESUME";
|
|
187
|
+
BIO: "BIO";
|
|
188
|
+
COVER_LETTER: "COVER_LETTER";
|
|
189
|
+
REFERENCE: "REFERENCE";
|
|
190
|
+
}>>>;
|
|
191
|
+
}, {
|
|
192
|
+
out: {};
|
|
193
|
+
in: {};
|
|
194
|
+
}>>;
|
|
195
|
+
}, z.core.$strip>;
|
|
173
196
|
type AdminFile = z.infer<typeof AdminFileSelectSchema>;
|
|
174
197
|
export type AdminFileParams = z.infer<typeof AdminFileParamsSchema>;
|
|
198
|
+
export type AdminFileListQuery = z.infer<typeof AdminFileListQuerySchema>;
|
|
175
199
|
export type AdminFileResult = AdminFile;
|
|
176
200
|
export type AdminFileListResult = ListResponse<AdminFile>;
|
|
177
201
|
export type AdminFileCreateInput = z.infer<typeof AdminFileCreateSchema>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AdminFileParamsSchema = exports.AdminFileSelectSchema = exports.AdminFileCreateSchema = exports.AdminFileSignedQueryParamsSchema = void 0;
|
|
3
|
+
exports.AdminFileListQuerySchema = exports.AdminFileParamsSchema = exports.AdminFileSelectSchema = exports.AdminFileCreateSchema = exports.AdminFileSignedQueryParamsSchema = void 0;
|
|
4
4
|
const v4_1 = require("zod/v4");
|
|
5
5
|
const core_1 = require("../../core");
|
|
6
6
|
const drizzle_zod_1 = require("drizzle-zod");
|
|
7
|
+
const utils_1 = require("../../../utils");
|
|
7
8
|
exports.AdminFileSignedQueryParamsSchema = v4_1.z.object({
|
|
8
9
|
name: v4_1.z.string()
|
|
9
10
|
});
|
|
@@ -12,7 +13,14 @@ exports.AdminFileCreateSchema = (0, drizzle_zod_1.createInsertSchema)(core_1.fil
|
|
|
12
13
|
});
|
|
13
14
|
exports.AdminFileSelectSchema = (0, drizzle_zod_1.createSelectSchema)(core_1.files);
|
|
14
15
|
exports.AdminFileParamsSchema = exports.AdminFileSelectSchema.pick({
|
|
15
|
-
id: true
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
id: true
|
|
17
|
+
});
|
|
18
|
+
exports.AdminFileListQuerySchema = utils_1.ListQuerySchema.extend({
|
|
19
|
+
filter: exports.AdminFileSelectSchema.pick({
|
|
20
|
+
personId: true,
|
|
21
|
+
category: true
|
|
22
|
+
})
|
|
23
|
+
.partial()
|
|
24
|
+
.optional()
|
|
25
|
+
});
|
|
18
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/files/index.ts"],"names":[],"mappings":";;;AAAA,+BAA0B;AAC1B,qCAAkC;AAClC,6CAAoE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/files/index.ts"],"names":[],"mappings":";;;AAAA,+BAA0B;AAC1B,qCAAkC;AAClC,6CAAoE;AACpE,0CAAmE;AAEtD,QAAA,gCAAgC,GAAG,MAAC,CAAC,MAAM,CAAC;IACvD,IAAI,EAAE,MAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAA;AAQW,QAAA,qBAAqB,GAAG,IAAA,gCAAkB,EAAC,YAAK,CAAC,CAAC,IAAI,CAAC;IAClE,EAAE,EAAE,IAAI;CACT,CAAC,CAAA;AACW,QAAA,qBAAqB,GAAG,IAAA,gCAAkB,EAAC,YAAK,CAAC,CAAA;AACjD,QAAA,qBAAqB,GAAG,6BAAqB,CAAC,IAAI,CAAC;IAC9D,EAAE,EAAE,IAAI;CACT,CAAC,CAAA;AACW,QAAA,wBAAwB,GAAG,uBAAe,CAAC,MAAM,CAAC;IAC7D,MAAM,EAAE,6BAAqB,CAAC,IAAI,CAAC;QACjC,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,IAAI;KACf,CAAC;SACC,OAAO,EAAE;SACT,QAAQ,EAAE;CACd,CAAC,CAAA","sourcesContent":["import { z } from 'zod/v4'\nimport { files } from '../../core'\nimport { createInsertSchema, createSelectSchema } from 'drizzle-zod'\nimport { type ListResponse, ListQuerySchema } from '../../../utils'\n\nexport const AdminFileSignedQueryParamsSchema = z.object({\n name: z.string()\n})\n\nexport type AdminFileSignedQueryParams = z.infer<\n typeof AdminFileSignedQueryParamsSchema\n>\nexport type AdminFileUploadResult = {\n uri: string\n}\nexport const AdminFileCreateSchema = createInsertSchema(files).omit({\n id: true\n})\nexport const AdminFileSelectSchema = createSelectSchema(files)\nexport const AdminFileParamsSchema = AdminFileSelectSchema.pick({\n id: true\n})\nexport const AdminFileListQuerySchema = ListQuerySchema.extend({\n filter: AdminFileSelectSchema.pick({\n personId: true,\n category: true\n })\n .partial()\n .optional()\n})\n\ntype AdminFile = z.infer<typeof AdminFileSelectSchema>\nexport type AdminFileParams = z.infer<typeof AdminFileParamsSchema>\nexport type AdminFileListQuery = z.infer<typeof AdminFileListQuerySchema>\nexport type AdminFileResult = AdminFile\nexport type AdminFileListResult = ListResponse<AdminFile>\nexport type AdminFileCreateInput = z.infer<typeof AdminFileCreateSchema>\nexport type AdminFileCreateResult = AdminFile\n"]}
|