UIKit/lib/model/customTariffs.ts
nflnkr 341bee7ea9 1.0.73
add cart calculation functions and tests
add custom tariff types
2024-03-27 13:21:49 +03:00

20 lines
516 B
TypeScript

import { CustomPrivilegeWithAmount } from "./privilege";
type ServiceKey = string;
export type PrivilegeWithoutPrice = Omit<CustomPrivilegeWithAmount, "price">;
export type CustomTariffUserValues = Record<string, number>;
export type CustomTariffUserValuesMap = Record<ServiceKey, CustomTariffUserValues>;
export type ServiceKeyToPriceMap = Record<ServiceKey, number>;
export interface CreateTariffBody {
name: string;
price?: number;
isCustom: boolean;
privileges: PrivilegeWithoutPrice[];
}