2023-06-30 15:35:31 +00:00
|
|
|
import { PrivilegeWithAmount, PrivilegeWithoutPrice } from "./privilege";
|
2023-05-27 11:50:21 +00:00
|
|
|
|
|
|
|
|
2023-07-13 18:59:23 +00:00
|
|
|
type ServiceKey = string;
|
|
|
|
|
2023-05-27 11:50:21 +00:00
|
|
|
export type CustomTariffUserValues = Record<string, number>;
|
|
|
|
|
2023-07-13 18:59:23 +00:00
|
|
|
export type CustomTariffUserValuesMap = Record<ServiceKey, CustomTariffUserValues>;
|
2023-05-27 11:50:21 +00:00
|
|
|
|
2023-07-13 18:59:23 +00:00
|
|
|
export type ServiceKeyToPriceMap = Record<ServiceKey, number>;
|
2023-06-11 10:07:47 +00:00
|
|
|
|
|
|
|
export interface CustomTariff {
|
|
|
|
name: string;
|
|
|
|
price?: number;
|
|
|
|
isCustom: boolean;
|
|
|
|
privilegies: PrivilegeWithAmount[];
|
|
|
|
updatedAt?: string;
|
|
|
|
isDeleted?: boolean;
|
|
|
|
createdAt?: string;
|
2023-06-30 15:35:31 +00:00
|
|
|
}
|
|
|
|
|
2023-07-13 18:59:23 +00:00
|
|
|
export type CreateTariffBody = Omit<CustomTariff, "privilegies"> & { privilegies: PrivilegeWithoutPrice[]; };
|