Skip to content
Open
71 changes: 71 additions & 0 deletions .github/workflows/publish_ghcr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Build and Publish to GHCR

on:
push:
branches:
- main
- 'release/**'
tags:
- 'v*.*.*'
pull_request:
branches:
- main

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build:
name: Build and Publish
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v5
with:
submodules: recursive

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,prefix=
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Image digest
if: github.event_name != 'pull_request'
run: echo ${{ steps.docker_build.outputs.digest }}
150 changes: 150 additions & 0 deletions openapi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
{
"openapi": "3.0.0",
"info": {
"title": "Evolution API",
"version": "2.3.7",
"description": "WhatsApp API - OpenAPI Documentation",
"contact": {
"name": "Evolution API",
"url": "https://github.com/EvolutionAPI/evolution-api"
}
},
"servers": [
{
"url": "/v1",
"description": "API v1"
}
],
"components": {
"securitySchemes": {
"apikey": {
"type": "apiKey",
"name": "apikey",
"in": "header",
"description": "API key for authentication"
}
}
},
"security": [
{
"apikey": []
}
],
"paths": {
"/business/getCatalog/{instanceName}": {
"post": {
"tags": [
"Business"
],
"summary": "Get WhatsApp Business catalog",
"description": "Fetches all products from a WhatsApp Business catalog with automatic pagination",
"security": [
{
"apikey": []
}
],
"parameters": [
{
"in": "path",
"name": "instanceName",
"required": true,
"schema": {
"type": "string"
},
"description": "Instance name"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CatalogRequest"
}
}
}
},
"responses": {
"200": {
"description": "Catalog retrieved successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CatalogResponse"
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
},
"/business/getCollections/{instanceName}": {
"post": {
"tags": [
"Business"
],
"summary": "Get WhatsApp Business collections",
"description": "Fetches all collections with their products from a WhatsApp Business account",
"security": [
{
"apikey": []
}
],
"parameters": [
{
"in": "path",
"name": "instanceName",
"required": true,
"schema": {
"type": "string"
},
"description": "Instance name"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CollectionsRequest"
}
}
}
},
"responses": {
"200": {
"description": "Collections retrieved successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CollectionsResponse"
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
}
},
"tags": []
}
Loading