12 implement twilio sms #37

Merged
BenjaminPalko merged 26 commits from 12-implement-twilio-sms into master 2025-01-02 20:11:28 -05:00
Showing only changes of commit 9451f5ceab - Show all commits

View file

@ -1,16 +1,19 @@
piopi commented 2024-12-31 22:43:38 -05:00 (Migrated from github.com)
Review

Add a script instead + add it to bun dev

Add a script instead + add it to `bun dev`
piopi commented 2024-12-31 22:43:38 -05:00 (Migrated from github.com)
Review

Add a script instead + add it to bun dev

Add a script instead + add it to `bun dev`
import { PhoneRegex } from '$lib/regex';
piopi commented 2024-12-31 22:43:38 -05:00 (Migrated from github.com)
Review

Add a script instead + add it to bun dev

Add a script instead + add it to `bun dev`
import { logger } from '$lib/server/logger'; import { logger } from '$lib/server/logger';
import { z } from 'zod'; import { z } from 'zod';
export interface TwilioConfiguration { export interface TwilioConfiguration {
twilio_account_sid: string; twilio_account_sid: string;
twilio_auth_token: string; twilio_auth_token: string;
twilio_phone_number: string;
piopi commented 2024-12-31 22:43:38 -05:00 (Migrated from github.com)
Review

Add a script instead + add it to bun dev

Add a script instead + add it to `bun dev`
} }
const LoadConfig = (): TwilioConfiguration => { const LoadConfig = (): TwilioConfiguration => {
const { success, data, error } = z const { success, data, error } = z
.object({ .object({
VITE_TWILIO_ACCOUNT_SID: z.string(), VITE_TWILIO_ACCOUNT_SID: z.string(),
VITE_TWILIO_AUTH_TOKEN: z.string() VITE_TWILIO_AUTH_TOKEN: z.string(),
piopi commented 2024-12-31 22:43:38 -05:00 (Migrated from github.com)
Review

Add a script instead + add it to bun dev

Add a script instead + add it to `bun dev`
piopi commented 2024-12-31 22:43:38 -05:00 (Migrated from github.com)
Review

Add a script instead + add it to bun dev

Add a script instead + add it to `bun dev`
VITE_TWILIO_PHONE_NUMBER: z.string().regex(PhoneRegex),
piopi commented 2024-12-31 22:43:38 -05:00 (Migrated from github.com)
Review

Add a script instead + add it to bun dev

Add a script instead + add it to `bun dev`
}) })
.safeParse(import.meta.env); .safeParse(import.meta.env);
@ -20,7 +23,8 @@ const LoadConfig = (): TwilioConfiguration => {
piopi commented 2024-12-31 22:43:38 -05:00 (Migrated from github.com)
Review

Add a script instead + add it to bun dev

Add a script instead + add it to `bun dev`
piopi commented 2024-12-31 22:43:38 -05:00 (Migrated from github.com)
Review

Add a script instead + add it to bun dev

Add a script instead + add it to `bun dev`
return { return {
twilio_account_sid: data!.VITE_TWILIO_ACCOUNT_SID, twilio_account_sid: data!.VITE_TWILIO_ACCOUNT_SID,
twilio_auth_token: data!.VITE_TWILIO_AUTH_TOKEN twilio_auth_token: data!.VITE_TWILIO_AUTH_TOKEN,
piopi commented 2024-12-31 22:43:38 -05:00 (Migrated from github.com)
Review

Add a script instead + add it to bun dev

Add a script instead + add it to `bun dev`
piopi commented 2024-12-31 22:43:38 -05:00 (Migrated from github.com)
Review

Add a script instead + add it to bun dev

Add a script instead + add it to `bun dev`
twilio_phone_number: data!.VITE_TWILIO_PHONE_NUMBER,
piopi commented 2024-12-31 22:43:38 -05:00 (Migrated from github.com)
Review

Add a script instead + add it to bun dev

Add a script instead + add it to `bun dev`
}; };
}; };

piopi commented 2024-12-31 22:43:38 -05:00 (Migrated from github.com)
Review

Add a script instead + add it to bun dev

Add a script instead + add it to `bun dev`
piopi commented 2024-12-31 22:43:38 -05:00 (Migrated from github.com)
Review

Add a script instead + add it to bun dev

Add a script instead + add it to `bun dev`