Skip to content

Commit

Permalink
feature(schemas): Add Easter Rabbit to Items (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianWendelborn authored May 9, 2024
2 parents 9e788e3 + 3a99dff commit c833d2e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/schemas/source/api/items/strict.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { UPPER_SNAKE_CASE_REGEX } from '../bazaar/common'
import { apiResponseSchema } from '../../common'

import { skinSchema } from './common'
import { EasterRabbit } from '../../enums/easter'

const statsSchemaStrict = z
.preprocess(
Expand Down Expand Up @@ -478,6 +479,12 @@ export const itemsResponseSchemaStrict = apiResponseSchema
type: z.literal('DUNGEON_TIER'),
})
.strict(),
z
.object({
rabbit: z.nativeEnum(EasterRabbit),
type: z.literal('EASTER_RABBIT'),
})
.strict(),
z
.object({
level: z.number().int().min(1),
Expand Down
3 changes: 3 additions & 0 deletions packages/schemas/source/enums/easter.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export enum EasterRabbit {
ZORRO = 'ZORRO',
}
1 change: 1 addition & 0 deletions packages/schemas/source/enums/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export * from './crimson-isle-faction'
export * from './dungeons'
export * from './easter'
export * from './gems'
export * from './items'
export * from './minions'
Expand Down

0 comments on commit c833d2e

Please sign in to comment.