Skip to content

Releases: code-chat-br/whatsapp-api

v1.3.7

Choose a tag to compare

@jrCleber jrCleber released this 15 May 12:56

Changes Implemented

  • Added Pino for application log management.
  • Support for console log output during development/debugging.
  • Support for persisting logs as JSON files in the following directory:
/logs/recorte
  • When running with containers, it is recommended to use a volume for log file persistence.

Related Commit

  • feat: add structured logging with pino 0a603a1

Request ID Middleware

Added a middleware responsible for generating and propagating the following header:

x-request-id

Behavior

  • If the request does not contain an x-request-id, a UUID is automatically generated.
  • The same identifier is returned in the response headers.
  • Improves request tracing and log correlation across the application.

Related Commit

  • feat: add request id middleware for request tracing 3850bb2

v1.3.6

Choose a tag to compare

@jrCleber jrCleber released this 30 Nov 22:18
461c450

What's Changed

  • Added: Connection via code.
GET /instance/connect/:instance/code/:phoneHumber HTTP/1.1
Host: localhost:8084
Authorization: Bearer token

Commit: afbe727

v1.3.4

Choose a tag to compare

@jrCleber jrCleber released this 01 Nov 12:48

Full Changelog: v1.3.4.108...v1.3.4

v1.3.3

Choose a tag to compare

@jrCleber jrCleber released this 04 Sep 15:32

Full Changelog: v1.3.3.82...v1.3.3

Deprecated

  • Endpoint: /instance/connectionState/{instanceName}

Added

  • externalAttributes

    The externalAttributes attribute is an optional field that can be used to add custom information or metadata to the message being sent. This field is useful for attaching additional data that you want to track or associate with the message throughout the sending and receiving process without affecting the main content of the message.

    Details of the externalAttributes Attribute

    • Type: string
    • Description: This field can accept various types of values, including simple strings, booleans, numbers, JSON objects, or JSON arrays. Below are the specifications for the accepted data types:
      • [string] - A simple text string.
      • [string[boolean]] - A string representing a boolean value.
      • [string[number]] - A string representing a numeric value.
      • [string[Json[Object]]] - A string containing a JSON object.
      • [string[Json[Array]]] - A string containing a JSON array.

    Usage

    When you create a message and include the externalAttributes field, the specified values are transmitted along with the message. These values are then forwarded to the associated webhook, providing a way to "stamp" the message with additional information that can be used for tracking, auditing, or other analytical or processing purposes.

    For example, you could use externalAttributes to store a user ID, process status, or any other relevant information you want to associate with the message. When the message is processed by the target system or responded to via webhook, these external attributes are included in the payload of the response, allowing you to use them as needed in your workflow.

    Example:

    {
      "number": "123@broadcast",
      "options": {
        "externalAttributes": "<any> - optional",
        "delay": 1200,
        "presence": "composing"
      },
      "textMessage": {
        "text": "text"
      }
    }
  • Endpoint:

    1. /instance/fetchInstance/:instanceName
      Response: 200
    {
      "id": number,
      "name": string,
      "description": string,
      "connectionStatus": string,
      "ownerJid": string,
      "profilePicUrl": string,
      "createdAt": dateTime,
      "updatedAt": dateTime,
      "Webhook": { ... },
      "Whatsapp": {
          "connection": {
              "state": string,
              "statusReason": number
          }
      }
    }
    1. /message/sendList/legacy/:instanceName

v1.3.2

Choose a tag to compare

@jrCleber jrCleber released this 28 Aug 17:29

Full Changelog: v1.3.2.79...v1.3.2

v1.3.1

Choose a tag to compare

@jrCleber jrCleber released this 24 Apr 11:57

What's Changed

New Contributors

Full Changelog: v1.3.0...v1.3.1

v1.3.0

Choose a tag to compare

@jrCleber jrCleber released this 20 Dec 18:38
Dockerfile

v1.2.8

Choose a tag to compare

@jrCleber jrCleber released this 06 Oct 13:19
socketConfig

v1.2.7

Choose a tag to compare

@jrCleber jrCleber released this 04 Sep 20:57
  • from query.owner to header['x-owner']: e1f9518
  • saving credential in session cookies: 120ec3e
  • Dockerfile: update node version: 2d5ffc0

v1.2.6

Choose a tag to compare

@jrCleber jrCleber released this 14 Aug 23:46
EXPIRIN_IN: default=0