Skip to content

Commit

Permalink
👷 Add email alert hourly sender
Browse files Browse the repository at this point in the history
Closes #549
  • Loading branch information
baptisteArno committed Jun 6, 2023
1 parent 40ef934 commit a4cb6fa
Show file tree
Hide file tree
Showing 16 changed files with 797 additions and 125 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/send-limit-email-alerts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Send chats limit alert emails

on:
schedule:
- cron: '0 * * * *'

jobs:
send:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/scripts
env:
DATABASE_URL: '${{ secrets.DATABASE_URL }}'
TELEMETRY_WEBHOOK_URL: '${{ secrets.TELEMETRY_WEBHOOK_URL }}'
TELEMETRY_WEBHOOK_BEARER_TOKEN: '${{ secrets.TELEMETRY_WEBHOOK_BEARER_TOKEN }}'
SMTP_USERNAME: '${{ secrets.SMTP_USERNAME }}'
SMTP_PASSWORD: '${{ secrets.SMTP_PASSWORD }}'
SMTP_HOST: '${{ secrets.SMTP_HOST }}'
SMTP_PORT: '${{ secrets.SMTP_PORT }}'
NEXT_PUBLIC_SMTP_FROM: '${{ secrets.NEXT_PUBLIC_SMTP_FROM }}'
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2.2.2
- run: pnpm i --frozen-lockfile
- run: pnpm turbo run sendAlertEmails
164 changes: 164 additions & 0 deletions apps/docs/openapi/builder/_spec_.json
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,46 @@
"data"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"userId": {
"type": "string"
},
"workspaceId": {
"type": "string"
},
"name": {
"type": "string",
"enum": [
"Workspace automatically quarantined"
]
},
"data": {
"type": "object",
"properties": {
"chatsLimit": {
"type": "number"
},
"totalChatsUsed": {
"type": "number"
}
},
"required": [
"chatsLimit",
"totalChatsUsed"
],
"additionalProperties": false
}
},
"required": [
"userId",
"workspaceId",
"name",
"data"
],
"additionalProperties": false
}
]
}
Expand Down Expand Up @@ -816,6 +856,68 @@
},
"content": {
"type": "string"
},
"displayCondition": {
"type": "object",
"properties": {
"isEnabled": {
"type": "boolean"
},
"condition": {
"type": "object",
"properties": {
"logicalOperator": {
"type": "string",
"enum": [
"OR",
"AND"
]
},
"comparisons": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"variableId": {
"type": "string"
},
"comparisonOperator": {
"type": "string",
"enum": [
"Equal to",
"Not equal",
"Contains",
"Does not contain",
"Greater than",
"Less than",
"Is set",
"Is empty",
"Starts with",
"Ends with"
]
},
"value": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
}
},
"required": [
"logicalOperator",
"comparisons"
],
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"required": [
Expand Down Expand Up @@ -1502,6 +1604,68 @@
},
"description": {
"type": "string"
},
"displayCondition": {
"type": "object",
"properties": {
"isEnabled": {
"type": "boolean"
},
"condition": {
"type": "object",
"properties": {
"logicalOperator": {
"type": "string",
"enum": [
"OR",
"AND"
]
},
"comparisons": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"variableId": {
"type": "string"
},
"comparisonOperator": {
"type": "string",
"enum": [
"Equal to",
"Not equal",
"Contains",
"Does not contain",
"Greater than",
"Less than",
"Is set",
"Is empty",
"Starts with",
"Ends with"
]
},
"value": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
}
},
"required": [
"logicalOperator",
"comparisons"
],
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"required": [
Expand Down
Loading

3 comments on commit a4cb6fa

@vercel
Copy link

@vercel vercel bot commented on a4cb6fa Jun 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on a4cb6fa Jun 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on a4cb6fa Jun 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

builder-v2 – ./apps/builder

builder-v2-git-main-typebot-io.vercel.app
builder-v2-typebot-io.vercel.app
app.typebot.io

Please sign in to comment.