/** * Base types for Nova Poshta API client * These are fundamental types used throughout the library */ export type NovaPoshtaRef = string; export type CityRef = string; export type WarehouseRef = string; export type CounterpartyRef = string; export type ContactRef = string; export type AddressRef = string; export type DocumentRef = string; export type SettlementRef = string; export type AreaRef = string; export type StreetRef = string; export type ObjectRef = string; export type String36 = string; export type String50 = string; export type String100 = string; export type PhoneNumber = string; export type NovaPoshtaDate = string; export type NovaPoshtaDateTime = string; export type Weight = number; export type Volume = number; export type Dimensions = number; export type Cost = number; export interface NovaPoshtaResponse { readonly success: boolean; readonly data: T; readonly errors: readonly string[]; readonly warnings: readonly string[]; readonly info: readonly string[]; readonly messageCodes: readonly string[]; readonly errorCodes: readonly string[]; readonly warningCodes: readonly string[]; readonly infoCodes: readonly string[]; } export interface NovaPoshtaRequest { readonly apiKey?: string; readonly modelName: string; readonly calledMethod: string; readonly methodProperties: Record; } export interface PaginationParams { readonly page?: number; readonly limit?: number; } export interface PaginatedResponse extends NovaPoshtaResponse { readonly totalCount?: number; readonly currentPage?: number; readonly totalPages?: number; } export interface SearchParams extends PaginationParams { readonly findByString?: string; } export interface ReferenceItem { readonly ref: NovaPoshtaRef; readonly description: string; readonly descriptionRu?: string; } export interface Location { readonly lat: string; readonly lon: string; } export interface AddressComponents { readonly settlement: string; readonly settlementRef: SettlementRef; readonly area: string; readonly areaRef: AreaRef; readonly region?: string; readonly regionRef?: AreaRef; readonly street?: string; readonly streetRef?: StreetRef; readonly buildingNumber?: string; readonly flat?: string; } export interface TimeInterval { readonly start: string; readonly end: string; } export interface CargoDimensions { readonly weight: Weight; readonly length?: Dimensions; readonly width?: Dimensions; readonly height?: Dimensions; readonly volume?: Volume; } export interface MoneyAmount { readonly amount: Cost; readonly currency: 'UAH' | 'USD' | 'EUR'; } export type Result = { readonly success: true; readonly data: T; } | { readonly success: false; readonly error: E; }; export type Optional = T | undefined; export type ConditionalProps = T[K] extends true ? Required : Partial; export type ApiData> = T extends NovaPoshtaResponse ? U : never; //# sourceMappingURL=base.d.ts.map