UNPKG

@enable-tech/shared-types

Version:

This package represents the single source of truth of the Types being used in the codebase (front-end and back-end) of enable.tech, It is an organization-scoped package. So, all the development teams belonging to it can participate to enhance it.

18 lines 1.27 kB
import { T_FalsyObject, T_FalsyValue } from 'src/common/client/types'; import { I_Benefit, I_MenuItemBenefit } from '../../backend/responses/schemas'; import { I_LoyaltyTier } from 'src/modules/loyaltyProgram/loyaltyTier/backend/responses/schemas'; export type T_BenefitsValidation = { valid: boolean; errorMessage?: string; }; export type T_TemporaryBenefit = T_FalsyValue<Partial<Omit<I_Benefit, 'menuItem'> & Pick<T_BenefitTypeOption, 'description'>> & { menuItem?: T_FalsyObject<I_MenuItemBenefit>; }>; export type T_TemporaryBenefits = T_TemporaryBenefit[] | undefined; export type T_BenefitTypeOption = { description: string; } & Pick<Partial<I_Benefit>, '_id' | 'appliedTo' | 'type' | 'value'>; export type T_FreeDeliverySpecialTreatmentFields = Pick<I_LoyaltyTier, 'freeDelivery' | 'freeDeliveryMaximumNumberOfUses' | 'freeDeliveryMaximumNumberOfUsesType' | 'freeDeliveryPreserveUsage'>; export type T_PercentDiscountSpecialTreatmentFields = Pick<I_LoyaltyTier, 'percentDiscount' | 'percentDiscountMaximumNumberOfUses' | 'percentDiscountMaximumNumberOfUsesType' | 'percentDiscountPreserveUsage'>; export type T_SpecialTreatmentFields = T_FreeDeliverySpecialTreatmentFields & T_PercentDiscountSpecialTreatmentFields; //# sourceMappingURL=index.d.ts.map