feat: Add Bussines Contact Types (#2369)

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
This commit is contained in:
Shir Serlui 2023-12-01 21:15:06 +02:00 • committed by GitHub
commit 4009bb792b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

75
index.d.ts vendored
View file

@ -1191,13 +1191,84 @@ declare namespace WAWebJS {
user: string, user: string,
_serialized: string, _serialized: string,
} }
export interface BusinessCategory {
id: string,
localized_display_name: string,
}
export interface BusinessHoursOfDay {
mode: string,
hours: number[]
}
export interface BusinessHours {
config: {
sun: BusinessHoursOfDay,
mon: BusinessHoursOfDay,
tue: BusinessHoursOfDay,
wed: BusinessHoursOfDay,
thu: BusinessHoursOfDay,
fri: BusinessHoursOfDay,
}
timezone: string,
}
export interface BusinessContact extends Contact { export interface BusinessContact extends Contact {
/** /**
* The contact's business profile * The contact's business profile
* @todo add a more specific type for the object
*/ */
businessProfile: object businessProfile: {
/** The contact's business profile id */
id: ContactId,
/** The contact's business profile tag */
tag: string,
/** The contact's business profile description */
description: string,
/** The contact's business profile categories */
categories: BusinessCategory[],
/** The contact's business profile options */
profileOptions: {
/** The contact's business profile commerce experience*/
commerceExperience: string,
/** The contact's business profile cart options */
cartEnabled: boolean,
}
/** The contact's business profile email */
email: string,
/** The contact's business profile websites */
website: string[],
/** The contact's business profile latitude */
latitude: number,
/** The contact's business profile longitude */
longitude: number,
/** The contact's business profile work hours*/
businessHours: BusinessHours
/** The contact's business profile address */
address: string,
/** The contact's business profile facebook page */
fbPage: object,
/** Indicate if the contact's business profile linked */
ifProfileLinked: boolean
/** The contact's business profile coverPhoto */
coverPhoto: null | any,
}
} }
export interface PrivateContact extends Contact { export interface PrivateContact extends Contact {