@the-inkwell/shared 0.2.37 → 0.2.39
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/schema/admin/clients/index.d.ts +30 -0
- package/dist/schema/admin/clients/index.js +11 -0
- package/dist/schema/admin/clients/index.js.map +1 -1
- package/dist/schema/admin/referrals/index.d.ts +2 -1
- package/dist/schema/admin/referrals/index.js +3 -5
- package/dist/schema/admin/referrals/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -545,6 +545,16 @@ export declare const AdminClientUpdateSchema: import("drizzle-zod").BuildSchema<
|
|
|
545
545
|
}, undefined, undefined>;
|
|
546
546
|
export declare const AdminClientParamsSchema: z.ZodObject<{
|
|
547
547
|
id: z.ZodUUID;
|
|
548
|
+
referral: z.ZodOptional<z.ZodObject<{
|
|
549
|
+
referrer: z.ZodOptional<z.ZodObject<{
|
|
550
|
+
id: z.ZodUUID;
|
|
551
|
+
email: z.ZodString;
|
|
552
|
+
fullName: z.ZodNullable<z.ZodString>;
|
|
553
|
+
}, {
|
|
554
|
+
out: {};
|
|
555
|
+
in: {};
|
|
556
|
+
}>>;
|
|
557
|
+
}, z.core.$strip>>;
|
|
548
558
|
}, {
|
|
549
559
|
out: {};
|
|
550
560
|
in: {};
|
|
@@ -563,12 +573,32 @@ export declare const AdminClientListQuerySchema: z.ZodObject<{
|
|
|
563
573
|
}, z.core.$strip>;
|
|
564
574
|
export declare const AdminClientUpdateParamsSchema: z.ZodObject<{
|
|
565
575
|
id: z.ZodUUID;
|
|
576
|
+
referral: z.ZodOptional<z.ZodObject<{
|
|
577
|
+
referrer: z.ZodOptional<z.ZodObject<{
|
|
578
|
+
id: z.ZodUUID;
|
|
579
|
+
email: z.ZodString;
|
|
580
|
+
fullName: z.ZodNullable<z.ZodString>;
|
|
581
|
+
}, {
|
|
582
|
+
out: {};
|
|
583
|
+
in: {};
|
|
584
|
+
}>>;
|
|
585
|
+
}, z.core.$strip>>;
|
|
566
586
|
}, {
|
|
567
587
|
out: {};
|
|
568
588
|
in: {};
|
|
569
589
|
}>;
|
|
570
590
|
export declare const AdminClientDeleteParamsSchema: z.ZodObject<{
|
|
571
591
|
id: z.ZodUUID;
|
|
592
|
+
referral: z.ZodOptional<z.ZodObject<{
|
|
593
|
+
referrer: z.ZodOptional<z.ZodObject<{
|
|
594
|
+
id: z.ZodUUID;
|
|
595
|
+
email: z.ZodString;
|
|
596
|
+
fullName: z.ZodNullable<z.ZodString>;
|
|
597
|
+
}, {
|
|
598
|
+
out: {};
|
|
599
|
+
in: {};
|
|
600
|
+
}>>;
|
|
601
|
+
}, z.core.$strip>>;
|
|
572
602
|
}, {
|
|
573
603
|
out: {};
|
|
574
604
|
in: {};
|
|
@@ -13,6 +13,17 @@ exports.AdminClientSelectSchema = (0, drizzle_zod_1.createSelectSchema)(core_1.c
|
|
|
13
13
|
exports.AdminClientUpdateSchema = (0, drizzle_zod_1.createUpdateSchema)(core_1.client);
|
|
14
14
|
exports.AdminClientParamsSchema = exports.AdminClientSelectSchema.pick({
|
|
15
15
|
id: true
|
|
16
|
+
}).extend({
|
|
17
|
+
referral: v4_1.z
|
|
18
|
+
.object({
|
|
19
|
+
referrer: (0, drizzle_zod_1.createSelectSchema)(core_1.person).pick({
|
|
20
|
+
id: true,
|
|
21
|
+
email: true,
|
|
22
|
+
fullName: true
|
|
23
|
+
})
|
|
24
|
+
})
|
|
25
|
+
.partial()
|
|
26
|
+
.optional()
|
|
16
27
|
});
|
|
17
28
|
const AdminClientListQuerySchemaStatus = v4_1.z.object({
|
|
18
29
|
status: v4_1.z.array(v4_1.z.enum(core_1.ClientStatuses.enumValues)).optional()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/clients/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/clients/index.ts"],"names":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Q,EAAE;CACd,CAAC,CAAA;AACW,QAAA,6BAA6B,GAAG,+BAAuB,CAAA;AACvD,QAAA,6BAA6B,GAAG,+BAAuB,CAAA","sourcesContent":["import {\n createInsertSchema,\n createSelectSchema,\n createUpdateSchema\n} from 'drizzle-zod'\nimport { client, ClientStatuses, person } from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\n\n//// validators\n\nexport const AdminClientCreateSchema = createInsertSchema(client)\nexport const AdminClientSelectSchema = createSelectSchema(client).extend({\n _openPositionsCount: z.number().optional()\n})\nexport const AdminClientUpdateSchema = createUpdateSchema(client)\n\nexport const AdminClientParamsSchema = AdminClientSelectSchema.pick({\n id: true\n}).extend({\n referral: z\n .object({\n referrer: createSelectSchema(person).pick({\n id: true,\n email: true,\n fullName: true\n })\n })\n .partial()\n .optional()\n})\n\nconst AdminClientListQuerySchemaStatus = z.object({\n status: z.array(z.enum(ClientStatuses.enumValues)).optional()\n})\nconst AdminClientListQuerySchemaIsLead = createSelectSchema(client)\n .pick({\n isLead: true\n })\n .partial()\nexport const AdminClientListQuerySchema = ListQuerySchema.extend({\n filter: z\n .object({\n ...AdminClientListQuerySchemaStatus.shape,\n ...AdminClientListQuerySchemaIsLead.shape\n })\n .optional()\n})\nexport const AdminClientUpdateParamsSchema = AdminClientParamsSchema\nexport const AdminClientDeleteParamsSchema = AdminClientParamsSchema\n\n//// types\n\ntype AdminClient = z.infer<typeof AdminClientSelectSchema>\n\n// detail\nexport type AdminClientParams = z.infer<typeof AdminClientParamsSchema>\nexport type AdminClientResult = AdminClient\n\n// list\nexport type AdminClientListQuery = z.infer<typeof AdminClientListQuerySchema>\nexport type AdminClientListResult = ListResponse<\n z.infer<typeof AdminClientSelectSchema>\n>\n\n// create\nexport type AdminClientCreateInput = z.infer<typeof AdminClientCreateSchema>\nexport type AdminClientCreateResult = Pick<AdminClient, 'id'>\n\n// update\nexport type AdminClientUpdateParams = z.infer<\n typeof AdminClientUpdateParamsSchema\n>\nexport type AdminClientUpdateInput = z.infer<typeof AdminClientUpdateSchema>\n\n// delete\nexport type AdminClientDeleteParams = z.infer<\n typeof AdminClientDeleteParamsSchema\n>\n"]}
|
|
@@ -528,8 +528,9 @@ export declare const AdminReferralListQuerySchema: z.ZodObject<{
|
|
|
528
528
|
offset: z.ZodOptional<z.ZodNumber>;
|
|
529
529
|
sort: z.ZodOptional<z.ZodObject<{}, z.core.$strip>>;
|
|
530
530
|
filter: z.ZodOptional<z.ZodObject<{
|
|
531
|
+
clientId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
532
|
+
positionId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
531
533
|
referrerId: z.ZodOptional<z.ZodUUID>;
|
|
532
|
-
positionId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
533
534
|
}, {
|
|
534
535
|
out: {};
|
|
535
536
|
in: {};
|
|
@@ -4,7 +4,6 @@ exports.AdminReferralDeleteParamsSchema = exports.AdminReferralUpdateParamsSchem
|
|
|
4
4
|
const drizzle_zod_1 = require("drizzle-zod");
|
|
5
5
|
const core_1 = require("../../core");
|
|
6
6
|
const utils_1 = require("../../../utils");
|
|
7
|
-
const v4_1 = require("zod/v4");
|
|
8
7
|
//// validators
|
|
9
8
|
exports.AdminReferralCreateSchema = (0, drizzle_zod_1.createInsertSchema)(core_1.referral);
|
|
10
9
|
exports.AdminReferralPersonSelectSchema = (0, drizzle_zod_1.createSelectSchema)(core_1.person).pick({
|
|
@@ -65,10 +64,9 @@ exports.AdminReferralParamsSchema = exports.AdminReferralSelectSchema.pick({
|
|
|
65
64
|
});
|
|
66
65
|
exports.AdminReferralListQuerySchema = utils_1.ListQuerySchema.extend({
|
|
67
66
|
filter: exports.AdminReferralSelectSchema.pick({
|
|
68
|
-
referrerId: true
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
positionId: v4_1.z.string().uuid().optional()
|
|
67
|
+
referrerId: true,
|
|
68
|
+
clientId: true,
|
|
69
|
+
positionId: true
|
|
72
70
|
})
|
|
73
71
|
.partial()
|
|
74
72
|
.optional()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/referrals/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAA0E;AAC1E,0CAAmE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/referrals/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAA0E;AAC1E,0CAAmE;AAGnE,eAAe;AAEF,QAAA,yBAAyB,GAAG,IAAA,gCAAkB,EAAC,eAAQ,CAAC,CAAA;AACxD,QAAA,+BAA+B,GAAG,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;IAC7E,EAAE,EAAE,IAAI;IACR,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI;CACZ,CAAC,CAAA;AACW,QAAA,yBAAyB,GAAG,IAAA,gCAAkB,EAAC,eAAQ,CAAC,CAAC,MAAM,CAAC;IAC3E,QAAQ,EAAE,uCAA+B,CAAC,QAAQ,EAAE;IACpD,SAAS,EAAE,IAAA,gCAAkB,EAAC,gBAAS,CAAC;SACrC,IAAI,CAAC;QACJ,EAAE,EAAE,IAAI;QACR,KAAK,EAAE,IAAI;KACZ,CAAC;SACD,MAAM,CAAC;QACN,MAAM,EAAE,uCAA+B,CAAC,QAAQ,EAAE;KACnD,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,EAAE;IACb,MAAM,EAAE,IAAA,gCAAkB,EAAC,aAAM,CAAC;SAC/B,IAAI,CAAC;QACJ,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;QACV,MAAM,EAAE,IAAI;KACb,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,EAAE;IACb,QAAQ,EAAE,IAAA,gCAAkB,EAAC,eAAQ,CAAC;SACnC,IAAI,CAAC;QACJ,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;KACX,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,EAAE;IACb,QAAQ,EAAE,IAAA,gCAAkB,EAAC,eAAQ,CAAC;SACnC,IAAI,CAAC;QACJ,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;KACX,CAAC;SACD,MAAM,CAAC;QACN,MAAM,EAAE,IAAA,gCAAkB,EAAC,aAAM,CAAC;aAC/B,IAAI,CAAC;YACJ,EAAE,EAAE,IAAI;YACR,IAAI,EAAE,IAAI;SACX,CAAC;aACD,QAAQ,EAAE;aACV,QAAQ,EAAE;KACd,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,EAAE;CACd,CAAC,CAAA;AACW,QAAA,yBAAyB,GAAG,IAAA,gCAAkB,EAAC,eAAQ,CAAC,CAAA;AAExD,QAAA,yBAAyB,GAAG,iCAAyB,CAAC,IAAI,CAAC;IACtE,EAAE,EAAE,IAAI;CACT,CAAC,CAAA;AACW,QAAA,4BAA4B,GAAG,uBAAe,CAAC,MAAM,CAAC;IACjE,MAAM,EAAE,iCAAyB,CAAC,IAAI,CAAC;QACrC,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,IAAI;KACjB,CAAC;SACC,OAAO,EAAE;SACT,QAAQ,EAAE;CACd,CAAC,CAAA;AAEW,QAAA,+BAA+B,GAAG,iCAAyB,CAAA;AAC3D,QAAA,+BAA+B,GAAG,iCAAyB,CAAA","sourcesContent":["import {\n createInsertSchema,\n createSelectSchema,\n createUpdateSchema\n} from 'drizzle-zod'\nimport { campaign, candidacy, client, person, referral } from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\n\n//// validators\n\nexport const AdminReferralCreateSchema = createInsertSchema(referral)\nexport const AdminReferralPersonSelectSchema = createSelectSchema(person).pick({\n id: true,\n firstName: true,\n lastName: true,\n fullName: true,\n photoUri: true,\n email: true\n})\nexport const AdminReferralSelectSchema = createSelectSchema(referral).extend({\n referrer: AdminReferralPersonSelectSchema.optional(),\n candidacy: createSelectSchema(candidacy)\n .pick({\n id: true,\n stage: true\n })\n .extend({\n person: AdminReferralPersonSelectSchema.optional()\n })\n .nullable()\n .optional(),\n client: createSelectSchema(client)\n .pick({\n id: true,\n name: true,\n isLead: true\n })\n .nullable()\n .optional(),\n campaign: createSelectSchema(campaign)\n .pick({\n id: true,\n name: true\n })\n .nullable()\n .optional(),\n position: createSelectSchema(campaign)\n .pick({\n id: true,\n name: true\n })\n .extend({\n client: createSelectSchema(client)\n .pick({\n id: true,\n name: true\n })\n .nullable()\n .optional()\n })\n .nullable()\n .optional()\n})\nexport const AdminReferralUpdateSchema = createUpdateSchema(referral)\n\nexport const AdminReferralParamsSchema = AdminReferralSelectSchema.pick({\n id: true\n})\nexport const AdminReferralListQuerySchema = ListQuerySchema.extend({\n filter: AdminReferralSelectSchema.pick({\n referrerId: true,\n clientId: true,\n positionId: true\n })\n .partial()\n .optional()\n})\n\nexport const AdminReferralUpdateParamsSchema = AdminReferralParamsSchema\nexport const AdminReferralDeleteParamsSchema = AdminReferralParamsSchema\n\n//// types\n\ntype AdminReferral = z.infer<typeof AdminReferralSelectSchema>\n\n// detail\nexport type AdminReferralParams = z.infer<typeof AdminReferralParamsSchema>\nexport type AdminReferralResult = AdminReferral\n\n// list\nexport type AdminReferralListQuery = z.infer<\n typeof AdminReferralListQuerySchema\n>\nexport type AdminReferralListResult = ListResponse<\n z.infer<typeof AdminReferralSelectSchema>\n>\n\n// create\nexport type AdminReferralCreateInput = z.infer<typeof AdminReferralCreateSchema>\nexport type AdminReferralCreateResult = Pick<AdminReferral, 'id'>\n\n// update\nexport type AdminReferralUpdateParams = z.infer<\n typeof AdminReferralUpdateParamsSchema\n>\nexport type AdminReferralUpdateInput = Partial<AdminReferral>\n\n// delete\nexport type AdminReferralDeleteParams = z.infer<\n typeof AdminReferralDeleteParamsSchema\n>\n"]}
|