Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
Merge branch 'feature/new-dashboard' into shafin/DAPI-464/feat--api-a…
Browse files Browse the repository at this point in the history
…pplication-screen
  • Loading branch information
shafin-deriv committed Apr 17, 2024
2 parents c8153f5 + 07dffb8 commit 7c4c2d5
Show file tree
Hide file tree
Showing 36 changed files with 1,318 additions and 902 deletions.
22 changes: 11 additions & 11 deletions .github/actions/deploy_to_kubernetes/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ inputs:
runs:
using: composite
steps:
- name: Setup Environment variables
run: |
echo "NAMESPACE=${{ inputs.K8S_NAMESPACE }}" >> "$GITHUB_ENV"
echo "KUBE_SERVER=${{ inputs.KUBE_SERVER }}" >> "$GITHUB_ENV"
echo "SERVICEACCOUNT_TOKEN=${{ inputs.SERVICEACCOUNT_TOKEN }}" >> "$GITHUB_ENV"
echo "DOCKERHUB_ORGANISATION=${{ inputs.DOCKERHUB_ORGANISATION }}" >> "$GITHUB_ENV"
echo "CA_CRT=${{ inputs.CA_CRT }}" >> "$GITHUB_ENV"
echo "APP_NAME=deriv-com-api" >> "$GITHUB_ENV"
shell: bash
- name: Deploying to k8s cluster for service ${{ inputs.K8S_NAMESPACE }} 🚀
env:
K8S_VERSION: ${{ inputs.K8S_VERSION }}
NAMESPACE: ${{ inputs.K8S_NAMESPACE }}
KUBE_SERVER: ${{ inputs.KUBE_SERVER }}
SERVICEACCOUNT_TOKEN: ${{ inputs.SERVICEACCOUNT_TOKEN }}
DOCKERHUB_ORGANISATION: ${{ inputs.DOCKERHUB_ORGANISATION }}
CA_CRT: ${{ inputs.CA_CRT }}
APP_NAME: deriv-com-api

run: |
git clone https://github.com/binary-com/devops-ci-scripts
cd devops-ci-scripts/k8s-build_tools
echo ${{ inputs.CA_CRT }} | base64 --decode > ca.crt
echo $CA_CRT | base64 --decode > ca.crt
export CA="ca.crt"
./release.sh ${APP_NAME} ${{ inputs.K8S_VERSION }}
./release.sh ${APP_NAME} $K8S_VERSION
shell: bash
12 changes: 5 additions & 7 deletions .github/actions/notify_slack/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ runs:
using: composite
steps:
- name: Send Slack Notification
run: |-
curl -X POST -H 'Content-type: application/json' \
--data '{
"text": "${{ inputs.MESSAGE }}",
}' \
${{ inputs.SLACK_WEBHOOK_URL }}
shell: bash
uses: 'deriv-com/shared-actions/.github/actions/send_slack_notification@master'
with:
SLACK_WEBHOOK_URL: ${{ inputs.SLACK_WEBHOOK_URL }}
MESSAGE: ${{ inputs.MESSAGE }}

25 changes: 20 additions & 5 deletions .github/actions/publish_to_docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,33 @@ runs:
using: composite
steps:
- name: Building docker image 🐳
env:
DOCKERHUB_ORGANISATION: ${{ inputs.DOCKERHUB_ORGANISATION }}
DOCKER_IMAGE_TAG: ${{ inputs.DOCKER_IMAGE_TAG }}
DOCKER_LATEST_IMAGE_TAG: ${{ inputs.DOCKER_LATEST_IMAGE_TAG }}
run: |
docker build -t ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_IMAGE_TAG }} -t ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_LATEST_IMAGE_TAG }} .
docker build -t $DOCKERHUB_ORGANISATION/deriv-com-api:$DOCKER_IMAGE_TAG -t $DOCKERHUB_ORGANISATION/deriv-com-api:$DOCKER_LATEST_IMAGE_TAG .
shell: bash

- name: Verify nginx image
env:
DOCKERHUB_ORGANISATION: ${{ inputs.DOCKERHUB_ORGANISATION }}
DOCKER_LATEST_IMAGE_TAG: ${{ inputs.DOCKER_LATEST_IMAGE_TAG }}
run: |
set -e
docker run --rm ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_LATEST_IMAGE_TAG }} nginx -t
docker run --rm $DOCKERHUB_ORGANISATION/deriv-com-api:$DOCKER_LATEST_IMAGE_TAG nginx -t
echo "docker image validated successfully"
shell: bash

- name: Pushing Image to docker hub 🐳
env:
DOCKERHUB_ORGANISATION: ${{ inputs.DOCKERHUB_ORGANISATION }}
DOCKER_IMAGE_TAG: ${{ inputs.DOCKER_IMAGE_TAG }}
DOCKER_LATEST_IMAGE_TAG: ${{ inputs.DOCKER_LATEST_IMAGE_TAG }}
DOCKERHUB_PASSWORD: ${{ inputs.DOCKERHUB_PASSWORD }}
DOCKERHUB_USERNAME: ${{ inputs.DOCKERHUB_USERNAME }}
run: |
echo ${{ inputs.DOCKERHUB_PASSWORD }} | docker login -u ${{ inputs.DOCKERHUB_USERNAME }} --password-stdin
docker push ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_IMAGE_TAG }}
docker push ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_LATEST_IMAGE_TAG }}
echo $DOCKERHUB_PASSWORD | docker login -u $DOCKERHUB_USERNAME --password-stdin
docker push $DOCKERHUB_ORGANISATION/deriv-com-api:$DOCKER_IMAGE_TAG
docker push $DOCKERHUB_ORGANISATION/deriv-com-api:$DOCKER_LATEST_IMAGE_TAG
shell: bash
4 changes: 2 additions & 2 deletions .github/actions/publish_to_pages/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ runs:
run: |-
npm i [email protected]
cd build
npx wrangler pages deploy . --project-name=${{ env.PROJECT_NAME }} --branch=${{ env.CF_BRANCH }}
echo "New staging website - https://${{ env.CF_BRANCH }}-api.deriv.com/"
npx wrangler pages deploy . --project-name=$PROJECT_NAME --branch=$CF_BRANCH
echo "New staging website - https://$CF_BRANCH-api.deriv.com/"
shell: bash
5 changes: 4 additions & 1 deletion .github/actions/versioning/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ runs:
using: composite
steps:
- name: Tag build
run: echo "${{ inputs.RELEASE_TYPE }}--GITHUB_REF:${{ inputs.RELEASE_TAG }}--DATE:$(date -u +'%Y-%m-%dT%H:%M:%SZ')" > build/version.txt
env:
RELEASE_TYPE: ${{ inputs.RELEASE_TYPE }}
RELEASE_TAG: ${{ inputs.RELEASE_TAG }}
run: echo "$RELEASE_TYPE--GITHUB_REF:$RELEASE_TAG--DATE:$(date -u +'%Y-%m-%dT%H:%M:%SZ')" > build/version.txt
shell: bash
8 changes: 4 additions & 4 deletions .github/workflows/release_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ jobs:
- name: Create Slack Message
id: create_slack_message
run: |
if [ "${{ env.WORKFLOW_CONCLUSION }}" == "success" ]; then
echo "MESSAGE=${{ env.RELEASE_TYPE }} Release succeeded for api.deriv.com with version *${{ needs.build_and_publish.outputs.RELEASE_VERSION }}*" >> $GITHUB_OUTPUT
if [ "$WORKFLOW_CONCLUSION" == "success" ]; then
echo "MESSAGE=$RELEASE_TYPE Release succeeded for api.deriv.com with version *${{ needs.build_and_publish.outputs.RELEASE_VERSION }}*" >> $GITHUB_OUTPUT
else
echo "MESSAGE=${{ env.RELEASE_TYPE }} Release failed for api.deriv.com with version *${{ needs.build_and_publish.outputs.RELEASE_VERSION }}*" >> $GITHUB_OUTPUT
echo "MESSAGE=$RELEASE_TYPE Release failed for api.deriv.com with version *${{ needs.build_and_publish.outputs.RELEASE_VERSION }}*" >> $GITHUB_OUTPUT
fi
- name: Send Slack Notification
uses: ./.github/actions/notify_slack
Expand Down Expand Up @@ -106,4 +106,4 @@ jobs:
uses: ./.github/actions/notify_slack
with:
RELEASE_TYPE: ${{ env.RELEASE_TYPE }}
MESSAGE: "'${{ env.RELEASE_TYPE }}' Docker Publish and Kubernetes Deployment for api.deriv.com with version *'${{ needs.build_and_publish.outputs.RELEASE_VERSION }}'* has Failed *"
MESSAGE: "'${{ env.RELEASE_TYPE }}' Release succeeded for api.deriv.com with version *'${{ needs.build_and_publish.outputs.RELEASE_VERSION }}'* has Failed *"
4 changes: 2 additions & 2 deletions .github/workflows/release_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ jobs:
with:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CF_BRANCH: main
PROJECT_NAME: deriv-developers-portal-test-pages
CF_BRANCH: uat
PROJECT_NAME: deriv-developers-portal-pages
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*

.idea
.idea

.vscode/settings.json
2 changes: 2 additions & 0 deletions _data/v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ groups:
title: P2P Advertiser Update
- name: p2p_chat_create
title: P2P Chat Create
- name: p2p_country_list
title: P2P Country List
- name: p2p_order_cancel
title: P2P Order Cancel
- name: p2p_order_confirm
Expand Down
4 changes: 4 additions & 0 deletions config/v3/authorize/receive.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
"description": "Currency of specified account.",
"type": "string"
},
"currency_type": {
"description": "Currency type for the corresponding currency.",
"type": "string"
},
"excluded_until": {
"description": "Epoch of date till client has excluded him/herself from the website, only present if client is self excluded.",
"type": "integer"
Expand Down
10 changes: 9 additions & 1 deletion config/v3/get_account_status/receive.json
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,14 @@
"type": "string"
}
},
"report_available": {
"description": "Indicate if the verification report was returned by the provider",
"type": "integer",
"enum": [
0,
1
]
},
"reported_properties": {
"description": "Shows the latest document properties detected and reported by IDVS",
"type": "object"
Expand Down Expand Up @@ -518,7 +526,7 @@
]
},
"status": {
"description": "Account status. Possible status: \n- `address_verified`: client's address is verified by third party services. \n- `allow_document_upload`: client is allowed to upload documents. \n- `age_verification`: client is age-verified. \n- `authenticated`: client is fully authenticated. \n- `cashier_locked`: cashier is locked. \n- `crs_tin_information`: client has updated tax related information. \n- `deposit_locked`: deposit is not allowed. \n- `disabled`: account is disabled. \n- `document_expired`: client's submitted proof-of-identity documents have expired. \n- `document_expiring_soon`: client's submitted proof-of-identity documents are expiring within a month. \n- `dxtrade_password_not_set`: Deriv X password is not set. \n- `financial_assessment_not_complete`: client should complete their financial assessment. \n- `financial_information_not_complete`: client has not completed financial assessment. \n- `financial_risk_approval`: client has accepted financial risk disclosure. \n- `max_turnover_limit_not_set`: client has not set financial limits on their account. Applies to UK and Malta clients. \n- `mt5_password_not_set`: MT5 password is not set. \n- `mt5_withdrawal_locked`: MT5 deposits allowed, but withdrawal is not allowed. \n- `needs_affiliate_coc_approval`: user must approve the Affiliate's Code of Conduct Agreement. \n- `no_trading`: trading is disabled. \n- `no_withdrawal_or_trading`: client cannot trade or withdraw but can deposit. \n- `p2p_blocked_for_pa`: p2p is blocked for the current payment agent client. \n- `pa_withdrawal_explicitly_allowed`: withdrawal through payment agent is allowed. \n- `password_reset_required`: this client must reset their password. \n- `professional`: this client has opted for a professional account. \n- `professional_requested`: this client has requested for a professional account. \n- `professional_rejected`: this client's request for a professional account has been rejected. \n- `social_signup`: this client is using social signup. \n- `trading_experience_not_complete`: client has not completed the trading experience questionnaire. \n- `ukgc_funds_protection`: client has acknowledged UKGC funds protection notice. \n- `unwelcome`: client cannot deposit or buy contracts, but can withdraw or sell contracts. \n- `withdrawal_locked`: deposits allowed but withdrawals are not allowed. \n- `deposit_attempt`: this prevent a client from changing the account currency after deposit attempt. \n- `poi_name_mismatch`: client POI documents name mismatch. \n- `allow_poa_resubmission`: the client can resubmit POA documents. \n- `allow_poi_resubmission`: the client can resubmit POI documents. \n- `shared_payment_method`: the client has been sharing payment methods. \n- `personal_details_locked`: client is not allowed to edit personal profile details. \n- `transfers_blocked`: it block any transfer between two accounts. \n- `df_deposit_requires_poi`: the DF deposit will be blocked until the client gets age verified. \n- `authenticated_with_idv_photoid`: the client has been fully authenticated by IDV. \n- `idv_revoked`: the client used to be fully authenticated by IDV but it was taken away due to compliance criteria. \n- `mt5_additional_kyc_required`: client tax information, place of birth and account opening reason is missing. \n- `poi_expiring_soon`: the POI documents of the client will get expired soon, allow them to reupload POI documents. \n- `poa_expiring_soon`: the POA documents of the client will get outdated soon, allow them to reupload POA documents.",
"description": "Account status. Possible status: \n- `address_verified`: client's address is verified by third party services. \n- `allow_document_upload`: client is allowed to upload documents. \n- `age_verification`: client is age-verified. \n- `authenticated`: client is fully authenticated. \n- `cashier_locked`: cashier is locked. \n- `crs_tin_information`: client has updated tax related information. \n- `deposit_locked`: deposit is not allowed. \n- `disabled`: account is disabled. \n- `document_expired`: client's submitted proof-of-identity documents have expired. \n- `document_expiring_soon`: client's submitted proof-of-identity documents are expiring within a month. \n- `dxtrade_password_not_set`: Deriv X password is not set. \n- `financial_assessment_not_complete`: client should complete their financial assessment. \n- `financial_information_not_complete`: client has not completed financial assessment. \n- `financial_risk_approval`: client has accepted financial risk disclosure. \n- `max_turnover_limit_not_set`: client has not set financial limits on their account. Applies to UK and Malta clients. \n- `mt5_password_not_set`: MT5 password is not set. \n- `mt5_withdrawal_locked`: MT5 deposits allowed, but withdrawal is not allowed. \n- `needs_affiliate_coc_approval`: user must approve the Affiliate's Code of Conduct Agreement. \n- `no_trading`: trading is disabled. \n- `no_withdrawal_or_trading`: client cannot trade or withdraw but can deposit. \n- `p2p_blocked_for_pa`: p2p is blocked for the current payment agent client. \n- `pa_withdrawal_explicitly_allowed`: withdrawal through payment agent is allowed. \n- `password_reset_required`: this client must reset their password. \n- `professional`: this client has opted for a professional account. \n- `professional_requested`: this client has requested for a professional account. \n- `professional_rejected`: this client's request for a professional account has been rejected. \n- `social_signup`: this client is using social signup. \n- `trading_experience_not_complete`: client has not completed the trading experience questionnaire. \n- `ukgc_funds_protection`: client has acknowledged UKGC funds protection notice. \n- `unwelcome`: client cannot deposit or buy contracts, but can withdraw or sell contracts. \n- `withdrawal_locked`: deposits allowed but withdrawals are not allowed. \n- `deposit_attempt`: this prevent a client from changing the account currency after deposit attempt. \n- `poi_name_mismatch`: client POI documents name mismatch. \n- `allow_poa_resubmission`: the client can resubmit POA documents. \n- `allow_poi_resubmission`: the client can resubmit POI documents. \n- `shared_payment_method`: the client has been sharing payment methods. \n- `personal_details_locked`: client is not allowed to edit personal profile details. \n- `transfers_blocked`: it block any transfer between two accounts. \n- `df_deposit_requires_poi`: the DF deposit will be blocked until the client gets age verified. \n- `authenticated_with_idv_photoid`: the client has been fully authenticated by IDV. \n- `idv_revoked`: the client used to be fully authenticated by IDV but it was taken away due to compliance criteria. \n- `mt5_additional_kyc_required`: client tax information, place of birth and account opening reason is missing. \n- `poi_expiring_soon`: the POI documents of the client will get expired soon, allow them to reupload POI documents. \n- `poa_expiring_soon`: the POA documents of the client will get outdated soon, allow them to reupload POA documents. \n- `tin_manually_approved`: the client's tax_identification_number has been manually approved as client is not applicable for tax_identification_number",
"type": "array",
"items": {
"type": "string"
Expand Down
16 changes: 16 additions & 0 deletions config/v3/kyc_auth_status/receive.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@
"items": {
"type": "string"
}
},
"report_available": {
"description": "Indicate if the verification report was returned by the provider (IDV only).",
"type": "integer",
"enum": [
0,
1
]
}
}
},
Expand Down Expand Up @@ -200,6 +208,14 @@
"items": {
"type": "string"
}
},
"report_available": {
"description": "Indicate if the verification report was returned by the provider (IDV only).",
"type": "integer",
"enum": [
0,
1
]
}
}
},
Expand Down
23 changes: 23 additions & 0 deletions config/v3/mt5_login_list/receive.json
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,29 @@
"type": "boolean"
}
}
},
"white_label_links": {
"description": "Links to access MT5 application for different platforms.",
"type": "object",
"additionalProperties": false,
"properties": {
"android": {
"description": "Download link for Android.",
"type": "string"
},
"ios": {
"description": "Download link for iOS.",
"type": "string"
},
"webtrader_url": {
"description": "MT5 webtrader url based on jurisdiction and platform",
"type": "string"
},
"windows": {
"description": "Download link for Windows.",
"type": "string"
}
}
}
}
}
Expand Down
1 change: 0 additions & 1 deletion config/v3/new_account_maltainvest/send.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"last_name",
"residence",
"salutation",
"tax_identification_number",
"tax_residence"
],
"properties": {
Expand Down
Loading

0 comments on commit 7c4c2d5

Please sign in to comment.