Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(EMS-1964): Move external UI currency API calls into the EXIP API #1511

Merged
merged 3 commits into from
Dec 14, 2023

Conversation

ttbarnes
Copy link
Contributor

@ttbarnes ttbarnes commented Dec 13, 2023

Introduction ✏️

This PR moves the last remaning external API call in the UI, into the EXIP API. This ensures that all external API calls are made from our own API, instead of the UI calling an external API.

Resolution ✔️

  • Remove APIM environment variables from the docker-compose UI service and UI env sample.
  • Add getApimCurrencies custom GQL resolver.
  • Add SUPPORTED_CURRENCIES API constants.
  • Add currency mapping functions into the API, using a new shared NAME field ID to sort alphabetically.
  • Add APIM currencies API call to the API.
  • Remove the UI's external API calls directory, replace with api.keystone.APIM.getCurrencies.
  • Update all "get currencies" calls to use api.keystone.APIM.getCurrencies.
  • Simplify UI currency mapping functions so that only needs to map the currencies into a structure for GOV select component options.

@ttbarnes ttbarnes added tech Technical debt/improvements chore Chore labels Dec 13, 2023
@ttbarnes ttbarnes self-assigned this Dec 13, 2023
@ttbarnes ttbarnes requested a deployment to qa December 14, 2023 11:07 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa December 14, 2023 11:07 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa December 14, 2023 11:07 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa December 14, 2023 11:07 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa December 14, 2023 11:07 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa December 14, 2023 11:07 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa December 14, 2023 11:07 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa December 14, 2023 11:07 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa December 14, 2023 11:07 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa December 14, 2023 11:07 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa December 14, 2023 11:07 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa December 14, 2023 11:07 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa December 14, 2023 11:07 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa December 14, 2023 11:07 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa December 14, 2023 11:07 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa December 14, 2023 11:07 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa December 14, 2023 11:07 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa December 14, 2023 11:07 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa December 14, 2023 11:07 — with GitHub Actions Abandoned
@ttbarnes ttbarnes merged commit 616ce85 into main Dec 14, 2023
73 checks passed
@ttbarnes ttbarnes deleted the chore/EMS-1964 branch December 14, 2023 11:44
ttbarnes added a commit that referenced this pull request Dec 14, 2023
…simplify UI currency mappings (#1515)

* fix(EMS-2341): quote page - update application link (#1429)

* chore(main): release 2.2.5 (#1430)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(EMS-2409): Rename/align assertSummaryListRowValue cypress commands (#1481)

* chore(tests): rename/align assertSummaryListRowValue cypress command name

* chore(tests): fix/update flaky date tests

* chore(main): release 2.2.6 (#1482)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* feat(EMS-2386): Add Google tag manager script (#1486)

* feat(EMS-2386): analytics - google tag manager

* chore(docs): add documentation to e2e analytics functions

* chore(docs): add documentation to e2e analytics functions

* chore(tests): update analytics e2e test description

* feat(EMS-2386): added SHA512 for Google scripts

* docs(EMS-2386): sri hash generation documentation

---------

Co-authored-by: Abhi Markan <abhi.markan@ukexportfinance.gov.uk>

* chore(main): release 2.3.0 (#1504)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(EMS-2394): Replace mock date constructions to use native JS instead of date-fns (#1463)

* chore(EMS-2394): replace date-fns date construction with native js

* chore(EMS-2394): replace date-fns date construction with native js

* chore(tech): revert extra spacing

* chore(EMS-2394): fix/update e2e test

* chore(EMS-2394): fix/update e2e test

* chore(main): release 2.3.1 (#1505)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(deps): dependencies updates (#1503)

Co-authored-by: Abhi Markan <abhi.markan@ukexportfinance.gov.uk>

* chore(main): release 2.3.2 (#1506)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(EMS-1964): Move external UI currency API calls into the EXIP API  (#1511)

* chore(EMS-1964): move external ui currency api calls into the exip api

* chore(EMS-1964): fix/update unit test

* chore(EMS-1964): update mapCurrencies function to use a new 'name' field id

* chore(main): release 2.3.3 (#1514)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(EMS-1964): fix/update/simplify ui currency mappings

* chore(merge): fix merge issue

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Abhi Markan <abhi.markan@ukexportfinance.gov.uk>
Co-authored-by: Abhi Markan <32125108+abhi-markan@users.noreply.github.com>
ttbarnes added a commit that referenced this pull request Dec 18, 2023
…no PDF form attributes (#1523)

* fix(EMS-2341): quote page - update application link (#1429)

* chore(main): release 2.2.5 (#1430)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(EMS-2409): Rename/align assertSummaryListRowValue cypress commands (#1481)

* chore(tests): rename/align assertSummaryListRowValue cypress command name

* chore(tests): fix/update flaky date tests

* chore(main): release 2.2.6 (#1482)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* feat(EMS-2386): Add Google tag manager script (#1486)

* feat(EMS-2386): analytics - google tag manager

* chore(docs): add documentation to e2e analytics functions

* chore(docs): add documentation to e2e analytics functions

* chore(tests): update analytics e2e test description

* feat(EMS-2386): added SHA512 for Google scripts

* docs(EMS-2386): sri hash generation documentation

---------

Co-authored-by: Abhi Markan <abhi.markan@ukexportfinance.gov.uk>

* chore(main): release 2.3.0 (#1504)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(EMS-2394): Replace mock date constructions to use native JS instead of date-fns (#1463)

* chore(EMS-2394): replace date-fns date construction with native js

* chore(EMS-2394): replace date-fns date construction with native js

* chore(tech): revert extra spacing

* chore(EMS-2394): fix/update e2e test

* chore(EMS-2394): fix/update e2e test

* chore(main): release 2.3.1 (#1505)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(deps): dependencies updates (#1503)

Co-authored-by: Abhi Markan <abhi.markan@ukexportfinance.gov.uk>

* chore(main): release 2.3.2 (#1506)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(EMS-1964): Move external UI currency API calls into the EXIP API  (#1511)

* chore(EMS-1964): move external ui currency api calls into the exip api

* chore(EMS-1964): fix/update unit test

* chore(EMS-1964): update mapCurrencies function to use a new 'name' field id

* chore(main): release 2.3.3 (#1514)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(EMS-2414): Add enctype to all forms (#1517)

* chore(EMS-2414): add enctype to all forms

* chore(EMS-2414): update core page checks to check for form attributes

* chore(EMS-2414): fix/update e2e tests

* chore(main): release 2.3.4 (#1518)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Merge branch 'main' into chore/mergeMain

* chore(EMS-2414): no pdf - add enctype to all no pdf forms

* chore(merge): fix/update e2e tests

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Abhi Markan <abhi.markan@ukexportfinance.gov.uk>
Co-authored-by: Abhi Markan <32125108+abhi-markan@users.noreply.github.com>
ttbarnes added a commit that referenced this pull request Dec 21, 2023
* fix(EMS-2341): quote page - update application link (#1429)

* chore(main): release 2.2.5 (#1430)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(EMS-2409): Rename/align assertSummaryListRowValue cypress commands (#1481)

* chore(tests): rename/align assertSummaryListRowValue cypress command name

* chore(tests): fix/update flaky date tests

* chore(main): release 2.2.6 (#1482)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* feat(EMS-2386): Add Google tag manager script (#1486)

* feat(EMS-2386): analytics - google tag manager

* chore(docs): add documentation to e2e analytics functions

* chore(docs): add documentation to e2e analytics functions

* chore(tests): update analytics e2e test description

* feat(EMS-2386): added SHA512 for Google scripts

* docs(EMS-2386): sri hash generation documentation

---------

Co-authored-by: Abhi Markan <abhi.markan@ukexportfinance.gov.uk>

* chore(main): release 2.3.0 (#1504)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(EMS-2394): Replace mock date constructions to use native JS instead of date-fns (#1463)

* chore(EMS-2394): replace date-fns date construction with native js

* chore(EMS-2394): replace date-fns date construction with native js

* chore(tech): revert extra spacing

* chore(EMS-2394): fix/update e2e test

* chore(EMS-2394): fix/update e2e test

* chore(main): release 2.3.1 (#1505)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(deps): dependencies updates (#1503)

Co-authored-by: Abhi Markan <abhi.markan@ukexportfinance.gov.uk>

* chore(main): release 2.3.2 (#1506)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(EMS-1964): Move external UI currency API calls into the EXIP API  (#1511)

* chore(EMS-1964): move external ui currency api calls into the exip api

* chore(EMS-1964): fix/update unit test

* chore(EMS-1964): update mapCurrencies function to use a new 'name' field id

* chore(main): release 2.3.3 (#1514)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(EMS-2414): Add enctype to all forms (#1517)

* chore(EMS-2414): add enctype to all forms

* chore(EMS-2414): update core page checks to check for form attributes

* chore(EMS-2414): fix/update e2e tests

* chore(main): release 2.3.4 (#1518)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(deps): dependencies updates (#1535)

Co-authored-by: Abhi Markan <abhi.markan@ukexportfinance.gov.uk>

* chore(main): release 2.3.5 (#1539)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix(EMS-2453): Buyer country - fix styling issue (#1540)

* fix(EMS-245): buyer country - fix styling issue

* fix(EMS-2453): fix typo

* fix(EMS-2453): fix typo

* chore(main): release 2.3.6 (#1548)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* style(EMS-2447 2451): Start page, cookies banner, cookies page content improvements (#1545)

* style(EMS-2447): start page content updates

* style(EMS-2451): cookies page content updates

* style(EMS-2451): cookies page content updates

* style(EMS-2451): cookies banner content updates

* style(EMS-2451): fix/update e2e test

* style(EMS-2451): fix/update e2e test

* chore(tech): destructure external links in e2e test

* style(EMS-2449): Get a quote - type of policy content updates (#1549)

* style(EMS-2449): get a quote - type of policy content updates

* chore(release): add style type changelog type

* chore(main): release 2.3.7 (#1550)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix(gha): ensure all packages are intalled with --legacy-peer-deps prior to test execution

* fix(EMS-2463): ci:all execution prior to test run

* chore(main): release 2.3.8 (#1557)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(deps): revert api dep updates

* chore(deps): revert typescript eslint bump

* chore(ci): revert test.yml change for api unit tests

* chore(ci): revert test.yml change for api unit tests

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Abhi Markan <abhi.markan@ukexportfinance.gov.uk>
Co-authored-by: Abhi Markan <32125108+abhi-markan@users.noreply.github.com>
ttbarnes added a commit that referenced this pull request Dec 27, 2023
* fix(EMS-2341): quote page - update application link (#1429)

* chore(main): release 2.2.5 (#1430)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(EMS-2409): Rename/align assertSummaryListRowValue cypress commands (#1481)

* chore(tests): rename/align assertSummaryListRowValue cypress command name

* chore(tests): fix/update flaky date tests

* chore(main): release 2.2.6 (#1482)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* feat(EMS-2386): Add Google tag manager script (#1486)

* feat(EMS-2386): analytics - google tag manager

* chore(docs): add documentation to e2e analytics functions

* chore(docs): add documentation to e2e analytics functions

* chore(tests): update analytics e2e test description

* feat(EMS-2386): added SHA512 for Google scripts

* docs(EMS-2386): sri hash generation documentation

---------

Co-authored-by: Abhi Markan <abhi.markan@ukexportfinance.gov.uk>

* chore(main): release 2.3.0 (#1504)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(EMS-2394): Replace mock date constructions to use native JS instead of date-fns (#1463)

* chore(EMS-2394): replace date-fns date construction with native js

* chore(EMS-2394): replace date-fns date construction with native js

* chore(tech): revert extra spacing

* chore(EMS-2394): fix/update e2e test

* chore(EMS-2394): fix/update e2e test

* chore(main): release 2.3.1 (#1505)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(deps): dependencies updates (#1503)

Co-authored-by: Abhi Markan <abhi.markan@ukexportfinance.gov.uk>

* chore(main): release 2.3.2 (#1506)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(EMS-1964): Move external UI currency API calls into the EXIP API  (#1511)

* chore(EMS-1964): move external ui currency api calls into the exip api

* chore(EMS-1964): fix/update unit test

* chore(EMS-1964): update mapCurrencies function to use a new 'name' field id

* chore(main): release 2.3.3 (#1514)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(EMS-2414): Add enctype to all forms (#1517)

* chore(EMS-2414): add enctype to all forms

* chore(EMS-2414): update core page checks to check for form attributes

* chore(EMS-2414): fix/update e2e tests

* chore(main): release 2.3.4 (#1518)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(deps): dependencies updates (#1535)

Co-authored-by: Abhi Markan <abhi.markan@ukexportfinance.gov.uk>

* chore(main): release 2.3.5 (#1539)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix(EMS-2453): Buyer country - fix styling issue (#1540)

* fix(EMS-245): buyer country - fix styling issue

* fix(EMS-2453): fix typo

* fix(EMS-2453): fix typo

* chore(main): release 2.3.6 (#1548)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* style(EMS-2447 2451): Start page, cookies banner, cookies page content improvements (#1545)

* style(EMS-2447): start page content updates

* style(EMS-2451): cookies page content updates

* style(EMS-2451): cookies page content updates

* style(EMS-2451): cookies banner content updates

* style(EMS-2451): fix/update e2e test

* style(EMS-2451): fix/update e2e test

* chore(tech): destructure external links in e2e test

* style(EMS-2449): Get a quote - type of policy content updates (#1549)

* style(EMS-2449): get a quote - type of policy content updates

* chore(release): add style type changelog type

* chore(main): release 2.3.7 (#1550)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix(gha): ensure all packages are intalled with --legacy-peer-deps prior to test execution

* fix(EMS-2463): ci:all execution prior to test run

* chore(main): release 2.3.8 (#1557)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix(release-please): update syntax to support v4

* fix(release-please): update syntax to support v4

* fix(release-please): update syntax to support v4

* fix(release-please): update syntax to support v4

* feat(EMS-2485): added code coverage to pipeline tests

* fix(cspell): added codecov to cspell

* fix(cspell): spelling check fi

* docs(badge): added codecov badge

* fix(revert): reverted back changes

* fix(revert): reverted back changes

* fix(EMS-2484): reverted back eslint update

* fix(EMS-2484): reverted back eslint update

* fix(EMS-2485): spelling fix

* fix(EMS-2485): fixed npm ci command

* fix(EMS-2485): fixed npm ci command

* fix(EMS-2485): fixed npm ci command

* fix(EMS-2485): fixed npm ci command

* fix(EMS-2485): fixed npm ci command

* chore(main): release 2.4.0 (#1594)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(deps): dependencies updates

* fix(manifest): updated manifest version

* fix(test): date issue

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Abhi Markan <abhi.markan@ukexportfinance.gov.uk>
Co-authored-by: Abhi Markan <32125108+abhi-markan@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Chore tech Technical debt/improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants