Skip to content

Commit

Permalink
feat(utils): expand mint params to encapsulate all combinations of fi…
Browse files Browse the repository at this point in the history
…lters
  • Loading branch information
sammccord committed Aug 21, 2024
1 parent 20390ad commit ab67847
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/dry-ducks-sleep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rabbitholegg/questdk-plugin-utils": minor
---

allow any combination of filters in mint params
3 changes: 3 additions & 0 deletions packages/utils/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

export {
CHAIN_TO_TOKENS,
Chains,
Expand Down Expand Up @@ -93,6 +94,7 @@ export type {
PremintValidationParams,
PremintActionDetail,
PremintActionForm,
Primitive,
} from './types'

export {
Expand Down Expand Up @@ -141,6 +143,7 @@ export {
PremintActionDetailSchema,
PremintActionFormSchema,
// Filter Schemas
// Primitive,
NumericSchema,
NumericOperatorSchema,
BitmaskFilterSchema,
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/src/types/filters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export const TransactionFilterSchema: z.ZodType<TransactionFilter> = z.record(
z.lazy(() => FilterSchema),
)

type Primitive = string | number | boolean | bigint
export type Primitive = string | number | boolean | bigint
export const PrimitiveSchema = z.union([z.string(), z.number(), z.boolean(), z.bigint()])

export type FilterObject = {
Expand Down
1 change: 1 addition & 0 deletions packages/utils/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export {
export { ActionType, OrderType } from './actions'

export type {
Primitive,
FilterObject,
BitmaskFilter,
NthFilter,
Expand Down

0 comments on commit ab67847

Please sign in to comment.