chore: rename route from api-v2 to api (#7379)
* chore: rename route from api-v2 to api * chore: change oas references * chore: remove v2 ref
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
import { createFindParams, createSelectParams } from "../../utils/validators"
|
||||
import { z } from "zod"
|
||||
|
||||
export type AdminGetPricingRuleTypeParamsType = z.infer<
|
||||
typeof AdminGetPricingRuleTypeParams
|
||||
>
|
||||
export const AdminGetPricingRuleTypeParams = createSelectParams()
|
||||
|
||||
export type AdminGetPricingRuleTypesParamsType = z.infer<
|
||||
typeof AdminGetPricingRuleTypesParams
|
||||
>
|
||||
export const AdminGetPricingRuleTypesParams = createFindParams({
|
||||
limit: 100,
|
||||
offset: 0,
|
||||
}).merge(
|
||||
z.object({
|
||||
rule_attribute: z.union([z.string(), z.array(z.string())]).optional(),
|
||||
$and: z.lazy(() => AdminGetPricingRuleTypesParams.array()).optional(),
|
||||
$or: z.lazy(() => AdminGetPricingRuleTypesParams.array()).optional(),
|
||||
})
|
||||
)
|
||||
|
||||
export type AdminCreatePricingRuleTypeType = z.infer<
|
||||
typeof AdminCreatePricingRuleType
|
||||
>
|
||||
export const AdminCreatePricingRuleType = z
|
||||
.object({
|
||||
name: z.string(),
|
||||
rule_attribute: z.string(),
|
||||
default_priority: z.number(),
|
||||
})
|
||||
.strict()
|
||||
|
||||
export type AdminUpdatePricingRuleTypeType = z.infer<
|
||||
typeof AdminUpdatePricingRuleType
|
||||
>
|
||||
export const AdminUpdatePricingRuleType = z
|
||||
.object({
|
||||
name: z.string().optional(),
|
||||
rule_attribute: z.string().optional(),
|
||||
default_priority: z.number().optional(),
|
||||
})
|
||||
.strict()
|
||||
Reference in New Issue
Block a user