@the-inkwell/shared 0.2.268 → 0.2.270
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/candidacies/index.d.ts +1 -0
- package/dist/schema/admin/candidacies/index.js +2 -1
- package/dist/schema/admin/candidacies/index.js.map +1 -1
- package/dist/schema/admin/matches/matches.d.ts +25 -111
- package/dist/schema/admin/matches/matches.js +8 -1
- package/dist/schema/admin/matches/matches.js.map +1 -1
- package/dist/schema/admin/referrals/index.d.ts +1 -0
- package/dist/schema/admin/referrals/index.js +2 -1
- package/dist/schema/admin/referrals/index.js.map +1 -1
- package/dist/schema/admin/todos/index.d.ts +6 -2
- package/dist/schema/admin/todos/index.js +6 -2
- package/dist/schema/admin/todos/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -804,6 +804,7 @@ export declare const AdminCandidacyListQuerySchema: z.ZodObject<{
|
|
|
804
804
|
}>;
|
|
805
805
|
}, z.core.$strip>>;
|
|
806
806
|
filter: z.ZodOptional<z.ZodObject<{
|
|
807
|
+
campaignId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
807
808
|
personId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
808
809
|
positionId: z.ZodOptional<z.ZodUUID>;
|
|
809
810
|
stage: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
@@ -83,7 +83,8 @@ exports.AdminCandidacyListQuerySchema = utils_1.ListQuerySchema.extend({
|
|
|
83
83
|
filter: exports.AdminCandidacySelectSchema.pick({
|
|
84
84
|
personId: true,
|
|
85
85
|
positionId: true,
|
|
86
|
-
stage: true
|
|
86
|
+
stage: true,
|
|
87
|
+
campaignId: true
|
|
87
88
|
})
|
|
88
89
|
.extend({
|
|
89
90
|
status: v4_1.z.enum(['open', 'closed']).optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/candidacies/index.ts"],"names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I;KACjB,CAAC;SACC,MAAM,CAAC;QACN,MAAM,EAAE,MAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE;QAC7C,eAAe,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACvC,CAAC;SACD,OAAO,EAAE;SACT,QAAQ,EAAE;CACd,CAAC,CAAA","sourcesContent":["import {\n createInsertSchema,\n createSelectSchema,\n createUpdateSchema\n} from 'drizzle-zod'\nimport {\n action,\n campaign,\n candidacy,\n candidacyFeedback,\n client,\n note,\n person,\n position,\n tag\n} from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\n\n//// validators\n\nexport const AdminCandidacyCreateSchema = createInsertSchema(candidacy)\n\nconst AdminCandidacySelectPersonSchema = createSelectSchema(person).pick({\n id: true,\n firstName: true,\n lastName: true,\n fullName: true,\n photoUri: true,\n doNotEngage: true,\n email: true\n})\nexport const AdminCandidacySelectSchema = createSelectSchema(candidacy).extend({\n referral: z\n .object({\n id: z.string(),\n referrer: AdminCandidacySelectPersonSchema\n })\n .nullable()\n .optional(),\n person: AdminCandidacySelectPersonSchema.optional(),\n campaign: createSelectSchema(campaign)\n .pick({\n id: true,\n name: true\n })\n .nullable()\n .optional(),\n personId: z.string().optional(),\n position: createSelectSchema(position)\n .pick({\n id: true,\n name: true\n })\n .extend({\n client: createSelectSchema(client).pick({\n id: true,\n name: true\n })\n })\n .optional(),\n ratingTags: z\n .array(\n z.object({\n tag: createSelectSchema(tag).pick({\n id: true,\n slug: true,\n name: true\n })\n })\n )\n .optional(),\n actions: z\n .array(\n createSelectSchema(action).pick({\n id: true,\n name: true\n })\n )\n .optional(),\n candidacyFeedbacks: z\n .array(\n createSelectSchema(candidacyFeedback).pick({\n id: true,\n content: true\n })\n )\n .optional(),\n notes: z\n .array(\n createSelectSchema(note).pick({\n id: true,\n content: true\n })\n )\n .optional()\n})\nexport const AdminCandidacyUpdateSchema = createUpdateSchema(candidacy)\n\nexport const AdminCandidacyParamsSchema = AdminCandidacySelectSchema.pick({\n id: true\n})\nexport const AdminCandidacyUpdateParamsSchema = AdminCandidacyParamsSchema\nexport const AdminCandidacyDeleteParamsSchema = AdminCandidacyParamsSchema\nexport const AdminCandidacyListQuerySchema = ListQuerySchema.extend({\n filter: AdminCandidacySelectSchema.pick({\n personId: true,\n positionId: true,\n stage: true,\n campaignId: true\n })\n .extend({\n status: z.enum(['open', 'closed']).optional(),\n personNameEmail: z.string().optional()\n })\n .partial()\n .optional()\n})\n\n//// types\n\ntype AdminCandidacy = z.infer<typeof AdminCandidacySelectSchema>\n\n// detail\nexport type AdminCandidacyParams = z.infer<typeof AdminCandidacyParamsSchema>\nexport type AdminCandidacyResult = AdminCandidacy\n\n// list\nexport type AdminCandidacyListQuery = z.infer<\n typeof AdminCandidacyListQuerySchema\n>\nexport type AdminCandidacyListResult = ListResponse<\n z.infer<typeof AdminCandidacySelectSchema>\n>\n\n// create\nexport type AdminCandidacyCreateInput = z.infer<\n typeof AdminCandidacyCreateSchema\n>\nexport type AdminCandidacyCreateResult = Pick<AdminCandidacy, 'id'>\n\n// update\nexport type AdminCandidacyUpdateParams = z.infer<\n typeof AdminCandidacyUpdateParamsSchema\n>\nexport type AdminCandidacyUpdateInput = Partial<AdminCandidacy>\n\n// delete\nexport type AdminCandidacyDeleteParams = z.infer<\n typeof AdminCandidacyDeleteParamsSchema\n>\n"]}
|
|
@@ -112,118 +112,32 @@ export declare const AdminMatchCreateSchema: import("drizzle-zod").BuildSchema<"
|
|
|
112
112
|
generated: undefined;
|
|
113
113
|
}, {}, {}>;
|
|
114
114
|
}, undefined, undefined>;
|
|
115
|
-
export declare const AdminMatchSelectSchema:
|
|
116
|
-
id:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
dataType: "string";
|
|
137
|
-
columnType: "PgUUID";
|
|
138
|
-
data: string;
|
|
139
|
-
driverParam: string;
|
|
140
|
-
notNull: true;
|
|
141
|
-
hasDefault: false;
|
|
142
|
-
isPrimaryKey: false;
|
|
143
|
-
isAutoincrement: false;
|
|
144
|
-
hasRuntimeDefault: false;
|
|
145
|
-
enumValues: undefined;
|
|
146
|
-
baseColumn: never;
|
|
147
|
-
identity: undefined;
|
|
148
|
-
generated: undefined;
|
|
149
|
-
}, {}, {}>;
|
|
150
|
-
positionId: import("drizzle-orm/pg-core").PgColumn<{
|
|
151
|
-
name: "positionId";
|
|
152
|
-
tableName: "matches";
|
|
153
|
-
dataType: "string";
|
|
154
|
-
columnType: "PgUUID";
|
|
155
|
-
data: string;
|
|
156
|
-
driverParam: string;
|
|
157
|
-
notNull: true;
|
|
158
|
-
hasDefault: false;
|
|
159
|
-
isPrimaryKey: false;
|
|
160
|
-
isAutoincrement: false;
|
|
161
|
-
hasRuntimeDefault: false;
|
|
162
|
-
enumValues: undefined;
|
|
163
|
-
baseColumn: never;
|
|
164
|
-
identity: undefined;
|
|
165
|
-
generated: undefined;
|
|
166
|
-
}, {}, {}>;
|
|
167
|
-
campaignId: import("drizzle-orm/pg-core").PgColumn<{
|
|
168
|
-
name: "campaignId";
|
|
169
|
-
tableName: "matches";
|
|
170
|
-
dataType: "string";
|
|
171
|
-
columnType: "PgUUID";
|
|
172
|
-
data: string;
|
|
173
|
-
driverParam: string;
|
|
174
|
-
notNull: false;
|
|
175
|
-
hasDefault: false;
|
|
176
|
-
isPrimaryKey: false;
|
|
177
|
-
isAutoincrement: false;
|
|
178
|
-
hasRuntimeDefault: false;
|
|
179
|
-
enumValues: undefined;
|
|
180
|
-
baseColumn: never;
|
|
181
|
-
identity: undefined;
|
|
182
|
-
generated: undefined;
|
|
183
|
-
}, {}, {}>;
|
|
184
|
-
criteria: import("drizzle-orm/pg-core").PgColumn<{
|
|
185
|
-
name: "criteria";
|
|
186
|
-
tableName: "matches";
|
|
187
|
-
dataType: "json";
|
|
188
|
-
columnType: "PgJsonb";
|
|
189
|
-
data: {
|
|
190
|
-
person: Record<any, any>;
|
|
191
|
-
referrer: Record<any, any>;
|
|
192
|
-
};
|
|
193
|
-
driverParam: unknown;
|
|
194
|
-
notNull: false;
|
|
195
|
-
hasDefault: false;
|
|
196
|
-
isPrimaryKey: false;
|
|
197
|
-
isAutoincrement: false;
|
|
198
|
-
hasRuntimeDefault: false;
|
|
199
|
-
enumValues: undefined;
|
|
200
|
-
baseColumn: never;
|
|
201
|
-
identity: undefined;
|
|
202
|
-
generated: undefined;
|
|
203
|
-
}, {}, {
|
|
204
|
-
$type: {
|
|
205
|
-
person: Record<any, any>;
|
|
206
|
-
referrer: Record<any, any>;
|
|
207
|
-
};
|
|
115
|
+
export declare const AdminMatchSelectSchema: z.ZodObject<{
|
|
116
|
+
id: z.ZodUUID;
|
|
117
|
+
personId: z.ZodUUID;
|
|
118
|
+
positionId: z.ZodUUID;
|
|
119
|
+
campaignId: z.ZodNullable<z.ZodUUID>;
|
|
120
|
+
criteria: z.ZodNullable<z.ZodType<{
|
|
121
|
+
person: Record<any, any>;
|
|
122
|
+
referrer: Record<any, any>;
|
|
123
|
+
}, {
|
|
124
|
+
person: Record<any, any>;
|
|
125
|
+
referrer: Record<any, any>;
|
|
126
|
+
}>>;
|
|
127
|
+
createdAt: z.ZodDate;
|
|
128
|
+
person: z.ZodObject<{
|
|
129
|
+
email: z.ZodString;
|
|
130
|
+
id: z.ZodUUID;
|
|
131
|
+
fullName: z.ZodNullable<z.ZodString>;
|
|
132
|
+
photoUri: z.ZodNullable<z.ZodString>;
|
|
133
|
+
}, {
|
|
134
|
+
out: {};
|
|
135
|
+
in: {};
|
|
208
136
|
}>;
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
columnType: "PgTimestamp";
|
|
214
|
-
data: Date;
|
|
215
|
-
driverParam: string;
|
|
216
|
-
notNull: true;
|
|
217
|
-
hasDefault: true;
|
|
218
|
-
isPrimaryKey: false;
|
|
219
|
-
isAutoincrement: false;
|
|
220
|
-
hasRuntimeDefault: false;
|
|
221
|
-
enumValues: undefined;
|
|
222
|
-
baseColumn: never;
|
|
223
|
-
identity: undefined;
|
|
224
|
-
generated: undefined;
|
|
225
|
-
}, {}, {}>;
|
|
226
|
-
}, undefined, undefined>;
|
|
137
|
+
}, {
|
|
138
|
+
out: {};
|
|
139
|
+
in: {};
|
|
140
|
+
}>;
|
|
227
141
|
export declare const AdminMatchUpdateSchema: import("drizzle-zod").BuildSchema<"update", {
|
|
228
142
|
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
229
143
|
name: "id";
|
|
@@ -7,7 +7,14 @@ const utils_1 = require("../../../utils");
|
|
|
7
7
|
const v4_1 = require("zod/v4");
|
|
8
8
|
//// validators
|
|
9
9
|
exports.AdminMatchCreateSchema = (0, drizzle_zod_1.createInsertSchema)(core_1.match);
|
|
10
|
-
exports.AdminMatchSelectSchema = (0, drizzle_zod_1.createSelectSchema)(core_1.match)
|
|
10
|
+
exports.AdminMatchSelectSchema = (0, drizzle_zod_1.createSelectSchema)(core_1.match).extend({
|
|
11
|
+
person: (0, drizzle_zod_1.createSelectSchema)(core_1.person).pick({
|
|
12
|
+
id: true,
|
|
13
|
+
fullName: true,
|
|
14
|
+
email: true,
|
|
15
|
+
photoUri: true
|
|
16
|
+
})
|
|
17
|
+
});
|
|
11
18
|
exports.AdminMatchUpdateSchema = (0, drizzle_zod_1.createUpdateSchema)(core_1.match);
|
|
12
19
|
exports.AdminMatchParamsSchema = exports.AdminMatchSelectSchema.pick({
|
|
13
20
|
id: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matches.js","sourceRoot":"","sources":["../../../../src/schema/admin/matches/matches.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,
|
|
1
|
+
{"version":3,"file":"matches.js","sourceRoot":"","sources":["../../../../src/schema/admin/matches/matches.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAA0C;AAC1C,0CAAmE;AACnE,+BAA0B;AAE1B,eAAe;AAEF,QAAA,sBAAsB,GAAG,IAAA,gCAAkB,EAAC,YAAK,CAAC,CAAA;AAClD,QAAA,sBAAsB,GAAG,IAAA,gCAAkB,EAAC,YAAK,CAAC,CAAC,MAAM,CAAC;IACrE,MAAM,EAAE,IAAA,gCAAkB,EAAC,aAAM,CAAC,CAAC,IAAI,CAAC;QACtC,EAAE,EAAE,IAAI;QACR,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,IAAI;KACf,CAAC;CACH,CAAC,CAAA;AACW,QAAA,sBAAsB,GAAG,IAAA,gCAAkB,EAAC,YAAK,CAAC,CAAA;AAElD,QAAA,sBAAsB,GAAG,8BAAsB,CAAC,IAAI,CAAC;IAChE,EAAE,EAAE,IAAI;CACT,CAAC,CAAA;AACW,QAAA,yBAAyB,GAAG,uBAAe,CAAC,MAAM,CAAC;IAC9D,MAAM,EAAE,MAAC;SACN,MAAM,CAAC;QACN,QAAQ,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC/B,UAAU,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACjC,UAAU,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACjC,MAAM,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC9B,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAA;AACW,QAAA,4BAA4B,GAAG,8BAAsB,CAAA;AACrD,QAAA,4BAA4B,GAAG,8BAAsB,CAAA","sourcesContent":["import {\n createInsertSchema,\n createSelectSchema,\n createUpdateSchema\n} from 'drizzle-zod'\nimport { match, person } from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\n\n//// validators\n\nexport const AdminMatchCreateSchema = createInsertSchema(match)\nexport const AdminMatchSelectSchema = createSelectSchema(match).extend({\n person: createSelectSchema(person).pick({\n id: true,\n fullName: true,\n email: true,\n photoUri: true\n })\n})\nexport const AdminMatchUpdateSchema = createUpdateSchema(match)\n\nexport const AdminMatchParamsSchema = AdminMatchSelectSchema.pick({\n id: true\n})\nexport const AdminMatchListQuerySchema = ListQuerySchema.extend({\n filter: z\n .object({\n personId: z.string().optional(),\n positionId: z.string().optional(),\n campaignId: z.string().optional(),\n search: z.string().optional()\n })\n .optional()\n})\nexport const AdminMatchUpdateParamsSchema = AdminMatchParamsSchema\nexport const AdminMatchDeleteParamsSchema = AdminMatchParamsSchema\n\n//// types\n\ntype AdminMatch = z.infer<typeof AdminMatchSelectSchema>\n\n// detail\nexport type AdminMatchParams = z.infer<typeof AdminMatchParamsSchema>\nexport type AdminMatchResult = AdminMatch\n\n// list\nexport type AdminMatchListQuery = z.infer<typeof AdminMatchListQuerySchema>\nexport type AdminMatchListResult = ListResponse<\n z.infer<typeof AdminMatchSelectSchema>\n>\n\n// create\nexport type AdminMatchCreateInput = z.infer<typeof AdminMatchCreateSchema>\nexport type AdminMatchCreateResult = Pick<AdminMatch, 'id'>\n\n// update\nexport type AdminMatchUpdateParams = z.infer<\n typeof AdminMatchUpdateParamsSchema\n>\nexport type AdminMatchUpdateInput = z.infer<typeof AdminMatchUpdateSchema>\n\n// delete\nexport type AdminMatchDeleteParams = z.infer<\n typeof AdminMatchDeleteParamsSchema\n>\n"]}
|
|
@@ -665,6 +665,7 @@ export declare const AdminReferralListQuerySchema: z.ZodObject<{
|
|
|
665
665
|
}, z.core.$strip>>;
|
|
666
666
|
filter: z.ZodOptional<z.ZodObject<{
|
|
667
667
|
clientId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
668
|
+
campaignId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
668
669
|
positionId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
669
670
|
referrerId: z.ZodOptional<z.ZodUUID>;
|
|
670
671
|
}, {
|
|
@@ -77,7 +77,8 @@ exports.AdminReferralListQuerySchema = utils_1.ListQuerySchema.extend({
|
|
|
77
77
|
filter: exports.AdminReferralSelectSchema.pick({
|
|
78
78
|
referrerId: true,
|
|
79
79
|
clientId: true,
|
|
80
|
-
positionId: true
|
|
80
|
+
positionId: true,
|
|
81
|
+
campaignId: true
|
|
81
82
|
})
|
|
82
83
|
.partial()
|
|
83
84
|
.optional()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/referrals/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAOmB;AACnB,0CAAmE;AACnE,+BAA0B;AAE1B,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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;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 {\n campaign,\n candidacy,\n client,\n person,\n referral,\n referralPayout\n} 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 clientPerson: AdminReferralPersonSelectSchema.nullable().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 payouts: z\n .array(\n createSelectSchema(referralPayout).pick({\n id: true,\n amount: true,\n paidAt: true,\n reason: true\n })\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"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/referrals/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAOmB;AACnB,0CAAmE;AACnE,+BAA0B;AAE1B,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,C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;QACZ,MAAM,EAAE,IAAI;KACb,CAAC,CACH;SACA,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;QAChB,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 {\n campaign,\n candidacy,\n client,\n person,\n referral,\n referralPayout\n} 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 clientPerson: AdminReferralPersonSelectSchema.nullable().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 payouts: z\n .array(\n createSelectSchema(referralPayout).pick({\n id: true,\n amount: true,\n paidAt: true,\n reason: true\n })\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 campaignId: 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"]}
|
|
@@ -156,7 +156,9 @@ export declare const AdminTodoCreateSchema: import("drizzle-zod").BuildSchema<"i
|
|
|
156
156
|
identity: undefined;
|
|
157
157
|
generated: undefined;
|
|
158
158
|
}, {}, {}>;
|
|
159
|
-
},
|
|
159
|
+
}, {
|
|
160
|
+
resolvedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
161
|
+
}, undefined>;
|
|
160
162
|
export declare const AdminTodoSelectSchema: import("drizzle-zod").BuildSchema<"select", {
|
|
161
163
|
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
162
164
|
name: "id";
|
|
@@ -470,7 +472,9 @@ export declare const AdminTodoUpdateSchema: import("drizzle-zod").BuildSchema<"u
|
|
|
470
472
|
identity: undefined;
|
|
471
473
|
generated: undefined;
|
|
472
474
|
}, {}, {}>;
|
|
473
|
-
},
|
|
475
|
+
}, {
|
|
476
|
+
resolvedAt: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
|
|
477
|
+
}, undefined>;
|
|
474
478
|
export declare const AdminTodoParamsSchema: z.ZodObject<{
|
|
475
479
|
id: z.ZodUUID;
|
|
476
480
|
}, {
|
|
@@ -6,9 +6,13 @@ const core_1 = require("../../core");
|
|
|
6
6
|
const utils_1 = require("../../../utils");
|
|
7
7
|
const v4_1 = require("zod/v4");
|
|
8
8
|
//// validators
|
|
9
|
-
exports.AdminTodoCreateSchema = (0, drizzle_zod_1.createInsertSchema)(core_1.todo
|
|
9
|
+
exports.AdminTodoCreateSchema = (0, drizzle_zod_1.createInsertSchema)(core_1.todo, {
|
|
10
|
+
resolvedAt: v4_1.z.coerce.date().optional()
|
|
11
|
+
});
|
|
10
12
|
exports.AdminTodoSelectSchema = (0, drizzle_zod_1.createSelectSchema)(core_1.todo);
|
|
11
|
-
exports.AdminTodoUpdateSchema = (0, drizzle_zod_1.createUpdateSchema)(core_1.todo
|
|
13
|
+
exports.AdminTodoUpdateSchema = (0, drizzle_zod_1.createUpdateSchema)(core_1.todo, {
|
|
14
|
+
resolvedAt: v4_1.z.coerce.date().optional().nullable()
|
|
15
|
+
});
|
|
12
16
|
exports.AdminTodoParamsSchema = exports.AdminTodoSelectSchema.pick({
|
|
13
17
|
id: true
|
|
14
18
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/todos/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAAiC;AACjC,0CAAmE;AACnE,+BAA0B;AAE1B,eAAe;AAEF,QAAA,qBAAqB,GAAG,IAAA,gCAAkB,EAAC,WAAI,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/todos/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAAiC;AACjC,0CAAmE;AACnE,+BAA0B;AAE1B,eAAe;AAEF,QAAA,qBAAqB,GAAG,IAAA,gCAAkB,EAAC,WAAI,EAAE;IAC5D,UAAU,EAAE,MAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAA;AACW,QAAA,qBAAqB,GAAG,IAAA,gCAAkB,EAAC,WAAI,CAAC,CAAA;AAChD,QAAA,qBAAqB,GAAG,IAAA,gCAAkB,EAAC,WAAI,EAAE;IAC5D,UAAU,EAAE,MAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAClD,CAAC,CAAA;AAEW,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,MAAC;SACN,MAAM,CAAC;QACN,UAAU,EAAE,MAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;KACnC,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAA;AACW,QAAA,2BAA2B,GAAG,6BAAqB,CAAA;AACnD,QAAA,2BAA2B,GAAG,6BAAqB,CAAA","sourcesContent":["import {\n createInsertSchema,\n createSelectSchema,\n createUpdateSchema\n} from 'drizzle-zod'\nimport { todo } from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\n\n//// validators\n\nexport const AdminTodoCreateSchema = createInsertSchema(todo, {\n resolvedAt: z.coerce.date().optional()\n})\nexport const AdminTodoSelectSchema = createSelectSchema(todo)\nexport const AdminTodoUpdateSchema = createUpdateSchema(todo, {\n resolvedAt: z.coerce.date().optional().nullable()\n})\n\nexport const AdminTodoParamsSchema = AdminTodoSelectSchema.pick({\n id: true\n})\nexport const AdminTodoListQuerySchema = ListQuerySchema.extend({\n filter: z\n .object({\n isResolved: z.boolean().optional()\n })\n .optional()\n})\nexport const AdminTodoUpdateParamsSchema = AdminTodoParamsSchema\nexport const AdminTodoDeleteParamsSchema = AdminTodoParamsSchema\n\n//// types\n\ntype AdminTodo = z.infer<typeof AdminTodoSelectSchema>\n\n// detail\nexport type AdminTodoParams = z.infer<typeof AdminTodoParamsSchema>\nexport type AdminTodoResult = AdminTodo\n\n// list\nexport type AdminTodoListQuery = z.infer<typeof AdminTodoListQuerySchema>\nexport type AdminTodoListResult = ListResponse<\n z.infer<typeof AdminTodoSelectSchema>\n>\n\n// create\nexport type AdminTodoCreateInput = z.infer<typeof AdminTodoCreateSchema>\nexport type AdminTodoCreateResult = Pick<AdminTodo, 'id'>\n\n// update\nexport type AdminTodoUpdateParams = z.infer<typeof AdminTodoUpdateParamsSchema>\nexport type AdminTodoUpdateInput = z.infer<typeof AdminTodoUpdateSchema>\n\n// delete\nexport type AdminTodoDeleteParams = z.infer<typeof AdminTodoDeleteParamsSchema>\n"]}
|