File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 1- pnpm exec lint-staged
1+ npm test
Original file line number Diff line number Diff line change 1+ import { z } from 'zod'
2+
3+ const translationKeySchema = z . string ( ) . brand ( 'translation-key' )
4+ export type TranslationKey = z . infer < typeof translationKeySchema >
5+
6+ const translationLanguageSchema = z . string ( ) . brand ( 'translation-language' )
7+ export type TranslationLanguage = z . infer < typeof translationLanguageSchema >
8+
9+ const translationValueSchema = z . string ( ) . brand ( 'translation-value' )
10+ export type TranslationValue = z . infer < typeof translationValueSchema >
11+
12+ const addTranslationCommandSchema = z . object ( {
13+ key : translationKeySchema ,
14+ lang : translationLanguageSchema ,
15+ value : translationValueSchema
16+ } )
17+ export type AddTranslationCommand = z . infer < typeof addTranslationCommandSchema >
18+
19+ export const translationPOSTRequestSchema = addTranslationCommandSchema . array ( )
20+
21+ export const translationsDELETERequestSchema = translationKeySchema . array ( )
22+
23+ const frontendAdapterSchema = z . enum ( [ 'typesafe-i18n' , 'other' ] )
24+
25+ export const projectConfigPOSTRequestSchema = z . object ( {
26+ frontendAdapter : frontendAdapterSchema
27+ } )
You can’t perform that action at this time.
0 commit comments