-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #324 from shawakash/mail_server
feat: init a new module for smtp server for paybox
- Loading branch information
Showing
45 changed files
with
5,966 additions
and
126 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@paybox/mail-zeus": patch | ||
"@paybox/mail": patch | ||
--- | ||
|
||
feat: init a new module for smtp server for paybox |
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,44 @@ | ||
version: "3.8" | ||
|
||
services: | ||
|
||
postgres: | ||
image: postgres:15.0-alpine | ||
ports: | ||
- 4446:5432 | ||
volumes: | ||
- mail_data:/var/lib/postgresql1/data | ||
restart: always | ||
environment: | ||
POSTGRES_DB: reef_dev | ||
POSTGRES_PASSWORD: pass | ||
POSTGRES_USER: user | ||
healthcheck: | ||
test: pg_isready --username=user --dbname=reef_dev --quiet | ||
interval: 15s | ||
timeout: 5s | ||
|
||
hasura: | ||
image: hasura/graphql-engine:v2.38.0 | ||
ports: | ||
- 8114:8080 | ||
depends_on: | ||
- postgres | ||
volumes: | ||
- "./hasura/metadata:/hasura-metadata" | ||
- "./hasura/migrations:/hasura-migrations" | ||
restart: unless-stopped | ||
healthcheck: | ||
test: curl -f http://localhost:8080/healthz || exit 1 | ||
interval: 10s | ||
timeout: 10s | ||
retries: 15 | ||
environment: | ||
HASURA_GRAPHQL_DATABASE_URL: postgres://user:pass@postgres/reef_dev | ||
PG_DATABASE_URL: postgres://user:pass@postgres/reef_dev | ||
HASURA_GRAPHQL_DEV_MODE: "true" | ||
HASURA_GRAPHQL_ADMIN_SECRET: myadminsecretkey | ||
HASURA_GRAPHQL_ENABLE_CONSOLE: "true" | ||
|
||
volumes: | ||
mail_data: |
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,4 @@ | ||
version: 3 | ||
endpoint: http://localhost:8114 | ||
metadata_directory: metadata | ||
admin_secret: myadminsecretkey |
Empty file.
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,6 @@ | ||
actions: [] | ||
custom_types: | ||
enums: [] | ||
input_objects: [] | ||
objects: [] | ||
scalars: [] |
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 @@ | ||
[] |
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 @@ | ||
{} |
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,13 @@ | ||
dataconnector: | ||
athena: | ||
uri: http://localhost:8081/api/v1/athena | ||
mariadb: | ||
uri: http://localhost:8081/api/v1/mariadb | ||
mongodb: | ||
uri: http://localhost:8082 | ||
mysql8: | ||
uri: http://localhost:8081/api/v1/mysql | ||
oracle: | ||
uri: http://localhost:8081/api/v1/oracle | ||
snowflake: | ||
uri: http://localhost:8081/api/v1/snowflake |
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 @@ | ||
[] |
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,9 @@ | ||
- name: default | ||
kind: postgres | ||
configuration: | ||
connection_info: | ||
database_url: | ||
from_env: PG_DATABASE_URL | ||
isolation_level: read-committed | ||
use_prepared_statements: false | ||
tables: "!include default/tables/tables.yaml" |
13 changes: 13 additions & 0 deletions
13
backend/hasura-mail/hasura/metadata/databases/default/tables/public_custom_address.yaml
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,13 @@ | ||
table: | ||
name: custom_address | ||
schema: public | ||
configuration: | ||
column_config: | ||
created_at: | ||
custom_name: createdAt | ||
updated_at: | ||
custom_name: updatedAt | ||
custom_column_names: | ||
created_at: createdAt | ||
updated_at: updatedAt | ||
custom_root_fields: {} |
25 changes: 25 additions & 0 deletions
25
backend/hasura-mail/hasura/metadata/databases/default/tables/public_mails.yaml
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,25 @@ | ||
table: | ||
name: mails | ||
schema: public | ||
configuration: | ||
column_config: | ||
created_at: | ||
custom_name: createdAt | ||
from_address: | ||
custom_name: fromAddress | ||
html_content: | ||
custom_name: htmlContent | ||
text_content: | ||
custom_name: textContent | ||
to_address: | ||
custom_name: toAddress | ||
updated_at: | ||
custom_name: updatedAt | ||
custom_column_names: | ||
created_at: createdAt | ||
from_address: fromAddress | ||
html_content: htmlContent | ||
text_content: textContent | ||
to_address: toAddress | ||
updated_at: updatedAt | ||
custom_root_fields: {} |
2 changes: 2 additions & 0 deletions
2
backend/hasura-mail/hasura/metadata/databases/default/tables/tables.yaml
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,2 @@ | ||
- "!include public_custom_address.yaml" | ||
- "!include public_mails.yaml" |
1 change: 1 addition & 0 deletions
1
backend/hasura-mail/hasura/metadata/graphql_schema_introspection.yaml
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 @@ | ||
disabled_for_roles: [] |
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 @@ | ||
[] |
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 @@ | ||
{} |
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 @@ | ||
{} |
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 @@ | ||
{} |
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 @@ | ||
[] |
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 @@ | ||
[] |
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 @@ | ||
[] |
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 @@ | ||
version: 3 |
45 changes: 45 additions & 0 deletions
45
backend/hasura-mail/hasura/migrations/default/1711624665816_initial/up.sql
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,45 @@ | ||
SET check_function_bodies = false; | ||
CREATE FUNCTION public.set_current_timestamp_updated_at() RETURNS trigger | ||
LANGUAGE plpgsql | ||
AS $$ | ||
DECLARE | ||
_new record; | ||
BEGIN | ||
_new := NEW; | ||
_new."updated_at" = NOW(); | ||
RETURN _new; | ||
END; | ||
$$; | ||
CREATE TABLE public.custom_address ( | ||
id uuid DEFAULT gen_random_uuid() NOT NULL, | ||
address text NOT NULL, | ||
description text NOT NULL, | ||
key text NOT NULL, | ||
created_at timestamp with time zone DEFAULT now() NOT NULL, | ||
updated_at timestamp with time zone DEFAULT now() NOT NULL | ||
); | ||
COMMENT ON TABLE public.custom_address IS 'custom address for paybox'; | ||
CREATE TABLE public.mails ( | ||
id uuid DEFAULT gen_random_uuid() NOT NULL, | ||
from_address text NOT NULL, | ||
to_address text NOT NULL, | ||
subject text NOT NULL, | ||
text_content text NOT NULL, | ||
html_content text NOT NULL, | ||
created_at timestamp with time zone DEFAULT now() NOT NULL, | ||
updated_at timestamp with time zone DEFAULT now() NOT NULL, | ||
date timestamp with time zone NOT NULL | ||
); | ||
COMMENT ON TABLE public.mails IS 'mails from clients'; | ||
ALTER TABLE ONLY public.custom_address | ||
ADD CONSTRAINT custom_address_address_key UNIQUE (address); | ||
ALTER TABLE ONLY public.custom_address | ||
ADD CONSTRAINT custom_address_key_key UNIQUE (key); | ||
ALTER TABLE ONLY public.custom_address | ||
ADD CONSTRAINT custom_address_pkey PRIMARY KEY (id); | ||
ALTER TABLE ONLY public.mails | ||
ADD CONSTRAINT mails_pkey PRIMARY KEY (id); | ||
CREATE TRIGGER set_public_custom_address_updated_at BEFORE UPDATE ON public.custom_address FOR EACH ROW EXECUTE FUNCTION public.set_current_timestamp_updated_at(); | ||
COMMENT ON TRIGGER set_public_custom_address_updated_at ON public.custom_address IS 'trigger to set value of column "updated_at" to current timestamp on row update'; | ||
CREATE TRIGGER set_public_mails_updated_at BEFORE UPDATE ON public.mails FOR EACH ROW EXECUTE FUNCTION public.set_current_timestamp_updated_at(); | ||
COMMENT ON TRIGGER set_public_mails_updated_at ON public.mails IS 'trigger to set value of column "updated_at" to current timestamp on row update'; |
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,10 @@ | ||
node_modules | ||
.build | ||
.next | ||
out | ||
.env | ||
dist | ||
.DS_Store | ||
npm-debug.log | ||
yarn-error.log | ||
.turbo |
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,2 @@ | ||
HASURA_MAIL_URL= | ||
HASURA_MAIL_ADMIN_SECRET= |
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,34 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
node_modules | ||
.pnp | ||
.pnp.js | ||
|
||
# testing | ||
coverage | ||
|
||
build | ||
/dist | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# turbo | ||
.turbo | ||
|
||
# vercel | ||
.vercel |
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,13 @@ | ||
# backend/ws/.yarnrc | ||
|
||
# Use Workspaces (if needed, though it's typically inherited) | ||
workspaces-experimental true | ||
|
||
"@paybox:registry" "https://registry.yarnpkg.com/" | ||
|
||
# Specify private registry for private packages | ||
# "@paybox:registry" "https://your-private-registry-url/" | ||
|
||
# Use selective version resolutions if needed | ||
# For example, to specify a different version of a package for this workspace | ||
# "@paybox/ws" "1.0.0" |
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,13 @@ | ||
# @paybox/zeus | ||
|
||
## 0.1.1 | ||
|
||
### Patch Changes | ||
|
||
- 2f0d245: feat: updating scripts and pipeline and adding some actions | ||
|
||
## 0.1.0 | ||
|
||
### Minor Changes | ||
|
||
- init package publishing |
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,23 @@ | ||
{ | ||
"name": "@paybox/mail-zeus", | ||
"version": "0.0.1", | ||
"main": "./src/index.ts", | ||
"types": "./src/index.ts", | ||
"license": "MIT", | ||
"private": "true", | ||
"scripts": { | ||
"zeus": "zeus http://localhost:8114/v1/graphql ./src --header=x-hasura-admin-secret:myadminsecretkey --header=x-hasura-role:admin --subscriptions && prettier src/zeus/*.ts --write", | ||
"build": "esbuild ./src/index.ts --bundle --platform=node --outfile=dist/index.js", | ||
"dev": "yarn build -- --watch", | ||
"codegen": "graphql-codegen generate --config src/codegen.yml" | ||
}, | ||
"dependencies": { | ||
"@graphql-codegen/cli": "^5.0.0", | ||
"@graphql-codegen/typescript": "^4.0.1", | ||
"@graphql-codegen/typescript-operations": "^4.0.1", | ||
"graphql": "^16.8.1", | ||
"graphql-zeus": "^5.3.2", | ||
"prettier": "^3.1.0", | ||
"tsc-alias": "^1.7.1" | ||
} | ||
} |
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,9 @@ | ||
overwrite: true | ||
schema: | ||
- http://localhost:8114/v1/graphql: | ||
headers: | ||
x-hasura-admin-secret: myadminsecretkey | ||
generates: | ||
src/codegen/types.ts: | ||
plugins: | ||
- "typescript" |
Oops, something went wrong.