Skip to content

Commit

Permalink
Add Bussines Contact Types
Browse files Browse the repository at this point in the history
  • Loading branch information
shirser121 authored and norima committed Oct 24, 2023
1 parent ccb094c commit ad74867
Showing 1 changed file with 73 additions and 2 deletions.
75 changes: 73 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1189,13 +1189,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

0 comments on commit ad74867

Please sign in to comment.