|
| 1 | +import { |
| 2 | + EnvelopeId, |
| 3 | + SpecificaitonGroupId, |
| 4 | + Specification, |
| 5 | + SpecificationGroup, |
| 6 | + SpecificationId, |
| 7 | +} from "@nhsdigital/nhs-notify-schemas-supplier-config/src/domain/specification"; |
| 8 | +import { Version } from "@nhsdigital/nhs-notify-schemas-supplier-config/src/domain/common"; |
| 9 | + |
| 10 | +const bauStandardC5: Specification = { |
| 11 | + id: SpecificationId("bau-standard-c5"), |
| 12 | + name: "BAU Standard Letter C5", |
| 13 | + status: "PUBLISHED", |
| 14 | + version: Version("1.0.0"), |
| 15 | + createdAt: new Date("2023-01-01T00:00:00Z"), |
| 16 | + updatedAt: new Date("2023-01-01T00:00:00Z"), |
| 17 | + specificationType: "LETTER_STANDARD", |
| 18 | + pack: { |
| 19 | + envelopeId: EnvelopeId("envelope-nhs-c5-economy"), |
| 20 | + }, |
| 21 | +}; |
| 22 | + |
| 23 | +const bauStandardC4: Specification = { |
| 24 | + id: SpecificationId("bau-standard-c4"), |
| 25 | + name: "BAU Standard Letter C4", |
| 26 | + status: "PUBLISHED", |
| 27 | + version: Version("1.0.0"), |
| 28 | + createdAt: new Date("2023-01-01T00:00:00Z"), |
| 29 | + updatedAt: new Date("2023-01-01T00:00:00Z"), |
| 30 | + specificationType: "LETTER_STANDARD", |
| 31 | + pack: { |
| 32 | + envelopeId: EnvelopeId("envelope-nhs-c4-economy"), |
| 33 | + }, |
| 34 | +}; |
| 35 | + |
| 36 | +const braille: Specification = { |
| 37 | + id: SpecificationId("braille"), |
| 38 | + name: "Braille Letter", |
| 39 | + status: "PUBLISHED", |
| 40 | + version: Version("1.0.0"), |
| 41 | + createdAt: new Date("2023-01-01T00:00:00Z"), |
| 42 | + updatedAt: new Date("2023-01-01T00:00:00Z"), |
| 43 | + specificationType: "LETTER_BRAILLE", |
| 44 | +}; |
| 45 | + |
| 46 | +const audio: Specification = { |
| 47 | + id: SpecificationId("audio"), |
| 48 | + name: "Audio Letter", |
| 49 | + status: "PUBLISHED", |
| 50 | + version: Version("1.0.0"), |
| 51 | + createdAt: new Date("2023-01-01T00:00:00Z"), |
| 52 | + updatedAt: new Date("2023-01-01T00:00:00Z"), |
| 53 | + specificationType: "LETTER_AUDIO", |
| 54 | +}; |
| 55 | + |
| 56 | +const sameDay: Specification = { |
| 57 | + id: SpecificationId("same-day"), |
| 58 | + name: "Same Day Letter", |
| 59 | + status: "PUBLISHED", |
| 60 | + version: Version("1.0.0"), |
| 61 | + createdAt: new Date("2023-01-01T00:00:00Z"), |
| 62 | + updatedAt: new Date("2023-01-01T00:00:00Z"), |
| 63 | + specificationType: "LETTER_SAME_DAY", |
| 64 | + pack: { |
| 65 | + envelopeId: EnvelopeId("envelope-nhs-c4-same-day"), |
| 66 | + }, |
| 67 | +}; |
| 68 | + |
| 69 | +const digitrials1: Specification = { |
| 70 | + id: SpecificationId("digitrials1"), |
| 71 | + name: "Digitrials Letter Pack 1", |
| 72 | + status: "PUBLISHED", |
| 73 | + version: Version("1.0.0"), |
| 74 | + createdAt: new Date("2023-01-01T00:00:00Z"), |
| 75 | + updatedAt: new Date("2023-01-01T00:00:00Z"), |
| 76 | + specificationType: "LETTER_STANDARD", |
| 77 | + pack: { |
| 78 | + envelopeId: EnvelopeId("digitrials-envelope1-c5"), |
| 79 | + }, |
| 80 | +}; |
| 81 | + |
| 82 | +const specifications = { |
| 83 | + bauStandardC5, |
| 84 | + bauStandardC4, |
| 85 | + braille, |
| 86 | + audio, |
| 87 | + sameDay, |
| 88 | +}; |
| 89 | + |
| 90 | +const specificationGroups: Record<string, SpecificationGroup> = { |
| 91 | + bauStandard: { |
| 92 | + id: SpecificaitonGroupId("bau-standard"), |
| 93 | + name: "BAU Standard Letter", |
| 94 | + description: "BAU Standard Letter", |
| 95 | + specificationIds: [bauStandardC5.id, bauStandardC4.id], |
| 96 | + specificationType: "LETTER_STANDARD", |
| 97 | + status: "PUBLISHED", |
| 98 | + }, |
| 99 | + braille: { |
| 100 | + id: SpecificaitonGroupId("braille"), |
| 101 | + name: "Braille Letter", |
| 102 | + description: "Braille Letter", |
| 103 | + specificationIds: [braille.id], |
| 104 | + specificationType: "LETTER_BRAILLE", |
| 105 | + status: "PUBLISHED", |
| 106 | + }, |
| 107 | + audio: { |
| 108 | + id: SpecificaitonGroupId("audio"), |
| 109 | + name: "Audio Letter", |
| 110 | + description: "Audio Letter", |
| 111 | + specificationIds: [audio.id], |
| 112 | + specificationType: "LETTER_AUDIO", |
| 113 | + status: "PUBLISHED", |
| 114 | + }, |
| 115 | + sameDay: { |
| 116 | + id: SpecificaitonGroupId("same-day"), |
| 117 | + name: "Same Day Letter", |
| 118 | + description: "Same Day Letter", |
| 119 | + specificationIds: [sameDay.id], |
| 120 | + specificationType: "LETTER_SAME_DAY", |
| 121 | + status: "PUBLISHED", |
| 122 | + }, |
| 123 | + digitrials1: { |
| 124 | + id: SpecificaitonGroupId("digitrials1"), |
| 125 | + name: "Digitrials Letter Pack 1", |
| 126 | + description: "Digitrials Letter Pack 1", |
| 127 | + specificationIds: [digitrials1.id], |
| 128 | + specificationType: "LETTER_STANDARD", |
| 129 | + status: "PUBLISHED", |
| 130 | + clientId: "digitrials", |
| 131 | + campaignIds: ["digitrials-campaign-1"], |
| 132 | + }, |
| 133 | +}; |
| 134 | + |
| 135 | +console.log(JSON.stringify({ specifications, specificationGroups }, null, 2)); |
0 commit comments