@aptly-as/types
Version:
Aptly types and enums
40 lines (39 loc) • 1.41 kB
TypeScript
import { AptlyInternationalCodeDesignator } from '../enums/index.js';
import { AptlyVatCategory } from './algorithm.js';
import { AptlyMediaSrcSchema } from './media.js';
import { AptlyOption } from './option.js';
export type AptlyItem = AptlyItemSchema<string, string>;
export interface AptlyItemSchema<ID, DATE> {
name: string;
type: AptlyItemType;
description: string;
buyersIdentification: string;
sellersIdentification: string;
standardIdentification: AptlyItemStandardIdentification | null;
vatCategory: AptlyVatCategory;
thumbnail: AptlyMediaSrcSchema<ID, DATE> | null;
producer?: string;
properties: AptlyItemProperty[];
}
export declare enum AptlyItemType {
Physical = "physical",
Digital = "digital",
Service = "service",
Resource = "resource",
Material = "material",
Category = "category",
Package = "package",
PackageEnd = "package-end"
}
export declare const AptlyItemOptionTypes: AptlyItemType[];
export declare const AptlyItemGroupTypes: AptlyItemType[];
export declare const AptlyItemEndTypes: AptlyItemType[];
export declare function aptlyItemPack<T extends Pick<AptlyOption, 'type'>>(option: T, pack: T | null): T | null;
export interface AptlyItemStandardIdentification {
scheme: AptlyInternationalCodeDesignator;
value: string;
}
export interface AptlyItemProperty {
name: string;
value: string;
}