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
4 changed files with 39 additions and 4 deletions
Showing only changes of commit 728ea32c16 - Show all commits

8
.env
View file

@ -1,2 +1,6 @@
VITE_APP_VERSION=1.0.0-alpha
DATABASE_URL="postgres://hestia:test123@localhost:5432/hestia"
# TWILIO
VITE_TWILIO_ACCOUNT_SID=
VITE_TWILIO_AUTH_TOKEN=
# PRISMA
DATABASE_URL="file:./dev.db"
piopi commented 2024-12-31 22:28:14 -05:00 (Migrated from github.com)
Review

Prefill them please with CHANGE_ME

Prefill them please with CHANGE_ME

View file

@ -1,3 +1,4 @@
import { version } from '$app/environment';
import { builder } from '../builder';
builder.queryType({});
@ -5,7 +6,7 @@ builder.queryType({});
builder.queryField('version', (t) =>
t.string({
description: 'Application version',
resolve: (parent, args, context) => context.config.app_version,
resolve: () => version
})
);

View file

@ -0,0 +1,27 @@
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 { logger } from '$lib/server/logger';
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 { z } from 'zod';
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`
export interface 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`
twilio_account_sid: 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`
twilio_auth_token: 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`
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 => {
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 { success, data, error } = z
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`
.object({
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_ACCOUNT_SID: 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`
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`
.safeParse(import.meta.env);
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`
if (!success) {
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`
logger.error(error.message);
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`
return {
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_account_sid: data!.VITE_TWILIO_ACCOUNT_SID,
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_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`
};
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`
export const TwilioConfig = LoadConfig();
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`

View file

@ -8,6 +8,9 @@ const config = {
preprocess: vitePreprocess(),
kit: {
version: {
name: '1.0.0-alpha'
},
// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
@ -15,4 +18,4 @@ const config = {
},
};
export default config;
export default config;