⚡ (whatsapp) Improve whatsApp management and media collection
Closes #796
This commit is contained in:
@@ -31,14 +31,16 @@ export const createCredentials = authenticatedProcedure
|
||||
})
|
||||
.input(
|
||||
z.object({
|
||||
credentials: z.discriminatedUnion('type', [
|
||||
stripeCredentialsSchema.pick(inputShape),
|
||||
smtpCredentialsSchema.pick(inputShape),
|
||||
googleSheetsCredentialsSchema.pick(inputShape),
|
||||
openAICredentialsSchema.pick(inputShape),
|
||||
whatsAppCredentialsSchema.pick(inputShape),
|
||||
zemanticAiCredentialsSchema.pick(inputShape),
|
||||
]),
|
||||
credentials: z
|
||||
.discriminatedUnion('type', [
|
||||
stripeCredentialsSchema.pick(inputShape),
|
||||
smtpCredentialsSchema.pick(inputShape),
|
||||
googleSheetsCredentialsSchema.pick(inputShape),
|
||||
openAICredentialsSchema.pick(inputShape),
|
||||
whatsAppCredentialsSchema.pick(inputShape),
|
||||
zemanticAiCredentialsSchema.pick(inputShape),
|
||||
])
|
||||
.and(z.object({ id: z.string().cuid2().optional() })),
|
||||
})
|
||||
)
|
||||
.output(
|
||||
|
||||
Reference in New Issue
Block a user