feat(business): change profile/cover photo and manage quick replies (#1724)

This commit is contained in:
vini
2025-09-07 08:08:26 -03:00
committed by GitHub
parent 084761dc31
commit 50fc83b008
8 changed files with 217 additions and 8 deletions
+20
View File
@@ -0,0 +1,20 @@
import type { proto } from '../../WAProto'
export type DayOfWeekBussines = 'sun' | 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat'
export type HoursDay =
| { day: DayOfWeekBussines; mode: 'specific_hours'; openTimeInMinutes: string; closeTimeInMinutes: string }
| { day: DayOfWeekBussines; mode: 'open_24h' | 'appointment_only' }
export type UpdateBussinesProfileProps = {
address?: string
websites?: string[]
email?: string
description?: string
hours?: {
timezone: string
days: HoursDay[]
}
}
export type QuickReplyAction = proto.SyncActionValue.IQuickReplyAction & { timestamp?: string }
+2
View File
@@ -1,5 +1,6 @@
import type { proto } from '../../WAProto/index.js'
import type { AccountSettings } from './Auth'
import type { QuickReplyAction } from './Bussines.js'
import type { BufferedEventData } from './Events'
import type { LabelActionBody } from './Label'
import type { ChatLabelAssociationActionBody } from './LabelAssociation'
@@ -119,6 +120,7 @@ export type ChatModification =
| { removeChatLabel: ChatLabelAssociationActionBody }
| { addMessageLabel: MessageLabelAssociationActionBody }
| { removeMessageLabel: MessageLabelAssociationActionBody }
| { quickReply: QuickReplyAction }
export type InitialReceivedChatsState = {
[jid: string]: {
+1 -1
View File
@@ -321,7 +321,7 @@ export type MessageGenerationOptionsFromContent = MiscMessageGenerationOptions &
export type WAMediaUploadFunction = (
encFilePath: string,
opts: { fileEncSha256B64: string; mediaType: MediaType; timeoutMs?: number }
) => Promise<{ mediaUrl: string; directPath: string }>
) => Promise<{ mediaUrl: string; directPath: string; meta_hmac?: string; ts?: number; fbid?: number }>
export type MediaGenerationOptions = {
logger?: ILogger