Skip to content

Commit f856984

Browse files
Merge branch 'main' into feature/CCM-14783_SQS_Module_Update_to_Include_Alarms
2 parents 270db8d + e88096e commit f856984

114 files changed

Lines changed: 6161 additions & 769 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.template

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
ENVIRONMENT=$ENV_NAME
2-
API_KEY=
3-
HEADERAUTH=
41
PR_NUMBER=prxx # remove if needs to run against main
5-
NHSD_APIM_TOKEN=
6-
PROXY_NAME=
2+
GITHUB_TOKEN= # Your github Personal Access Token (PAT)
3+
4+
5+
# The variables below are used for End to End tests
6+
PROXY_NAME= # information about the proxy name can be found in the tests/e2e-tests/README.md
7+
8+
9+
710
# * nhs-notify-supplier--internal-dev--nhs-notify-supplier
811
# * nhs-notify-supplier--internal-dev--nhs-notify-supplier-PR-XX
912
# * nhs-notify-supplier--ref--nhs-notify-supplier -- ref env

README.md

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!-- vale off -->
12
# NHS Notify Supplier API
23

34
[![1. CI/CD pull request](https://github.com/NHSDigital/nhs-notify-supplier-api/actions/workflows/cicd-1-pull-request.yaml/badge.svg)](https://github.com/NHSDigital/nhs-notify-supplier-api/actions/workflows/cicd-1-pull-request.yaml)
@@ -75,9 +76,49 @@ New developers of the NHS Notify Supplier API should understand the below.
7576

7677
#### Prerequisites and Configuration
7778

78-
- Utilised the devcontainer, for pre reqs and configuration.
79-
- You should open in a devcontainer or a Github workspaces.
80-
- By default it will run `make config` when the container is first setup
79+
- Create the file `~/.aws/config` with the following contents:
80+
81+
```dsconfig
82+
[profile ]
83+
region = eu-west-2
84+
output = json
85+
86+
[profile supplier-dev]
87+
sso_start_url = https://d-9c67018f89.awsapps.com/start#/
88+
sso_region = eu-west-2
89+
sso_account_id = 820178564574
90+
sso_role_name = nhs-notify-bc-developer
91+
region = eu-west-2
92+
output = json
93+
94+
[profile supplier-nonprod]
95+
sso_start_url = https://d-9c67018f89.awsapps.com/start#/
96+
sso_region = eu-west-2
97+
sso_account_id = 885964308133
98+
sso_role_name = nhs-notify-bc-developer
99+
region = eu-west-2
100+
output = json
101+
```
102+
103+
- In your `~/.bashrc` or `~/.zshrc` add the export `export AWS_PROFILE=supplier-dev`, or whichever profile you need
104+
- In the project's root directory create an `.env` file based on the `.env.template` file and fill variables as needed.
105+
- Create the file `~/.npmrc` with the contents:
106+
107+
```dsconfig
108+
# Authenticate to GitHub Packages for github.com
109+
//npm.pkg.github.com/:_authToken=<Insert your Github PAT (Personal Access Token)>
110+
111+
112+
# Package is scoped under @org, set registry for that scope
113+
@nhsdigital:registry=https://npm.pkg.github.com
114+
```
115+
116+
- Install `node` (to run `npm install` and build the project)
117+
- Install `aws cli` to be able to connect to AWS (needed for some tests)
118+
- If AWS CLI calls are blocked by a firewall (e.g. Zscaler), you need to add the custom certificates in the location `/scripts/devcontainer/custom-ca-certs`
119+
- Install `docker` or `Rancher` for containerisation
120+
- You should open in a devcontainer or a Github workspaces. (In VSCode -> Open Command Palet -> "Dev containers: rebuild without cache and reopen in container")
121+
- By default it will run `make config` when the container is first setup
81122

82123
##### SDKs
83124

@@ -151,3 +192,5 @@ Import the files into postman
151192
Select a target environment in postman
152193
Run the collection
153194
The collections must be kept in sync manually
195+
196+
<!-- vale on -->

config/suppliers/letter-variant/client1-campaign.json renamed to config/suppliers/letter-variant/client1-campaign1.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"campaignIds": [
3-
"client1-campaign"
3+
"client1-campaign1"
44
],
55
"clientId": "client1",
66
"constraints": {
@@ -25,12 +25,13 @@
2525
"value": 6
2626
}
2727
},
28-
"description": "Colour printing, campaign envelope, Attachment",
29-
"id": "client1-campaign",
30-
"name": "Client1 - campaign",
28+
"description": "Colour printing, campaign1 envelope, Attachment",
29+
"id": "client1-campaign1",
30+
"name": "Client1 - Campaign1",
3131
"packSpecificationIds": [
32-
"client1-campaign"
32+
"client1-campaign1"
3333
],
34+
"priority": 1,
3435
"status": "INT",
3536
"type": "STANDARD",
3637
"volumeGroupId": "volumeGroup-test3"
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"campaignIds": [
3+
"client1-campaign2"
4+
],
5+
"clientId": "client1",
6+
"constraints": {
7+
"blackCoveragePercentage": {
8+
"operator": "LESS_THAN",
9+
"value": 20
10+
},
11+
"colourCoveragePercentage": {
12+
"operator": "LESS_THAN",
13+
"value": 10
14+
},
15+
"deliveryDays": {
16+
"operator": "LESS_THAN",
17+
"value": 3
18+
},
19+
"sheets": {
20+
"operator": "LESS_THAN",
21+
"value": 5
22+
},
23+
"sides": {
24+
"operator": "LESS_THAN",
25+
"value": 10
26+
}
27+
},
28+
"description": "Admail, colour printing",
29+
"id": "client1-campaign2",
30+
"name": "Client1 - CAMPAIGN2",
31+
"packSpecificationIds": [
32+
"client1-campaign2"
33+
],
34+
"priority": 1,
35+
"status": "INT",
36+
"type": "STANDARD",
37+
"volumeGroupId": "volumeGroup-test3"
38+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"campaignIds": [
3+
"client1-campaign3"
4+
],
5+
"clientId": "client1",
6+
"constraints": {
7+
"blackCoveragePercentage": {
8+
"operator": "LESS_THAN",
9+
"value": 20
10+
},
11+
"colourCoveragePercentage": {
12+
"operator": "LESS_THAN",
13+
"value": 10
14+
},
15+
"deliveryDays": {
16+
"operator": "LESS_THAN",
17+
"value": 3
18+
},
19+
"sheets": {
20+
"operator": "LESS_THAN",
21+
"value": 5
22+
},
23+
"sides": {
24+
"operator": "LESS_THAN",
25+
"value": 10
26+
}
27+
},
28+
"description": "Admail?, colour printing, booklet",
29+
"id": "client1-campaign3",
30+
"name": "Client1 - Campaign 3",
31+
"packSpecificationIds": [
32+
"client1-campaign3"
33+
],
34+
"priority": 2,
35+
"status": "INT",
36+
"type": "STANDARD",
37+
"volumeGroupId": "volumeGroup-test3"
38+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"campaignIds": [
3+
"client1-campaign4"
4+
],
5+
"clientId": "client1",
6+
"constraints": {
7+
"blackCoveragePercentage": {
8+
"operator": "LESS_THAN",
9+
"value": 20
10+
},
11+
"colourCoveragePercentage": {
12+
"operator": "LESS_THAN",
13+
"value": 10
14+
},
15+
"deliveryDays": {
16+
"operator": "LESS_THAN",
17+
"value": 3
18+
},
19+
"sheets": {
20+
"operator": "LESS_THAN",
21+
"value": 5
22+
},
23+
"sides": {
24+
"operator": "LESS_THAN",
25+
"value": 10
26+
}
27+
},
28+
"description": "Admail, colour printing, campaign4 envelope",
29+
"id": "client1-campaign4",
30+
"name": "Client1 - Campaign 4",
31+
"packSpecificationIds": [
32+
"client1-campaign4"
33+
],
34+
"priority": 3,
35+
"status": "INT",
36+
"type": "STANDARD",
37+
"volumeGroupId": "volumeGroup-test3"
38+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"campaignIds": [
3+
"client1-campaign5"
4+
],
5+
"clientId": "client1",
6+
"constraints": {
7+
"blackCoveragePercentage": {
8+
"operator": "LESS_THAN",
9+
"value": 20
10+
},
11+
"colourCoveragePercentage": {
12+
"operator": "LESS_THAN",
13+
"value": 10
14+
},
15+
"deliveryDays": {
16+
"operator": "LESS_THAN",
17+
"value": 3
18+
},
19+
"sheets": {
20+
"operator": "LESS_THAN",
21+
"value": 5
22+
},
23+
"sides": {
24+
"operator": "LESS_THAN",
25+
"value": 10
26+
}
27+
},
28+
"description": "Admail, colour printing, Campaign 5 envelope",
29+
"id": "client1-campaign5",
30+
"name": "Client1 - Campaign 5",
31+
"packSpecificationIds": [
32+
"client1-campaign5"
33+
],
34+
"priority": 4,
35+
"status": "PROD",
36+
"type": "STANDARD",
37+
"volumeGroupId": "volumeGroup-test3"
38+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"campaignIds": [
3+
"client1-campaign6"
4+
],
5+
"clientId": "client1",
6+
"constraints": {
7+
"blackCoveragePercentage": {
8+
"operator": "LESS_THAN",
9+
"value": 20
10+
},
11+
"colourCoveragePercentage": {
12+
"operator": "LESS_THAN",
13+
"value": 10
14+
},
15+
"deliveryDays": {
16+
"operator": "LESS_THAN",
17+
"value": 3
18+
},
19+
"sheets": {
20+
"operator": "LESS_THAN",
21+
"value": 4
22+
},
23+
"sides": {
24+
"operator": "LESS_THAN",
25+
"value": 8
26+
}
27+
},
28+
"description": "Colour printing, Campaign 6 envelope, Attachment",
29+
"id": "client1-campaign6",
30+
"name": "Client1 - Campaign 6",
31+
"packSpecificationIds": [
32+
"client1-campaign6"
33+
],
34+
"priority": 5,
35+
"status": "INT",
36+
"type": "STANDARD",
37+
"volumeGroupId": "volumeGroup-test3"
38+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"campaignIds": [
3+
"client1-campaign7 "
4+
],
5+
"clientId": "client1",
6+
"constraints": {
7+
"blackCoveragePercentage": {
8+
"operator": "LESS_THAN",
9+
"value": 20
10+
},
11+
"colourCoveragePercentage": {
12+
"operator": "LESS_THAN",
13+
"value": 10
14+
},
15+
"deliveryDays": {
16+
"operator": "LESS_THAN",
17+
"value": 3
18+
},
19+
"sheets": {
20+
"operator": "LESS_THAN",
21+
"value": 5
22+
},
23+
"sides": {
24+
"operator": "LESS_THAN",
25+
"value": 10
26+
}
27+
},
28+
"description": "Economy, colour printing",
29+
"id": "client1-campaign7",
30+
"name": "Client1 - Campaign 7",
31+
"packSpecificationIds": [
32+
"notify-c5-colour"
33+
],
34+
"priority": 50,
35+
"status": "INT",
36+
"type": "STANDARD",
37+
"volumeGroupId": "volumeGroup-test3"
38+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"campaignIds": [
3+
"client1-campaign8"
4+
],
5+
"clientId": "client1",
6+
"constraints": {
7+
"blackCoveragePercentage": {
8+
"operator": "LESS_THAN",
9+
"value": 20
10+
},
11+
"colourCoveragePercentage": {
12+
"operator": "LESS_THAN",
13+
"value": 10
14+
},
15+
"deliveryDays": {
16+
"operator": "LESS_THAN",
17+
"value": 3
18+
},
19+
"sheets": {
20+
"operator": "LESS_THAN",
21+
"value": 5
22+
},
23+
"sides": {
24+
"operator": "LESS_THAN",
25+
"value": 10
26+
}
27+
},
28+
"description": "Admail?, colour printing, booklet",
29+
"id": "client1-campaign8",
30+
"name": "Client1 - Campaign 8",
31+
"packSpecificationIds": [
32+
"client1-campaign8"
33+
],
34+
"priority": 7,
35+
"status": "INT",
36+
"type": "STANDARD",
37+
"volumeGroupId": "volumeGroup-test3"
38+
}

0 commit comments

Comments
 (0)