mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
feat(api): ✨ Finish push notification delivery
This commit is contained in:
parent
d096ab830c
commit
d839c274b1
12 changed files with 457 additions and 9 deletions
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue