-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add eslint to github actions - update deps - closes #14 and type check config
- Loading branch information
1 parent
19126d4
commit aa5ff83
Showing
6 changed files
with
98 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: eslint-check | ||
on: | ||
push: | ||
branches: | ||
- "*" | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
jobs: | ||
eslint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install | ||
- run: npm run eslint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { z } from 'zod'; | ||
|
||
const configZod = z.object({ | ||
personalInfo: z.object({ | ||
firstName: z.string(), | ||
lastName: z.string(), | ||
dob: z.string(), | ||
email: z.string(), | ||
lastFourSSN: z.string(), | ||
phoneNumber: z.string().optional(), | ||
typeId: z.number().optional(), | ||
}), | ||
location: z.object({ | ||
zipCode: z.string(), | ||
miles: z.number(), | ||
preferredDays: z.number(), | ||
sameDay: z.boolean(), | ||
daysAround: z.object({ | ||
start: z.number(), | ||
end: z.number(), | ||
}), | ||
}), | ||
appSettings: z.object({ | ||
cancelIfExist: z.boolean().default(false), | ||
interval: z.number().default(10000), | ||
webserver: z.boolean().default(false), | ||
headersTimeout: z.number().default(20000), | ||
}), | ||
webhook: z.object({ | ||
enable: z.boolean().default(false), | ||
url: z.string().optional(), | ||
password: z.string().optional(), | ||
phoneNumber: z.string().optional(), | ||
sendMethod: z.union([z.literal('private-api'), z.literal('apple-script')]).default('apple-script'), | ||
phoneNumberType: z.union([z.literal('iMessage'), z.literal('SMS')]).default('SMS'), | ||
}), | ||
}); | ||
|
||
type Config = z.infer<typeof configZod>; | ||
|
||
export { Config, configZod }; |