mirror of
https://github.com/EvolutionAPI/evolution-client-python.git
synced 2025-12-19 03:42:22 -06:00
adjusts in package
This commit is contained in:
59
build/lib/evolution/models/instance.py
Normal file
59
build/lib/evolution/models/instance.py
Normal file
@@ -0,0 +1,59 @@
|
||||
from typing import Optional, List, Dict
|
||||
|
||||
class WebhookConfig:
|
||||
def __init__(self, url: str = None, byEvents: bool = False, base64: bool = True,
|
||||
headers: Dict = None, events: List[str] = None):
|
||||
self.url = url
|
||||
self.byEvents = byEvents
|
||||
self.base64 = base64
|
||||
self.headers = headers
|
||||
self.events = events
|
||||
|
||||
class EventsConfig:
|
||||
def __init__(self, enabled: bool = True, events: List[str] = None):
|
||||
self.enabled = enabled
|
||||
self.events = events
|
||||
|
||||
class ChatwootConfig:
|
||||
def __init__(self, accountId: str = None, token: str = None, url: str = None,
|
||||
signMsg: bool = True, reopenConversation: bool = True,
|
||||
conversationPending: bool = False, importContacts: bool = True,
|
||||
nameInbox: str = "evolution", mergeBrazilContacts: bool = True,
|
||||
importMessages: bool = True, daysLimitImportMessages: int = 3,
|
||||
organization: str = "Evolution Bot",
|
||||
logo: str = "https://evolution-api.com/files/evolution-api-favicon.png"):
|
||||
self.chatwootAccountId = accountId
|
||||
self.chatwootToken = token
|
||||
self.chatwootUrl = url
|
||||
self.chatwootSignMsg = signMsg
|
||||
self.chatwootReopenConversation = reopenConversation
|
||||
self.chatwootConversationPending = conversationPending
|
||||
self.chatwootImportContacts = importContacts
|
||||
self.chatwootNameInbox = nameInbox
|
||||
self.chatwootMergeBrazilContacts = mergeBrazilContacts
|
||||
self.chatwootImportMessages = importMessages
|
||||
self.chatwootDaysLimitImportMessages = daysLimitImportMessages
|
||||
self.chatwootOrganization = organization
|
||||
self.chatwootLogo = logo
|
||||
|
||||
class InstanceConfig:
|
||||
def __init__(
|
||||
self,
|
||||
instanceName: str,
|
||||
integration: str = None,
|
||||
token: str = None,
|
||||
number: str = None,
|
||||
qrcode: bool = None,
|
||||
rejectCall: bool = None,
|
||||
msgCall: str = None,
|
||||
groupsIgnore: bool = None,
|
||||
alwaysOnline: bool = None,
|
||||
readMessages: bool = None,
|
||||
readStatus: bool = None,
|
||||
syncFullHistory: bool = None
|
||||
):
|
||||
self.__dict__['instanceName'] = instanceName
|
||||
|
||||
for key, value in locals().items():
|
||||
if key != 'self' and key != 'instanceName' and value is not None:
|
||||
self.__dict__[key] = value
|
||||
Reference in New Issue
Block a user