Skip to content

Commit 3788ab9

Browse files
CCM-12090: Review comments
1 parent efb363a commit 3788ab9

File tree

5 files changed

+91
-87
lines changed

5 files changed

+91
-87
lines changed

packages/event-schemas/schemas/TemplateCompleted/v1.json

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
"time": {
1111
"description": "Time the event was generated",
1212
"type": "string",
13-
"format": "date-time",
14-
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
13+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$"
1514
},
1615
"type": {
1716
"type": "string",
@@ -105,14 +104,13 @@
105104
"type": "object",
106105
"properties": {
107106
"owner": {
108-
"description": "The client or user that owns the template",
107+
"description": "The client that owns the template",
109108
"type": "string"
110109
},
111110
"id": {
112111
"description": "Unique identifier for the template",
113112
"type": "string",
114-
"format": "uuid",
115-
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
113+
"pattern": "^[\\dA-Fa-f]{8}(?:-[\\dA-Fa-f]{4}){3}-[\\dA-Fa-f]{12}$"
116114
},
117115
"clientId": {
118116
"description": "The client that owns the template",
@@ -122,7 +120,7 @@
122120
"createdAt": {
123121
"description": "Timestamp for when the template was initially created",
124122
"type": "string",
125-
"maxLength": 1000
123+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$"
126124
},
127125
"createdBy": {
128126
"description": "Unique identifier for the user that initially created the template",
@@ -153,7 +151,7 @@
153151
"updatedAt": {
154152
"description": "Timestamp for when the template was most recently updated",
155153
"type": "string",
156-
"maxLength": 1000
154+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$"
157155
},
158156
"updatedBy": {
159157
"description": "Unique identifier for the user that most recently updated the template",
@@ -192,14 +190,13 @@
192190
"type": "object",
193191
"properties": {
194192
"owner": {
195-
"description": "The client or user that owns the template",
193+
"description": "The client that owns the template",
196194
"type": "string"
197195
},
198196
"id": {
199197
"description": "Unique identifier for the template",
200198
"type": "string",
201-
"format": "uuid",
202-
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
199+
"pattern": "^[\\dA-Fa-f]{8}(?:-[\\dA-Fa-f]{4}){3}-[\\dA-Fa-f]{12}$"
203200
},
204201
"clientId": {
205202
"description": "The client that owns the template",
@@ -209,7 +206,7 @@
209206
"createdAt": {
210207
"description": "Timestamp for when the template was initially created",
211208
"type": "string",
212-
"maxLength": 1000
209+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$"
213210
},
214211
"createdBy": {
215212
"description": "Unique identifier for the user that initially created the template",
@@ -240,7 +237,7 @@
240237
"updatedAt": {
241238
"description": "Timestamp for when the template was most recently updated",
242239
"type": "string",
243-
"maxLength": 1000
240+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$"
244241
},
245242
"updatedBy": {
246243
"description": "Unique identifier for the user that most recently updated the template",
@@ -273,14 +270,13 @@
273270
"type": "object",
274271
"properties": {
275272
"owner": {
276-
"description": "The client or user that owns the template",
273+
"description": "The client that owns the template",
277274
"type": "string"
278275
},
279276
"id": {
280277
"description": "Unique identifier for the template",
281278
"type": "string",
282-
"format": "uuid",
283-
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
279+
"pattern": "^[\\dA-Fa-f]{8}(?:-[\\dA-Fa-f]{4}){3}-[\\dA-Fa-f]{12}$"
284280
},
285281
"clientId": {
286282
"description": "The client that owns the template",
@@ -290,7 +286,7 @@
290286
"createdAt": {
291287
"description": "Timestamp for when the template was initially created",
292288
"type": "string",
293-
"maxLength": 1000
289+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$"
294290
},
295291
"createdBy": {
296292
"description": "Unique identifier for the user that initially created the template",
@@ -321,7 +317,7 @@
321317
"updatedAt": {
322318
"description": "Timestamp for when the template was most recently updated",
323319
"type": "string",
324-
"maxLength": 1000
320+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$"
325321
},
326322
"updatedBy": {
327323
"description": "Unique identifier for the user that most recently updated the template",
@@ -358,7 +354,7 @@
358354
"const": "LETTER"
359355
},
360356
"language": {
361-
"description": "Language the letter template is written in",
357+
"description": "ISO 639 language code for the language the letter template is written in",
362358
"type": "string",
363359
"enum": [
364360
"ar",
@@ -393,7 +389,7 @@
393389
]
394390
},
395391
"letterType": {
396-
"description": "Letter type",
392+
"description": "Letter type - q4:British Sign Language, x1:Large Print, x0:Standard",
397393
"type": "string",
398394
"enum": [
399395
"q4",
@@ -428,14 +424,13 @@
428424
"type": "object",
429425
"properties": {
430426
"owner": {
431-
"description": "The client or user that owns the template",
427+
"description": "The client that owns the template",
432428
"type": "string"
433429
},
434430
"id": {
435431
"description": "Unique identifier for the template",
436432
"type": "string",
437-
"format": "uuid",
438-
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
433+
"pattern": "^[\\dA-Fa-f]{8}(?:-[\\dA-Fa-f]{4}){3}-[\\dA-Fa-f]{12}$"
439434
},
440435
"clientId": {
441436
"description": "The client that owns the template",
@@ -445,7 +440,7 @@
445440
"createdAt": {
446441
"description": "Timestamp for when the template was initially created",
447442
"type": "string",
448-
"maxLength": 1000
443+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$"
449444
},
450445
"createdBy": {
451446
"description": "Unique identifier for the user that initially created the template",
@@ -476,7 +471,7 @@
476471
"updatedAt": {
477472
"description": "Timestamp for when the template was most recently updated",
478473
"type": "string",
479-
"maxLength": 1000
474+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$"
480475
},
481476
"updatedBy": {
482477
"description": "Unique identifier for the user that most recently updated the template",

packages/event-schemas/schemas/TemplateDeleted/v1.json

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
"time": {
1111
"description": "Time the event was generated",
1212
"type": "string",
13-
"format": "date-time",
14-
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
13+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$"
1514
},
1615
"type": {
1716
"type": "string",
@@ -105,14 +104,13 @@
105104
"type": "object",
106105
"properties": {
107106
"owner": {
108-
"description": "The client or user that owns the template",
107+
"description": "The client that owns the template",
109108
"type": "string"
110109
},
111110
"id": {
112111
"description": "Unique identifier for the template",
113112
"type": "string",
114-
"format": "uuid",
115-
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
113+
"pattern": "^[\\dA-Fa-f]{8}(?:-[\\dA-Fa-f]{4}){3}-[\\dA-Fa-f]{12}$"
116114
},
117115
"clientId": {
118116
"description": "The client that owns the template",
@@ -122,7 +120,7 @@
122120
"createdAt": {
123121
"description": "Timestamp for when the template was initially created",
124122
"type": "string",
125-
"maxLength": 1000
123+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$"
126124
},
127125
"createdBy": {
128126
"description": "Unique identifier for the user that initially created the template",
@@ -153,7 +151,7 @@
153151
"updatedAt": {
154152
"description": "Timestamp for when the template was most recently updated",
155153
"type": "string",
156-
"maxLength": 1000
154+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$"
157155
},
158156
"updatedBy": {
159157
"description": "Unique identifier for the user that most recently updated the template",
@@ -192,14 +190,13 @@
192190
"type": "object",
193191
"properties": {
194192
"owner": {
195-
"description": "The client or user that owns the template",
193+
"description": "The client that owns the template",
196194
"type": "string"
197195
},
198196
"id": {
199197
"description": "Unique identifier for the template",
200198
"type": "string",
201-
"format": "uuid",
202-
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
199+
"pattern": "^[\\dA-Fa-f]{8}(?:-[\\dA-Fa-f]{4}){3}-[\\dA-Fa-f]{12}$"
203200
},
204201
"clientId": {
205202
"description": "The client that owns the template",
@@ -209,7 +206,7 @@
209206
"createdAt": {
210207
"description": "Timestamp for when the template was initially created",
211208
"type": "string",
212-
"maxLength": 1000
209+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$"
213210
},
214211
"createdBy": {
215212
"description": "Unique identifier for the user that initially created the template",
@@ -240,7 +237,7 @@
240237
"updatedAt": {
241238
"description": "Timestamp for when the template was most recently updated",
242239
"type": "string",
243-
"maxLength": 1000
240+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$"
244241
},
245242
"updatedBy": {
246243
"description": "Unique identifier for the user that most recently updated the template",
@@ -273,14 +270,13 @@
273270
"type": "object",
274271
"properties": {
275272
"owner": {
276-
"description": "The client or user that owns the template",
273+
"description": "The client that owns the template",
277274
"type": "string"
278275
},
279276
"id": {
280277
"description": "Unique identifier for the template",
281278
"type": "string",
282-
"format": "uuid",
283-
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
279+
"pattern": "^[\\dA-Fa-f]{8}(?:-[\\dA-Fa-f]{4}){3}-[\\dA-Fa-f]{12}$"
284280
},
285281
"clientId": {
286282
"description": "The client that owns the template",
@@ -290,7 +286,7 @@
290286
"createdAt": {
291287
"description": "Timestamp for when the template was initially created",
292288
"type": "string",
293-
"maxLength": 1000
289+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$"
294290
},
295291
"createdBy": {
296292
"description": "Unique identifier for the user that initially created the template",
@@ -321,7 +317,7 @@
321317
"updatedAt": {
322318
"description": "Timestamp for when the template was most recently updated",
323319
"type": "string",
324-
"maxLength": 1000
320+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$"
325321
},
326322
"updatedBy": {
327323
"description": "Unique identifier for the user that most recently updated the template",
@@ -358,7 +354,7 @@
358354
"const": "LETTER"
359355
},
360356
"language": {
361-
"description": "Language the letter template is written in",
357+
"description": "ISO 639 language code for the language the letter template is written in",
362358
"type": "string",
363359
"enum": [
364360
"ar",
@@ -393,7 +389,7 @@
393389
]
394390
},
395391
"letterType": {
396-
"description": "Letter type",
392+
"description": "Letter type - q4:British Sign Language, x1:Large Print, x0:Standard",
397393
"type": "string",
398394
"enum": [
399395
"q4",
@@ -428,14 +424,13 @@
428424
"type": "object",
429425
"properties": {
430426
"owner": {
431-
"description": "The client or user that owns the template",
427+
"description": "The client that owns the template",
432428
"type": "string"
433429
},
434430
"id": {
435431
"description": "Unique identifier for the template",
436432
"type": "string",
437-
"format": "uuid",
438-
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
433+
"pattern": "^[\\dA-Fa-f]{8}(?:-[\\dA-Fa-f]{4}){3}-[\\dA-Fa-f]{12}$"
439434
},
440435
"clientId": {
441436
"description": "The client that owns the template",
@@ -445,7 +440,7 @@
445440
"createdAt": {
446441
"description": "Timestamp for when the template was initially created",
447442
"type": "string",
448-
"maxLength": 1000
443+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$"
449444
},
450445
"createdBy": {
451446
"description": "Unique identifier for the user that initially created the template",
@@ -476,7 +471,7 @@
476471
"updatedAt": {
477472
"description": "Timestamp for when the template was most recently updated",
478473
"type": "string",
479-
"maxLength": 1000
474+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z$"
480475
},
481476
"updatedBy": {
482477
"description": "Unique identifier for the user that most recently updated the template",

0 commit comments

Comments
 (0)