import { Attr } from 'ts-framework' export class LocationResponseDTO { id: string name?: string placeName?: string fullAddress?: string note?: string userId?: string unit?: string street?: string streetNumber?: string state?: string country?: string city?: string zip?: string timeZone?: string active?: boolean lastUsedAt: Date createdAt: Date updatedAt: Date phoneId?: string googlePlaceId?: string coordinates_id: string } export class LocationByAddressResponseDTO { name?: string placeName?: string fullAddress?: string unit?: string street?: string streetNumber?: string state?: string country?: string city?: string zip?: string timeZone?: string googlePlaceId?: string coordinates: { latitude?: number longitude?: number } } export class UpdateLocationDTO { @Attr({ type: String }) id: string @Attr({ type: String, optional: true }) name?: string @Attr({ type: String, optional: true }) placeName?: string @Attr({ type: String, optional: true }) fullAddress?: string @Attr({ type: String, optional: true }) note?: string @Attr({ type: String, optional: true }) userId?: string @Attr({ type: String, optional: true }) unit?: string @Attr({ type: String, optional: true }) street?: string @Attr({ type: String, optional: true }) streetNumber?: string @Attr({ type: String, optional: true }) state?: string @Attr({ type: String, optional: true }) country?: string @Attr({ type: String, optional: true }) city?: string @Attr({ type: String, optional: true }) zip?: string @Attr({ type: String, optional: true }) timeZone?: string @Attr({ type: String, optional: true }) active?: boolean @Attr({ type: String, optional: true }) lastUsedAt: Date @Attr({ type: String, optional: true }) createdAt: Date @Attr({ type: String, optional: true }) updatedAt: Date @Attr({ type: String, optional: true }) phoneId?: string @Attr({ type: String, optional: true }) googlePlaceId?: string @Attr({ type: String, optional: true }) coordinates_id?: string } export class CreateLocationByPlaceIdDTO { @Attr({ type: String, optional: true }) name?: string @Attr({ type: String, optional: true }) placeName?: string @Attr({ type: String, optional: true }) fullAddress?: string @Attr({ type: String, optional: true }) note?: string @Attr({ type: String, optional: true }) unit?: string @Attr({ type: String, optional: true }) street?: string @Attr({ type: String, optional: true }) streetNumber?: string @Attr({ type: String, optional: true }) state?: string @Attr({ type: String, optional: true }) country?: string @Attr({ type: String, optional: true }) city?: string @Attr({ type: String, optional: true }) zip?: string @Attr({ type: String, optional: true }) timeZone?: string @Attr({ type: String, optional: true }) active?: boolean @Attr({ type: String, optional: true }) lastUsedAt?: Date @Attr({ type: String, optional: true }) createdAt?: Date @Attr({ type: String, optional: true }) updatedAt?: Date @Attr({ type: String, optional: true }) phoneId?: string @Attr({ type: String, optional: true }) coordinates_id?: string @Attr({ type: String, optional: true }) userId?: string @Attr({ type: String, optional: true }) googlePlaceId?: string } export class CreateLocationByAddressDTO extends LocationResponseDTO { @Attr({ type: String, optional: true }) name?: string @Attr({ type: String, optional: true }) placeName?: string @Attr({ type: String, optional: true }) note?: string @Attr({ type: String, optional: true }) unit?: string @Attr({ type: String, optional: true }) street?: string @Attr({ type: String, optional: true }) streetNumber?: string @Attr({ type: String, optional: true }) state?: string @Attr({ type: String, optional: true }) country?: string @Attr({ type: String, optional: true }) city?: string @Attr({ type: String, optional: true }) zip?: string @Attr({ type: String, optional: true }) timeZone?: string @Attr({ type: String, optional: true }) active?: boolean @Attr({ type: String }) lastUsedAt: Date @Attr({ type: String }) createdAt: Date @Attr({ type: String }) updatedAt: Date @Attr({ type: String, optional: true }) phoneId?: string @Attr({ type: String }) coordinates_id: string @Attr({ type: String }) fullAddress: string @Attr({ type: String }) userId: string } export class CreateLocationDTO { @Attr({ type: String, optional: true }) name?: string @Attr({ type: String, optional: true }) placeName?: string @Attr({ type: String, optional: true }) note?: string @Attr({ type: String, optional: true }) unit?: string @Attr({ type: String, optional: true }) street?: string @Attr({ type: String, optional: true }) streetNumber?: string @Attr({ type: String, optional: true }) state?: string @Attr({ type: String, optional: true }) country?: string @Attr({ type: String, optional: true }) city?: string @Attr({ type: String, optional: true }) zip?: string @Attr({ type: String, optional: true }) timeZone?: string @Attr({ type: String, optional: true }) active?: boolean @Attr({ type: String, optional: true }) lastUsedAt?: Date @Attr({ type: String, optional: true }) createdAt?: Date @Attr({ type: String, optional: true }) updatedAt?: Date @Attr({ type: String, optional: true }) phoneId?: string @Attr({ type: String, optional: true }) coordinates_id?: string @Attr({ type: String, optional: true }) fullAddress?: string @Attr({ type: String, optional: true }) userId?: string @Attr({ type: String, optional: true }) googlePlaceId?: string } export class CreateLocationWithPlaceIdDTO extends CreateLocationByPlaceIdDTO { @Attr({ type: String, optional: true }) placeId?: string } export class InsertByCoordinatesDTO { @Attr({ type: String }) id: string @Attr({ type: Number }) longitude: number @Attr({ type: Number }) latitude: number @Attr({ type: CreateLocationDTO }) location: CreateLocationDTO } export class InsertByAddressDTO { @Attr({ type: String }) id: string @Attr({ type: CreateLocationDTO }) location: CreateLocationByAddressDTO } export class InsertByPlaceIdDTO { @Attr({ type: String }) id: string @Attr({ type: CreateLocationWithPlaceIdDTO }) location: CreateLocationWithPlaceIdDTO } export class GetPlaceDetailsByAddressesDTO { @Attr({ type: String }) addresses: string[] } export class GetLocationsByIdDTO { locationIds: string[] } export class GoinLocationDTO extends LocationResponseDTO { geometry: { type: string coordinates: number[] } phone?: { number: string countryCode: string } } export class SimpleLocationDTO { @Attr({ type: Number }) lat: number @Attr({ type: Number }) lng: number @Attr({ type: String }) address: string @Attr({ type: String, optional: true }) placeName?: string }