feat(api): Finish push notification delivery

This commit is contained in:
Jesse Wierzbinski 2025-01-02 02:45:40 +01:00
parent d096ab830c
commit d839c274b1
No known key found for this signature in database
12 changed files with 457 additions and 9 deletions

View file

@ -454,6 +454,33 @@ export const configValidator = z
key: "",
},
}),
notifications: z
.object({
push: z
.object({
enabled: z.boolean().default(true),
vapid: z
.object({
public: z.string(),
private: z.string(),
subject: z.string().optional(),
})
.strict()
.default({
public: "",
private: "",
}),
})
.strict()
.default({
enabled: true,
vapid: {
public: "",
private: "",
},
}),
})
.strict(),
defaults: z
.object({
visibility: z.string().default("public"),
@ -585,6 +612,24 @@ export const configValidator = z
remove_on_complete: 60 * 60 * 24 * 365,
remove_on_failure: 60 * 60 * 24 * 365,
}),
push: z
.object({
remove_on_complete: z
.number()
.int()
// 1 year
.default(60 * 60 * 24 * 365),
remove_on_failure: z
.number()
.int()
// 1 year
.default(60 * 60 * 24 * 365),
})
.strict()
.default({
remove_on_complete: 60 * 60 * 24 * 365,
remove_on_failure: 60 * 60 * 24 * 365,
}),
})
.strict()
.default({
@ -600,6 +645,10 @@ export const configValidator = z
remove_on_complete: 60 * 60 * 24 * 365,
remove_on_failure: 60 * 60 * 24 * 365,
},
push: {
remove_on_complete: 60 * 60 * 24 * 365,
remove_on_failure: 60 * 60 * 24 * 365,
},
}),
instance: z
.object({