You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.2 KiB
40 lines
1.2 KiB
import { defHttp } from '/@/utils/http/axios';
|
|
import {
|
|
NotificationDefinitionDto,
|
|
NotificationDefinitionCreateDto,
|
|
NotificationDefinitionUpdateDto,
|
|
NotificationDefinitionGetListInput,
|
|
} from './model';
|
|
|
|
export const CreateAsyncByInput = (input: NotificationDefinitionCreateDto) => {
|
|
return defHttp.post<NotificationDefinitionDto>({
|
|
url: '/api/notifications/definitions/notifications',
|
|
data: input,
|
|
});
|
|
};
|
|
|
|
export const DeleteAsyncByName = (name: string) => {
|
|
return defHttp.delete<void>({
|
|
url: `/api/notifications/definitions/notifications/${name}`,
|
|
});
|
|
};
|
|
|
|
export const GetAsyncByName = (name: string) => {
|
|
return defHttp.get<NotificationDefinitionDto>({
|
|
url: `/api/notifications/definitions/notifications/${name}`,
|
|
});
|
|
};
|
|
|
|
export const GetListAsyncByInput = (input: NotificationDefinitionGetListInput) => {
|
|
return defHttp.get<ListResultDto<NotificationDefinitionDto>>({
|
|
url: '/api/notifications/definitions/notifications',
|
|
params: input,
|
|
});
|
|
};
|
|
|
|
export const UpdateAsyncByNameAndInput = (name: string, input: NotificationDefinitionUpdateDto) => {
|
|
return defHttp.put<NotificationDefinitionDto>({
|
|
url: `/api/notifications/definitions/notifications/${name}`,
|
|
data: input,
|
|
});
|
|
};
|
|
|