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

Commit 7c4c2d5

Browse files
committed
Merge branch 'feature/new-dashboard' into shafin/DAPI-464/feat--api-application-screen
2 parents c8153f5 + 07dffb8 commit 7c4c2d5

File tree

36 files changed

+1318
-902
lines changed

36 files changed

+1318
-902
lines changed

.github/actions/deploy_to_kubernetes/action.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,20 @@ inputs:
2323
runs:
2424
using: composite
2525
steps:
26-
- name: Setup Environment variables
27-
run: |
28-
echo "NAMESPACE=${{ inputs.K8S_NAMESPACE }}" >> "$GITHUB_ENV"
29-
echo "KUBE_SERVER=${{ inputs.KUBE_SERVER }}" >> "$GITHUB_ENV"
30-
echo "SERVICEACCOUNT_TOKEN=${{ inputs.SERVICEACCOUNT_TOKEN }}" >> "$GITHUB_ENV"
31-
echo "DOCKERHUB_ORGANISATION=${{ inputs.DOCKERHUB_ORGANISATION }}" >> "$GITHUB_ENV"
32-
echo "CA_CRT=${{ inputs.CA_CRT }}" >> "$GITHUB_ENV"
33-
echo "APP_NAME=deriv-com-api" >> "$GITHUB_ENV"
34-
shell: bash
3526
- name: Deploying to k8s cluster for service ${{ inputs.K8S_NAMESPACE }} 🚀
27+
env:
28+
K8S_VERSION: ${{ inputs.K8S_VERSION }}
29+
NAMESPACE: ${{ inputs.K8S_NAMESPACE }}
30+
KUBE_SERVER: ${{ inputs.KUBE_SERVER }}
31+
SERVICEACCOUNT_TOKEN: ${{ inputs.SERVICEACCOUNT_TOKEN }}
32+
DOCKERHUB_ORGANISATION: ${{ inputs.DOCKERHUB_ORGANISATION }}
33+
CA_CRT: ${{ inputs.CA_CRT }}
34+
APP_NAME: deriv-com-api
35+
3636
run: |
3737
git clone https://github.com/binary-com/devops-ci-scripts
3838
cd devops-ci-scripts/k8s-build_tools
39-
echo ${{ inputs.CA_CRT }} | base64 --decode > ca.crt
39+
echo $CA_CRT | base64 --decode > ca.crt
4040
export CA="ca.crt"
41-
./release.sh ${APP_NAME} ${{ inputs.K8S_VERSION }}
41+
./release.sh ${APP_NAME} $K8S_VERSION
4242
shell: bash

.github/actions/notify_slack/action.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@ runs:
1111
using: composite
1212
steps:
1313
- name: Send Slack Notification
14-
run: |-
15-
curl -X POST -H 'Content-type: application/json' \
16-
--data '{
17-
"text": "${{ inputs.MESSAGE }}",
18-
}' \
19-
${{ inputs.SLACK_WEBHOOK_URL }}
20-
shell: bash
14+
uses: 'deriv-com/shared-actions/.github/actions/send_slack_notification@master'
15+
with:
16+
SLACK_WEBHOOK_URL: ${{ inputs.SLACK_WEBHOOK_URL }}
17+
MESSAGE: ${{ inputs.MESSAGE }}
18+

.github/actions/publish_to_docker/action.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,33 @@ runs:
2121
using: composite
2222
steps:
2323
- name: Building docker image 🐳
24+
env:
25+
DOCKERHUB_ORGANISATION: ${{ inputs.DOCKERHUB_ORGANISATION }}
26+
DOCKER_IMAGE_TAG: ${{ inputs.DOCKER_IMAGE_TAG }}
27+
DOCKER_LATEST_IMAGE_TAG: ${{ inputs.DOCKER_LATEST_IMAGE_TAG }}
2428
run: |
25-
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 }} .
29+
docker build -t $DOCKERHUB_ORGANISATION/deriv-com-api:$DOCKER_IMAGE_TAG -t $DOCKERHUB_ORGANISATION/deriv-com-api:$DOCKER_LATEST_IMAGE_TAG .
2630
shell: bash
31+
2732
- name: Verify nginx image
33+
env:
34+
DOCKERHUB_ORGANISATION: ${{ inputs.DOCKERHUB_ORGANISATION }}
35+
DOCKER_LATEST_IMAGE_TAG: ${{ inputs.DOCKER_LATEST_IMAGE_TAG }}
2836
run: |
2937
set -e
30-
docker run --rm ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_LATEST_IMAGE_TAG }} nginx -t
38+
docker run --rm $DOCKERHUB_ORGANISATION/deriv-com-api:$DOCKER_LATEST_IMAGE_TAG nginx -t
3139
echo "docker image validated successfully"
3240
shell: bash
41+
3342
- name: Pushing Image to docker hub 🐳
43+
env:
44+
DOCKERHUB_ORGANISATION: ${{ inputs.DOCKERHUB_ORGANISATION }}
45+
DOCKER_IMAGE_TAG: ${{ inputs.DOCKER_IMAGE_TAG }}
46+
DOCKER_LATEST_IMAGE_TAG: ${{ inputs.DOCKER_LATEST_IMAGE_TAG }}
47+
DOCKERHUB_PASSWORD: ${{ inputs.DOCKERHUB_PASSWORD }}
48+
DOCKERHUB_USERNAME: ${{ inputs.DOCKERHUB_USERNAME }}
3449
run: |
35-
echo ${{ inputs.DOCKERHUB_PASSWORD }} | docker login -u ${{ inputs.DOCKERHUB_USERNAME }} --password-stdin
36-
docker push ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_IMAGE_TAG }}
37-
docker push ${{ inputs.DOCKERHUB_ORGANISATION }}/deriv-com-api:${{ inputs.DOCKER_LATEST_IMAGE_TAG }}
50+
echo $DOCKERHUB_PASSWORD | docker login -u $DOCKERHUB_USERNAME --password-stdin
51+
docker push $DOCKERHUB_ORGANISATION/deriv-com-api:$DOCKER_IMAGE_TAG
52+
docker push $DOCKERHUB_ORGANISATION/deriv-com-api:$DOCKER_LATEST_IMAGE_TAG
3853
shell: bash

.github/actions/publish_to_pages/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ runs:
2525
run: |-
2626
2727
cd build
28-
npx wrangler pages deploy . --project-name=${{ env.PROJECT_NAME }} --branch=${{ env.CF_BRANCH }}
29-
echo "New staging website - https://${{ env.CF_BRANCH }}-api.deriv.com/"
28+
npx wrangler pages deploy . --project-name=$PROJECT_NAME --branch=$CF_BRANCH
29+
echo "New staging website - https://$CF_BRANCH-api.deriv.com/"
3030
shell: bash

.github/actions/versioning/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,8 @@ runs:
1212
using: composite
1313
steps:
1414
- name: Tag build
15-
run: echo "${{ inputs.RELEASE_TYPE }}--GITHUB_REF:${{ inputs.RELEASE_TAG }}--DATE:$(date -u +'%Y-%m-%dT%H:%M:%SZ')" > build/version.txt
15+
env:
16+
RELEASE_TYPE: ${{ inputs.RELEASE_TYPE }}
17+
RELEASE_TAG: ${{ inputs.RELEASE_TAG }}
18+
run: echo "$RELEASE_TYPE--GITHUB_REF:$RELEASE_TAG--DATE:$(date -u +'%Y-%m-%dT%H:%M:%SZ')" > build/version.txt
1619
shell: bash

.github/workflows/release_production.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ jobs:
5858
- name: Create Slack Message
5959
id: create_slack_message
6060
run: |
61-
if [ "${{ env.WORKFLOW_CONCLUSION }}" == "success" ]; then
62-
echo "MESSAGE=${{ env.RELEASE_TYPE }} Release succeeded for api.deriv.com with version *${{ needs.build_and_publish.outputs.RELEASE_VERSION }}*" >> $GITHUB_OUTPUT
61+
if [ "$WORKFLOW_CONCLUSION" == "success" ]; then
62+
echo "MESSAGE=$RELEASE_TYPE Release succeeded for api.deriv.com with version *${{ needs.build_and_publish.outputs.RELEASE_VERSION }}*" >> $GITHUB_OUTPUT
6363
else
64-
echo "MESSAGE=${{ env.RELEASE_TYPE }} Release failed for api.deriv.com with version *${{ needs.build_and_publish.outputs.RELEASE_VERSION }}*" >> $GITHUB_OUTPUT
64+
echo "MESSAGE=$RELEASE_TYPE Release failed for api.deriv.com with version *${{ needs.build_and_publish.outputs.RELEASE_VERSION }}*" >> $GITHUB_OUTPUT
6565
fi
6666
- name: Send Slack Notification
6767
uses: ./.github/actions/notify_slack
@@ -106,4 +106,4 @@ jobs:
106106
uses: ./.github/actions/notify_slack
107107
with:
108108
RELEASE_TYPE: ${{ env.RELEASE_TYPE }}
109-
MESSAGE: "'${{ env.RELEASE_TYPE }}' Docker Publish and Kubernetes Deployment for api.deriv.com with version *'${{ needs.build_and_publish.outputs.RELEASE_VERSION }}'* has Failed *"
109+
MESSAGE: "'${{ env.RELEASE_TYPE }}' Release succeeded for api.deriv.com with version *'${{ needs.build_and_publish.outputs.RELEASE_VERSION }}'* has Failed *"

.github/workflows/release_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ jobs:
3939
with:
4040
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
4141
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
42-
CF_BRANCH: main
43-
PROJECT_NAME: deriv-developers-portal-test-pages
42+
CF_BRANCH: uat
43+
PROJECT_NAME: deriv-developers-portal-pages

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ npm-debug.log*
2222
yarn-debug.log*
2323
yarn-error.log*
2424

25-
.idea
25+
.idea
26+
27+
.vscode/settings.json

_data/v3.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ groups:
135135
title: P2P Advertiser Update
136136
- name: p2p_chat_create
137137
title: P2P Chat Create
138+
- name: p2p_country_list
139+
title: P2P Country List
138140
- name: p2p_order_cancel
139141
title: P2P Order Cancel
140142
- name: p2p_order_confirm

config/v3/authorize/receive.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@
4545
"description": "Currency of specified account.",
4646
"type": "string"
4747
},
48+
"currency_type": {
49+
"description": "Currency type for the corresponding currency.",
50+
"type": "string"
51+
},
4852
"excluded_until": {
4953
"description": "Epoch of date till client has excluded him/herself from the website, only present if client is self excluded.",
5054
"type": "integer"

config/v3/get_account_status/receive.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,14 @@
237237
"type": "string"
238238
}
239239
},
240+
"report_available": {
241+
"description": "Indicate if the verification report was returned by the provider",
242+
"type": "integer",
243+
"enum": [
244+
0,
245+
1
246+
]
247+
},
240248
"reported_properties": {
241249
"description": "Shows the latest document properties detected and reported by IDVS",
242250
"type": "object"
@@ -518,7 +526,7 @@
518526
]
519527
},
520528
"status": {
521-
"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.",
529+
"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",
522530
"type": "array",
523531
"items": {
524532
"type": "string"

config/v3/kyc_auth_status/receive.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@
7070
"items": {
7171
"type": "string"
7272
}
73+
},
74+
"report_available": {
75+
"description": "Indicate if the verification report was returned by the provider (IDV only).",
76+
"type": "integer",
77+
"enum": [
78+
0,
79+
1
80+
]
7381
}
7482
}
7583
},
@@ -200,6 +208,14 @@
200208
"items": {
201209
"type": "string"
202210
}
211+
},
212+
"report_available": {
213+
"description": "Indicate if the verification report was returned by the provider (IDV only).",
214+
"type": "integer",
215+
"enum": [
216+
0,
217+
1
218+
]
203219
}
204220
}
205221
},

config/v3/mt5_login_list/receive.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,29 @@
354354
"type": "boolean"
355355
}
356356
}
357+
},
358+
"white_label_links": {
359+
"description": "Links to access MT5 application for different platforms.",
360+
"type": "object",
361+
"additionalProperties": false,
362+
"properties": {
363+
"android": {
364+
"description": "Download link for Android.",
365+
"type": "string"
366+
},
367+
"ios": {
368+
"description": "Download link for iOS.",
369+
"type": "string"
370+
},
371+
"webtrader_url": {
372+
"description": "MT5 webtrader url based on jurisdiction and platform",
373+
"type": "string"
374+
},
375+
"windows": {
376+
"description": "Download link for Windows.",
377+
"type": "string"
378+
}
379+
}
357380
}
358381
}
359382
}

config/v3/new_account_maltainvest/send.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"last_name",
1919
"residence",
2020
"salutation",
21-
"tax_identification_number",
2221
"tax_residence"
2322
],
2423
"properties": {

0 commit comments

Comments
 (0)