Skip to content

Commit 21aa63d

Browse files
committed
Add group and specification IDs to letter event domain model
1 parent 0a7aa88 commit 21aa63d

17 files changed

+391
-12
lines changed

internal/events/schemas/domain/letter.schema.json

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,19 @@
1111
},
1212
"origin": {
1313
"title": "Letter origin",
14-
"description": "The source and subject of the original event that introduced the letter to the supplier-api domain.",
14+
"description": "The origin domain identifier, source and subject of the original event that introduced the letter to the supplier-api domain.\n\nThe identifier will be included as the origin in the subject of any corresponding events emitted by the supplier-api domain.",
15+
"examples": [
16+
{
17+
"domain": "letter-rendering",
18+
"source": "/data-plane/letter-rendering/prod/render-pdf",
19+
"subject": "customer/00f3b388-bbe9-41c9-9e76-052d37ee8988/letter-rendering/letter-request/0o5Fs0EELR0fUjHjbCnEtdUwQe4_0o5Fs0EELR0fUjHjbCnEtdUwQe5"
20+
}
21+
],
1522
"type": "object",
1623
"properties": {
24+
"domain": {
25+
"type": "string"
26+
},
1727
"source": {
1828
"type": "string"
1929
},
@@ -22,10 +32,28 @@
2232
}
2333
},
2434
"required": [
35+
"domain",
2536
"source",
2637
"subject"
2738
]
2839
},
40+
"specificationId": {
41+
"title": "Specification ID",
42+
"description": "Reference to the letter specification which was used to produce a letter pack for this request.",
43+
"examples": [
44+
"1y3q9v1zzzz"
45+
],
46+
"type": "string"
47+
},
48+
"groupId": {
49+
"title": "Group ID",
50+
"description": "Identifier for the group which this letter assigned to for reporting purposes.",
51+
"examples": [
52+
"client_template",
53+
"00f3b388-bbe9-41c9-9e76-052d37ee8988_20a1ab22-6136-47ae-ac0f-989f382be8df"
54+
],
55+
"type": "string"
56+
},
2957
"status": {
3058
"title": "Letter Status",
3159
"description": "The status of a letter in the supplier-api domain.",
@@ -71,6 +99,8 @@
7199
"required": [
72100
"domainId",
73101
"origin",
102+
"specificationId",
103+
"groupId",
74104
"status"
75105
]
76106
}

internal/events/schemas/events/letter.ACCEPTED.schema.json

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,19 @@
9090
},
9191
"origin": {
9292
"title": "Letter origin",
93-
"description": "The source and subject of the original event that introduced the letter to the supplier-api domain.",
93+
"description": "The origin domain identifier, source and subject of the original event that introduced the letter to the supplier-api domain.\n\nThe identifier will be included as the origin in the subject of any corresponding events emitted by the supplier-api domain.",
94+
"examples": [
95+
{
96+
"domain": "letter-rendering",
97+
"source": "/data-plane/letter-rendering/prod/render-pdf",
98+
"subject": "customer/00f3b388-bbe9-41c9-9e76-052d37ee8988/letter-rendering/letter-request/0o5Fs0EELR0fUjHjbCnEtdUwQe4_0o5Fs0EELR0fUjHjbCnEtdUwQe5"
99+
}
100+
],
94101
"type": "object",
95102
"properties": {
103+
"domain": {
104+
"type": "string"
105+
},
96106
"source": {
97107
"type": "string"
98108
},
@@ -101,10 +111,28 @@
101111
}
102112
},
103113
"required": [
114+
"domain",
104115
"source",
105116
"subject"
106117
]
107118
},
119+
"specificationId": {
120+
"title": "Specification ID",
121+
"description": "Reference to the letter specification which was used to produce a letter pack for this request.",
122+
"examples": [
123+
"1y3q9v1zzzz"
124+
],
125+
"type": "string"
126+
},
127+
"groupId": {
128+
"title": "Group ID",
129+
"description": "Identifier for the group which this letter assigned to for reporting purposes.",
130+
"examples": [
131+
"client_template",
132+
"00f3b388-bbe9-41c9-9e76-052d37ee8988_20a1ab22-6136-47ae-ac0f-989f382be8df"
133+
],
134+
"type": "string"
135+
},
108136
"status": {
109137
"type": "string",
110138
"enum": [
@@ -133,6 +161,8 @@
133161
"required": [
134162
"domainId",
135163
"origin",
164+
"specificationId",
165+
"groupId",
136166
"status"
137167
]
138168
},

internal/events/schemas/events/letter.CANCELLED.schema.json

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,19 @@
9090
},
9191
"origin": {
9292
"title": "Letter origin",
93-
"description": "The source and subject of the original event that introduced the letter to the supplier-api domain.",
93+
"description": "The origin domain identifier, source and subject of the original event that introduced the letter to the supplier-api domain.\n\nThe identifier will be included as the origin in the subject of any corresponding events emitted by the supplier-api domain.",
94+
"examples": [
95+
{
96+
"domain": "letter-rendering",
97+
"source": "/data-plane/letter-rendering/prod/render-pdf",
98+
"subject": "customer/00f3b388-bbe9-41c9-9e76-052d37ee8988/letter-rendering/letter-request/0o5Fs0EELR0fUjHjbCnEtdUwQe4_0o5Fs0EELR0fUjHjbCnEtdUwQe5"
99+
}
100+
],
94101
"type": "object",
95102
"properties": {
103+
"domain": {
104+
"type": "string"
105+
},
96106
"source": {
97107
"type": "string"
98108
},
@@ -101,10 +111,28 @@
101111
}
102112
},
103113
"required": [
114+
"domain",
104115
"source",
105116
"subject"
106117
]
107118
},
119+
"specificationId": {
120+
"title": "Specification ID",
121+
"description": "Reference to the letter specification which was used to produce a letter pack for this request.",
122+
"examples": [
123+
"1y3q9v1zzzz"
124+
],
125+
"type": "string"
126+
},
127+
"groupId": {
128+
"title": "Group ID",
129+
"description": "Identifier for the group which this letter assigned to for reporting purposes.",
130+
"examples": [
131+
"client_template",
132+
"00f3b388-bbe9-41c9-9e76-052d37ee8988_20a1ab22-6136-47ae-ac0f-989f382be8df"
133+
],
134+
"type": "string"
135+
},
108136
"status": {
109137
"type": "string",
110138
"enum": [
@@ -133,6 +161,8 @@
133161
"required": [
134162
"domainId",
135163
"origin",
164+
"specificationId",
165+
"groupId",
136166
"status"
137167
]
138168
},

internal/events/schemas/events/letter.DELIVERED.schema.json

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,19 @@
9090
},
9191
"origin": {
9292
"title": "Letter origin",
93-
"description": "The source and subject of the original event that introduced the letter to the supplier-api domain.",
93+
"description": "The origin domain identifier, source and subject of the original event that introduced the letter to the supplier-api domain.\n\nThe identifier will be included as the origin in the subject of any corresponding events emitted by the supplier-api domain.",
94+
"examples": [
95+
{
96+
"domain": "letter-rendering",
97+
"source": "/data-plane/letter-rendering/prod/render-pdf",
98+
"subject": "customer/00f3b388-bbe9-41c9-9e76-052d37ee8988/letter-rendering/letter-request/0o5Fs0EELR0fUjHjbCnEtdUwQe4_0o5Fs0EELR0fUjHjbCnEtdUwQe5"
99+
}
100+
],
94101
"type": "object",
95102
"properties": {
103+
"domain": {
104+
"type": "string"
105+
},
96106
"source": {
97107
"type": "string"
98108
},
@@ -101,10 +111,28 @@
101111
}
102112
},
103113
"required": [
114+
"domain",
104115
"source",
105116
"subject"
106117
]
107118
},
119+
"specificationId": {
120+
"title": "Specification ID",
121+
"description": "Reference to the letter specification which was used to produce a letter pack for this request.",
122+
"examples": [
123+
"1y3q9v1zzzz"
124+
],
125+
"type": "string"
126+
},
127+
"groupId": {
128+
"title": "Group ID",
129+
"description": "Identifier for the group which this letter assigned to for reporting purposes.",
130+
"examples": [
131+
"client_template",
132+
"00f3b388-bbe9-41c9-9e76-052d37ee8988_20a1ab22-6136-47ae-ac0f-989f382be8df"
133+
],
134+
"type": "string"
135+
},
108136
"status": {
109137
"type": "string",
110138
"enum": [
@@ -133,6 +161,8 @@
133161
"required": [
134162
"domainId",
135163
"origin",
164+
"specificationId",
165+
"groupId",
136166
"status"
137167
]
138168
},

internal/events/schemas/events/letter.DISPATCHED.schema.json

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,19 @@
9090
},
9191
"origin": {
9292
"title": "Letter origin",
93-
"description": "The source and subject of the original event that introduced the letter to the supplier-api domain.",
93+
"description": "The origin domain identifier, source and subject of the original event that introduced the letter to the supplier-api domain.\n\nThe identifier will be included as the origin in the subject of any corresponding events emitted by the supplier-api domain.",
94+
"examples": [
95+
{
96+
"domain": "letter-rendering",
97+
"source": "/data-plane/letter-rendering/prod/render-pdf",
98+
"subject": "customer/00f3b388-bbe9-41c9-9e76-052d37ee8988/letter-rendering/letter-request/0o5Fs0EELR0fUjHjbCnEtdUwQe4_0o5Fs0EELR0fUjHjbCnEtdUwQe5"
99+
}
100+
],
94101
"type": "object",
95102
"properties": {
103+
"domain": {
104+
"type": "string"
105+
},
96106
"source": {
97107
"type": "string"
98108
},
@@ -101,10 +111,28 @@
101111
}
102112
},
103113
"required": [
114+
"domain",
104115
"source",
105116
"subject"
106117
]
107118
},
119+
"specificationId": {
120+
"title": "Specification ID",
121+
"description": "Reference to the letter specification which was used to produce a letter pack for this request.",
122+
"examples": [
123+
"1y3q9v1zzzz"
124+
],
125+
"type": "string"
126+
},
127+
"groupId": {
128+
"title": "Group ID",
129+
"description": "Identifier for the group which this letter assigned to for reporting purposes.",
130+
"examples": [
131+
"client_template",
132+
"00f3b388-bbe9-41c9-9e76-052d37ee8988_20a1ab22-6136-47ae-ac0f-989f382be8df"
133+
],
134+
"type": "string"
135+
},
108136
"status": {
109137
"type": "string",
110138
"enum": [
@@ -133,6 +161,8 @@
133161
"required": [
134162
"domainId",
135163
"origin",
164+
"specificationId",
165+
"groupId",
136166
"status"
137167
]
138168
},

internal/events/schemas/events/letter.ENCLOSED.schema.json

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,19 @@
9090
},
9191
"origin": {
9292
"title": "Letter origin",
93-
"description": "The source and subject of the original event that introduced the letter to the supplier-api domain.",
93+
"description": "The origin domain identifier, source and subject of the original event that introduced the letter to the supplier-api domain.\n\nThe identifier will be included as the origin in the subject of any corresponding events emitted by the supplier-api domain.",
94+
"examples": [
95+
{
96+
"domain": "letter-rendering",
97+
"source": "/data-plane/letter-rendering/prod/render-pdf",
98+
"subject": "customer/00f3b388-bbe9-41c9-9e76-052d37ee8988/letter-rendering/letter-request/0o5Fs0EELR0fUjHjbCnEtdUwQe4_0o5Fs0EELR0fUjHjbCnEtdUwQe5"
99+
}
100+
],
94101
"type": "object",
95102
"properties": {
103+
"domain": {
104+
"type": "string"
105+
},
96106
"source": {
97107
"type": "string"
98108
},
@@ -101,10 +111,28 @@
101111
}
102112
},
103113
"required": [
114+
"domain",
104115
"source",
105116
"subject"
106117
]
107118
},
119+
"specificationId": {
120+
"title": "Specification ID",
121+
"description": "Reference to the letter specification which was used to produce a letter pack for this request.",
122+
"examples": [
123+
"1y3q9v1zzzz"
124+
],
125+
"type": "string"
126+
},
127+
"groupId": {
128+
"title": "Group ID",
129+
"description": "Identifier for the group which this letter assigned to for reporting purposes.",
130+
"examples": [
131+
"client_template",
132+
"00f3b388-bbe9-41c9-9e76-052d37ee8988_20a1ab22-6136-47ae-ac0f-989f382be8df"
133+
],
134+
"type": "string"
135+
},
108136
"status": {
109137
"type": "string",
110138
"enum": [
@@ -133,6 +161,8 @@
133161
"required": [
134162
"domainId",
135163
"origin",
164+
"specificationId",
165+
"groupId",
136166
"status"
137167
]
138168
},

0 commit comments

Comments
 (0)