2025-12-23 20:35:20 +03:30
|
|
|
import { ICardexInventorySummary, ICardexProductSummary } from './types';
|
2025-12-21 19:09:13 +03:30
|
|
|
|
2025-12-23 20:35:20 +03:30
|
|
|
export interface ICardexRawResponse {
|
2025-12-21 19:09:13 +03:30
|
|
|
id: number;
|
2025-12-23 20:35:20 +03:30
|
|
|
type: string;
|
2025-12-21 19:09:13 +03:30
|
|
|
quantity: number;
|
2026-01-04 13:45:45 +03:30
|
|
|
unitPrice: number;
|
2025-12-23 20:35:20 +03:30
|
|
|
totalCost: number;
|
|
|
|
|
referenceType: string;
|
|
|
|
|
referenceId: string;
|
|
|
|
|
createdAt: string;
|
2025-12-21 19:09:13 +03:30
|
|
|
avgCost: number;
|
2025-12-23 20:35:20 +03:30
|
|
|
product: ICardexProductSummary;
|
|
|
|
|
inventory: ICardexInventorySummary;
|
|
|
|
|
supplier?: {
|
|
|
|
|
id: number;
|
|
|
|
|
firstName: string;
|
|
|
|
|
lastName: string;
|
|
|
|
|
};
|
|
|
|
|
customer?: {
|
|
|
|
|
id: number;
|
|
|
|
|
firstName: string;
|
|
|
|
|
lastName: string;
|
|
|
|
|
};
|
|
|
|
|
counterInventory?: ICardexInventorySummary;
|
2025-12-21 19:09:13 +03:30
|
|
|
}
|
|
|
|
|
|
2025-12-23 20:35:20 +03:30
|
|
|
export interface ICardexResponse extends ICardexRawResponse {
|
|
|
|
|
supplier?: {
|
|
|
|
|
id: number;
|
|
|
|
|
name: string;
|
|
|
|
|
};
|
|
|
|
|
customer?: {
|
|
|
|
|
id: number;
|
|
|
|
|
name: string;
|
|
|
|
|
};
|
2025-12-21 19:09:13 +03:30
|
|
|
}
|
|
|
|
|
|
2025-12-23 20:35:20 +03:30
|
|
|
export interface ICardexRequestPayload {
|
|
|
|
|
startDate?: string;
|
|
|
|
|
endDate?: string;
|
|
|
|
|
inventoryId?: number;
|
|
|
|
|
productId?: number;
|
|
|
|
|
}
|