paxton-front/shared/yandex_pvz.ts
alsaze 2e01f58e67
Some checks failed
Deploy / build (push) Has been cancelled
refactoring
2025-11-21 12:48:00 +03:00

128 lines
2.7 KiB
TypeScript

// -----------------------------
// REQUEST
// -----------------------------
export type YandexPvzPaymentMethod = 'already_paid'
export interface YandexPvzCoordinateRange {
from: number
to: number
}
export interface YandexPvzPickupServicesRequest {
is_fitting_allowed: boolean
is_partial_refuse_allowed: boolean
is_paperless_pickup_allowed: boolean
is_unboxing_allowed: boolean
}
export interface YandexPvzRequest {
pickup_point_ids?: string[]
geo_id?: number
longitude?: YandexPvzCoordinateRange
latitude?: YandexPvzCoordinateRange
type?: 'pickup_point'
payment_method?: YandexPvzPaymentMethod
available_for_dropoff?: boolean
is_yandex_branded?: boolean
is_not_branded_partner_station?: boolean
is_post_office?: boolean
payment_methods?: YandexPvzPaymentMethod[]
pickup_services?: YandexPvzPickupServicesRequest
}
// -----------------------------
// RESPONSE
// -----------------------------
export interface YandexPvzPosition {
latitude: number
longitude: number
}
export interface YandexPvzAddress {
geoId: string
country: string
region: string
subRegion: string
locality: string
street: string
house: string
housing: string
apartment: string
building: string
comment: string
full_address: string
postal_code: string
}
export interface YandexPvzContact {
first_name: string
last_name: string
patronymic: string
phone: string
email: string
}
export interface YandexPvzTimeObject {
hours: number
minutes: number
}
export interface YandexPvzScheduleRestriction {
days: number[]
time_from: YandexPvzTimeObject
time_to: YandexPvzTimeObject
}
export interface YandexPvzSchedule {
time_zone: number
restrictions: YandexPvzScheduleRestriction[]
}
export interface YandexPvzPickupServices {
is_fitting_allowed: boolean
is_partial_refuse_allowed: boolean
is_paperless_pickup_allowed: boolean
is_unboxing_allowed: boolean
}
export interface YandexPvzDayoff {
date: string
date_utc: string
}
export interface YandexPvzDeactivation {
deactivation_date_predicted_debt: boolean
available_for_dropoff: boolean
available_for_c2c_dropoff: boolean
}
export interface YandexPvzPoint {
ID: string
operator_station_id: string
name: string
type: 'pickup_point'
position: YandexPvzPosition
address: YandexPvzAddress
instruction: string
payment_methods: YandexPvzPaymentMethod[]
contact: YandexPvzContact
schedule: YandexPvzSchedule
is_yandex_branded: boolean
is_market_partner: boolean
is_dark_store: boolean
is_post_office: boolean
pickup_services: YandexPvzPickupServices
deactivation_date: YandexPvzDeactivation
dayoffs: YandexPvzDayoff[]
}
export interface YandexPvzResponse {
points: YandexPvzPoint[]
}