feat: module dependencies
This commit is contained in:
@ -1276,7 +1276,7 @@ export const addKitToDealQueryKey = (options: Options<AddKitToDealData>) =>
|
||||
createQueryKey("addKitToDeal", options);
|
||||
|
||||
/**
|
||||
* Add Kit To Deal Product
|
||||
* Add Kit To Deal
|
||||
*/
|
||||
export const addKitToDealOptions = (options: Options<AddKitToDealData>) => {
|
||||
return queryOptions({
|
||||
@ -1294,7 +1294,7 @@ export const addKitToDealOptions = (options: Options<AddKitToDealData>) => {
|
||||
};
|
||||
|
||||
/**
|
||||
* Add Kit To Deal Product
|
||||
* Add Kit To Deal
|
||||
*/
|
||||
export const addKitToDealMutation = (
|
||||
options?: Partial<Options<AddKitToDealData>>
|
||||
|
||||
@ -990,7 +990,7 @@ export const updateDealService = <ThrowOnError extends boolean = false>(
|
||||
};
|
||||
|
||||
/**
|
||||
* Add Kit To Deal Product
|
||||
* Add Kit To Deal
|
||||
*/
|
||||
export const addKitToDeal = <ThrowOnError extends boolean = false>(
|
||||
options: Options<AddKitToDealData, ThrowOnError>
|
||||
|
||||
@ -25,7 +25,7 @@ export type BoardSchema = {
|
||||
/**
|
||||
* BuiltInModuleSchema
|
||||
*/
|
||||
export type BuiltInModuleSchema = {
|
||||
export type BuiltInModuleSchemaInput = {
|
||||
/**
|
||||
* Id
|
||||
*/
|
||||
@ -46,6 +46,40 @@ export type BuiltInModuleSchema = {
|
||||
* Description
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* Dependson
|
||||
*/
|
||||
dependsOn: Array<BuiltInModuleSchemaInput>;
|
||||
};
|
||||
|
||||
/**
|
||||
* BuiltInModuleSchema
|
||||
*/
|
||||
export type BuiltInModuleSchemaOutput = {
|
||||
/**
|
||||
* Id
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Key
|
||||
*/
|
||||
key: string;
|
||||
/**
|
||||
* Label
|
||||
*/
|
||||
label: string;
|
||||
/**
|
||||
* Iconname
|
||||
*/
|
||||
iconName: string;
|
||||
/**
|
||||
* Description
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* Dependson
|
||||
*/
|
||||
dependsOn: Array<BuiltInModuleSchemaOutput>;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -690,7 +724,7 @@ export type GetAllBuiltInModulesResponse = {
|
||||
/**
|
||||
* Items
|
||||
*/
|
||||
items: Array<BuiltInModuleSchema>;
|
||||
items: Array<BuiltInModuleSchemaOutput>;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -938,7 +972,7 @@ export type ProjectSchema = {
|
||||
/**
|
||||
* Builtinmodules
|
||||
*/
|
||||
builtInModules: Array<BuiltInModuleSchema>;
|
||||
builtInModules: Array<BuiltInModuleSchemaOutput>;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -1316,7 +1350,7 @@ export type UpdateProjectSchema = {
|
||||
/**
|
||||
* Builtinmodules
|
||||
*/
|
||||
builtInModules?: Array<BuiltInModuleSchema>;
|
||||
builtInModules?: Array<BuiltInModuleSchemaInput>;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@ -15,12 +15,37 @@ export const zBoardSchema = z.object({
|
||||
/**
|
||||
* BuiltInModuleSchema
|
||||
*/
|
||||
export const zBuiltInModuleSchema = z.object({
|
||||
export const zBuiltInModuleSchemaInput = z.object({
|
||||
id: z.int(),
|
||||
key: z.string(),
|
||||
label: z.string(),
|
||||
iconName: z.string(),
|
||||
description: z.string(),
|
||||
get dependsOn() {
|
||||
return z.array(
|
||||
z.lazy((): any => {
|
||||
return zBuiltInModuleSchemaInput;
|
||||
})
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
* BuiltInModuleSchema
|
||||
*/
|
||||
export const zBuiltInModuleSchemaOutput = z.object({
|
||||
id: z.int(),
|
||||
key: z.string(),
|
||||
label: z.string(),
|
||||
iconName: z.string(),
|
||||
description: z.string(),
|
||||
get dependsOn() {
|
||||
return z.array(
|
||||
z.lazy((): any => {
|
||||
return zBuiltInModuleSchemaOutput;
|
||||
})
|
||||
);
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
@ -304,7 +329,7 @@ export const zCreateProjectRequest = z.object({
|
||||
export const zProjectSchema = z.object({
|
||||
id: z.int(),
|
||||
name: z.string(),
|
||||
builtInModules: z.array(zBuiltInModuleSchema),
|
||||
builtInModules: z.array(zBuiltInModuleSchemaOutput),
|
||||
});
|
||||
|
||||
/**
|
||||
@ -507,7 +532,7 @@ export const zDeleteStatusResponse = z.object({
|
||||
* GetAllBuiltInModulesResponse
|
||||
*/
|
||||
export const zGetAllBuiltInModulesResponse = z.object({
|
||||
items: z.array(zBuiltInModuleSchema),
|
||||
items: z.array(zBuiltInModuleSchemaOutput),
|
||||
});
|
||||
|
||||
/**
|
||||
@ -772,7 +797,7 @@ export const zUpdateProductServiceResponse = z.object({
|
||||
*/
|
||||
export const zUpdateProjectSchema = z.object({
|
||||
name: z.optional(z.union([z.string(), z.null()])),
|
||||
builtInModules: z.optional(z.array(zBuiltInModuleSchema)),
|
||||
builtInModules: z.optional(z.array(zBuiltInModuleSchemaInput)),
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user