feat: client tab in deal editor
This commit is contained in:
@ -102,6 +102,7 @@ import type {
|
||||
GetBuiltInModulesData,
|
||||
GetBuiltInModulesResponses,
|
||||
GetClientsData,
|
||||
GetClientsErrors,
|
||||
GetClientsResponses,
|
||||
GetDealProductsData,
|
||||
GetDealProductsErrors,
|
||||
@ -759,7 +760,7 @@ export const getClients = <ThrowOnError extends boolean = false>(
|
||||
) => {
|
||||
return (options?.client ?? _heyApiClient).get<
|
||||
GetClientsResponses,
|
||||
unknown,
|
||||
GetClientsErrors,
|
||||
ThrowOnError
|
||||
>({
|
||||
requestValidator: async data => {
|
||||
|
||||
@ -214,6 +214,10 @@ export type ClientSchema = {
|
||||
* Id
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Isdeleted
|
||||
*/
|
||||
isDeleted?: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -403,6 +407,10 @@ export type CreateDealSchema = {
|
||||
* Statusid
|
||||
*/
|
||||
statusId: number;
|
||||
/**
|
||||
* Clientid
|
||||
*/
|
||||
clientId?: number | null;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -831,6 +839,7 @@ export type DealSchema = {
|
||||
* Createdat
|
||||
*/
|
||||
createdAt: string;
|
||||
client?: ClientSchema | null;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -1624,6 +1633,7 @@ export type UpdateDealSchema = {
|
||||
* Statusid
|
||||
*/
|
||||
statusId?: number | null;
|
||||
client?: ClientSchema | null;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -2497,10 +2507,24 @@ export type GetStatusHistoryResponse2 =
|
||||
export type GetClientsData = {
|
||||
body?: never;
|
||||
path?: never;
|
||||
query?: never;
|
||||
query?: {
|
||||
/**
|
||||
* Includedeleted
|
||||
*/
|
||||
includeDeleted?: boolean;
|
||||
};
|
||||
url: "/modules/clients/client/";
|
||||
};
|
||||
|
||||
export type GetClientsErrors = {
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HttpValidationError;
|
||||
};
|
||||
|
||||
export type GetClientsError = GetClientsErrors[keyof GetClientsErrors];
|
||||
|
||||
export type GetClientsResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
|
||||
@ -108,6 +108,7 @@ export const zClientSchema = z.object({
|
||||
comment: z.optional(z.union([z.string(), z.null()])),
|
||||
details: zClientDetailsSchema,
|
||||
id: z.int(),
|
||||
isDeleted: z.optional(z.boolean()).default(false),
|
||||
});
|
||||
|
||||
/**
|
||||
@ -290,6 +291,7 @@ export const zCreateDealSchema = z.object({
|
||||
boardId: z.int(),
|
||||
lexorank: z.string(),
|
||||
statusId: z.int(),
|
||||
clientId: z.optional(z.union([z.int(), z.null()])),
|
||||
});
|
||||
|
||||
/**
|
||||
@ -320,6 +322,7 @@ export const zDealSchema = z.object({
|
||||
createdAt: z.iso.datetime({
|
||||
offset: true,
|
||||
}),
|
||||
client: z.optional(z.union([zClientSchema, z.null()])),
|
||||
});
|
||||
|
||||
/**
|
||||
@ -964,6 +967,7 @@ export const zUpdateDealSchema = z.object({
|
||||
lexorank: z.optional(z.union([z.string(), z.null()])),
|
||||
boardId: z.optional(z.union([z.int(), z.null()])),
|
||||
statusId: z.optional(z.union([z.int(), z.null()])),
|
||||
client: z.optional(z.union([zClientSchema, z.null()])),
|
||||
});
|
||||
|
||||
/**
|
||||
@ -1409,7 +1413,11 @@ export const zGetStatusHistoryResponse2 = zGetStatusHistoryResponse;
|
||||
export const zGetClientsData = z.object({
|
||||
body: z.optional(z.never()),
|
||||
path: z.optional(z.never()),
|
||||
query: z.optional(z.never()),
|
||||
query: z.optional(
|
||||
z.object({
|
||||
includeDeleted: z.optional(z.boolean()).default(false),
|
||||
})
|
||||
),
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user