evolution-api-sdk
Version:
Unofficial SDK for the Evolution Whatsapp API v2
57 lines (54 loc) • 1.39 kB
text/typescript
import { Jid, MessageId } from '../../../types/tags.mjs';
import { BaseMessageOptions } from './base.mjs';
interface LocationMessageResponseRaw {
key: {
remoteJid: string;
id: string;
};
message: {
locationMessage: {
degreesLatitude: number;
degreesLongitude: number;
name: string;
address: string;
};
};
messageTimestamp: string | Date;
}
interface LocationMessageOptions extends BaseMessageOptions {
/**
* Location name
*/
name: string;
/**
* Location address
*/
address: string;
/**
* Location latitude
*/
latitude: number;
/**
* Location longitude
*/
longitude: number;
}
interface LocationMessageResponse {
receiver: {
phoneNumber: string;
jid: Jid;
};
location: {
latitude: number;
longitude: number;
name: string;
address: string;
};
id: MessageId;
timestamp: Date;
}
declare const LocationMessageResponseTransform: (data: LocationMessageResponseRaw) => LocationMessageResponse;
declare const ResponseSchema: {
parse: (data: LocationMessageResponseRaw) => LocationMessageResponse;
};
export { type LocationMessageOptions, type LocationMessageResponse, type LocationMessageResponseRaw, LocationMessageResponseTransform, ResponseSchema };