feat: clients page
This commit is contained in:
@ -89,6 +89,27 @@ export const zBuiltInModuleSchemaOutput = z.object({
|
||||
tabs: z.array(zBuiltInModuleTabSchema),
|
||||
});
|
||||
|
||||
/**
|
||||
* ClientDetailsSchema
|
||||
*/
|
||||
export const zClientDetailsSchema = z.object({
|
||||
telegram: z.string(),
|
||||
phoneNumber: z.string(),
|
||||
inn: z.string(),
|
||||
email: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* ClientSchema
|
||||
*/
|
||||
export const zClientSchema = z.object({
|
||||
name: z.string(),
|
||||
companyName: z.string(),
|
||||
comment: z.optional(z.union([z.string(), z.null()])),
|
||||
details: zClientDetailsSchema,
|
||||
id: z.int(),
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateBarcodeTemplateSchema
|
||||
*/
|
||||
@ -138,6 +159,30 @@ export const zCreateBoardResponse = z.object({
|
||||
entity: zBoardSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateClientSchema
|
||||
*/
|
||||
export const zCreateClientSchema = z.object({
|
||||
name: z.string(),
|
||||
companyName: z.string(),
|
||||
comment: z.optional(z.union([z.string(), z.null()])),
|
||||
details: zClientDetailsSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateClientRequest
|
||||
*/
|
||||
export const zCreateClientRequest = z.object({
|
||||
entity: zCreateClientSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateClientResponse
|
||||
*/
|
||||
export const zCreateClientResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* CreateDealProductSchema
|
||||
*/
|
||||
@ -563,6 +608,13 @@ export const zDeleteBoardResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* DeleteClientResponse
|
||||
*/
|
||||
export const zDeleteClientResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* DeleteDealProductResponse
|
||||
*/
|
||||
@ -668,6 +720,13 @@ export const zGetBoardsResponse = z.object({
|
||||
items: z.array(zBoardSchema),
|
||||
});
|
||||
|
||||
/**
|
||||
* GetClientsResponse
|
||||
*/
|
||||
export const zGetClientsResponse = z.object({
|
||||
items: z.array(zClientSchema),
|
||||
});
|
||||
|
||||
/**
|
||||
* GetDealProductsResponse
|
||||
*/
|
||||
@ -851,6 +910,30 @@ export const zUpdateBoardResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateClientSchema
|
||||
*/
|
||||
export const zUpdateClientSchema = z.object({
|
||||
name: z.optional(z.union([z.string(), z.null()])),
|
||||
companyName: z.optional(z.union([z.string(), z.null()])),
|
||||
comment: z.optional(z.union([z.string(), z.null()])),
|
||||
details: z.optional(z.union([zClientDetailsSchema, z.null()])),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateClientRequest
|
||||
*/
|
||||
export const zUpdateClientRequest = z.object({
|
||||
entity: zUpdateClientSchema,
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateClientResponse
|
||||
*/
|
||||
export const zUpdateClientResponse = z.object({
|
||||
message: z.string(),
|
||||
});
|
||||
|
||||
/**
|
||||
* UpdateDealProductSchema
|
||||
*/
|
||||
@ -1323,6 +1406,54 @@ export const zGetStatusHistoryData = z.object({
|
||||
*/
|
||||
export const zGetStatusHistoryResponse2 = zGetStatusHistoryResponse;
|
||||
|
||||
export const zGetClientsData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.optional(z.never()),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zGetClientsResponse2 = zGetClientsResponse;
|
||||
|
||||
export const zCreateClientData = z.object({
|
||||
body: zCreateClientRequest,
|
||||
path: z.optional(z.never()),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zCreateClientResponse2 = zCreateClientResponse;
|
||||
|
||||
export const zDeleteClientData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.object({
|
||||
pk: z.int(),
|
||||
}),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zDeleteClientResponse2 = zDeleteClientResponse;
|
||||
|
||||
export const zUpdateClientData = z.object({
|
||||
body: zUpdateClientRequest,
|
||||
path: z.object({
|
||||
pk: z.int(),
|
||||
}),
|
||||
query: z.optional(z.never()),
|
||||
});
|
||||
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
export const zUpdateClientResponse2 = zUpdateClientResponse;
|
||||
|
||||
export const zGetBarcodeTemplatesData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.optional(z.never()),
|
||||
|
||||
Reference in New Issue
Block a user