-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
134 changed files
with
1,061 additions
and
603 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
FROM node:20.7.0-alpine AS builder | ||
|
||
LABEL version="1.7.1" description="Api to control whatsapp features through http requests." | ||
LABEL version="1.7.2" description="Api to control whatsapp features through http requests." | ||
LABEL maintainer="Davidson Gomes" git="https://github.com/DavidsonGomes" | ||
LABEL contact="[email protected]" | ||
|
||
|
@@ -68,6 +68,7 @@ ENV RABBITMQ_EXCHANGE_NAME=evolution_exchange | |
ENV RABBITMQ_URI=amqp://guest:guest@rabbitmq:5672 | ||
|
||
ENV WEBSOCKET_ENABLED=false | ||
ENV WEBSOCKET_GLOBAL_EVENTS=false | ||
|
||
ENV WA_BUSINESS_TOKEN_WEBHOOK=evolution | ||
ENV WA_BUSINESS_URL=https://graph.facebook.com | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...hatsapp/controllers/chamaai.controller.ts → ...chamaai/controllers/chamaai.controller.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
src/whatsapp/models/chamaai.model.ts → ...egrations/chamaai/models/chamaai.model.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...whatsapp/repository/chamaai.repository.ts → .../chamaai/repository/chamaai.repository.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
src/whatsapp/routers/chamaai.router.ts → ...grations/chamaai/routes/chamaai.router.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { JSONSchema7 } from 'json-schema'; | ||
import { v4 } from 'uuid'; | ||
|
||
const isNotEmpty = (...propertyNames: string[]): JSONSchema7 => { | ||
const properties = {}; | ||
propertyNames.forEach( | ||
(property) => | ||
(properties[property] = { | ||
minLength: 1, | ||
description: `The "${property}" cannot be empty`, | ||
}), | ||
); | ||
return { | ||
if: { | ||
propertyNames: { | ||
enum: [...propertyNames], | ||
}, | ||
}, | ||
then: { properties }, | ||
}; | ||
}; | ||
|
||
export const chamaaiSchema: JSONSchema7 = { | ||
$id: v4(), | ||
type: 'object', | ||
properties: { | ||
enabled: { type: 'boolean', enum: [true, false] }, | ||
url: { type: 'string' }, | ||
token: { type: 'string' }, | ||
waNumber: { type: 'string' }, | ||
answerByAudio: { type: 'boolean', enum: [true, false] }, | ||
}, | ||
required: ['enabled', 'url', 'token', 'waNumber', 'answerByAudio'], | ||
...isNotEmpty('enabled', 'url', 'token', 'waNumber', 'answerByAudio'), | ||
}; |
4 changes: 2 additions & 2 deletions
4
src/libs/cacheengine.ts → ...ntegrations/chatwoot/cache/cacheengine.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/libs/localcache.ts → ...integrations/chatwoot/cache/localcache.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/libs/rediscache.client.ts → ...tions/chatwoot/cache/rediscache.client.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/libs/rediscache.ts → ...integrations/chatwoot/cache/rediscache.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.