- models/category.model.ts: Category -> CategoryApiModel, disambiguated from core/categories/models/category-domain.model.ts's Category (admin domain shape). Removes a dead unused import in item.utils.ts along the way. Only live consumer was services/api.service.ts, updated in place. - BACKEND-API-REFERENCE.md §5: corrected two rows documenting the TOKEN_EXPIRED/INVALID_SIGNATURE auth-error bug as still open - the fix (reading error.error.code before falling back to HTTP status) is already in auth.service.ts. Doc was stale, not the code. - Sprint 0.2 audit: AdminRole duplication and the PRODUCT_DATA_PROVIDER/CATEGORY_REPOSITORY dead mock branches were already resolved in a prior pass - verified, no code change needed. - docs/backend/PHASE-1-MONEY-FX-PAYMENTS-CONTRACT.md: new wire contract for Money/FxQuote/PriceSnapshot/payment state machine, so backend can start Phase 1 the moment the frozen payment chain is unblocked. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
44 lines
1008 B
TypeScript
44 lines
1008 B
TypeScript
import { ItemName } from './item.model';
|
|
|
|
/**
|
|
* Storefront-side raw category shape (item.service.ts/api.service.ts responses).
|
|
* Unrelated to core/categories/models/category-domain.model.ts's Category, which is
|
|
* the normalized admin-backoffice domain shape produced by CategoryMapper.
|
|
*/
|
|
export interface CategoryApiModel {
|
|
categoryID: number;
|
|
name: string;
|
|
parentID: number;
|
|
icon?: string;
|
|
wideBanner?: string;
|
|
itemCount?: number;
|
|
categoriesCount?: number;
|
|
priority?: number;
|
|
names?: ItemName[];
|
|
translations?: Record<string, CategoryTranslation>;
|
|
|
|
// BackOffice API fields
|
|
id?: string;
|
|
visible?: boolean;
|
|
img?: string;
|
|
marketplaceId?: string;
|
|
subcategories?: Subcategory[];
|
|
}
|
|
|
|
export interface Subcategory {
|
|
id: string;
|
|
name: string;
|
|
visible?: boolean;
|
|
priority?: number;
|
|
img?: string;
|
|
categoryId: string;
|
|
parentId: string;
|
|
itemCount?: number;
|
|
hasItems?: boolean;
|
|
subcategories?: Subcategory[];
|
|
}
|
|
|
|
interface CategoryTranslation {
|
|
name?: string;
|
|
}
|