@experteam-mx/ngx-services
Version:
Angular common services for Experteam apps
90 lines (89 loc) • 2.35 kB
TypeScript
import { CustomerRestriction, Discount, LoyaltyPeriod, LoyaltyRule, TopCustomer } from './api-discounts.interfaces';
export type DiscountIn = {
code: string;
company_country_id: number;
name: string;
description: string;
account_number: string;
percentage: number;
start_date: string;
end_date: string;
start_weight: number;
end_weight: number;
shipment_scopes: number[];
country_reference_products: number[];
applies_to_all_locations: boolean;
locations: number[];
reference_required: boolean;
reference_restriction: boolean;
reference_restriction_period: number;
reference_restriction_amount: number;
reference_restriction_message: string;
is_active: boolean;
};
export type DiscountOut = {
discount: Discount;
};
export type DiscountsOut = {
discounts: Discount[];
total: number;
};
export type TopCustomersOut = {
top_customers: TopCustomer[];
total: number;
};
export type OperationsLoadTopCustomerV2In = {
company_country_id: number;
file: File;
};
export type LoyaltyPeriodsOut = {
loyalty_periods: LoyaltyPeriod[];
total: number;
};
export type LoyaltyPeriodIn = {
company_country_id: number;
days: number;
shipment_scopes: number[];
products: string[];
is_active: boolean;
};
export type LoyaltyPeriodOut = {
loyalty_period: LoyaltyPeriod;
};
export type LoyaltyRulesOut = {
loyalty_rules: LoyaltyRule[];
total: number;
};
export type LoyaltyRuleIn = {
name: string;
loyalty_period_id: number;
min_quantity: number;
max_quantity: number;
discount_percentage: number;
products: string[];
account: string;
valid_since: string;
valid_until: string;
is_active: boolean;
};
export type LoyaltyRuleOut = {
loyalty_rule: LoyaltyRule;
};
export type CustomerRestrictionsOut = {
customer_restrictions: CustomerRestriction[];
total: number;
};
export type CustomerRestrictionIn = {
identification_type_id?: number;
identification_number?: string;
company_country_id: number;
};
export type CustomerRestrictionInV2 = CustomerRestrictionIn & {
email?: string;
phone_number?: string;
phone_code?: string;
phone_country_code?: string;
};
export type CustomerRestrictionOut = {
customer_restriction: CustomerRestriction;
};