import { Product } from './product'; export type Division = { id: number; name: string; division_type: string; parent: number; erp_code: string; country_id: number; city_id: number; township_id: number; district_id: number; address: string; phone_number: string; fax_number: string; is_active: true; latitude: null; longitude: null; monthly_order_limit: string; current_balance: string; current_balance_last_update: null | string; extra_data: object; }; export interface ProductB2b extends Product { sku: string; name: string; price: string; base_code: string; asorti: string; category: string; currency: string; variants: { [key: string]: any; }; product_image: string; } export type BasketResponse = { id: number; total_amount: string; total_quantity: number; basket_items: [ { total_amount: string; price: string; quantity: number; divisions: BasketItemDivision[]; product: ProductB2b; product_remote_id: number; } ]; }; export interface QuotationErrorType { data: { non_field_errors: string[]; }; } export interface BasketItemDivision { id: number; name: string; erp_code: string; quantity: number; } export type BasketItemType = { total_amount: string; price: string; quantity: number; divisions: BasketItemDivision[]; product: ProductB2b; product_remote_id: number; }; export type BasketParams = { division: string; product_remote_id: string; quantity: string; }; export type SaveBasketParams = { name: string; }; export type CreateQuotationParams = { name: string; }; export type UpdateProductParams = { product_remote_id: number; division: number; quantity: number; }; export type DeleteProductParams = { product_remote_id: number; }; export type LoadBasketParams = { id: number; }; export interface GetResponse { count: number; next: null; previous: null; results: T[]; } export type DraftResponse = { id: number; name: string; total_amount: number; total_quantity: number; }; export type BasketStatusResponse = { is_ready: boolean; status: string; url: string; }; export type ExportBasketResponse = { cache_key: string; };