Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Business Contact Types #2369

Merged
merged 5 commits into from
Dec 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 73 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1191,13 +1191,84 @@ declare namespace WAWebJS {
user: 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 {
/**
* 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 {
Expand Down
Loading