diff --git a/.github/actions/publish_to_pages/action.yml b/.github/actions/publish_to_pages/action.yml index 8e1302e78..27b84cdac 100644 --- a/.github/actions/publish_to_pages/action.yml +++ b/.github/actions/publish_to_pages/action.yml @@ -26,5 +26,5 @@ runs: npm i wrangler@3.10.1 cd build npx wrangler pages deploy . --project-name=$PROJECT_NAME --branch=$CF_BRANCH - echo "New staging website - https://$CF_BRANCH-api.deriv.com/" + echo "New staging website - https://$CF_BRANCH-legacy-api.deriv.com/" shell: bash diff --git a/.github/actions/publish_to_pages_production/action.yml b/.github/actions/publish_to_pages_production/action.yml index ca2822f18..d580bb0ec 100644 --- a/.github/actions/publish_to_pages_production/action.yml +++ b/.github/actions/publish_to_pages_production/action.yml @@ -18,5 +18,5 @@ runs: npm i wrangler@3.10.1 cd build npx wrangler pages deploy . --project-name=deriv-developers-portal-pages --branch=main - echo "New website - https://api.deriv.com" + echo "New website - https://legacy-api.deriv.com" shell: bash diff --git a/.github/workflows/release_production.yml b/.github/workflows/release_production.yml index 5c1898eb1..a3890b26d 100644 --- a/.github/workflows/release_production.yml +++ b/.github/workflows/release_production.yml @@ -65,9 +65,9 @@ jobs: id: create_slack_message run: | 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 + echo "MESSAGE=$RELEASE_TYPE Release succeeded for legacy-api.deriv.com with version *${{ needs.build_and_publish.outputs.RELEASE_VERSION }}*" >> $GITHUB_OUTPUT else - echo "MESSAGE=$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 legacy-api.deriv.com with version *${{ needs.build_and_publish.outputs.RELEASE_VERSION }}*" >> $GITHUB_OUTPUT fi - name: Send Slack Notification uses: ./.github/actions/notify_slack @@ -105,4 +105,4 @@ jobs: uses: ./.github/actions/notify_slack with: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - MESSAGE: "Publish to vercel failed for '${{ env.RELEASE_TYPE }}' release on api.deriv.com with version *'${{ needs.build_and_publish.outputs.RELEASE_VERSION }}" + MESSAGE: "Publish to vercel failed for '${{ env.RELEASE_TYPE }}' release on legacy-api.deriv.com with version *'${{ needs.build_and_publish.outputs.RELEASE_VERSION }}" diff --git a/config/v3/get_settings/receive.json b/config/v3/get_settings/receive.json index 25af05d38..9f85fda9c 100644 --- a/config/v3/get_settings/receive.json +++ b/config/v3/get_settings/receive.json @@ -1,356 +1,265 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Get Account Settings (response)", - "description": "A message with User Settings", - "type": "object", - "required": [ - "echo_req", - "msg_type" - ], - "properties": { - "get_settings": { - "title": "get_settings", - "description": "User information and settings.", - "type": "object", - "additionalProperties": false, - "properties": { - "account_opening_reason": { - "description": "Purpose and reason for requesting the account opening. Only applicable for real money account.", - "type": [ - "null", - "string" - ] - }, - "address_city": { - "description": "City (note: Only available for users who have at least one real account)", - "type": "string" - }, - "address_line_1": { - "description": "Address line 1 (note: Only available for users who have at least one real account)", - "type": "string" - }, - "address_line_2": { - "description": "Address line 2 (note: Only available for users who have at least one real account)", - "type": "string" - }, - "address_postcode": { - "description": "Post Code (note: Only available for users who have at least one real account)", - "type": "string" - }, - "address_state": { - "description": "State (note: Only available for users who have at least one real account)", - "type": "string" - }, - "allow_copiers": { - "description": "Boolean value 1 or 0, indicating permission to allow others to follow your trades. Note: not applicable for Virtual account. Only allow for real money account.", - "type": "integer", - "enum": [ - 0, - 1 - ] - }, - "calling_country_code": { - "description": "The phone's calling country code.", - "type": [ - "null", - "string" - ], - "sensitive": 1 - }, - "citizen": { - "description": "Country of legal citizenship, 2-letter country code.", - "type": "string" - }, - "client_tnc_status": { - "description": "Latest terms and conditions version accepted by client", - "type": [ - "null", - "string" - ] - }, - "cooling_off_expiration_date": { - "description": "Cooldown expiration epoch date when a client fails appropriateness tests", - "type": [ - "integer", - "null" - ] - }, - "country": { - "description": "User Country (same as residence field) - deprecated", - "type": [ - "null", - "string" - ] - }, - "country_code": { - "description": "2-letter country code ISO standard", - "type": [ - "null", - "string" - ], - "pattern": "^[a-z]{0,2}$" - }, - "date_of_birth": { - "description": "Epoch of user's birthday (note: Only available for users who have at least one real account)", - "type": [ - "integer", - "null" - ] - }, - "dxtrade_user_exception": { - "description": "Boolean value 1 or 0, indicating if user email belong to dxtrade exception list.", - "type": "integer", - "enum": [ - 0, - 1 - ] - }, - "email": { - "description": "User Email", - "type": "string", - "sensitive": 1 - }, - "email_consent": { - "description": "Boolean value 1 or 0, indicating permission to use email address for any contact which may include marketing", - "type": "integer", - "enum": [ - 0, - 1 - ] - }, - "employment_status": { - "description": "Employment Status.", - "type": "string" - }, - "fatca_declaration": { - "description": "Indicates client's self-declaration for FATCA.", - "type": [ - "integer", - "null" - ] - }, - "feature_flag": { - "description": "Contains features that are enabled or disabled for this user", - "type": "object", - "additionalProperties": false, - "properties": { - "wallet": { - "description": "Boolean value 1 or 0 indicating whether his feature this enabled or not", - "type": "integer", - "enum": [ - 0, - 1 - ] - } - } - }, - "first_name": { - "description": "First name (note: Only available for users who have at least one real account)", - "type": "string", - "sensitive": 1 - }, - "has_secret_answer": { - "description": "Returns 1 if the client has a secret answer, 0 otherwise.", - "type": "integer", - "enum": [ - 0, - 1 - ] - }, - "immutable_fields": { - "description": "A list of profile fields which are immutable (read-only unless they are not set yet) due to landing company regulations and the current status of the account.", - "type": "array", - "items": { - "type": "string" - } - }, - "is_authenticated_payment_agent": { - "description": "Boolean value 1 or 0, indicating whether is payment agent (note: not applicable for virtual money accounts)", - "type": "integer", - "enum": [ - 0, - 1 - ] - }, - "last_name": { - "description": "Last name (note: Only available for users who have at least one real account)", - "type": "string", - "sensitive": 1 - }, - "national_id_number": { - "description": "National identification number. Only returned if previously set.", - "type": [ - "null", - "string" - ] - }, - "no_tin_justification": { - "description": "Client's justification for not providing a tax identification number. Only returned if previously set.", - "type": "string" - }, - "non_pep_declaration": { - "description": "Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Note: returned for real accounts only.", - "type": "integer", - "enum": [ - 0, - 1 - ] - }, - "phone": { - "description": "The phone's national format phone.", - "type": [ - "null", - "string" - ], - "sensitive": 1 - }, - "phone_country_code": { - "description": "The phone's country code in 2-letter ISO standard. Only available for valid phone numbers.", - "type": [ - "null", - "string" - ] - }, - "phone_number_verification": { - "description": "The status of the Phone Number Verification.", - "type": "object", - "additionalProperties": false, - "required": [ - "verified" - ], - "properties": { - "challenge_attempts_remaining": { - "description": "Indicates the attempts remaining for /phone_number_challenge", - "type": "integer" - }, - "next_attempt": { - "description": "(Optional) Indicates the timestamp for the next verification attempt", - "type": "integer" - }, - "next_email_attempt": { - "description": "(Optional) Indicates the timestamp for the next email verification attempt", - "type": "integer" - }, - "next_verify_attempt": { - "description": "(Optional) Indicates the timestamp for the next verify attempt", - "type": "integer" - }, - "session_timestamp": { - "description": "(Optional) Indicates the timestamp for the current's session email code expiry", - "type": "integer" - }, - "verified": { - "description": "Indicates the verification status of the client's phone number.", - "type": "integer", - "enum": [ - 0, - 1 - ] - }, - "verify_attempts_remaining": { - "description": "Indicates the attempts remaining for /phone_number_verification", - "type": "integer" - } - } - }, - "place_of_birth": { - "description": "Place of birth, 2-letter country code.", - "type": [ - "null", - "string" - ] - }, - "preferred_language": { - "description": "User's preferred language, ISO standard code of language", - "type": [ - "null", - "string" - ], - "pattern": "^[A-Z]{0,2}$|^[A-Z]{2}_[A-Z]{2}$" - }, - "request_professional_status": { - "description": "Boolean value 1 or 0, indicating if client has requested professional status.", - "type": "integer", - "enum": [ - 0, - 1 - ] - }, - "residence": { - "description": "User Country", - "type": [ - "null", - "string" - ] - }, - "salutation": { - "description": "Salutation (note: Only available for users who have at least one real account)", - "type": "string" - }, - "tax_identification_number": { - "description": "Tax identification number. Only applicable for real money account.", - "type": [ - "null", - "string" - ] - }, - "tax_residence": { - "description": "Residence for tax purpose. Comma separated iso country code if multiple jurisdictions. Only applicable for real money account.", - "type": [ - "null", - "string" - ] - }, - "tax_residence_justification": { - "description": "Client's justification for not changing tax residence when prompted. Only returned if previously set.", - "type": "string" - }, - "tin_skipped": { - "description": "[Optional] Whether the client has skipped the TIN form. Only applicable for real money account.", - "type": "integer", - "enum": [ - 0, - 1 - ] - }, - "tnc_status": { - "description": "Terms and condition status tells us whether all the accounts of this user has accepted the latest T&C version.", - "type": "object" - }, - "tnc_update_notification_start_date": { - "description": "The start date to inform users within a grace period, with the notification automatically deactivating after the specified duration.", - "type": [ - "null", - "string" - ] - }, - "trading_hub": { - "description": "Boolean value 1 or 0, indicating if client has enabled the Trading Hub dashboard", - "type": "integer" - }, - "user_hash": { - "description": "Hash generated using user details to verify whether the user is legitimate for our customer support system.", - "type": [ - "null", - "string" - ] - } + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Get Account Settings (response)", + "description": "A message with User Settings", + "type": "object", + "required": ["echo_req", "msg_type"], + "properties": { + "get_settings": { + "title": "get_settings", + "description": "User information and settings.", + "type": "object", + "additionalProperties": false, + "properties": { + "account_opening_reason": { + "description": "Purpose and reason for requesting the account opening. Only applicable for real money account.", + "type": ["null", "string"] + }, + "address_city": { + "description": "City (note: Only available for users who have at least one real account)", + "type": "string" + }, + "address_line_1": { + "description": "Address line 1 (note: Only available for users who have at least one real account)", + "type": "string" + }, + "address_line_2": { + "description": "Address line 2 (note: Only available for users who have at least one real account)", + "type": "string" + }, + "address_postcode": { + "description": "Post Code (note: Only available for users who have at least one real account)", + "type": "string" + }, + "address_state": { + "description": "State (note: Only available for users who have at least one real account)", + "type": "string" + }, + "allow_copiers": { + "description": "Boolean value 1 or 0, indicating permission to allow others to follow your trades. Note: not applicable for Virtual account. Only allow for real money account.", + "type": "integer", + "enum": [0, 1] + }, + "calling_country_code": { + "description": "The phone's calling country code.", + "type": ["null", "string"], + "sensitive": 1 + }, + "citizen": { + "description": "Country of legal citizenship, 2-letter country code.", + "type": "string" + }, + "client_tnc_status": { + "description": "Latest terms and conditions version accepted by client", + "type": ["null", "string"] + }, + "cooling_off_expiration_date": { + "description": "Cooldown expiration epoch date when a client fails appropriateness tests", + "type": ["integer", "null"] + }, + "country": { + "description": "User Country (same as residence field) - deprecated", + "type": ["null", "string"] + }, + "country_code": { + "description": "2-letter country code ISO standard", + "type": ["null", "string"], + "pattern": "^[a-z]{0,2}$" + }, + "date_of_birth": { + "description": "Epoch of user's birthday (note: Only available for users who have at least one real account)", + "type": ["integer", "null"] + }, + "dxtrade_user_exception": { + "description": "Boolean value 1 or 0, indicating if user email belong to dxtrade exception list.", + "type": "integer", + "enum": [0, 1] + }, + "email": { + "description": "User Email", + "type": "string", + "sensitive": 1 + }, + "email_consent": { + "description": "Boolean value 1 or 0, indicating permission to use email address for any contact which may include marketing", + "type": "integer", + "enum": [0, 1] + }, + "employment_status": { + "description": "Employment Status.", + "type": "string" + }, + "fatca_declaration": { + "description": "Indicates client's self-declaration for FATCA.", + "type": ["integer", "null"] + }, + "feature_flag": { + "description": "Contains features that are enabled or disabled for this user", + "type": "object", + "additionalProperties": false, + "properties": { + "wallet": { + "description": "Boolean value 1 or 0 indicating whether his feature this enabled or not", + "type": "integer", + "enum": [0, 1] } + } + }, + "first_name": { + "description": "First name (note: Only available for users who have at least one real account)", + "type": "string", + "sensitive": 1 + }, + "has_secret_answer": { + "description": "Returns 1 if the client has a secret answer, 0 otherwise.", + "type": "integer", + "enum": [0, 1] + }, + "immutable_fields": { + "description": "A list of profile fields which are immutable (read-only unless they are not set yet) due to landing company regulations and the current status of the account.", + "type": "array", + "items": { + "type": "string" + } + }, + "is_authenticated_payment_agent": { + "description": "Boolean value 1 or 0, indicating whether is payment agent (note: not applicable for virtual money accounts)", + "type": "integer", + "enum": [0, 1] + }, + "last_name": { + "description": "Last name (note: Only available for users who have at least one real account)", + "type": "string", + "sensitive": 1 + }, + "national_id_number": { + "description": "National identification number. Only returned if previously set.", + "type": ["null", "string"] + }, + "no_tin_justification": { + "description": "Client's justification for not providing a tax identification number. Only returned if previously set.", + "type": "string" + }, + "non_pep_declaration": { + "description": "Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Note: returned for real accounts only.", + "type": "integer", + "enum": [0, 1] + }, + "phone": { + "description": "The phone's national format phone.", + "type": ["null", "string"], + "sensitive": 1 + }, + "phone_country_code": { + "description": "The phone's country code in 2-letter ISO standard. Only available for valid phone numbers.", + "type": ["null", "string"] + }, + "phone_number_verification": { + "description": "The status of the Phone Number Verification.", + "type": "object", + "additionalProperties": false, + "required": ["verified"], + "properties": { + "challenge_attempts_remaining": { + "description": "Indicates the attempts remaining for /phone_number_challenge", + "type": "integer" + }, + "next_attempt": { + "description": "(Optional) Indicates the timestamp for the next verification attempt", + "type": "integer" + }, + "next_email_attempt": { + "description": "(Optional) Indicates the timestamp for the next email verification attempt", + "type": "integer" + }, + "next_verify_attempt": { + "description": "(Optional) Indicates the timestamp for the next verify attempt", + "type": "integer" + }, + "session_timestamp": { + "description": "(Optional) Indicates the timestamp for the current's session email code expiry", + "type": "integer" + }, + "verified": { + "description": "Indicates the verification status of the client's phone number.", + "type": "integer", + "enum": [0, 1] + }, + "verify_attempts_remaining": { + "description": "Indicates the attempts remaining for /phone_number_verification", + "type": "integer" + } + } + }, + "place_of_birth": { + "description": "Place of birth, 2-letter country code.", + "type": ["null", "string"] + }, + "preferred_language": { + "description": "User's preferred language, ISO standard code of language", + "type": ["null", "string"], + "pattern": "^[A-Z]{0,2}$|^[A-Z]{2}_[A-Z]{2}$" + }, + "request_professional_status": { + "description": "Boolean value 1 or 0, indicating if client has requested professional status.", + "type": "integer", + "enum": [0, 1] + }, + "residence": { + "description": "User Country", + "type": ["null", "string"] + }, + "salutation": { + "description": "Salutation (note: Only available for users who have at least one real account)", + "type": "string" + }, + "tax_identification_number": { + "description": "Tax identification number. Only applicable for real money account.", + "type": ["null", "string"] + }, + "tax_residence": { + "description": "Residence for tax purpose. Comma separated iso country code if multiple jurisdictions. Only applicable for real money account.", + "type": ["null", "string"] + }, + "tax_residence_justification": { + "description": "Client's justification for not changing tax residence when prompted. Only returned if previously set.", + "type": "string" + }, + "tin_skipped": { + "description": "[Optional] Whether the client has skipped the TIN form. Only applicable for real money account.", + "type": "integer", + "enum": [0, 1] + }, + "tnc_status": { + "description": "Terms and condition status tells us whether all the accounts of this user has accepted the latest T&C version.", + "type": "object" }, - "echo_req": { - "description": "Echo of the request made.", - "type": "object" + "tnc_update_notification_start_date": { + "description": "The start date to inform users within a grace period, with the notification automatically deactivating after the specified duration.", + "type": ["null", "string"] }, - "msg_type": { - "description": "Action name of the request made.", - "type": "string", - "enum": [ - "get_settings" - ] + "trading_hub": { + "description": "Boolean value 1 or 0, indicating if client has enabled the Trading Hub dashboard", + "type": "integer" }, - "req_id": { - "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", - "type": "integer" + "user_hash": { + "description": "Hash generated using user details to verify whether the user is legitimate for our customer support system.", + "type": ["null", "string"] } + } + }, + "echo_req": { + "description": "Echo of the request made.", + "type": "object" + }, + "msg_type": { + "description": "Action name of the request made.", + "type": "string", + "enum": ["get_settings"] + }, + "req_id": { + "description": "Optional field sent in request to map to response, present only when request contains `req_id`.", + "type": "integer" } + } } diff --git a/config/v3/set_settings/example.json b/config/v3/set_settings/example.json index a32df6399..d81225610 100644 --- a/config/v3/set_settings/example.json +++ b/config/v3/set_settings/example.json @@ -1,20 +1,20 @@ { - "set_settings": 1, - "account_opening_reason": "Speculative", - "address_city": "Test City", - "address_line_1": "Test Address Line 1", - "address_line_2": "Test Address Line 2", - "address_postcode": "123456", - "allow_copiers": 1, - "calling_country_code": "154", - "email_consent": 0, - "employment_status": "Employed", - "phone": "17543010", - "place_of_birth": "ar", - "preferred_language": "EN", - "request_professional_status": 1, - "tax_identification_number": "987654321", - "tax_residence": "hk", - "tax_residence_justification": "I only have tax obligations in Hong Kong", - "tin_skipped": 0 + "set_settings": 1, + "account_opening_reason": "Speculative", + "address_city": "Test City", + "address_line_1": "Test Address Line 1", + "address_line_2": "Test Address Line 2", + "address_postcode": "123456", + "allow_copiers": 1, + "calling_country_code": "154", + "email_consent": 0, + "employment_status": "Employed", + "phone": "17543010", + "place_of_birth": "ar", + "preferred_language": "EN", + "request_professional_status": 1, + "tax_identification_number": "987654321", + "tax_residence": "hk", + "tax_residence_justification": "I only have tax obligations in Hong Kong", + "tin_skipped": 0 } diff --git a/config/v3/set_settings/send.json b/config/v3/set_settings/send.json index 42dbf200b..646410668 100644 --- a/config/v3/set_settings/send.json +++ b/config/v3/set_settings/send.json @@ -1,275 +1,224 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Set Account Settings (request)", - "description": "Set User Settings (this call should be used in conjunction with `get_settings`)", - "type": "object", - "auth_required": 1, - "auth_scopes": [ - "admin" - ], - "additionalProperties": false, - "required": [ - "set_settings" - ], - "properties": { - "set_settings": { - "description": "Must be `1`", - "type": "integer", - "enum": [ - 1 - ] - }, - "account_opening_reason": { - "description": "[Optional] Purpose and reason for requesting the account opening. Only applicable for real money account. Required for clients that have not set it yet. Can only be set once.", - "type": "string", - "enum": [ - "Speculative", - "Income Earning", - "Hedging", - "Peer-to-peer exchange", - "Additional revenue", - "Savings" - ] - }, - "address_city": { - "description": "[Optional] Note: not applicable for virtual account. Required field for real money account.", - "type": "string", - "pattern": "^[\\p{L}\\s'.-]{1,35}$" - }, - "address_line_1": { - "description": "[Optional] Note: not applicable for virtual account. Required field for real money account.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'’.,:;()\\x{b0}@#/-]{1,70}$" - }, - "address_line_2": { - "description": "[Optional] Note: not applicable for virtual account. Optional field for real money account.", - "type": [ - "null", - "string" - ], - "pattern": "^[\\p{L}\\p{Nd}\\s'’.,:;()\\x{b0}@#/-]{0,70}$" - }, - "address_postcode": { - "description": "[Optional] Note: not applicable for virtual account. Optional field for real money account.", - "type": "string", - "pattern": "^([A-Za-z0-9][A-Za-z0-9\\s-]{0,20})?$" - }, - "address_state": { - "description": "[Optional] Note: not applicable for virtual account. Optional field for real money account.", - "type": "string", - "pattern": "^[\\p{L}\\p{Nd}\\s'.,-;]{0,100}$" - }, - "allow_copiers": { - "description": "[Optional] Boolean value 1 or 0, indicating permission to allow others to follow your trades. Note: not applicable for Virtual account. Only allow for real money account.", - "type": "integer", - "enum": [ - 0, - 1 - ] - }, - "calling_country_code": { - "description": "[Optional] The phone's calling country code. Don't include the `+` sign. Up to 4 digits.", - "type": [ - "null", - "string" - ], - "pattern": "^\\d{1,4}$", - "sensitive": 1 - }, - "citizen": { - "description": "[Optional] Country of legal citizenship, 2-letter country code.", - "type": [ - "null", - "string" - ], - "pattern": "^([a-z]{2})?$" - }, - "date_of_birth": { - "description": "[Optional] Date of birth format: yyyy-mm-dd (can only be changed on unauthenticated svg accounts).", - "type": "string", - "pattern": "^[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}$" - }, - "dxtrade_user_exception": { - "description": "Boolean value 1 or 0, indicating if user email belong to dxtrade exception list.", - "type": "integer", - "enum": [ - 0, - 1 - ] - }, - "email_consent": { - "description": "[Optional] Boolean value 1 or 0, indicating permission to use email address for any contact which may include marketing", - "type": "integer", - "enum": [ - 0, - 1 - ] - }, - "employment_status": { - "description": "[Optional] Employment Status.", - "type": "string" - }, - "feature_flag": { - "description": "[Optional] Enable or disable one or multiple features.", - "type": "object", - "additionalProperties": false, - "properties": { - "wallet": { - "description": "[Optional] Boolean value 1 or 0 indicating whether to enable/disable this feature", - "type": "integer", - "enum": [ - 0, - 1 - ] - } - } - }, - "financial_information_version": { - "description": "[Optional] The version of the financial information", - "type": "string" - }, - "first_name": { - "description": "[Optional] Within 1-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes (can only be changed on unauthenticated svg accounts).", - "type": "string", - "pattern": "^(?!.*\\s{2,})[\\p{L}\\s'.-]{1,50}$", - "sensitive": 1 - }, - "last_name": { - "description": "[Optional] Within 1-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes (can only be changed on unauthenticated svg accounts).", - "type": "string", - "pattern": "^(?!.*\\s{2,})[\\p{L}\\s'.-]{1,50}$", - "sensitive": 1 - }, - "national_id_number": { - "description": "[Optional] National identification number. Must contain only ASCII characters.", - "type": "string", - "pattern": "^[ -~]{1,50}$" - }, - "no_tin_justification": { - "description": "[Optional] Justification for not providing a tax identification number. Only applicable for real money account.", - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - "non_pep_declaration": { - "description": "[Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Effective for real accounts only.", - "type": "integer", - "enum": [ - 1 - ] - }, - "phone": { - "description": "[Optional] The phone's national format, don't include the `+` sign nor the calling country code. Up to 15 digits are allowed.", - "type": [ - "null", - "string" - ], - "sensitive": 1 - }, - "place_of_birth": { - "description": "[Optional] Place of birth, 2-letter country code.", - "type": "string", - "pattern": "^[a-z]{2}$" - }, - "preferred_language": { - "description": "[Optional] User's preferred language, ISO standard language code", - "type": [ - "null", - "string" - ], - "pattern": "^[A-Z]{0,2}$|^[A-Z]{2}_[A-Z]{2}$" - }, - "request_professional_status": { - "description": "[Optional] Required when client wants to be treated as professional. Applicable for financial accounts only.", - "type": "integer", - "enum": [ - 1 - ] - }, - "residence": { - "description": "[Optional] 2-letter country code. Note: not applicable for real money account. Only allow for Virtual account without residence set.", - "type": [ - "null", - "string" - ], - "pattern": "^[a-z]{2}$" - }, - "salutation": { - "description": "[Optional] Accept any value in enum list (can only be changed on unauthenticated svg accounts).", - "type": "string", - "enum": [ - "Mr", - "Ms", - "Miss", - "Mrs" - ] - }, - "secret_answer": { - "description": "[Optional] Answer to secret question, within 4-50 characters. Required for new account and existing client details will be used if client opens another account.", - "type": "string", - "pattern": "^[\\w\\-\\,\\.\\' ]+", - "maxLength": 50, - "minLength": 4, - "sensitive": 1 - }, - "secret_question": { - "description": "[Optional] Accept any value in enum list. Required for new account and existing client details will be used if client opens another account.", - "type": "string", - "enum": [ - "Mother's maiden name", - "Name of your pet", - "Name of first love", - "Memorable town/city", - "Memorable date", - "Favourite dish", - "Brand of first car", - "Favourite artist" - ] - }, - "tax_identification_number": { - "description": "[Optional] Tax identification number. Only applicable for real money account. Required for maltainvest landing company.", - "type": "string", - "pattern": "^[A-Za-z0-9.\\/\\s-]{0,25}$" - }, - "tax_residence": { - "description": "[Optional] Residence for tax purpose. Comma separated iso country code if multiple jurisdictions. Only applicable for real money account. Required for maltainvest landing company.", - "type": "string", - "pattern": "^[a-z]{0,2}(?:,[a-z]{2})*$" - }, - "tax_residence_justification": { - "description": "[Optional] Justification for not changing tax residence when prompted. Only applicable when the client has been flagged to update their tax residence.", - "type": "string", - "maxLength": 500, - "minLength": 1 - }, - "tin_skipped": { - "description": "[Optional] Whether the client has skipped the TIN form. Only applicable for real money account.", - "type": "integer", - "enum": [ - 0, - 1 - ] - }, - "trading_hub": { - "description": "[Optional] Enable/Disable Trading Hub dashboard", - "type": "integer", - "enum": [ - 0, - 1 - ] - }, - "loginid": { - "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", - "type": "string", - "pattern": "^[A-Za-z]+[0-9]+$" - }, - "passthrough": { - "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", - "type": "object" - }, - "req_id": { - "description": "[Optional] Used to map request to response.", - "type": "integer" + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Set Account Settings (request)", + "description": "Set User Settings (this call should be used in conjunction with `get_settings`)", + "type": "object", + "auth_required": 1, + "auth_scopes": ["admin"], + "additionalProperties": false, + "required": ["set_settings"], + "properties": { + "set_settings": { + "description": "Must be `1`", + "type": "integer", + "enum": [1] + }, + "account_opening_reason": { + "description": "[Optional] Purpose and reason for requesting the account opening. Only applicable for real money account. Required for clients that have not set it yet. Can only be set once.", + "type": "string", + "enum": [ + "Speculative", + "Income Earning", + "Hedging", + "Peer-to-peer exchange", + "Additional revenue", + "Savings" + ] + }, + "address_city": { + "description": "[Optional] Note: not applicable for virtual account. Required field for real money account.", + "type": "string", + "pattern": "^[\\p{L}\\s'.-]{1,35}$" + }, + "address_line_1": { + "description": "[Optional] Note: not applicable for virtual account. Required field for real money account.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'’.,:;()\\x{b0}@#/-]{1,70}$" + }, + "address_line_2": { + "description": "[Optional] Note: not applicable for virtual account. Optional field for real money account.", + "type": ["null", "string"], + "pattern": "^[\\p{L}\\p{Nd}\\s'’.,:;()\\x{b0}@#/-]{0,70}$" + }, + "address_postcode": { + "description": "[Optional] Note: not applicable for virtual account. Optional field for real money account.", + "type": "string", + "pattern": "^([A-Za-z0-9][A-Za-z0-9\\s-]{0,20})?$" + }, + "address_state": { + "description": "[Optional] Note: not applicable for virtual account. Optional field for real money account.", + "type": "string", + "pattern": "^[\\p{L}\\p{Nd}\\s'.,-;]{0,100}$" + }, + "allow_copiers": { + "description": "[Optional] Boolean value 1 or 0, indicating permission to allow others to follow your trades. Note: not applicable for Virtual account. Only allow for real money account.", + "type": "integer", + "enum": [0, 1] + }, + "calling_country_code": { + "description": "[Optional] The phone's calling country code. Don't include the `+` sign. Up to 4 digits.", + "type": ["null", "string"], + "pattern": "^\\d{1,4}$", + "sensitive": 1 + }, + "citizen": { + "description": "[Optional] Country of legal citizenship, 2-letter country code.", + "type": ["null", "string"], + "pattern": "^([a-z]{2})?$" + }, + "date_of_birth": { + "description": "[Optional] Date of birth format: yyyy-mm-dd (can only be changed on unauthenticated svg accounts).", + "type": "string", + "pattern": "^[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}$" + }, + "dxtrade_user_exception": { + "description": "Boolean value 1 or 0, indicating if user email belong to dxtrade exception list.", + "type": "integer", + "enum": [0, 1] + }, + "email_consent": { + "description": "[Optional] Boolean value 1 or 0, indicating permission to use email address for any contact which may include marketing", + "type": "integer", + "enum": [0, 1] + }, + "employment_status": { + "description": "[Optional] Employment Status.", + "type": "string" + }, + "feature_flag": { + "description": "[Optional] Enable or disable one or multiple features.", + "type": "object", + "additionalProperties": false, + "properties": { + "wallet": { + "description": "[Optional] Boolean value 1 or 0 indicating whether to enable/disable this feature", + "type": "integer", + "enum": [0, 1] } + } + }, + "financial_information_version": { + "description": "[Optional] The version of the financial information", + "type": "string" + }, + "first_name": { + "description": "[Optional] Within 1-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes (can only be changed on unauthenticated svg accounts).", + "type": "string", + "pattern": "^(?!.*\\s{2,})[\\p{L}\\s'.-]{1,50}$", + "sensitive": 1 + }, + "last_name": { + "description": "[Optional] Within 1-50 characters, use only letters, spaces, hyphens, full-stops or apostrophes (can only be changed on unauthenticated svg accounts).", + "type": "string", + "pattern": "^(?!.*\\s{2,})[\\p{L}\\s'.-]{1,50}$", + "sensitive": 1 + }, + "national_id_number": { + "description": "[Optional] National identification number. Must contain only ASCII characters.", + "type": "string", + "pattern": "^[ -~]{1,50}$" + }, + "no_tin_justification": { + "description": "[Optional] Justification for not providing a tax identification number. Only applicable for real money account.", + "type": "string", + "maxLength": 500, + "minLength": 1 + }, + "non_pep_declaration": { + "description": "[Optional] Indicates client's self-declaration of not being a PEP/RCA (Politically Exposed Person/Relatives and Close Associates). Effective for real accounts only.", + "type": "integer", + "enum": [1] + }, + "phone": { + "description": "[Optional] The phone's national format, don't include the `+` sign nor the calling country code. Up to 15 digits are allowed.", + "type": ["null", "string"], + "sensitive": 1 + }, + "place_of_birth": { + "description": "[Optional] Place of birth, 2-letter country code.", + "type": "string", + "pattern": "^[a-z]{2}$" + }, + "preferred_language": { + "description": "[Optional] User's preferred language, ISO standard language code", + "type": ["null", "string"], + "pattern": "^[A-Z]{0,2}$|^[A-Z]{2}_[A-Z]{2}$" + }, + "request_professional_status": { + "description": "[Optional] Required when client wants to be treated as professional. Applicable for financial accounts only.", + "type": "integer", + "enum": [1] + }, + "residence": { + "description": "[Optional] 2-letter country code. Note: not applicable for real money account. Only allow for Virtual account without residence set.", + "type": ["null", "string"], + "pattern": "^[a-z]{2}$" + }, + "salutation": { + "description": "[Optional] Accept any value in enum list (can only be changed on unauthenticated svg accounts).", + "type": "string", + "enum": ["Mr", "Ms", "Miss", "Mrs"] + }, + "secret_answer": { + "description": "[Optional] Answer to secret question, within 4-50 characters. Required for new account and existing client details will be used if client opens another account.", + "type": "string", + "pattern": "^[\\w\\-\\,\\.\\' ]+", + "maxLength": 50, + "minLength": 4, + "sensitive": 1 + }, + "secret_question": { + "description": "[Optional] Accept any value in enum list. Required for new account and existing client details will be used if client opens another account.", + "type": "string", + "enum": [ + "Mother's maiden name", + "Name of your pet", + "Name of first love", + "Memorable town/city", + "Memorable date", + "Favourite dish", + "Brand of first car", + "Favourite artist" + ] + }, + "tax_identification_number": { + "description": "[Optional] Tax identification number. Only applicable for real money account. Required for maltainvest landing company.", + "type": "string", + "pattern": "^[A-Za-z0-9.\\/\\s-]{0,25}$" + }, + "tax_residence": { + "description": "[Optional] Residence for tax purpose. Comma separated iso country code if multiple jurisdictions. Only applicable for real money account. Required for maltainvest landing company.", + "type": "string", + "pattern": "^[a-z]{0,2}(?:,[a-z]{2})*$" + }, + "tax_residence_justification": { + "description": "[Optional] Justification for not changing tax residence when prompted. Only applicable when the client has been flagged to update their tax residence.", + "type": "string", + "maxLength": 500, + "minLength": 1 + }, + "tin_skipped": { + "description": "[Optional] Whether the client has skipped the TIN form. Only applicable for real money account.", + "type": "integer", + "enum": [0, 1] + }, + "trading_hub": { + "description": "[Optional] Enable/Disable Trading Hub dashboard", + "type": "integer", + "enum": [0, 1] + }, + "loginid": { + "description": "[Optional] The login id of the user. Mandatory when multiple tokens were provided during authorize.", + "type": "string", + "pattern": "^[A-Za-z]+[0-9]+$" + }, + "passthrough": { + "description": "[Optional] Used to pass data through the websocket, which may be retrieved via the `echo_req` output field.", + "type": "object" + }, + "req_id": { + "description": "[Optional] Used to map request to response.", + "type": "integer" } + } } diff --git a/docusaurus.config.js b/docusaurus.config.js index 033af721b..1e1de7b44 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -6,9 +6,9 @@ const darkTheme = themes.vsDark; /** @type {import('@docusaurus/types').Config} */ const config = { - title: 'Deriv API', + title: 'Legacy Deriv API', tagline: 'Create your own apps', - url: 'https://api.deriv.com', + url: 'https://legacy-api.deriv.com', baseUrl: '/', onBrokenLinks: 'throw', onBrokenMarkdownLinks: 'warn', diff --git a/i18n/en/code.json b/i18n/en/code.json index 7e4f64204..b667556cd 100644 --- a/i18n/en/code.json +++ b/i18n/en/code.json @@ -1201,5 +1201,119 @@ }, "Go to home": { "message": "Go to home" + }, + "You're on the Legacy Deriv API. We've launched a new and improved version.": { + "message": "You're on the Legacy Deriv API. We've launched a new and improved version." + }, + "What's New": { + "message": "What's New" + }, + "Explore docs": { + "message": "Explore docs" + }, + "Ready to explore the new Deriv APIs?": { + "message": "Ready to explore the new Deriv APIs?" + }, + "Create your account and start building with OAuth 2.0 security and improved documentation.": { + "message": "Create your account and start building with OAuth 2.0 security and improved documentation." + }, + "Sign up on beta-api.deriv.com →": { + "message": "Sign up on beta-api.deriv.com →" + }, + "Yes. Your existing applications, tokens, and integrations will continue to work on the legacy Deriv APIs. Your current users can keep using your apps as normal. Nothing changes for them.": { + "message": "Yes. Your existing applications, tokens, and integrations will continue to work on the legacy Deriv APIs. Your current users can keep using your apps as normal. Nothing changes for them." + }, + "No. New users can only sign up through apps built on the new Deriv APIs. Your legacy apps will continue serving your existing users, but to onboard new users, you will need to create a new application on beta-api.deriv.com.": { + "message": "No. New users can only sign up through apps built on the new Deriv APIs. Your legacy apps will continue serving your existing users, but to onboard new users, you will need to create a new application on beta-api.deriv.com." + }, + "Nothing changes for your current traders. They can continue using your apps on the legacy Deriv APIs as they do today.": { + "message": "Nothing changes for your current traders. They can continue using your apps on the legacy Deriv APIs as they do today." + }, + "Head straight to beta-api.deriv.com and create an account. The new Deriv APIs offer OAuth 2.0 security, improved documentation, a playground to test your integrations, and AI-powered tools to help you build faster. (edited)": { + "message": "Head straight to beta-api.deriv.com and create an account. The new Deriv APIs offer OAuth 2.0 security, improved documentation, a playground to test your integrations, and AI-powered tools to help you build faster. (edited)" + }, + "We've moved these APIs to legacy-api.deriv.com to clearly separate them from the new Deriv APIs at beta-api.deriv.com. If you had api.deriv.com bookmarked, it now redirects here automatically.": { + "message": "We've moved these APIs to legacy-api.deriv.com to clearly separate them from the new Deriv APIs at beta-api.deriv.com. If you had api.deriv.com bookmarked, it now redirects here automatically." + }, + "Frequently asked questions": { + "message": "Frequently asked questions" + }, + "Common questions about the new Deriv APIs and the transition.": { + "message": "Common questions about the new Deriv APIs and the transition." + }, + "We bring you": { + "message": "We bring you" + }, + "new Deriv APIs": { + "message": "new Deriv APIs" + }, + "Far more secure, powered by OAuth 2.0, and a streamlined developer experience.": { + "message": "Far more secure, powered by OAuth 2.0, and a streamlined developer experience." + }, + "Create a new account on the new Deriv APIs to get started.": { + "message": "Create a new account on the new Deriv APIs to get started." + }, + "Go to new Deriv APIs →": { + "message": "Go to new Deriv APIs →" + }, + "Go to {link} to access the new Deriv APIs.": { + "message": "Go to {link} to access the new Deriv APIs." + }, + "How to get started": { + "message": "How to get started" + }, + "Three steps to set up your account on the new Deriv APIs.": { + "message": "Three steps to set up your account on the new Deriv APIs." + }, + "Important notice for existing developers": { + "message": "Important notice for existing developers" + }, + "Your existing apps and integrations will continue to work on this legacy platform. You do not need to migrate immediately — your current setup remains functional.": { + "message": "Your existing apps and integrations will continue to work on this legacy platform. You do not need to migrate immediately — your current setup remains functional." + }, + "However, to access the new Deriv APIs, you will need to create a new account on {link}. Your existing legacy credentials will not work there.": { + "message": "However, to access the new Deriv APIs, you will need to create a new account on {link}. Your existing legacy credentials will not work there." + }, + "New users do not need to take any action.": { + "message": "New users do not need to take any action." + }, + "New Deriv APIs": { + "message": "New Deriv APIs" + }, + "Help centre": { + "message": "Help centre" + }, + "COMING SOON": { + "message": "COMING SOON" + }, + "What's new in the Deriv APIs": { + "message": "What's new in the Deriv APIs" + }, + "Everything you get when you move to the new platform — built for security, speed, and the future.": { + "message": "Everything you get when you move to the new platform — built for security, speed, and the future." + }, + "App registration is disabled on the legacy API. Use beta-api.deriv.com to register new apps.": { + "message": "App registration is disabled on the legacy API. Use beta-api.deriv.com to register new apps." + }, + "The name cannot contain \"Binary\", \"Deriv\", or similar words.": { + "message": "The name cannot contain \"Binary\", \"Deriv\", or similar words." + }, + "Your existing apps and integrations will continue to work on this legacy platform, and your current setup remains functional. Your existing users will continue using your app without any issue.": { + "message": "Your existing apps and integrations will continue to work on this legacy platform, and your current setup remains functional. Your existing users will continue using your app without any issue." + }, + "However, in order to onboard and support new users, you should migrate to the new Deriv APIs. {breakline}{breakline} To access the new Deriv APIs, you will need to create a new account on {link}. Your existing legacy credentials will not work there.": { + "message": "However, in order to onboard and support new users, you should migrate to the new Deriv APIs. {breakline}{breakline} To access the new Deriv APIs, you will need to create a new account on {link}. Your existing legacy credentials will not work there." + }, + "We will soon move all new sign-ups to the new Deriv APIs. To onboard new users, you must create a new application using the new Deriv APIs at {link}. Your legacy apps will continue to work for your existing users only.": { + "message": "We will soon move all new sign-ups to the new Deriv APIs. To onboard new users, you must create a new application using the new Deriv APIs at {link}. Your legacy apps will continue to work for your existing users only." + }, + "Nothing changes for your current users. They can continue using your apps on the legacy Deriv APIs as they do today.": { + "message": "Nothing changes for your current users. They can continue using your apps on the legacy Deriv APIs as they do today." + }, + "Head straight to beta-api.deriv.com and create an account. The new Deriv APIs offer OAuth 2.0 security, improved documentation, a playground to test your integrations, and AI-powered tools to help you build faster.": { + "message": "Head straight to beta-api.deriv.com and create an account. The new Deriv APIs offer OAuth 2.0 security, improved documentation, a playground to test your integrations, and AI-powered tools to help you build faster." + }, + "LIMITED TIME": { + "message": "LIMITED TIME" } } diff --git a/i18n/fr/code.json b/i18n/fr/code.json index 83774b4a1..4863457b8 100644 --- a/i18n/fr/code.json +++ b/i18n/fr/code.json @@ -1201,5 +1201,119 @@ }, "Go to home": { "message": "Rentrez à la page d'accueil" + }, + "You're on the Legacy Deriv API. We've launched a new and improved version.": { + "message": "Vous utilisez l'ancienne version de Deriv API. Nous avons lancé une nouvelle version améliorée." + }, + "What's New": { + "message": "Nouveautés" + }, + "Explore docs": { + "message": "Consulter la documentation" + }, + "Ready to explore the new Deriv APIs?": { + "message": "Prêt à découvrir les nouveaux Deriv APIs ?" + }, + "Create your account and start building with OAuth 2.0 security and improved documentation.": { + "message": "Créez votre compte et commencez à développer avec la sécurité OAuth 2.0 et une documentation améliorée." + }, + "Sign up on beta-api.deriv.com →": { + "message": "Inscrivez-vous sur beta-api.deriv.com →" + }, + "Yes. Your existing applications, tokens, and integrations will continue to work on the legacy Deriv APIs. Your current users can keep using your apps as normal. Nothing changes for them.": { + "message": "Oui. Vos applications, jetons et intégrations existants continueront de fonctionner sur les anciens Deriv APIs. Vos utilisateurs actuels pourront continuer à utiliser vos applications normalement. Rien ne change pour eux." + }, + "No. New users can only sign up through apps built on the new Deriv APIs. Your legacy apps will continue serving your existing users, but to onboard new users, you will need to create a new application on beta-api.deriv.com.": { + "message": "Non. Les nouveaux utilisateurs peuvent uniquement s'inscrire via des applications développées sur les nouveaux Deriv APIs. Vos anciennes applications continueront à servir vos utilisateurs existants, mais pour intégrer de nouveaux utilisateurs, vous devrez créer une nouvelle application sur beta-api.deriv.com." + }, + "Nothing changes for your current traders. They can continue using your apps on the legacy Deriv APIs as they do today.": { + "message": "Rien ne change pour vos traders actuels. Ils peuvent continuer à utiliser vos applications sur les anciens Deriv APIs comme ils le font aujourd'hui." + }, + "Head straight to beta-api.deriv.com and create an account. The new Deriv APIs offer OAuth 2.0 security, improved documentation, a playground to test your integrations, and AI-powered tools to help you build faster. (edited)": { + "message": "Rendez-vous directement sur beta-api.deriv.com et créez un compte. Les nouveaux Deriv APIs offrent la sécurité OAuth 2.0, une documentation améliorée, un environnement de test pour vos intégrations et des outils basés sur l'IA pour vous aider à développer plus rapidement. (modifié)" + }, + "We've moved these APIs to legacy-api.deriv.com to clearly separate them from the new Deriv APIs at beta-api.deriv.com. If you had api.deriv.com bookmarked, it now redirects here automatically.": { + "message": "Nous avons déplacé ces APIs vers legacy-api.deriv.com pour les séparer clairement des nouveaux Deriv APIs disponibles sur beta-api.deriv.com. Si vous aviez mis api.deriv.com dans vos favoris, il vous redirige désormais automatiquement ici." + }, + "Frequently asked questions": { + "message": "Foire aux questions" + }, + "Common questions about the new Deriv APIs and the transition.": { + "message": "Questions courantes concernant les nouveaux Deriv APIs et la transition." + }, + "We bring you": { + "message": "Nous vous présentons" + }, + "new Deriv APIs": { + "message": "les nouveaux Deriv APIs" + }, + "Far more secure, powered by OAuth 2.0, and a streamlined developer experience.": { + "message": "Bien plus sécurisés, basés sur OAuth 2.0, avec une expérience développeur optimisée." + }, + "Create a new account on the new Deriv APIs to get started.": { + "message": "Créez un nouveau compte sur les nouveaux Deriv APIs pour commencer." + }, + "Go to new Deriv APIs →": { + "message": "Accéder aux nouveaux Deriv APIs →" + }, + "Go to {link} to access the new Deriv APIs.": { + "message": "Rendez-vous sur {link} pour accéder aux nouveaux Deriv APIs." + }, + "How to get started": { + "message": "Comment commencer" + }, + "Three steps to set up your account on the new Deriv APIs.": { + "message": "Trois étapes pour configurer votre compte sur les nouveaux Deriv APIs." + }, + "Important notice for existing developers": { + "message": "Avis important pour les développeurs existants" + }, + "Your existing apps and integrations will continue to work on this legacy platform. You do not need to migrate immediately — your current setup remains functional.": { + "message": "Vos applications et intégrations existantes continueront de fonctionner sur cette ancienne plateforme. Vous n'avez pas besoin de migrer immédiatement — votre configuration actuelle reste fonctionnelle." + }, + "However, to access the new Deriv APIs, you will need to create a new account on {link}. Your existing legacy credentials will not work there.": { + "message": "Cependant, pour accéder aux nouveaux Deriv APIs, vous devrez créer un nouveau compte sur {link}. Vos identifiants de l'ancienne version ne fonctionneront pas." + }, + "New users do not need to take any action.": { + "message": "Les nouveaux utilisateurs n'ont aucune action à effectuer." + }, + "New Deriv APIs": { + "message": "Nouveaux Deriv APIs" + }, + "Help centre": { + "message": "Centre d'aide" + }, + "COMING SOON": { + "message": "BIENTÔT DISPONIBLE" + }, + "What's new in the Deriv APIs": { + "message": "Nouveautés des Deriv APIs" + }, + "Everything you get when you move to the new platform — built for security, speed, and the future.": { + "message": "Tout ce que vous obtenez en migrant vers la nouvelle plateforme — conçue pour la sécurité, la rapidité et l'avenir." + }, + "App registration is disabled on the legacy API. Use beta-api.deriv.com to register new apps.": { + "message": "L'enregistrement d'applications est désactivé sur l'ancien API. Utilisez beta-api.deriv.com pour enregistrer de nouvelles applications." + }, + "The name cannot contain \"Binary\", \"Deriv\", or similar words.": { + "message": "Le nom ne peut pas contenir \"Binary\", \"Deriv\" ou des mots similaires." + }, + "Your existing apps and integrations will continue to work on this legacy platform, and your current setup remains functional. Your existing users will continue using your app without any issue.": { + "message": "Vos applications et intégrations existantes continueront de fonctionner sur cette ancienne plateforme, et votre configuration actuelle reste fonctionnelle. Vos utilisateurs existants continueront à utiliser votre application sans aucun problème." + }, + "However, in order to onboard and support new users, you should migrate to the new Deriv APIs. {breakline}{breakline} To access the new Deriv APIs, you will need to create a new account on {link}. Your existing legacy credentials will not work there.": { + "message": "Cependant, afin d'intégrer et de prendre en charge de nouveaux utilisateurs, vous devriez migrer vers les nouveaux Deriv APIs. {breakline}{breakline} Pour accéder aux nouveaux Deriv APIs, vous devrez créer un nouveau compte sur {link}. Vos identifiants de l'ancienne version ne fonctionneront pas." + }, + "We will soon move all new sign-ups to the new Deriv APIs. To onboard new users, you must create a new application using the new Deriv APIs at {link}. Your legacy apps will continue to work for your existing users only.": { + "message": "Nous allons bientôt transférer toutes les nouvelles inscriptions vers les nouveaux Deriv APIs. Pour intégrer de nouveaux utilisateurs, vous devez créer une nouvelle application en utilisant les nouveaux Deriv APIs sur {link}. Vos anciennes applications continueront de fonctionner uniquement pour vos utilisateurs existants." + }, + "Nothing changes for your current users. They can continue using your apps on the legacy Deriv APIs as they do today.": { + "message": "Rien ne change pour vos utilisateurs actuels. Ils peuvent continuer à utiliser vos applications sur les anciens Deriv APIs comme ils le font aujourd'hui." + }, + "Head straight to beta-api.deriv.com and create an account. The new Deriv APIs offer OAuth 2.0 security, improved documentation, a playground to test your integrations, and AI-powered tools to help you build faster.": { + "message": "Rendez-vous directement sur beta-api.deriv.com et créez un compte. Les nouveaux Deriv APIs offrent la sécurité OAuth 2.0, une documentation améliorée, un environnement de test pour vos intégrations et des outils basés sur l'IA pour vous aider à développer plus rapidement." + }, + "LIMITED TIME": { + "message": "OFFRE LIMITÉE" } } diff --git a/i18n/fr/docusaurus-plugin-content-docs/current/_terminology/trading/residence-list/index.md b/i18n/fr/docusaurus-plugin-content-docs/current/_terminology/trading/residence-list/index.md index 2f3894009..b736f619a 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/current/_terminology/trading/residence-list/index.md +++ b/i18n/fr/docusaurus-plugin-content-docs/current/_terminology/trading/residence-list/index.md @@ -70,4 +70,4 @@ La liste d'exemples peut ressembler à ceci : ] ``` -Vous pouvez en savoir plus sur la "Liste des pays" sur [API Explorer - Liste des pays] (https://api.deriv.com/api-explorer#residence_list) +Vous pouvez en savoir plus sur la "Liste des pays" sur [API Explorer - Liste des pays] (https://legacy-api.deriv.com/api-explorer#residence_list) diff --git a/package-lock.json b/package-lock.json index 40e20114e..865e92d12 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5183,15 +5183,6 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/@fastify/busboy": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz", - "integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==", - "license": "MIT", - "engines": { - "node": ">=14" - } - }, "node_modules/@floating-ui/core": { "version": "1.7.2", "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.7.2.tgz", @@ -24553,23 +24544,6 @@ "node": ">= 4" } }, - "node_modules/npm/node_modules/@isaacs/balanced-match": { - "version": "4.0.1", - "license": "MIT", - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/npm/node_modules/@isaacs/brace-expansion": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "@isaacs/balanced-match": "^4.0.1" - }, - "engines": { - "node": "20 || >=22" - } - }, "node_modules/npm/node_modules/@isaacs/fs-minipass": { "version": "4.0.1", "inBundle": true, @@ -25089,14 +25063,6 @@ "node": ">=0.3.1" } }, - "node_modules/npm/node_modules/encoding": { - "version": "0.1.13", - "license": "MIT", - "optional": true, - "dependencies": { - "iconv-lite": "^0.6.2" - } - }, "node_modules/npm/node_modules/env-paths": { "version": "2.2.1", "inBundle": true, @@ -26037,22 +26003,6 @@ "node": ">= 14" } }, - "node_modules/npm/node_modules/spdx-correct": { - "version": "3.2.0", - "license": "Apache-2.0", - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/npm/node_modules/spdx-correct/node_modules/spdx-expression-parse": { - "version": "3.0.1", - "license": "MIT", - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, "node_modules/npm/node_modules/spdx-exceptions": { "version": "2.5.0", "inBundle": true, @@ -26209,22 +26159,6 @@ "inBundle": true, "license": "MIT" }, - "node_modules/npm/node_modules/validate-npm-package-license": { - "version": "3.0.4", - "license": "Apache-2.0", - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "node_modules/npm/node_modules/validate-npm-package-license/node_modules/spdx-expression-parse": { - "version": "3.0.1", - "license": "MIT", - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, "node_modules/npm/node_modules/validate-npm-package-name": { "version": "7.0.2", "inBundle": true, @@ -29188,15 +29122,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, "node_modules/range-parser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", @@ -31681,12 +31606,12 @@ } }, "node_modules/serialize-javascript": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", - "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-7.0.3.tgz", + "integrity": "sha512-h+cZ/XXarqDgCjo+YSyQU/ulDEESGGf8AMK9pPNmhNSl/FzPl6L8pMp1leca5z6NuG6tvV/auC8/43tmovowww==", "license": "BSD-3-Clause", - "dependencies": { - "randombytes": "^2.1.0" + "engines": { + "node": ">=20.0.0" } }, "node_modules/serve-handler": { @@ -33929,15 +33854,12 @@ } }, "node_modules/undici": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz", - "integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==", + "version": "6.24.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.24.0.tgz", + "integrity": "sha512-lVLNosgqo5EkGqh5XUDhGfsMSoO8K0BAN0TyJLvwNRSl4xWGZlCVYsAIpa/OpA3TvmnM01GWcoKmc3ZWo5wKKA==", "license": "MIT", - "dependencies": { - "@fastify/busboy": "^2.0.0" - }, "engines": { - "node": ">=14.0" + "node": ">=18.17" } }, "node_modules/unicode-canonical-property-names-ecmascript": { diff --git a/package.json b/package.json index 5414610da..e189a1220 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,9 @@ "@semantic-release/npm": "^13.1.2", "test-exclude": { "glob": "^7.2.3" - } + }, + "undici": "6.24.0", + "serialize-javascript": "7.0.3" }, "browserslist": { "production": [ diff --git a/src/components/CustomAccordion/custom-accordion.scss b/src/components/CustomAccordion/custom-accordion.scss index efb3f747e..ee2ba56fa 100644 --- a/src/components/CustomAccordion/custom-accordion.scss +++ b/src/components/CustomAccordion/custom-accordion.scss @@ -19,6 +19,10 @@ overflow: hidden; margin-top: 2px; border-radius: 24px; + + &[data-state='open'] { + background-color: var(--opacity-black-75); + } } } @@ -28,14 +32,9 @@ column-gap: 12px; background-color: transparent; - [data-state='open'] { - background-color: var(--opacity-black-75); - padding: 16px; - } - &__trigger { font-family: inherit; - padding: 24px 0px; + padding: 10px 18px; height: 42px; flex: 1; display: flex; @@ -61,7 +60,6 @@ .accordion_content { overflow: hidden; - background-color: var(--opacity-black-75); &__text { padding: 16px 18px; @@ -75,7 +73,6 @@ &[data-state='closed'] { animation: slideUp 300ms cubic-bezier(0.87, 0, 0.13, 1); - background-color: transparent; } } diff --git a/src/components/Layout/CustomLayout.tsx b/src/components/Layout/CustomLayout.tsx index 721c49a46..18bff0177 100644 --- a/src/components/Layout/CustomLayout.tsx +++ b/src/components/Layout/CustomLayout.tsx @@ -108,7 +108,7 @@ const CustomLayout: React.FC = () => { ) : ( <> - Deriv API | Customise your trading app + Legacy Deriv API | Customise your trading app { + const history = useHistory(); + + return ( +
+ + + You're on the Legacy Deriv API. We've launched a new and improved version. + + + +
+ ); +}; diff --git a/src/components/UserNavbarItem/__tests__/item.desktop.test.tsx b/src/components/UserNavbarItem/__tests__/item.desktop.test.tsx index 675601d2b..84f47af1e 100644 --- a/src/components/UserNavbarItem/__tests__/item.desktop.test.tsx +++ b/src/components/UserNavbarItem/__tests__/item.desktop.test.tsx @@ -70,20 +70,5 @@ describe('User Navbar Desktop Item', () => { }); expect(location.pathname).toBe('/dashboard'); }); - - it('should click on sign up button', async () => { - const updatedProps = { - ...initialProps, - is_logged_in: false, - }; - renderDashboardActions(updatedProps); - const signUp_button = screen.getByTestId('sa_signup'); - expect(signUp_button).toBeInTheDocument(); - await act(async () => { - await userEvent.click(signUp_button); - }); - // No need to check location.href since handleSignUp is mocked and doesn't do actual navigation - expect(signUp_button).toBeInTheDocument(); - }); }); }); diff --git a/src/components/UserNavbarItem/item.desktop.tsx b/src/components/UserNavbarItem/item.desktop.tsx index 42140ec01..7afc75105 100644 --- a/src/components/UserNavbarItem/item.desktop.tsx +++ b/src/components/UserNavbarItem/item.desktop.tsx @@ -15,7 +15,6 @@ import useAuthContext from '@site/src/hooks/useAuthContext'; import CustomTooltip from '../CustomTooltip'; import useTMB from '@site/src/hooks/useTmb'; import useTmbEnabled from '@site/src/hooks/useTmbEnabled'; -import useSignUp from '@site/src/hooks/useSignUp'; interface IActionProps { handleClick: () => void; @@ -78,8 +77,6 @@ const SignedInActions: React.FC = ({ handleClick, isDesktop, siteA onClickLogin: handleClick, }); - const { handleSignUp } = useSignUp(); - const renderSignupBtn = () => { return ( ); }; diff --git a/src/features/Home/HeroHeader/HeroHeader.tsx b/src/features/Home/HeroHeader/HeroHeader.tsx index cd4a30d2b..9fb072772 100644 --- a/src/features/Home/HeroHeader/HeroHeader.tsx +++ b/src/features/Home/HeroHeader/HeroHeader.tsx @@ -24,7 +24,7 @@ export const HeroHeader = () => { diff --git a/src/features/Home/WaysToEarn/WaysToEarn.tsx b/src/features/Home/WaysToEarn/WaysToEarn.tsx index ed140d605..bf3a444f1 100644 --- a/src/features/Home/WaysToEarn/WaysToEarn.tsx +++ b/src/features/Home/WaysToEarn/WaysToEarn.tsx @@ -49,22 +49,6 @@ export const WaysToEarn = () => { -
- } - label='regular' - size='large' - spacing='loose' - visibility='icon-and-label' - > - - - Sign up as a payment agent, build your own custom payment website, and use our API - to earn commission on every payment you process for Deriv's clients. - - - -
diff --git a/src/features/Home/WaysToEarn/__tests__/WaysToEarn.test.tsx b/src/features/Home/WaysToEarn/__tests__/WaysToEarn.test.tsx index 66fd181bb..26fe2f06d 100644 --- a/src/features/Home/WaysToEarn/__tests__/WaysToEarn.test.tsx +++ b/src/features/Home/WaysToEarn/__tests__/WaysToEarn.test.tsx @@ -20,9 +20,7 @@ describe('WaysToEarn', () => { it('renders the badges', () => { const badge_one = screen.getByText(/register your app with deriv/i); const badge_two = screen.getByText(/sign up as an affiliate/i); - const badge_three = screen.getByText(/sign up as a payment agent/i); expect(badge_one).toBeVisible(); expect(badge_two).toBeVisible(); - expect(badge_three).toBeVisible(); }); }); diff --git a/src/features/Home/index.tsx b/src/features/Home/index.tsx index 5da905ac0..3e409bae5 100644 --- a/src/features/Home/index.tsx +++ b/src/features/Home/index.tsx @@ -21,7 +21,7 @@ export default function HomepageFeatures() { - + {/* */} {/* Carousel requires new quote's before it should be enabled again */} {/* */} diff --git a/src/features/Updates/CTAFooter/CTAFooter.module.scss b/src/features/Updates/CTAFooter/CTAFooter.module.scss new file mode 100644 index 000000000..704d71ba2 --- /dev/null +++ b/src/features/Updates/CTAFooter/CTAFooter.module.scss @@ -0,0 +1,48 @@ +@use '../../../styles/utility' as *; +@use '../../../styles/mixins' as *; + +.ctaSection { + background: #0d0d0d; + padding: rem(9.6) rem(2.4); + + @include mobile { + padding: rem(6.4) rem(1.6); + } +} + +.ctaContent { + max-width: rem(72); + margin: 0 auto; + text-align: center; + display: flex; + flex-direction: column; + align-items: center; + gap: rem(2.4); +} + +.ctaTitle { + color: #ffffff; + font-size: rem(4); + font-weight: 700; + line-height: 1.2; + margin: 0; + + @include mobile { + font-size: rem(2.8); + } +} + +.ctaSubtitle { + color: rgba(255, 255, 255, 0.7); + font-size: rem(1.6); + line-height: 1.6; + max-width: rem(56); + margin: 0; +} + +// .ctaButton { +// border-radius: rem(10) !important; +// font-weight: 700 !important; +// padding-left: rem(2.4) !important; +// padding-right: rem(2.4) !important; +// } diff --git a/src/features/Updates/CTAFooter/CTAFooter.tsx b/src/features/Updates/CTAFooter/CTAFooter.tsx new file mode 100644 index 000000000..aa2bfcd59 --- /dev/null +++ b/src/features/Updates/CTAFooter/CTAFooter.tsx @@ -0,0 +1,31 @@ +import React from 'react'; +import Translate from '@docusaurus/Translate'; +import { Button } from '@deriv-com/quill-ui'; +import styles from './CTAFooter.module.scss'; + +export const CTAFooter = () => { + return ( +
+
+

+ Ready to explore the new Deriv APIs? +

+

+ + Create your account and start building with OAuth 2.0 security and improved + documentation. + +

+ +
+
+ ); +}; diff --git a/src/features/Updates/FAQ/FAQ.module.scss b/src/features/Updates/FAQ/FAQ.module.scss new file mode 100644 index 000000000..bca8b156b --- /dev/null +++ b/src/features/Updates/FAQ/FAQ.module.scss @@ -0,0 +1,36 @@ +@use '../../../styles/utility' as *; +@use '../../../styles/mixins' as *; + +.faqSection { + background: #ffffff; + padding: rem(6.4) rem(2.4); + border-top: 1px solid #f0f0f0; + + @include mobile { + padding: rem(4.8) rem(1.6); + } +} + +.container { + max-width: rem(80); + margin: 0 auto; +} + +.sectionTitle { + text-align: center; + font-size: rem(3.6); + font-weight: 700; + color: #181c25; + margin-bottom: rem(1.6); + + @include mobile { + font-size: rem(2.4); + } +} + +.sectionSubtitle { + text-align: center; + font-size: rem(1.6); + color: #5c6374; + margin-bottom: rem(4.8); +} diff --git a/src/features/Updates/FAQ/FAQ.tsx b/src/features/Updates/FAQ/FAQ.tsx new file mode 100644 index 000000000..dd86c5889 --- /dev/null +++ b/src/features/Updates/FAQ/FAQ.tsx @@ -0,0 +1,80 @@ +import React from 'react'; +import Translate from '@docusaurus/Translate'; +import CustomAccordion from '@site/src/components/CustomAccordion'; +import styles from './FAQ.module.scss'; +import Link from '@docusaurus/Link'; + +const FAQ_ITEMS = [ + { + header: 'Will my existing apps still work?', + content: ( +

+ + Yes. Your existing applications, tokens, and integrations will continue to work on the + legacy Deriv APIs. Your current users can keep using your apps as normal. Nothing changes + for them. + +

+ ), + }, + { + header: 'Can my existing apps sign in new users?', + content: ( +

+ + beta-api.deriv.com + + ), + breakline:
, + }} + > + { + 'We will soon move all new sign-ups to the new Deriv APIs. To onboard new users, you must create a new application using the new Deriv APIs at {link}. Your legacy apps will continue to work for your existing users only.' + } +
+

+ ), + }, + { + header: 'What happens to my current users?', + content: ( +

+ + Nothing changes for your current users. They can continue using your apps on the legacy + Deriv APIs as they do today. + +

+ ), + }, + { + header: "I'm a new developer. Where do I start?", + content: ( +

+ + Head straight to beta-api.deriv.com and create an account. The new Deriv APIs offer OAuth + 2.0 security, improved documentation, a playground to test your integrations, and + AI-powered tools to help you build faster. + +

+ ), + }, +]; + +export const FAQ = () => { + return ( +
+
+

+ Frequently asked questions +

+

+ Common questions about the new Deriv APIs and the transition. +

+ +
+
+ ); +}; diff --git a/src/features/Updates/Hero/Hero.module.scss b/src/features/Updates/Hero/Hero.module.scss new file mode 100644 index 000000000..d46d9df97 --- /dev/null +++ b/src/features/Updates/Hero/Hero.module.scss @@ -0,0 +1,88 @@ +@use '../../../styles/utility' as *; +@use '../../../styles/mixins' as *; + +.heroSection { + background-color: #0d0d0d; + padding: rem(9.6) rem(2.4); + + @include mobile { + padding: rem(6.4) rem(1.6); + } +} + +.heroContent { + max-width: rem(80); + margin: 0 auto; + display: flex; + flex-direction: column; + align-items: center; + text-align: center; +} + +.headline { + color: #ffffff; + font-size: rem(5.6); + font-weight: 700; + line-height: 1.15; + margin-bottom: rem(2.4); + + @include mobile { + font-size: rem(3.2); + } +} + +.coral { + color: #ff444f; +} + +.subtitle { + color: rgba(255, 255, 255, 0.75); + font-size: rem(1.8); + line-height: 1.6; + max-width: rem(72); + margin-bottom: rem(3.6); + + @include mobile { + font-size: rem(1.5); + } +} + +.pillRow { + display: flex; + flex-wrap: wrap; + gap: rem(1.2); + justify-content: center; + margin-bottom: rem(4); +} + +.pill { + border: 1px solid rgba(255, 255, 255, 0.25); + color: rgba(255, 255, 255, 0.85); + border-radius: rem(10); + padding: rem(0.6) rem(1.6); + font-size: rem(1.4); + font-weight: 500; +} + +.ctaRow { + display: flex; + gap: rem(1.6); + align-items: center; + + @include mobile { + flex-direction: column; + width: 100%; + } +} + +/* +.primaryBtn { + border-radius: rem(10) !important; + font-weight: 700 !important; +} + +.secondaryBtn { + border-radius: rem(10) !important; + font-weight: 700 !important; +} +*/ \ No newline at end of file diff --git a/src/features/Updates/Hero/Hero.tsx b/src/features/Updates/Hero/Hero.tsx new file mode 100644 index 000000000..4afe59adb --- /dev/null +++ b/src/features/Updates/Hero/Hero.tsx @@ -0,0 +1,37 @@ +import React from 'react'; +import Translate from '@docusaurus/Translate'; +import { Button } from '@deriv-com/quill-ui'; +import styles from './Hero.module.scss'; + +export const Hero = () => { + return ( +
+
+

+ We bring you + + new Deriv APIs + +

+

+ + Far more secure, powered by OAuth 2.0, and a streamlined developer experience. + +
+ Create a new account on the new Deriv APIs to get started. +

+
+ +
+
+
+ ); +}; diff --git a/src/features/Updates/HowToGetStarted/HowToGetStarted.module.scss b/src/features/Updates/HowToGetStarted/HowToGetStarted.module.scss new file mode 100644 index 000000000..f3babc025 --- /dev/null +++ b/src/features/Updates/HowToGetStarted/HowToGetStarted.module.scss @@ -0,0 +1,98 @@ +@use '../../../styles/utility' as *; +@use '../../../styles/mixins' as *; + +.stepsSection { + background: #ffffff; + padding: rem(6.4) rem(2.4); + + @include mobile { + padding: rem(4.8) rem(1.6); + } +} + +.container { + max-width: rem(120); + margin: 0 auto; +} + +.sectionTitle { + text-align: center; + font-size: rem(3.6); + font-weight: 700; + color: #181c25; + margin-bottom: rem(1.6); + + @include mobile { + font-size: rem(2.4); + } +} + +.sectionSubtitle { + text-align: center; + font-size: rem(1.6); + color: #5c6374; + margin-bottom: rem(4.8); +} + +.stepsWrapper { + display: flex; + flex-direction: row; + gap: rem(2.4); + + @include mobile { + flex-direction: column; + gap: rem(3.2); + } +} + +.step { + display: flex; + flex: 1; + align-items: flex-start; + gap: rem(1.6); +} + +.stepNumber { + width: rem(4); + height: rem(4); + border-radius: 50%; + background: #ff444f; + color: #ffffff; + display: flex; + align-items: center; + justify-content: center; + font-weight: 700; + font-size: rem(1.6); + flex-shrink: 0; +} + +.stepContent { + display: flex; + flex-direction: column; + gap: rem(0.8); + padding-top: rem(0.4); +} + +.stepTitle { + font-size: rem(1.6); + font-weight: 700; + color: #181c25; + margin: 0; +} + +.stepDescription { + font-size: rem(1.4); + color: #5c6374; + line-height: 1.6; + margin: 0; +} + +.link { + color: #ff444f !important; + font-weight: 600; + text-decoration: underline !important; + + &:hover { + color: #cc363f !important; + } +} diff --git a/src/features/Updates/HowToGetStarted/HowToGetStarted.tsx b/src/features/Updates/HowToGetStarted/HowToGetStarted.tsx new file mode 100644 index 000000000..73865aa78 --- /dev/null +++ b/src/features/Updates/HowToGetStarted/HowToGetStarted.tsx @@ -0,0 +1,72 @@ +import React from 'react'; +import Link from '@docusaurus/Link'; +import Translate from '@docusaurus/Translate'; +import styles from './HowToGetStarted.module.scss'; + +type TStep = { + number: number; + title: string; + description: React.ReactNode; +}; + +const STEPS: TStep[] = [ + { + number: 1, + title: 'Visit beta-api.deriv.com', + description: ( + + beta-api.deriv.com + + ), + }} + > + {'Go to {link} to access the new Deriv APIs.'} + + ), + }, + { + number: 2, + title: 'Create a new account', + description: + "Click Sign up and register. Your existing legacy credentials won't work here — a new account is required.", + }, + { + number: 3, + title: 'Start building', + description: + 'Explore the APIs, create applications, generate tokens, and use the AI tools and documentation.', + }, +]; + +const Step = ({ step }: { step: TStep }) => ( +
+
{step.number}
+
+
{step.title}
+

{step.description}

+
+
+); + +export const HowToGetStarted = () => { + return ( +
+
+

+ How to get started +

+

+ Three steps to set up your account on the new Deriv APIs. +

+
+ {STEPS.map((step) => ( + + ))} +
+
+
+ ); +}; diff --git a/src/features/Updates/ImportantNotice/ImportantNotice.module.scss b/src/features/Updates/ImportantNotice/ImportantNotice.module.scss new file mode 100644 index 000000000..b469fc731 --- /dev/null +++ b/src/features/Updates/ImportantNotice/ImportantNotice.module.scss @@ -0,0 +1,73 @@ +@use '../../../styles/utility' as *; +@use '../../../styles/mixins' as *; + +.noticeSection { + background: #ffffff; + padding: rem(4.8) rem(2.4); + + @include mobile { + padding: rem(3.2) rem(1.6); + } +} + +.noticeCard { + max-width: rem(80); + margin: 0 auto; + border-left: rem(0.4) solid #ff444f; + border-radius: 0 rem(0.8) rem(0.8) 0; + padding: rem(2.4) rem(3.2); + box-shadow: 0 rem(0.2) rem(1.6) rgba(0, 0, 0, 0.08); + display: flex; + flex-direction: column; + gap: rem(1.2); + + @include mobile { + padding: rem(2) rem(1.6); + } +} + +.noticeHeader { + display: flex; + align-items: center; + gap: rem(1.2); + margin-bottom: rem(0.4); +} + +.noticeIcon { + color: #ff444f; + flex-shrink: 0; +} + +.noticeTitle { + font-size: rem(1.8); + font-weight: 700; + color: #181c25; + margin: 0; +} + +.noticeBody { + font-size: rem(1.5); + color: #181c25; + line-height: 1.6; + margin: 0; +} + +.noticeBold { + font-size: rem(1.5); + font-weight: 700; + color: #181c25; + line-height: 1.6; + margin: 0; +} + +.noticeSmall { + font-size: rem(1.3); + color: #5c6374; + margin: 0; +} + +.noticeLink { + color: #ff444f !important; + text-decoration: underline !important; + font-weight: 700; +} diff --git a/src/features/Updates/ImportantNotice/ImportantNotice.tsx b/src/features/Updates/ImportantNotice/ImportantNotice.tsx new file mode 100644 index 000000000..023951cdb --- /dev/null +++ b/src/features/Updates/ImportantNotice/ImportantNotice.tsx @@ -0,0 +1,46 @@ +import React from 'react'; +import Link from '@docusaurus/Link'; +import Translate from '@docusaurus/Translate'; +import { StandaloneCircleInfoBoldIcon } from '@deriv/quill-icons'; +import styles from './ImportantNotice.module.scss'; + +export const ImportantNotice = () => { + return ( +
+
+
+ +

+ Important notice for existing developers +

+
+

+ + Your existing apps and integrations will continue to work on this legacy platform, and + your current setup remains functional. Your existing users will continue using your app + without any issue. + +

+

+ + beta-api.deriv.com + + ), + breakline:
, + }} + > + { + 'However, in order to onboard and support new users, you should migrate to the new Deriv APIs. {breakline}{breakline} To access the new Deriv APIs, you will need to create a new account on {link}. Your existing legacy credentials will not work there.' + } +
+

+

+ New users do not need to take any action. +

+
+
+ ); +}; diff --git a/src/features/Updates/PageFooter/PageFooter.module.scss b/src/features/Updates/PageFooter/PageFooter.module.scss new file mode 100644 index 000000000..3af49e667 --- /dev/null +++ b/src/features/Updates/PageFooter/PageFooter.module.scss @@ -0,0 +1,47 @@ +@use '../../../styles/utility' as *; +@use '../../../styles/mixins' as *; + +.pageFooter { + background: #0d0d0d; + padding: rem(3.2) rem(2.4); + border-top: 1px solid rgba(255, 255, 255, 0.08); + display: flex; + flex-direction: column; + align-items: center; + gap: rem(1.6); + + @include mobile { + padding: rem(2.4) rem(1.6); + } +} + +.footerLinks { + display: flex; + gap: rem(1.6); + flex-wrap: wrap; + justify-content: center; + align-items: center; +} + +.footerLink { + color: rgba(255, 255, 255, 0.6) !important; + text-decoration: none !important; + font-size: rem(1.4); + transition: color 0.2s; + + &:hover { + color: #ffffff !important; + text-decoration: none !important; + } +} + +.separator { + color: rgba(255, 255, 255, 0.25); + font-size: rem(1.4); +} + +.copyright { + color: rgba(255, 255, 255, 0.35); + font-size: rem(1.3); + margin: 0; +} diff --git a/src/features/Updates/PageFooter/PageFooter.tsx b/src/features/Updates/PageFooter/PageFooter.tsx new file mode 100644 index 000000000..3271da71c --- /dev/null +++ b/src/features/Updates/PageFooter/PageFooter.tsx @@ -0,0 +1,24 @@ +import React from 'react'; +import Link from '@docusaurus/Link'; +import Translate from '@docusaurus/Translate'; +import styles from './PageFooter.module.scss'; + +export const PageFooter = () => { + return ( +
+
+ + New Deriv APIs + + | + + Deriv.com + + | + + Help centre + +
+
+ ); +}; diff --git a/src/features/Updates/WhatsNew/WhatsNew.module.scss b/src/features/Updates/WhatsNew/WhatsNew.module.scss new file mode 100644 index 000000000..5c3e84bec --- /dev/null +++ b/src/features/Updates/WhatsNew/WhatsNew.module.scss @@ -0,0 +1,117 @@ +@use '../../../styles/utility' as *; +@use '../../../styles/mixins' as *; + +.whatsNewSection { + background: #f6f7f8; + padding: rem(6.4) rem(2.4); + + @include mobile { + padding: rem(4.8) rem(1.6); + } +} + +.container { + max-width: rem(120); + margin: 0 auto; +} + +.sectionTitle { + text-align: center; + font-size: rem(3.6); + font-weight: 700; + color: #181c25; + margin-bottom: rem(1.6); + + @include mobile { + font-size: rem(2.4); + } +} + +.sectionSubtitle { + text-align: center; + font-size: rem(1.6); + color: #5c6374; + margin-bottom: rem(4.8); + max-width: rem(64); + margin-left: auto; + margin-right: auto; +} + +.cardGrid { + display: grid; + grid-template-columns: repeat(5, 1fr); + gap: rem(1.6); + + @include tablet { + grid-template-columns: repeat(3, 1fr); + } + + @include mobile { + grid-template-columns: repeat(2, 1fr); + } +} + +.card { + background: #ffffff; + border-radius: rem(1.2); + padding: rem(2) rem(1.6); + position: relative; + display: flex; + flex-direction: column; + align-items: center; + text-align: center; + gap: rem(1.2); + box-shadow: 0 rem(0.2) rem(0.8) rgba(0, 0, 0, 0.06); + transition: transform 0.2s ease, box-shadow 0.2s ease; + cursor: default; + + &:hover { + transform: translateY(-rem(0.4)); + box-shadow: 0 rem(0.8) rem(2.4) rgba(0, 0, 0, 0.12); + } +} + +.iconWrapper { + width: rem(4.8); + height: rem(4.8); + border-radius: rem(0.8); + display: flex; + align-items: center; + justify-content: center; + flex-shrink: 0; +} + +.badge { + position: absolute; + top: rem(0.8); + right: rem(0.8); + background: #2196f3; + color: #ffffff; + border-radius: rem(0.4); + padding: rem(0.2) rem(0.6); + font-size: rem(0.9); + font-weight: 700; + letter-spacing: 0.05em; +} + +.badgeRed { + position: absolute; + top: rem(0.8); + right: rem(0.8); + background: #f21818; + color: #ffffff; + border-radius: rem(0.4); + padding: rem(0.2) rem(0.6); + font-size: rem(0.9); + font-weight: 700; + letter-spacing: 0.05em; +} + + +.cardTitle { + font-size: rem(1.3); + font-weight: 700; + color: #181c25; + margin: 0; + line-height: 1.4; +} diff --git a/src/features/Updates/WhatsNew/WhatsNew.tsx b/src/features/Updates/WhatsNew/WhatsNew.tsx new file mode 100644 index 000000000..43cb94e25 --- /dev/null +++ b/src/features/Updates/WhatsNew/WhatsNew.tsx @@ -0,0 +1,90 @@ +import React from 'react'; +import Translate from '@docusaurus/Translate'; +import { + StandaloneShieldCheckBoldIcon, + StandaloneLightbulbBoldIcon, + StandaloneBookCircleQuestionBoldIcon, + StandaloneChartLineBoldIcon, + StandaloneDollarSignBoldIcon, +} from '@deriv/quill-icons'; +import styles from './WhatsNew.module.scss'; + +type TCard = { + iconBg: string; + icon: React.ReactNode; + title: string; + comingSoon?: boolean; + limitedTime?: boolean; +}; + +const CARDS: TCard[] = [ + { + iconBg: '#ffeef0', + icon: , + title: 'OAuth 2.0 authentication', + }, + { + iconBg: '#f3eeff', + icon: , + title: 'AI-powered features', + }, + { + iconBg: '#e8f4ff', + icon: , + title: 'Better documentation', + }, + { + iconBg: '#e8f0ff', + icon: , + title: 'Analytics dashboard', + comingSoon: true, + }, + { + iconBg: '#e8fff3', + icon: , + title: 'Markup commissions up to 5%', + limitedTime: true, + }, +]; + +const FeatureCard = ({ card }: { card: TCard }) => ( +
+
+ {card.icon} +
+ {card.comingSoon && ( + + COMING SOON + + )} + {card.limitedTime && ( + + LIMITED TIME + + )} +
{card.title}
+
+); + +export const WhatsNew = () => { + return ( +
+
+

+ What's new in the Deriv APIs +

+

+ + Everything you get when you move to the new platform — built for security, speed, and + the future. + +

+
+ {CARDS.map((card) => ( + + ))} +
+
+
+ ); +}; diff --git a/src/features/Updates/index.tsx b/src/features/Updates/index.tsx new file mode 100644 index 000000000..6a622fb83 --- /dev/null +++ b/src/features/Updates/index.tsx @@ -0,0 +1,23 @@ +import React from 'react'; +import { Hero } from './Hero/Hero'; +import { ImportantNotice } from './ImportantNotice/ImportantNotice'; +import { WhatsNew } from './WhatsNew/WhatsNew'; +import { HowToGetStarted } from './HowToGetStarted/HowToGetStarted'; +import { FAQ } from './FAQ/FAQ'; +import { CTAFooter } from './CTAFooter/CTAFooter'; +import { PageFooter } from './PageFooter/PageFooter'; +import styles from './styles.module.scss'; + +export default function UpdatesFeature() { + return ( +
+ + + + + + + +
+ ); +} diff --git a/src/features/Updates/styles.module.scss b/src/features/Updates/styles.module.scss new file mode 100644 index 000000000..b77de9e46 --- /dev/null +++ b/src/features/Updates/styles.module.scss @@ -0,0 +1,5 @@ +.updates { + width: 100%; + display: flex; + flex-direction: column; +} diff --git a/src/features/dashboard/components/app-register/__tests__/app-register.test.tsx b/src/features/dashboard/components/app-register/__tests__/app-register.test.tsx deleted file mode 100644 index c40144d86..000000000 --- a/src/features/dashboard/components/app-register/__tests__/app-register.test.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from 'react'; -import { cleanup, render, screen } from '@site/src/test-utils'; -import AppRegister from '..'; - -const mock_submit = jest.fn(); - -describe('AppRegister', () => { - afterEach(() => { - cleanup(); - jest.clearAllMocks(); - }); - - it('Should render the register form with register button', () => { - render(); - - const button = screen.getByText(/Register now/i); - expect(button).toBeInTheDocument(); - }); -}); diff --git a/src/features/dashboard/components/app-register/app-register.tsx b/src/features/dashboard/components/app-register/app-register.tsx index b01964cf5..73ef14805 100644 --- a/src/features/dashboard/components/app-register/app-register.tsx +++ b/src/features/dashboard/components/app-register/app-register.tsx @@ -1,6 +1,7 @@ import React, { useCallback, useEffect, useState } from 'react'; import { useForm } from 'react-hook-form'; import Translate, { translate } from '@docusaurus/Translate'; +import CustomTooltip from '@site/src/components/CustomTooltip'; import { ApplicationObject } from '@deriv/api-types'; import { Button, Link, Text } from '@deriv-com/quill-ui'; import { yupResolver } from '@hookform/resolvers/yup'; @@ -75,7 +76,6 @@ const AppRegister: React.FC = () => { const { register, handleSubmit, - watch, formState: { errors }, } = useForm({ mode: 'all', @@ -84,10 +84,6 @@ const AppRegister: React.FC = () => { }); const has_error = Object.entries(errors).length !== 0; - const watchedValues = watch(); - const name_value = watchedValues.name || ''; - const tnc_approval = watchedValues.tnc_approval || false; - const is_button_disabled = has_error || !name_value || !tnc_approval; const { deviceType } = useDeviceType(); const is_desktop = deviceType === 'desktop'; @@ -169,14 +165,23 @@ const AppRegister: React.FC = () => { Cancel - + + + + + diff --git a/src/features/dashboard/components/app-register/types.ts b/src/features/dashboard/components/app-register/types.ts index c7a196065..a94245bfc 100644 --- a/src/features/dashboard/components/app-register/types.ts +++ b/src/features/dashboard/components/app-register/types.ts @@ -8,7 +8,7 @@ export const app_name_error_map = { }), error_code_2: translate({ message: 'The name can contain up to 48 characters.' }), error_code_3: translate({ - message: 'The name cannot contain “Binary”, “Deriv”, or similar words.', + message: 'The name cannot contain "Binary", "Deriv", or similar words.', }), }; diff --git a/src/features/dashboard/components/apps-table/apps-table.tsx b/src/features/dashboard/components/apps-table/apps-table.tsx index c5bd09a1f..34eff438a 100644 --- a/src/features/dashboard/components/apps-table/apps-table.tsx +++ b/src/features/dashboard/components/apps-table/apps-table.tsx @@ -15,6 +15,7 @@ import { import { TDashboardTab } from '@site/src/contexts/app-manager/app-manager.context'; import useAppManager from '@site/src/hooks/useAppManager'; import useDeviceType from '@site/src/hooks/useDeviceType'; +import CustomTooltip from '@site/src/components/CustomTooltip'; import Table from '../common-table'; import DeleteAppDialog from '../dialogs/delete-app-dialog'; import AppsTableOptionDialog, { @@ -117,8 +118,7 @@ const AppsTableOptions: React.FC = ({ const AppsTableHeader: React.FC<{ is_desktop: boolean; - updateCurrentTab: (tab: TDashboardTab) => void; -}> = ({ is_desktop, updateCurrentTab }) => { +}> = ({ is_desktop }) => { return (
- - + ); }; @@ -411,7 +418,7 @@ const AppsTable = ({ apps }: AppsTableProps) => { })} > {isDeleteOpen && } - + diff --git a/src/hooks/useLoginUrl/index.tsx b/src/hooks/useLoginUrl/index.tsx index 174c0a5f3..61e931773 100644 --- a/src/hooks/useLoginUrl/index.tsx +++ b/src/hooks/useLoginUrl/index.tsx @@ -9,7 +9,6 @@ const useLoginUrl = () => { const { appId, oauth } = getServerConfig(); const pathname = getPathname(); const route = pathname.replace(/\//g, '%2F'); //replacement is done for backend to understand the route - return generateLoginUrl(language, oauth, appId, route); }, // eslint-disable-next-line react-hooks/exhaustive-deps diff --git a/src/hooks/useSignUp/index.tsx b/src/hooks/useSignUp/index.tsx index 3c1cb2594..d299ee847 100644 --- a/src/hooks/useSignUp/index.tsx +++ b/src/hooks/useSignUp/index.tsx @@ -16,7 +16,7 @@ export const useSignUp = () => { const handleSignUp = useCallback(() => { const is_en = currentLocale === 'en'; // Properly encode the redirect URL to handle slashes and special characters - const encodedRedirectUrl = encodeURIComponent('https://api.deriv.com/'); + const encodedRedirectUrl = encodeURIComponent('https://legacy-api.deriv.com/'); // Redirect to sign-up page // If language is not English, include it in the URL diff --git a/src/pages/updates.tsx b/src/pages/updates.tsx new file mode 100644 index 000000000..46451053c --- /dev/null +++ b/src/pages/updates.tsx @@ -0,0 +1,16 @@ +import React from 'react'; +import Layout from '@theme/Layout'; +import UpdatesFeature from '../features/Updates'; + +export default function Updates(): JSX.Element { + return ( + + + + ); +} diff --git a/src/theme/Layout/index.tsx b/src/theme/Layout/index.tsx index 005c2af77..c59c836a3 100644 --- a/src/theme/Layout/index.tsx +++ b/src/theme/Layout/index.tsx @@ -11,7 +11,9 @@ import LayoutProvider from '@theme/Layout/Provider'; import ErrorPageContent from '@theme/ErrorPageContent'; import type { Props } from '@theme/Layout'; import { Header } from '@site/src/components/Header'; +import { LegacyBanner } from '@site/src/components/LegacyBanner'; import useOfficialContentsContext from '@site/src/hooks/useOfficialContentsContext'; +import { useLocation } from '@docusaurus/router'; import styles from './styles.module.css'; export default function Layout(props: Props): JSX.Element { @@ -24,6 +26,7 @@ export default function Layout(props: Props): JSX.Element { description, } = props; const { is_official_domain } = useOfficialContentsContext(); + const { pathname } = useLocation(); useKeyboardNavigation(); @@ -33,7 +36,10 @@ export default function Layout(props: Props): JSX.Element { - +
+ + {pathname !== '/updates' && } +
= ({ mobileSidebar }) => { - const { is_logged_in } = useAuthContext(); - const { handleSignUp } = useSignUp(); - - return ( -
- {!is_logged_in && ( - - )} -
- ); + return
; }; export default function CustomMobileSidebar() { diff --git a/src/utils/__tests__/utils.test.ts b/src/utils/__tests__/utils.test.ts index d9c3f16b4..0095cedea 100644 --- a/src/utils/__tests__/utils.test.ts +++ b/src/utils/__tests__/utils.test.ts @@ -45,12 +45,12 @@ describe('Get App ID', () => { expect(appId).toBe('35073'); }); it("Should return 36545 when it's called in staging environment", () => { - window.location.hostname = 'staging-api.deriv.com'; + window.location.hostname = 'staging-legacy-api.deriv.com'; const appId = getAppId(); expect(appId).toBe('36545'); }); it("Should return 36544 when it's called in production environment", () => { - window.location.hostname = 'api.deriv.com'; + window.location.hostname = 'legacy-api.deriv.com'; const appId = getAppId(); expect(appId).toBe('36544'); }); diff --git a/src/utils/index.ts b/src/utils/index.ts index f2d9f9f2b..4049e1e7c 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -31,12 +31,12 @@ const CURRENCY_MAP = new Map([ ]); export const domains = [ - 'deriv.be', - 'deriv.me', - 'deriv.com', - 'api.deriv.me', - 'api.deriv.be', - 'api.deriv.com', + 'legacy-deriv.be', + 'legacy-deriv.me', + 'legacy-deriv.com', + 'legacy-api.deriv.me', + 'legacy-api.deriv.be', + 'legacy-api.deriv.com', 'staging.deriv.be', 'staging.deriv.me', 'staging.deriv.com', @@ -45,9 +45,9 @@ export const domains = [ 'deriv-developers-portal-git-fork', 'deriv-api-docs-git-fork', 'binary.sx', - 'staging-api.deriv.be', - 'staging-api.deriv.me', - 'staging-api.deriv.com', + 'staging-legacy-api.deriv.be', + 'staging-legacy-api.deriv.me', + 'staging-legacy-api.deriv.com', 'api.binary.sx', 'staging-api.binary.sx', ]; @@ -89,13 +89,13 @@ export const isHost = (hostname: string) => { */ export const getAppId = () => { if (isHost('localhost')) return LOCALHOST_APP_ID; - if (isHost('staging-api.deriv.com')) return STAGING_APP_ID; + if (isHost('staging-legacy-api.deriv.com')) return STAGING_APP_ID; if (isHost('deriv-api-docs.binary.sx')) return VERCEL_DEPLOYMENT_APP_ID; - if (isHost('staging-api.deriv.me')) return STAGING_ME_APP_ID; - if (isHost('staging-api.deriv.be')) return STAGING_BE_APP_ID; - if (isHost('api.deriv.com')) return PRODUCTION_APP_ID; - if (isHost('api.deriv.me')) return PRODUCTION_ME_APP_ID; - if (isHost('api.deriv.be')) return PRODUCTION_BE_APP_ID; + if (isHost('staging-legacy-api.deriv.me')) return STAGING_ME_APP_ID; + if (isHost('staging-legacy-api.deriv.be')) return STAGING_BE_APP_ID; + if (isHost('legacy-api.deriv.com')) return PRODUCTION_APP_ID; + if (isHost('legacy-api.deriv.me')) return PRODUCTION_ME_APP_ID; + if (isHost('legacy-api.deriv.be')) return PRODUCTION_BE_APP_ID; return PRODUCTION_APP_ID; }; @@ -263,7 +263,7 @@ export const hasDuplicateKeys = (jsonStr: string) => { export const getTmbConfigUrl = () => { if (typeof window === 'undefined') return ''; - const isProduction = window.location.hostname === 'api.deriv.com'; + const isProduction = window.location.hostname === 'legacy-api.deriv.com'; return isProduction ? 'https://app-config-prod.firebaseio.com/remote_config/oauth/is_tmb_enabled.json' : 'https://app-config-staging.firebaseio.com/remote_config/oauth/is_tmb_enabled.json'; diff --git a/static/img/derivlogo.svg b/static/img/derivlogo.svg index d854d896d..a943617e3 100644 --- a/static/img/derivlogo.svg +++ b/static/img/derivlogo.svg @@ -1,13 +1,15 @@ - - - - - - + + + + + + + + - - + +