feat: services table, base segmented control
This commit is contained in:
@ -119,10 +119,10 @@ export const zProductSchema = z.object({
|
||||
* ServiceCategorySchema
|
||||
*/
|
||||
export const zServiceCategorySchema = z.object({
|
||||
id: z.int(),
|
||||
name: z.string(),
|
||||
dealServiceRank: z.string(),
|
||||
productServiceRank: z.string(),
|
||||
id: z.int(),
|
||||
});
|
||||
|
||||
/**
|
||||
@ -139,7 +139,6 @@ export const zServicePriceRangeSchema = z.object({
|
||||
* ServiceSchema
|
||||
*/
|
||||
export const zServiceSchema = z.object({
|
||||
id: z.int(),
|
||||
name: z.string(),
|
||||
category: zServiceCategorySchema,
|
||||
price: z.number(),
|
||||
@ -147,6 +146,7 @@ export const zServiceSchema = z.object({
|
||||
priceRanges: z.array(zServicePriceRangeSchema),
|
||||
cost: z.union([z.number(), z.null()]),
|
||||
lexorank: z.string(),
|
||||
id: z.int(),
|
||||
});
|
||||
|
||||
/**
|
||||
@ -351,11 +351,34 @@ export const zCreateProjectResponse = z.object({
|
||||
entity: zProjectSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateServiceCategorySchema
|
||||
*/
|
||||
export const zCreateServiceCategorySchema = z.object({
|
||||
name: z.string(),
|
||||
dealServiceRank: z.string(),
|
||||
productServiceRank: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateServiceCategoryRequest
|
||||
*/
|
||||
export const zCreateServiceCategoryRequest = z.object({
|
||||
entity: zCreateServiceCategorySchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateServiceCategoryResponse
|
||||
*/
|
||||
export const zCreateServiceCategoryResponse = z.object({
|
||||
message: z.string(),
|
||||
entity: zServiceCategorySchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateServiceSchema
|
||||
*/
|
||||
export const zCreateServiceSchema = z.object({
|
||||
id: z.int(),
|
||||
name: z.string(),
|
||||
category: zServiceCategorySchema,
|
||||
price: z.number(),
|
||||
@ -518,6 +541,13 @@ export const zDeleteProjectResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* DeleteServiceCategoryResponse
|
||||
*/
|
||||
export const zDeleteServiceCategoryResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* DeleteServiceResponse
|
||||
*/
|
||||
@ -597,6 +627,13 @@ export const zGetProjectsResponse = z.object({
|
||||
items: z.array(zProjectSchema),
|
||||
});
|
||||
|
||||
/**
|
||||
* GetServiceCategoriesResponse
|
||||
*/
|
||||
export const zGetServiceCategoriesResponse = z.object({
|
||||
items: z.array(zServiceCategorySchema),
|
||||
});
|
||||
|
||||
/**
|
||||
* GetServicesKitResponse
|
||||
*/
|
||||
@ -845,11 +882,34 @@ export const zUpdateProjectResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateServiceCategorySchema
|
||||
*/
|
||||
export const zUpdateServiceCategorySchema = z.object({
|
||||
name: z.string(),
|
||||
dealServiceRank: z.string(),
|
||||
productServiceRank: z.string(),
|
||||
id: z.int(),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateServiceCategoryRequest
|
||||
*/
|
||||
export const zUpdateServiceCategoryRequest = z.object({
|
||||
entity: zUpdateServiceCategorySchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateServiceCategoryResponse
|
||||
*/
|
||||
export const zUpdateServiceCategoryResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateServiceSchema
|
||||
*/
|
||||
export const zUpdateServiceSchema = z.object({
|
||||
id: z.int(),
|
||||
name: z.string(),
|
||||
category: zServiceCategorySchema,
|
||||
price: z.number(),
|
||||
@ -857,6 +917,7 @@ export const zUpdateServiceSchema = z.object({
|
||||
priceRanges: z.array(zServicePriceRangeSchema),
|
||||
cost: z.union([z.number(), z.null()]),
|
||||
lexorank: z.string(),
|
||||
id: z.int(),
|
||||
});
|
||||
|
||||
/**
|
||||
@ -1431,6 +1492,54 @@ export const zUpdateServiceData = z.object({
|
||||
*/
|
||||
export const zUpdateServiceResponse2 = zUpdateServiceResponse;
|
||||
|
||||
export const zGetServiceCategoriesData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.optional(z.never()),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zGetServiceCategoriesResponse2 = zGetServiceCategoriesResponse;
|
||||
|
||||
export const zCreateServiceCategoryData = z.object({
|
||||
body: zCreateServiceCategoryRequest,
|
||||
path: z.optional(z.never()),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zCreateServiceCategoryResponse2 = zCreateServiceCategoryResponse;
|
||||
|
||||
export const zDeleteServiceCategoryData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.object({
|
||||
pk: z.int(),
|
||||
}),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zDeleteServiceCategoryResponse2 = zDeleteServiceCategoryResponse;
|
||||
|
||||
export const zUpdateServiceCategoryData = z.object({
|
||||
body: zUpdateServiceCategoryRequest,
|
||||
path: z.object({
|
||||
pk: z.int(),
|
||||
}),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zUpdateServiceCategoryResponse2 = zUpdateServiceCategoryResponse;
|
||||
|
||||
export const zGetServicesKitsData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.optional(z.never()),
|
||||
|
||||
Reference in New Issue
Block a user