@the-inkwell/shared 0.2.185 → 0.2.187
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/constants.d.ts +0 -18
- package/dist/constants.js +1 -7
- package/dist/constants.js.map +1 -1
- package/dist/schema/admin/campaigns/index.d.ts +88 -97
- package/dist/schema/admin/campaigns/index.js +2 -33
- package/dist/schema/admin/campaigns/index.js.map +1 -1
- package/dist/schema/admin/index.d.ts +1 -1
- package/dist/schema/admin/index.js +1 -1
- package/dist/schema/admin/index.js.map +1 -1
- package/dist/schema/admin/matches/index.d.ts +383 -0
- package/dist/schema/admin/matches/index.js +26 -0
- package/dist/schema/admin/matches/index.js.map +1 -0
- package/dist/schema/admin/positions/index.d.ts +27 -25
- package/dist/schema/admin/positions/index.js +3 -1
- package/dist/schema/admin/positions/index.js.map +1 -1
- package/dist/schema/admin/referrals/index.d.ts +5 -5
- package/dist/schema/admin/referralsToMessages/index.d.ts +1 -1
- package/dist/schema/core.d.ts +87 -170
- package/dist/schema/core.js +49 -31
- package/dist/schema/core.js.map +1 -1
- package/dist/utils.d.ts +25 -0
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,383 @@
|
|
|
1
|
+
import { type ListResponse } from '../../../utils';
|
|
2
|
+
import { z } from 'zod/v4';
|
|
3
|
+
export declare const AdminMatchCreateSchema: import("drizzle-zod").BuildSchema<"insert", {
|
|
4
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
5
|
+
name: "id";
|
|
6
|
+
tableName: "matches";
|
|
7
|
+
dataType: "string";
|
|
8
|
+
columnType: "PgUUID";
|
|
9
|
+
data: string;
|
|
10
|
+
driverParam: string;
|
|
11
|
+
notNull: true;
|
|
12
|
+
hasDefault: true;
|
|
13
|
+
isPrimaryKey: true;
|
|
14
|
+
isAutoincrement: false;
|
|
15
|
+
hasRuntimeDefault: false;
|
|
16
|
+
enumValues: undefined;
|
|
17
|
+
baseColumn: never;
|
|
18
|
+
identity: undefined;
|
|
19
|
+
generated: undefined;
|
|
20
|
+
}, {}, {}>;
|
|
21
|
+
personId: import("drizzle-orm/pg-core").PgColumn<{
|
|
22
|
+
name: "personId";
|
|
23
|
+
tableName: "matches";
|
|
24
|
+
dataType: "string";
|
|
25
|
+
columnType: "PgUUID";
|
|
26
|
+
data: string;
|
|
27
|
+
driverParam: string;
|
|
28
|
+
notNull: true;
|
|
29
|
+
hasDefault: false;
|
|
30
|
+
isPrimaryKey: false;
|
|
31
|
+
isAutoincrement: false;
|
|
32
|
+
hasRuntimeDefault: false;
|
|
33
|
+
enumValues: undefined;
|
|
34
|
+
baseColumn: never;
|
|
35
|
+
identity: undefined;
|
|
36
|
+
generated: undefined;
|
|
37
|
+
}, {}, {}>;
|
|
38
|
+
positionId: import("drizzle-orm/pg-core").PgColumn<{
|
|
39
|
+
name: "positionId";
|
|
40
|
+
tableName: "matches";
|
|
41
|
+
dataType: "string";
|
|
42
|
+
columnType: "PgUUID";
|
|
43
|
+
data: string;
|
|
44
|
+
driverParam: string;
|
|
45
|
+
notNull: true;
|
|
46
|
+
hasDefault: false;
|
|
47
|
+
isPrimaryKey: false;
|
|
48
|
+
isAutoincrement: false;
|
|
49
|
+
hasRuntimeDefault: false;
|
|
50
|
+
enumValues: undefined;
|
|
51
|
+
baseColumn: never;
|
|
52
|
+
identity: undefined;
|
|
53
|
+
generated: undefined;
|
|
54
|
+
}, {}, {}>;
|
|
55
|
+
campaignId: import("drizzle-orm/pg-core").PgColumn<{
|
|
56
|
+
name: "campaignId";
|
|
57
|
+
tableName: "matches";
|
|
58
|
+
dataType: "string";
|
|
59
|
+
columnType: "PgUUID";
|
|
60
|
+
data: string;
|
|
61
|
+
driverParam: string;
|
|
62
|
+
notNull: false;
|
|
63
|
+
hasDefault: false;
|
|
64
|
+
isPrimaryKey: false;
|
|
65
|
+
isAutoincrement: false;
|
|
66
|
+
hasRuntimeDefault: false;
|
|
67
|
+
enumValues: undefined;
|
|
68
|
+
baseColumn: never;
|
|
69
|
+
identity: undefined;
|
|
70
|
+
generated: undefined;
|
|
71
|
+
}, {}, {}>;
|
|
72
|
+
criteria: import("drizzle-orm/pg-core").PgColumn<{
|
|
73
|
+
name: "criteria";
|
|
74
|
+
tableName: "matches";
|
|
75
|
+
dataType: "json";
|
|
76
|
+
columnType: "PgJsonb";
|
|
77
|
+
data: {
|
|
78
|
+
person: import("../../../utils").MatchCriteria;
|
|
79
|
+
referrer: import("../../../utils").MatchCriteria;
|
|
80
|
+
};
|
|
81
|
+
driverParam: unknown;
|
|
82
|
+
notNull: false;
|
|
83
|
+
hasDefault: false;
|
|
84
|
+
isPrimaryKey: false;
|
|
85
|
+
isAutoincrement: false;
|
|
86
|
+
hasRuntimeDefault: false;
|
|
87
|
+
enumValues: undefined;
|
|
88
|
+
baseColumn: never;
|
|
89
|
+
identity: undefined;
|
|
90
|
+
generated: undefined;
|
|
91
|
+
}, {}, {
|
|
92
|
+
$type: {
|
|
93
|
+
person: import("../../../utils").MatchCriteria;
|
|
94
|
+
referrer: import("../../../utils").MatchCriteria;
|
|
95
|
+
};
|
|
96
|
+
}>;
|
|
97
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
98
|
+
name: "createdAt";
|
|
99
|
+
tableName: "matches";
|
|
100
|
+
dataType: "date";
|
|
101
|
+
columnType: "PgTimestamp";
|
|
102
|
+
data: Date;
|
|
103
|
+
driverParam: string;
|
|
104
|
+
notNull: true;
|
|
105
|
+
hasDefault: true;
|
|
106
|
+
isPrimaryKey: false;
|
|
107
|
+
isAutoincrement: false;
|
|
108
|
+
hasRuntimeDefault: false;
|
|
109
|
+
enumValues: undefined;
|
|
110
|
+
baseColumn: never;
|
|
111
|
+
identity: undefined;
|
|
112
|
+
generated: undefined;
|
|
113
|
+
}, {}, {}>;
|
|
114
|
+
}, undefined, undefined>;
|
|
115
|
+
export declare const AdminMatchSelectSchema: import("drizzle-zod").BuildSchema<"select", {
|
|
116
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
117
|
+
name: "id";
|
|
118
|
+
tableName: "matches";
|
|
119
|
+
dataType: "string";
|
|
120
|
+
columnType: "PgUUID";
|
|
121
|
+
data: string;
|
|
122
|
+
driverParam: string;
|
|
123
|
+
notNull: true;
|
|
124
|
+
hasDefault: true;
|
|
125
|
+
isPrimaryKey: true;
|
|
126
|
+
isAutoincrement: false;
|
|
127
|
+
hasRuntimeDefault: false;
|
|
128
|
+
enumValues: undefined;
|
|
129
|
+
baseColumn: never;
|
|
130
|
+
identity: undefined;
|
|
131
|
+
generated: undefined;
|
|
132
|
+
}, {}, {}>;
|
|
133
|
+
personId: import("drizzle-orm/pg-core").PgColumn<{
|
|
134
|
+
name: "personId";
|
|
135
|
+
tableName: "matches";
|
|
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: import("../../../utils").MatchCriteria;
|
|
191
|
+
referrer: import("../../../utils").MatchCriteria;
|
|
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: import("../../../utils").MatchCriteria;
|
|
206
|
+
referrer: import("../../../utils").MatchCriteria;
|
|
207
|
+
};
|
|
208
|
+
}>;
|
|
209
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
210
|
+
name: "createdAt";
|
|
211
|
+
tableName: "matches";
|
|
212
|
+
dataType: "date";
|
|
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>;
|
|
227
|
+
export declare const AdminMatchUpdateSchema: import("drizzle-zod").BuildSchema<"update", {
|
|
228
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
229
|
+
name: "id";
|
|
230
|
+
tableName: "matches";
|
|
231
|
+
dataType: "string";
|
|
232
|
+
columnType: "PgUUID";
|
|
233
|
+
data: string;
|
|
234
|
+
driverParam: string;
|
|
235
|
+
notNull: true;
|
|
236
|
+
hasDefault: true;
|
|
237
|
+
isPrimaryKey: true;
|
|
238
|
+
isAutoincrement: false;
|
|
239
|
+
hasRuntimeDefault: false;
|
|
240
|
+
enumValues: undefined;
|
|
241
|
+
baseColumn: never;
|
|
242
|
+
identity: undefined;
|
|
243
|
+
generated: undefined;
|
|
244
|
+
}, {}, {}>;
|
|
245
|
+
personId: import("drizzle-orm/pg-core").PgColumn<{
|
|
246
|
+
name: "personId";
|
|
247
|
+
tableName: "matches";
|
|
248
|
+
dataType: "string";
|
|
249
|
+
columnType: "PgUUID";
|
|
250
|
+
data: string;
|
|
251
|
+
driverParam: string;
|
|
252
|
+
notNull: true;
|
|
253
|
+
hasDefault: false;
|
|
254
|
+
isPrimaryKey: false;
|
|
255
|
+
isAutoincrement: false;
|
|
256
|
+
hasRuntimeDefault: false;
|
|
257
|
+
enumValues: undefined;
|
|
258
|
+
baseColumn: never;
|
|
259
|
+
identity: undefined;
|
|
260
|
+
generated: undefined;
|
|
261
|
+
}, {}, {}>;
|
|
262
|
+
positionId: import("drizzle-orm/pg-core").PgColumn<{
|
|
263
|
+
name: "positionId";
|
|
264
|
+
tableName: "matches";
|
|
265
|
+
dataType: "string";
|
|
266
|
+
columnType: "PgUUID";
|
|
267
|
+
data: string;
|
|
268
|
+
driverParam: string;
|
|
269
|
+
notNull: true;
|
|
270
|
+
hasDefault: false;
|
|
271
|
+
isPrimaryKey: false;
|
|
272
|
+
isAutoincrement: false;
|
|
273
|
+
hasRuntimeDefault: false;
|
|
274
|
+
enumValues: undefined;
|
|
275
|
+
baseColumn: never;
|
|
276
|
+
identity: undefined;
|
|
277
|
+
generated: undefined;
|
|
278
|
+
}, {}, {}>;
|
|
279
|
+
campaignId: import("drizzle-orm/pg-core").PgColumn<{
|
|
280
|
+
name: "campaignId";
|
|
281
|
+
tableName: "matches";
|
|
282
|
+
dataType: "string";
|
|
283
|
+
columnType: "PgUUID";
|
|
284
|
+
data: string;
|
|
285
|
+
driverParam: string;
|
|
286
|
+
notNull: false;
|
|
287
|
+
hasDefault: false;
|
|
288
|
+
isPrimaryKey: false;
|
|
289
|
+
isAutoincrement: false;
|
|
290
|
+
hasRuntimeDefault: false;
|
|
291
|
+
enumValues: undefined;
|
|
292
|
+
baseColumn: never;
|
|
293
|
+
identity: undefined;
|
|
294
|
+
generated: undefined;
|
|
295
|
+
}, {}, {}>;
|
|
296
|
+
criteria: import("drizzle-orm/pg-core").PgColumn<{
|
|
297
|
+
name: "criteria";
|
|
298
|
+
tableName: "matches";
|
|
299
|
+
dataType: "json";
|
|
300
|
+
columnType: "PgJsonb";
|
|
301
|
+
data: {
|
|
302
|
+
person: import("../../../utils").MatchCriteria;
|
|
303
|
+
referrer: import("../../../utils").MatchCriteria;
|
|
304
|
+
};
|
|
305
|
+
driverParam: unknown;
|
|
306
|
+
notNull: false;
|
|
307
|
+
hasDefault: false;
|
|
308
|
+
isPrimaryKey: false;
|
|
309
|
+
isAutoincrement: false;
|
|
310
|
+
hasRuntimeDefault: false;
|
|
311
|
+
enumValues: undefined;
|
|
312
|
+
baseColumn: never;
|
|
313
|
+
identity: undefined;
|
|
314
|
+
generated: undefined;
|
|
315
|
+
}, {}, {
|
|
316
|
+
$type: {
|
|
317
|
+
person: import("../../../utils").MatchCriteria;
|
|
318
|
+
referrer: import("../../../utils").MatchCriteria;
|
|
319
|
+
};
|
|
320
|
+
}>;
|
|
321
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
322
|
+
name: "createdAt";
|
|
323
|
+
tableName: "matches";
|
|
324
|
+
dataType: "date";
|
|
325
|
+
columnType: "PgTimestamp";
|
|
326
|
+
data: Date;
|
|
327
|
+
driverParam: string;
|
|
328
|
+
notNull: true;
|
|
329
|
+
hasDefault: true;
|
|
330
|
+
isPrimaryKey: false;
|
|
331
|
+
isAutoincrement: false;
|
|
332
|
+
hasRuntimeDefault: false;
|
|
333
|
+
enumValues: undefined;
|
|
334
|
+
baseColumn: never;
|
|
335
|
+
identity: undefined;
|
|
336
|
+
generated: undefined;
|
|
337
|
+
}, {}, {}>;
|
|
338
|
+
}, undefined, undefined>;
|
|
339
|
+
export declare const AdminMatchParamsSchema: z.ZodObject<{
|
|
340
|
+
id: z.ZodUUID;
|
|
341
|
+
}, {
|
|
342
|
+
out: {};
|
|
343
|
+
in: {};
|
|
344
|
+
}>;
|
|
345
|
+
export declare const AdminMatchListQuerySchema: z.ZodObject<{
|
|
346
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
347
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
348
|
+
sort: z.ZodOptional<z.ZodObject<{
|
|
349
|
+
field: z.ZodString;
|
|
350
|
+
direction: z.ZodEnum<{
|
|
351
|
+
asc: "asc";
|
|
352
|
+
desc: "desc";
|
|
353
|
+
}>;
|
|
354
|
+
}, z.core.$strip>>;
|
|
355
|
+
filter: z.ZodOptional<z.ZodObject<{
|
|
356
|
+
personId: z.ZodOptional<z.ZodString>;
|
|
357
|
+
positionId: z.ZodOptional<z.ZodString>;
|
|
358
|
+
campaignId: z.ZodOptional<z.ZodString>;
|
|
359
|
+
}, z.core.$strip>>;
|
|
360
|
+
}, z.core.$strip>;
|
|
361
|
+
export declare const AdminMatchUpdateParamsSchema: z.ZodObject<{
|
|
362
|
+
id: z.ZodUUID;
|
|
363
|
+
}, {
|
|
364
|
+
out: {};
|
|
365
|
+
in: {};
|
|
366
|
+
}>;
|
|
367
|
+
export declare const AdminMatchDeleteParamsSchema: z.ZodObject<{
|
|
368
|
+
id: z.ZodUUID;
|
|
369
|
+
}, {
|
|
370
|
+
out: {};
|
|
371
|
+
in: {};
|
|
372
|
+
}>;
|
|
373
|
+
type AdminMatch = z.infer<typeof AdminMatchSelectSchema>;
|
|
374
|
+
export type AdminMatchParams = z.infer<typeof AdminMatchParamsSchema>;
|
|
375
|
+
export type AdminMatchResult = AdminMatch;
|
|
376
|
+
export type AdminMatchListQuery = z.infer<typeof AdminMatchListQuerySchema>;
|
|
377
|
+
export type AdminMatchListResult = ListResponse<z.infer<typeof AdminMatchSelectSchema>>;
|
|
378
|
+
export type AdminMatchCreateInput = z.infer<typeof AdminMatchCreateSchema>;
|
|
379
|
+
export type AdminMatchCreateResult = Pick<AdminMatch, 'id'>;
|
|
380
|
+
export type AdminMatchUpdateParams = z.infer<typeof AdminMatchUpdateParamsSchema>;
|
|
381
|
+
export type AdminMatchUpdateInput = z.infer<typeof AdminMatchUpdateSchema>;
|
|
382
|
+
export type AdminMatchDeleteParams = z.infer<typeof AdminMatchDeleteParamsSchema>;
|
|
383
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminMatchDeleteParamsSchema = exports.AdminMatchUpdateParamsSchema = exports.AdminMatchListQuerySchema = exports.AdminMatchParamsSchema = exports.AdminMatchUpdateSchema = exports.AdminMatchSelectSchema = exports.AdminMatchCreateSchema = void 0;
|
|
4
|
+
const drizzle_zod_1 = require("drizzle-zod");
|
|
5
|
+
const core_1 = require("../../core");
|
|
6
|
+
const utils_1 = require("../../../utils");
|
|
7
|
+
const v4_1 = require("zod/v4");
|
|
8
|
+
//// validators
|
|
9
|
+
exports.AdminMatchCreateSchema = (0, drizzle_zod_1.createInsertSchema)(core_1.match);
|
|
10
|
+
exports.AdminMatchSelectSchema = (0, drizzle_zod_1.createSelectSchema)(core_1.match);
|
|
11
|
+
exports.AdminMatchUpdateSchema = (0, drizzle_zod_1.createUpdateSchema)(core_1.match);
|
|
12
|
+
exports.AdminMatchParamsSchema = exports.AdminMatchSelectSchema.pick({
|
|
13
|
+
id: true
|
|
14
|
+
});
|
|
15
|
+
exports.AdminMatchListQuerySchema = utils_1.ListQuerySchema.extend({
|
|
16
|
+
filter: v4_1.z
|
|
17
|
+
.object({
|
|
18
|
+
personId: v4_1.z.string().optional(),
|
|
19
|
+
positionId: v4_1.z.string().optional(),
|
|
20
|
+
campaignId: v4_1.z.string().optional()
|
|
21
|
+
})
|
|
22
|
+
.optional()
|
|
23
|
+
});
|
|
24
|
+
exports.AdminMatchUpdateParamsSchema = exports.AdminMatchParamsSchema;
|
|
25
|
+
exports.AdminMatchDeleteParamsSchema = exports.AdminMatchParamsSchema;
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/matches/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAAkC;AAClC,0CAAmE;AACnE,+BAA0B;AAE1B,eAAe;AAEF,QAAA,sBAAsB,GAAG,IAAA,gCAAkB,EAAC,YAAK,CAAC,CAAA;AAClD,QAAA,sBAAsB,GAAG,IAAA,gCAAkB,EAAC,YAAK,CAAC,CAAA;AAClD,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;KAClC,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 } 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)\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 })\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"]}
|
|
@@ -137,9 +137,9 @@ export declare const AdminPositionCreateSchema: z.ZodObject<{
|
|
|
137
137
|
referralPlacementReward: z.ZodOptional<z.ZodInt>;
|
|
138
138
|
referralInterviewReward: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
139
139
|
retainerFee: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
140
|
+
retainerFeePaidAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
140
141
|
placementFee: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
|
|
141
|
-
|
|
142
|
-
isPlacementFeePaid: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
142
|
+
placementFeePaidAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
143
143
|
benefitHighlights: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
144
144
|
closedReason: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
145
145
|
PLACED: "PLACED";
|
|
@@ -284,9 +284,9 @@ export declare const AdminPositionSelectSchema: z.ZodObject<{
|
|
|
284
284
|
referralPlacementReward: z.ZodInt;
|
|
285
285
|
referralInterviewReward: z.ZodNullable<z.ZodInt>;
|
|
286
286
|
retainerFee: z.ZodNullable<z.ZodInt>;
|
|
287
|
+
retainerFeePaidAt: z.ZodNullable<z.ZodDate>;
|
|
287
288
|
placementFee: z.ZodNullable<z.ZodInt>;
|
|
288
|
-
|
|
289
|
-
isPlacementFeePaid: z.ZodNullable<z.ZodBoolean>;
|
|
289
|
+
placementFeePaidAt: z.ZodNullable<z.ZodDate>;
|
|
290
290
|
benefitHighlights: z.ZodNullable<z.ZodString>;
|
|
291
291
|
clientId: z.ZodUUID;
|
|
292
292
|
closedReason: z.ZodNullable<z.ZodEnum<{
|
|
@@ -829,13 +829,13 @@ export declare const AdminPositionUpdateSchema: import("drizzle-zod").BuildSchem
|
|
|
829
829
|
identity: undefined;
|
|
830
830
|
generated: undefined;
|
|
831
831
|
}, {}, {}>;
|
|
832
|
-
|
|
833
|
-
name: "
|
|
832
|
+
retainerFeePaidAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
833
|
+
name: "retainerFeePaidAt";
|
|
834
834
|
tableName: "positions";
|
|
835
|
-
dataType: "
|
|
836
|
-
columnType: "
|
|
837
|
-
data:
|
|
838
|
-
driverParam: string
|
|
835
|
+
dataType: "date";
|
|
836
|
+
columnType: "PgTimestamp";
|
|
837
|
+
data: Date;
|
|
838
|
+
driverParam: string;
|
|
839
839
|
notNull: false;
|
|
840
840
|
hasDefault: false;
|
|
841
841
|
isPrimaryKey: false;
|
|
@@ -846,15 +846,15 @@ export declare const AdminPositionUpdateSchema: import("drizzle-zod").BuildSchem
|
|
|
846
846
|
identity: undefined;
|
|
847
847
|
generated: undefined;
|
|
848
848
|
}, {}, {}>;
|
|
849
|
-
|
|
850
|
-
name: "
|
|
849
|
+
placementFee: import("drizzle-orm/pg-core").PgColumn<{
|
|
850
|
+
name: "placementFee";
|
|
851
851
|
tableName: "positions";
|
|
852
|
-
dataType: "
|
|
853
|
-
columnType: "
|
|
854
|
-
data:
|
|
855
|
-
driverParam:
|
|
852
|
+
dataType: "number";
|
|
853
|
+
columnType: "PgInteger";
|
|
854
|
+
data: number;
|
|
855
|
+
driverParam: string | number;
|
|
856
856
|
notNull: false;
|
|
857
|
-
hasDefault:
|
|
857
|
+
hasDefault: false;
|
|
858
858
|
isPrimaryKey: false;
|
|
859
859
|
isAutoincrement: false;
|
|
860
860
|
hasRuntimeDefault: false;
|
|
@@ -863,15 +863,15 @@ export declare const AdminPositionUpdateSchema: import("drizzle-zod").BuildSchem
|
|
|
863
863
|
identity: undefined;
|
|
864
864
|
generated: undefined;
|
|
865
865
|
}, {}, {}>;
|
|
866
|
-
|
|
867
|
-
name: "
|
|
866
|
+
placementFeePaidAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
867
|
+
name: "placementFeePaidAt";
|
|
868
868
|
tableName: "positions";
|
|
869
|
-
dataType: "
|
|
870
|
-
columnType: "
|
|
871
|
-
data:
|
|
872
|
-
driverParam:
|
|
869
|
+
dataType: "date";
|
|
870
|
+
columnType: "PgTimestamp";
|
|
871
|
+
data: Date;
|
|
872
|
+
driverParam: string;
|
|
873
873
|
notNull: false;
|
|
874
|
-
hasDefault:
|
|
874
|
+
hasDefault: false;
|
|
875
875
|
isPrimaryKey: false;
|
|
876
876
|
isAutoincrement: false;
|
|
877
877
|
hasRuntimeDefault: false;
|
|
@@ -1017,8 +1017,10 @@ export declare const AdminPositionUpdateSchema: import("drizzle-zod").BuildSchem
|
|
|
1017
1017
|
generated: undefined;
|
|
1018
1018
|
}, {}, {}>;
|
|
1019
1019
|
}, {
|
|
1020
|
-
openedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
|
|
1021
1020
|
closedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
|
|
1021
|
+
openedAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
|
|
1022
|
+
placementFeePaidAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
|
|
1023
|
+
retainerFeePaidAt: z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
|
|
1022
1024
|
}, undefined>;
|
|
1023
1025
|
export declare const AdminPositionParamsSchema: z.ZodObject<{
|
|
1024
1026
|
id: z.ZodUUID;
|
|
@@ -41,8 +41,10 @@ exports.AdminPositionSelectSchema = (0, drizzle_zod_1.createSelectSchema)(core_1
|
|
|
41
41
|
_openCandidaciesCount: v4_1.z.number().optional()
|
|
42
42
|
});
|
|
43
43
|
exports.AdminPositionUpdateSchema = (0, drizzle_zod_1.createUpdateSchema)(core_1.position, {
|
|
44
|
+
closedAt: v4_1.z.coerce.date().nullable().optional(),
|
|
44
45
|
openedAt: v4_1.z.coerce.date().nullable().optional(),
|
|
45
|
-
|
|
46
|
+
placementFeePaidAt: v4_1.z.coerce.date().nullable().optional(),
|
|
47
|
+
retainerFeePaidAt: v4_1.z.coerce.date().nullable().optional()
|
|
46
48
|
});
|
|
47
49
|
exports.AdminPositionParamsSchema = exports.AdminPositionSelectSchema.pick({
|
|
48
50
|
id: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/admin/positions/index.ts"],"names":[],"mappings":";;;AAAA,6CAIoB;AACpB,qCAAgF;AAChF,0CAAmE;AACnE,+BAA0B;AAE1B,eAAe;AAEF,QAAA,yBAAyB,GAAG,IAAA,gCAAkB,EAAC,eAAQ,CAAC,CAAC,IAAI,CAAC;IACzE,MAAM,EAAE,IAAI;CACb,CAAC,CAAA;AACW,QAAA,yBAAyB,GAAG,IAAA,gCAAkB,EAAC,eAAQ,CAAC,CAAC,MAAM,CAAC;IAC3E,MAAM,EAAE,IAAA,gCAAkB,EAAC,aAAM,CAAC;SAC/B,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,QAAQ,EAAE;IACb,WAAW,EAAE,IAAA,gCAAkB,EAAC,kBAAW,CAAC;SACzC,IAAI,CAAC;QACJ,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;KACX,CAAC;SACD,QAAQ,EAAE;IACb,MAAM,EAAE,MAAC,CAAC,KAAK,CACb,IAAA,gCAAkB,EAAC,YAAK,CAAC,CAAC,IAAI,CAAC;QAC7B,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,IAAI;KACX,CAAC,CACH;IACD,IAAI,EAAE,MAAC,CAAC,KAA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AAQ,EAAE;QAChC,QAAQ,EAAE,MAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAChC,CAAC;SACD,OAAO,EAAE;SACT,QAAQ,EAAE;CACd,CAAC,CAAA;AACW,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 { client, industry, jobFunction, position, skill, tag } from '../../core'\nimport { ListQuerySchema, type ListResponse } from '../../../utils'\nimport { z } from 'zod/v4'\n\n//// validators\n\nexport const AdminPositionCreateSchema = createInsertSchema(position).omit({\n idNano: true\n})\nexport const AdminPositionSelectSchema = createSelectSchema(position).extend({\n client: createSelectSchema(client)\n .pick({\n id: true,\n name: true\n })\n .nullable()\n .optional(),\n industry: createSelectSchema(industry)\n .pick({\n id: true,\n name: true\n })\n .nullable(),\n jobFunction: createSelectSchema(jobFunction)\n .pick({\n id: true,\n name: true\n })\n .nullable(),\n skills: z.array(\n createSelectSchema(skill).pick({\n id: true,\n name: true\n })\n ),\n tags: z.array(\n createSelectSchema(tag).pick({\n id: true,\n name: true\n })\n ),\n _referralsCount: z.number().optional(),\n _openCandidaciesCount: z.number().optional()\n})\nexport const AdminPositionUpdateSchema = createUpdateSchema(position, {\n closedAt: z.coerce.date().nullable().optional(),\n openedAt: z.coerce.date().nullable().optional(),\n placementFeePaidAt: z.coerce.date().nullable().optional(),\n retainerFeePaidAt: z.coerce.date().nullable().optional()\n})\n\nexport const AdminPositionParamsSchema = AdminPositionSelectSchema.pick({\n id: true\n})\nexport const AdminPositionListQuerySchema = ListQuerySchema.extend({\n filter: z\n .object({\n isClosed: z.boolean().optional(),\n clientId: z.string().optional()\n })\n .partial()\n .optional()\n})\nexport const AdminPositionUpdateParamsSchema = AdminPositionParamsSchema\nexport const AdminPositionDeleteParamsSchema = AdminPositionParamsSchema\n\n//// types\n\ntype AdminPosition = z.infer<typeof AdminPositionSelectSchema>\n\n// detail\nexport type AdminPositionParams = z.infer<typeof AdminPositionParamsSchema>\nexport type AdminPositionResult = AdminPosition\n\n// list\nexport type AdminPositionListQuery = z.infer<\n typeof AdminPositionListQuerySchema\n>\nexport type AdminPositionListResult = ListResponse<\n z.infer<typeof AdminPositionSelectSchema>\n>\n\n// create\nexport type AdminPositionCreateInput = z.infer<typeof AdminPositionCreateSchema>\nexport type AdminPositionCreateResult = Pick<AdminPosition, 'id'>\n\n// update\nexport type AdminPositionUpdateParams = z.infer<\n typeof AdminPositionUpdateParamsSchema\n>\nexport type AdminPositionUpdateInput = z.infer<typeof AdminPositionUpdateSchema>\n\n// delete\nexport type AdminPositionDeleteParams = z.infer<\n typeof AdminPositionDeleteParamsSchema\n>\n"]}
|
|
@@ -40,14 +40,14 @@ export declare const AdminReferralCreateSchema: import("drizzle-zod").BuildSchem
|
|
|
40
40
|
tableName: "referrals";
|
|
41
41
|
dataType: "string";
|
|
42
42
|
columnType: "PgEnumColumn";
|
|
43
|
-
data: "CLIENT" | "
|
|
43
|
+
data: "CLIENT" | "CANDIDACY" | "PERSON";
|
|
44
44
|
driverParam: string;
|
|
45
45
|
notNull: false;
|
|
46
46
|
hasDefault: false;
|
|
47
47
|
isPrimaryKey: false;
|
|
48
48
|
isAutoincrement: false;
|
|
49
49
|
hasRuntimeDefault: false;
|
|
50
|
-
enumValues: ["CLIENT" | "
|
|
50
|
+
enumValues: ["CLIENT" | "CANDIDACY" | "PERSON"];
|
|
51
51
|
baseColumn: never;
|
|
52
52
|
identity: undefined;
|
|
53
53
|
generated: undefined;
|
|
@@ -244,8 +244,8 @@ export declare const AdminReferralSelectSchema: z.ZodObject<{
|
|
|
244
244
|
}>>;
|
|
245
245
|
referralType: z.ZodNullable<z.ZodEnum<{
|
|
246
246
|
CLIENT: "CLIENT";
|
|
247
|
-
PERSON: "PERSON";
|
|
248
247
|
CANDIDACY: "CANDIDACY";
|
|
248
|
+
PERSON: "PERSON";
|
|
249
249
|
}>>;
|
|
250
250
|
networkId: z.ZodNullable<z.ZodUUID>;
|
|
251
251
|
referrerId: z.ZodUUID;
|
|
@@ -381,14 +381,14 @@ export declare const AdminReferralUpdateSchema: import("drizzle-zod").BuildSchem
|
|
|
381
381
|
tableName: "referrals";
|
|
382
382
|
dataType: "string";
|
|
383
383
|
columnType: "PgEnumColumn";
|
|
384
|
-
data: "CLIENT" | "
|
|
384
|
+
data: "CLIENT" | "CANDIDACY" | "PERSON";
|
|
385
385
|
driverParam: string;
|
|
386
386
|
notNull: false;
|
|
387
387
|
hasDefault: false;
|
|
388
388
|
isPrimaryKey: false;
|
|
389
389
|
isAutoincrement: false;
|
|
390
390
|
hasRuntimeDefault: false;
|
|
391
|
-
enumValues: ["CLIENT" | "
|
|
391
|
+
enumValues: ["CLIENT" | "CANDIDACY" | "PERSON"];
|
|
392
392
|
baseColumn: never;
|
|
393
393
|
identity: undefined;
|
|
394
394
|
generated: undefined;
|
|
@@ -125,8 +125,8 @@ export declare const AdminReferralToMessageSelectSchema: z.ZodObject<{
|
|
|
125
125
|
id: z.ZodUUID;
|
|
126
126
|
referralType: z.ZodNullable<z.ZodEnum<{
|
|
127
127
|
CLIENT: "CLIENT";
|
|
128
|
-
PERSON: "PERSON";
|
|
129
128
|
CANDIDACY: "CANDIDACY";
|
|
129
|
+
PERSON: "PERSON";
|
|
130
130
|
}>>;
|
|
131
131
|
}, z.core.$strip>;
|
|
132
132
|
}, {
|