feat: expand outreach targeting and messaging
This commit is contained in:
1 parent
7defff422d
commit
d0a8bd0e2f
40 files changed
+890
-82
No files matched your search
@@ -37,6 +37,22 @@ export const SubredditConfigSchema = z.object({
|
||||
|
||||
export type SubredditConfig = z.infer<typeof SubredditConfigSchema>;
|
||||
|
||||
export const PhysiqueTargetingSchema = z.object({
|
||||
enabled: z.boolean().default(false),
|
||||
minScore: z.number().int().min(1).max(10).default(1),
|
||||
maxScore: z.number().int().min(1).max(10).default(10),
|
||||
}).superRefine((targeting, context) => {
|
||||
if (targeting.minScore > targeting.maxScore) {
|
||||
context.addIssue({
|
||||
code: 'custom',
|
||||
path: ['minScore'],
|
||||
message: 'Minimum physique score cannot exceed maximum physique score.',
|
||||
});
|
||||
}
|
||||
}).default({ enabled: false, minScore: 1, maxScore: 10 });
|
||||
|
||||
export type PhysiqueTargeting = z.infer<typeof PhysiqueTargetingSchema>;
|
||||
|
||||
const SubredditEntrySchema = z
|
||||
.union([z.string().transform((s) => ({ name: s })), z.object({}).passthrough()])
|
||||
.pipe(SubredditConfigSchema);
|
||||
@@ -51,6 +67,7 @@ export const ConfigSchema = z.object({
|
||||
prioritizeRecentPosts: z.boolean().default(false),
|
||||
recentWindowMinutes: z.number().positive().default(60),
|
||||
maxReadyCandidates: z.number().int().min(1).max(500).default(25),
|
||||
physiqueTargeting: PhysiqueTargetingSchema,
|
||||
sellerKeywords: z
|
||||
.array(z.string())
|
||||
.default([
|
||||
|
||||
Reference in new issue
Block a user