Initial commit
This commit is contained in:
174
templates/config/mailer.yml.erb
Normal file
174
templates/config/mailer.yml.erb
Normal file
@@ -0,0 +1,174 @@
|
||||
keychain:
|
||||
barong:
|
||||
algorithm: RS256
|
||||
value: "<%= @barong_public_key %>"
|
||||
peatio:
|
||||
algorithm: RS256
|
||||
value: "<%= @barong_public_key %>"
|
||||
|
||||
exchanges:
|
||||
barong_system:
|
||||
name: barong.events.system
|
||||
signer: barong
|
||||
barong_model:
|
||||
name: barong.events.model
|
||||
signer: barong
|
||||
peatio:
|
||||
name: peatio.events.model
|
||||
signer: peatio
|
||||
peatio_system:
|
||||
name: peatio.events.system
|
||||
signer: peatio
|
||||
events:
|
||||
- name: Email Confirmation
|
||||
key: user.email.confirmation.token
|
||||
exchange: barong_system
|
||||
templates:
|
||||
en:
|
||||
subject: Registration Confirmation
|
||||
template_path: email_confirmation.en.html.erb
|
||||
ru:
|
||||
subject: Подтверждение Регистрации
|
||||
template_path: email_confirmation.ru.html.erb
|
||||
|
||||
- name: Email Confirmation by Code
|
||||
key: user.email.confirmation.code
|
||||
exchange: barong_system
|
||||
templates:
|
||||
en:
|
||||
subject: Registration Confirmation
|
||||
template_path: email_confirmation_code.en.html.erb
|
||||
|
||||
- name: Password Reset
|
||||
key: user.password.reset.token
|
||||
exchange: barong_system
|
||||
templates:
|
||||
en:
|
||||
subject: Password Reset
|
||||
template_path: password_reset.en.html.erb
|
||||
ru:
|
||||
subject: Сброс Пароля
|
||||
template_path: password_reset.ru.html.erb
|
||||
|
||||
- name: Password Reset by confirm code
|
||||
key: user.password.confirmation.code
|
||||
exchange: barong_system
|
||||
templates:
|
||||
en:
|
||||
subject: Password Reset
|
||||
template_path: password_confirmation_code.en.html.erb
|
||||
|
||||
- name: Label Created
|
||||
key: label.created
|
||||
exchange: barong_model
|
||||
expression: |
|
||||
record.key in ["phone", "profile", "document"] &&
|
||||
record.value in ["verified", "rejected"]
|
||||
templates:
|
||||
en:
|
||||
subject: Label verified
|
||||
template_path: label.en.html.erb
|
||||
|
||||
- name: otp enable Confirmation by Code
|
||||
key: user.email.otp.enable
|
||||
exchange: barong_system
|
||||
templates:
|
||||
en:
|
||||
subject: otp enable code
|
||||
template_path: email_otp_enable_confirmation_code.en.html.erb
|
||||
|
||||
- name: otp disable Confirmation by Code
|
||||
key: user.email.otp.disable
|
||||
exchange: barong_system
|
||||
templates:
|
||||
en:
|
||||
subject: otp disable code
|
||||
template_path: email_otp_disable_confirmation_code.en.html.erb
|
||||
|
||||
- name: Label Updated
|
||||
key: label.updated
|
||||
exchange: barong_model
|
||||
expression: |
|
||||
record.key in ["phone", "profile", "document"] &&
|
||||
record.value in ["verified", "rejected"]
|
||||
templates:
|
||||
en:
|
||||
subject: Label Updated
|
||||
template_path: label.en.html.erb
|
||||
|
||||
- name: Session Create
|
||||
key: session.create
|
||||
exchange: barong_system
|
||||
templates:
|
||||
en:
|
||||
subject: New Login
|
||||
template_path: session_create.en.html.erb
|
||||
|
||||
- name: Session failed
|
||||
key: session.failed
|
||||
exchange: barong_system
|
||||
templates:
|
||||
en:
|
||||
subject: Failed Login
|
||||
template_path: session_failed.en.html.erb
|
||||
|
||||
- name: Deposit Accepted
|
||||
key: deposit.updated
|
||||
exchange: peatio
|
||||
expression: |
|
||||
changes.state == "submitted" &&
|
||||
record.state == "accepted" templates:
|
||||
en:
|
||||
subject: Deposit Accepted
|
||||
template_path: deposit_accepted.en.html.erb
|
||||
|
||||
- name: Withdrawal Succeed
|
||||
key: withdraw.updated
|
||||
exchange: peatio
|
||||
expression: |
|
||||
changes.state in ["succeed", "rejected", "canceled", "failed", "accepted"] &&
|
||||
record.state in ["succeed", "rejected", "canceled", "failed"]
|
||||
templates:
|
||||
en:
|
||||
subject: Withdrawal Succeed
|
||||
template_path: withdraw_succeed.en.html.erb
|
||||
|
||||
- name: New Beneficiary
|
||||
key: beneficiary.created
|
||||
exchange: peatio
|
||||
templates:
|
||||
en:
|
||||
subject: New Beneficiary
|
||||
template_path: new_beneficiary.en.html.erb
|
||||
|
||||
- name: Resend beneficiary
|
||||
key: beneficiary.updated
|
||||
exchange: peatio
|
||||
expression:
|
||||
and:
|
||||
record.state: 'pending'
|
||||
templates:
|
||||
EN:
|
||||
subject: Resend Beneficiary
|
||||
template_path: new_beneficiary.en.html.erb
|
||||
|
||||
- name: New Withdraw Otp
|
||||
key: user.withdraw.confirm.code
|
||||
exchange: peatio_system
|
||||
templates:
|
||||
en:
|
||||
subject: New Withdraw Otp
|
||||
template_path: withdraw_confirmation_code.en.html.erb
|
||||
|
||||
# expression example
|
||||
# - name: Session Create
|
||||
# key: session.create
|
||||
# expression:
|
||||
# and: # need to use and/or/not operator here
|
||||
# record.user_ip: '::1' # full patch to key
|
||||
# record.user.role: 'member'
|
||||
# exchange: barong_system
|
||||
# templates:
|
||||
# en:
|
||||
# subject: New Login
|
||||
# template_path: session_create.en.html.erb
|
||||
Reference in New Issue
Block a user