@checkdigit/eslint-plugin 7.18.0-PR.143-072f → 7.18.0-PR.143-518d

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,170 +1,12 @@
1
1
  {
2
2
  "apis": {
3
- "/person/v1/ping": {
4
- "get": {
5
- "request": {
6
- "$schema": "https://json-schema.org/draft/2020-12/schema",
7
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/PingGetRequestContext",
8
- "type": "object",
9
- "properties": {
10
- "headers": {
11
- "type": "object",
12
- "additionalProperties": true
13
- }
14
- },
15
- "required": [],
16
- "additionalProperties": false
17
- },
18
- "responses": {
19
- "200": {
20
- "$schema": "https://json-schema.org/draft/2020-12/schema",
21
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/PingGetResponseOK",
22
- "type": "object",
23
- "properties": {
24
- "headers": {
25
- "type": "object",
26
- "additionalProperties": true
27
- },
28
- "body": {
29
- "$schema": "https://json-schema.org/draft/2020-12/schema",
30
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Ping",
31
- "type": "object",
32
- "additionalProperties": false,
33
- "required": ["serverTime"],
34
- "properties": {
35
- "serverTime": {
36
- "type": "string",
37
- "format": "date-time",
38
- "description": "Current server time"
39
- }
40
- }
41
- }
42
- },
43
- "required": ["body"],
44
- "additionalProperties": false
45
- },
46
- "default": {
47
- "$schema": "https://json-schema.org/draft/2020-12/schema",
48
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/PingGetResponseDefault",
49
- "type": "object",
50
- "properties": {
51
- "headers": {
52
- "type": "object",
53
- "additionalProperties": true
54
- },
55
- "body": {
56
- "$schema": "https://json-schema.org/draft/2020-12/schema",
57
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Error",
58
- "type": "object",
59
- "properties": {
60
- "message": {
61
- "minLength": 1,
62
- "type": "string"
63
- },
64
- "code": {
65
- "type": "string"
66
- }
67
- },
68
- "description": "Error message"
69
- }
70
- },
71
- "required": ["body"],
72
- "additionalProperties": false
73
- }
74
- }
75
- }
76
- },
77
- "/person/v1/public-key": {
78
- "get": {
79
- "request": {
80
- "$schema": "https://json-schema.org/draft/2020-12/schema",
81
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/PublicKeyGetRequestContext",
82
- "type": "object",
83
- "properties": {
84
- "headers": {
85
- "type": "object",
86
- "additionalProperties": true
87
- }
88
- },
89
- "required": [],
90
- "additionalProperties": false
91
- },
92
- "responses": {
93
- "200": {
94
- "$schema": "https://json-schema.org/draft/2020-12/schema",
95
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/PublicKeyGetResponseOK",
96
- "type": "object",
97
- "properties": {
98
- "headers": {
99
- "type": "object",
100
- "properties": {
101
- "created-on": {
102
- "type": "string",
103
- "format": "date-time"
104
- },
105
- "updated-on": {
106
- "type": "string",
107
- "format": "date-time"
108
- }
109
- },
110
- "required": ["created-on", "updated-on"]
111
- },
112
- "body": {
113
- "$schema": "https://json-schema.org/draft/2020-12/schema",
114
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/PublicKeyResponse",
115
- "description": "This object contains the rsa generated public key for the Person Service. This public key must be used\nwhen transmitting encrypted data to Person Service APIs.\n",
116
- "type": "object",
117
- "required": ["publicKey"],
118
- "properties": {
119
- "publicKey": {
120
- "$schema": "https://json-schema.org/draft/2020-12/schema",
121
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/PublicKey",
122
- "description": "RSA generated public key in PEM format",
123
- "type": "string",
124
- "example": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwm2sxmRdTF7ZIBA6+ngO\n8jOTCHmID0PpQB1q85+hrcLSfB1rWY9bzNNLabBo/ajDnA4Pcadq/x6gpg70qZcR\n9Wxm6TttKzBPZsxasGXgSTDqEi2KcYZgq1mL4qyxUvyIms7/llGy+W9b5huZaVcO\nxdT1tw/zctbOhb6S2t5vH+zkta/2ncUXjG7i8XdLsJ1qe4K1kYbA4KVkOMmAtw7O\n4STk0TZDD0YARdmrciorJjbIVt0Xj1CrYQ5QbDGrlfeXgrcZwX5f9wT2MnKlY5oZ\n5Wtb57oGtLkVf8g6vN/2jGtAmOmHK2hHwNd/+zUet5G/S5uwEli4RgMPP4pUoKgd\nGQIDAQAB\n-----END PUBLIC KEY-----\n"
125
- }
126
- }
127
- }
128
- },
129
- "required": ["headers", "body"],
130
- "additionalProperties": false
131
- },
132
- "default": {
133
- "$schema": "https://json-schema.org/draft/2020-12/schema",
134
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/PublicKeyGetResponseDefault",
135
- "type": "object",
136
- "properties": {
137
- "headers": {
138
- "type": "object",
139
- "additionalProperties": true
140
- },
141
- "body": {
142
- "$schema": "https://json-schema.org/draft/2020-12/schema",
143
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Error",
144
- "type": "object",
145
- "properties": {
146
- "message": {
147
- "minLength": 1,
148
- "type": "string"
149
- },
150
- "code": {
151
- "type": "string"
152
- }
153
- },
154
- "description": "Error message"
155
- }
156
- },
157
- "required": ["body"],
158
- "additionalProperties": false
159
- }
160
- }
161
- }
162
- },
3
+ "/person/v1/ping": {},
4
+ "/person/v1/public-key": {},
163
5
  "/person/v1/data-encryption-key/:dataEncryptionKeyId": {
164
- "get": {
6
+ "put": {
165
7
  "request": {
166
8
  "$schema": "https://json-schema.org/draft/2020-12/schema",
167
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/DataEncryptionKeyGetRequestContext",
9
+ "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/DataEncryptionKeyPutRequestContext",
168
10
  "type": "object",
169
11
  "properties": {
170
12
  "params": {
@@ -181,15 +23,36 @@
181
23
  "headers": {
182
24
  "type": "object",
183
25
  "additionalProperties": true
26
+ },
27
+ "body": {
28
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
29
+ "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/DataEncryptionKeyRequest",
30
+ "type": "object",
31
+ "additionalProperties": false,
32
+ "required": ["publicKeys"],
33
+ "properties": {
34
+ "publicKeys": {
35
+ "type": "array",
36
+ "minItems": 1,
37
+ "description": "List of public keys in PEM format.\n\nAssociated private keys can be used to decrypt person data encrypted by Person Service.\n",
38
+ "items": {
39
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
40
+ "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/PublicKey",
41
+ "description": "RSA generated public key in PEM format",
42
+ "type": "string",
43
+ "example": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwm2sxmRdTF7ZIBA6+ngO\n8jOTCHmID0PpQB1q85+hrcLSfB1rWY9bzNNLabBo/ajDnA4Pcadq/x6gpg70qZcR\n9Wxm6TttKzBPZsxasGXgSTDqEi2KcYZgq1mL4qyxUvyIms7/llGy+W9b5huZaVcO\nxdT1tw/zctbOhb6S2t5vH+zkta/2ncUXjG7i8XdLsJ1qe4K1kYbA4KVkOMmAtw7O\n4STk0TZDD0YARdmrciorJjbIVt0Xj1CrYQ5QbDGrlfeXgrcZwX5f9wT2MnKlY5oZ\n5Wtb57oGtLkVf8g6vN/2jGtAmOmHK2hHwNd/+zUet5G/S5uwEli4RgMPP4pUoKgd\nGQIDAQAB\n-----END PUBLIC KEY-----\n"
44
+ }
45
+ }
46
+ }
184
47
  }
185
48
  },
186
- "required": ["params"],
49
+ "required": ["params", "body"],
187
50
  "additionalProperties": false
188
51
  },
189
52
  "responses": {
190
53
  "200": {
191
54
  "$schema": "https://json-schema.org/draft/2020-12/schema",
192
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/DataEncryptionKeyGetResponseOK",
55
+ "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/DataEncryptionKeyPutResponseOK",
193
56
  "type": "object",
194
57
  "properties": {
195
58
  "headers": {
@@ -260,22 +123,9 @@
260
123
  "required": ["body"],
261
124
  "additionalProperties": false
262
125
  },
263
- "404": {
264
- "$schema": "https://json-schema.org/draft/2020-12/schema",
265
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/DataEncryptionKeyGetResponseNotFound",
266
- "type": "object",
267
- "properties": {
268
- "headers": {
269
- "type": "object",
270
- "additionalProperties": true
271
- }
272
- },
273
- "required": [],
274
- "additionalProperties": false
275
- },
276
126
  "default": {
277
127
  "$schema": "https://json-schema.org/draft/2020-12/schema",
278
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/DataEncryptionKeyGetResponseDefault",
128
+ "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/DataEncryptionKeyPutResponseDefault",
279
129
  "type": "object",
280
130
  "properties": {
281
131
  "headers": {
@@ -302,2183 +152,450 @@
302
152
  "additionalProperties": false
303
153
  }
304
154
  }
305
- },
155
+ }
156
+ },
157
+ "/person/v1/person/:personId": {
306
158
  "put": {
307
159
  "request": {
308
160
  "$schema": "https://json-schema.org/draft/2020-12/schema",
309
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/DataEncryptionKeyPutRequestContext",
161
+ "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/PersonPutRequestContext",
310
162
  "type": "object",
311
163
  "properties": {
312
164
  "params": {
313
165
  "type": "object",
314
166
  "additionalProperties": false,
315
167
  "properties": {
316
- "dataEncryptionKeyId": {
168
+ "personId": {
317
169
  "type": "string",
318
170
  "format": "uuid"
319
171
  }
320
172
  },
321
- "required": ["dataEncryptionKeyId"]
173
+ "required": ["personId"]
322
174
  },
323
175
  "headers": {
324
176
  "type": "object",
325
- "additionalProperties": true
177
+ "additionalProperties": true,
178
+ "properties": {
179
+ "if-match": {
180
+ "type": "string"
181
+ },
182
+ "created-on": {
183
+ "type": "string",
184
+ "format": "date-time"
185
+ },
186
+ "last-modified": {
187
+ "type": "string",
188
+ "format": "date-time"
189
+ }
190
+ }
326
191
  },
327
192
  "body": {
328
193
  "$schema": "https://json-schema.org/draft/2020-12/schema",
329
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/DataEncryptionKeyRequest",
194
+ "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/PersonRequest",
330
195
  "type": "object",
331
196
  "additionalProperties": false,
332
- "required": ["publicKeys"],
197
+ "required": ["dataEncryptionKeyId", "encryptedDataEncryptionKey", "person"],
333
198
  "properties": {
334
- "publicKeys": {
335
- "type": "array",
336
- "minItems": 1,
337
- "description": "List of public keys in PEM format.\n\nAssociated private keys can be used to decrypt person data encrypted by Person Service.\n",
338
- "items": {
339
- "$schema": "https://json-schema.org/draft/2020-12/schema",
340
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/PublicKey",
341
- "description": "RSA generated public key in PEM format",
342
- "type": "string",
343
- "example": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwm2sxmRdTF7ZIBA6+ngO\n8jOTCHmID0PpQB1q85+hrcLSfB1rWY9bzNNLabBo/ajDnA4Pcadq/x6gpg70qZcR\n9Wxm6TttKzBPZsxasGXgSTDqEi2KcYZgq1mL4qyxUvyIms7/llGy+W9b5huZaVcO\nxdT1tw/zctbOhb6S2t5vH+zkta/2ncUXjG7i8XdLsJ1qe4K1kYbA4KVkOMmAtw7O\n4STk0TZDD0YARdmrciorJjbIVt0Xj1CrYQ5QbDGrlfeXgrcZwX5f9wT2MnKlY5oZ\n5Wtb57oGtLkVf8g6vN/2jGtAmOmHK2hHwNd/+zUet5G/S5uwEli4RgMPP4pUoKgd\nGQIDAQAB\n-----END PUBLIC KEY-----\n"
344
- }
345
- }
346
- }
347
- }
348
- },
349
- "required": ["params", "body"],
350
- "additionalProperties": false
351
- },
352
- "responses": {
353
- "200": {
354
- "$schema": "https://json-schema.org/draft/2020-12/schema",
355
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/DataEncryptionKeyPutResponseOK",
356
- "type": "object",
357
- "properties": {
358
- "headers": {
359
- "type": "object",
360
- "properties": {
361
- "created-on": {
362
- "type": "string",
363
- "format": "date-time"
364
- },
365
- "updated-on": {
366
- "type": "string",
367
- "format": "date-time"
368
- },
369
- "last-modified": {
370
- "type": "string",
371
- "format": "date-time"
372
- }
373
- }
374
- },
375
- "body": {
376
- "$schema": "https://json-schema.org/draft/2020-12/schema",
377
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/DataEncryptionKeyResponse",
378
- "type": "object",
379
- "required": ["encryptedDataEncryptionKeys", "transmissionKey", "createdOn", "lastModified"],
380
- "properties": {
381
- "createdOn": {
382
- "description": "Time data was first stored",
383
- "type": "string",
384
- "format": "date-time"
385
- },
386
- "lastModified": {
387
- "description": "Time data was last modified",
388
- "type": "string",
389
- "format": "date-time"
390
- },
391
- "encryptedDataEncryptionKeys": {
392
- "type": "array",
393
- "items": {
394
- "$schema": "https://json-schema.org/draft/2020-12/schema",
395
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/EncryptedDataEncryptionKey",
396
- "type": "object",
397
- "additionalProperties": false,
398
- "description": "An object that includes an encrypted data encryption key and a hashed version of the public key used to encrypt it.\n",
399
- "required": ["publicKeyHash", "encryptedDataEncryptionKey"],
400
- "properties": {
401
- "publicKeyHash": {
402
- "$schema": "https://json-schema.org/draft/2020-12/schema",
403
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/PublicKeyHash",
404
- "type": "string",
405
- "description": "UUID derived using @checkdigit/hash",
406
- "format": "uuid",
407
- "example": "15a85f64-5717-4562-b3fc-2c963f66afa6"
408
- },
409
- "encryptedDataEncryptionKey": {
410
- "description": "Data encryption key encrypted with a public key.",
411
- "type": "string"
412
- }
413
- }
414
- }
415
- },
416
- "transmissionKey": {
417
- "type": "string",
418
- "description": "A PEM formatted public key to use when transmitting data to Person service.\nEncrypt the data encryption key used to encrypt data being sent using the transmissionKey.\n"
419
- }
420
- }
421
- }
422
- },
423
- "required": ["body"],
424
- "additionalProperties": false
425
- },
426
- "default": {
427
- "$schema": "https://json-schema.org/draft/2020-12/schema",
428
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/DataEncryptionKeyPutResponseDefault",
429
- "type": "object",
430
- "properties": {
431
- "headers": {
432
- "type": "object",
433
- "additionalProperties": true
434
- },
435
- "body": {
436
- "$schema": "https://json-schema.org/draft/2020-12/schema",
437
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Error",
438
- "type": "object",
439
- "properties": {
440
- "message": {
441
- "minLength": 1,
442
- "type": "string"
443
- },
444
- "code": {
445
- "type": "string"
446
- }
447
- },
448
- "description": "Error message"
449
- }
450
- },
451
- "required": ["body"],
452
- "additionalProperties": false
453
- }
454
- }
455
- }
456
- },
457
- "/person/v1/person/:personId": {
458
- "get": {
459
- "request": {
460
- "$schema": "https://json-schema.org/draft/2020-12/schema",
461
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/PersonGetRequestContext",
462
- "type": "object",
463
- "properties": {
464
- "params": {
465
- "type": "object",
466
- "additionalProperties": false,
467
- "properties": {
468
- "at": {
469
- "type": "string",
470
- "format": "date-time"
471
- },
472
- "publicKeyHash": {
473
- "type": "string",
474
- "format": "uuid",
475
- "example": "15a85f64-5717-4562-b3fc-2c963f66afa6"
476
- }
477
- },
478
- "required": ["at"]
479
- },
480
- "headers": {
481
- "type": "object",
482
- "additionalProperties": true
483
- }
484
- },
485
- "required": ["params", "query"],
486
- "additionalProperties": false
487
- },
488
- "responses": {
489
- "200": {
490
- "$schema": "https://json-schema.org/draft/2020-12/schema",
491
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/PersonGetResponseOK",
492
- "type": "object",
493
- "properties": {
494
- "headers": {
495
- "type": "object",
496
- "properties": {
497
- "last-modified": {
498
- "type": "string",
499
- "format": "date-time"
500
- },
501
- "created-on": {
502
- "type": "string",
503
- "format": "date-time"
504
- },
505
- "updated-on": {
506
- "type": "string",
507
- "format": "date-time"
508
- },
509
- "etag": {
510
- "type": "string"
511
- }
512
- }
513
- },
514
- "body": {
515
- "$schema": "https://json-schema.org/draft/2020-12/schema",
516
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/PersonResponse",
517
- "type": "object",
518
- "additionalProperties": false,
519
- "description": "Encrypted version of object stored and related ids and metadata. A encryptedDataEncryptionKey is included if\na publicKeyHash query parameter is supplied as part of request.\n",
520
- "required": ["dataEncryptionKeyId", "storageKeyId", "createdOn", "updatedOn", "person"],
521
- "properties": {
522
- "dataEncryptionKeyId": {
523
- "$schema": "https://json-schema.org/draft/2020-12/schema",
524
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/DataEncryptionKeyId",
525
- "type": "string",
526
- "description": "Reference to encryption keys Person Service used to encrypt the Person object.\n\nUpdates must use the same dataEncryptionKeyId.\n",
527
- "format": "uuid"
528
- },
529
- "storageKeyId": {
530
- "type": "string",
531
- "description": "DEK's non-derived identifier to be used by Check Digit services only.\n"
532
- },
533
- "encryptedDataEncryptionKey": {
534
- "description": "Encrypted DEK matching the publicKeyId sent in the request. Used to decrypt values in the Person object.\n",
535
- "type": "string"
536
- },
537
- "createdOn": {
538
- "description": "Time data was first stored",
539
- "type": "string",
540
- "format": "date-time"
541
- },
542
- "updatedOn": {
543
- "description": "Time data was last stored",
544
- "type": "string",
545
- "format": "date-time"
546
- },
547
- "lastModified": {
548
- "description": "Time data was last stored (deprecated, use updatedOn)",
549
- "deprecated": true,
550
- "type": "string",
551
- "format": "date-time"
552
- },
553
- "person": {
554
- "$schema": "https://json-schema.org/draft/2020-12/schema",
555
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Person",
556
- "type": "object",
557
- "additionalProperties": false,
558
- "properties": {
559
- "company": {
560
- "minLength": 1,
561
- "type": "string",
562
- "description": "Encrypted company name using the AES algorithm"
563
- },
564
- "title": {
565
- "minLength": 1,
566
- "type": "string",
567
- "description": "Encrypted title using the AES algorithm"
568
- },
569
- "firstName": {
570
- "minLength": 1,
571
- "type": "string",
572
- "description": "Encrypted first name using the AES algorithm"
573
- },
574
- "middleName": {
575
- "minLength": 1,
576
- "type": "string",
577
- "description": "Encrypted middle name using the AES algorithm"
578
- },
579
- "lastName": {
580
- "minLength": 1,
581
- "type": "string",
582
- "description": "Encrypted last name using the AES algorithm"
583
- },
584
- "addresses": {
585
- "type": "array",
586
- "items": {
587
- "$schema": "https://json-schema.org/draft/2020-12/schema",
588
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Address",
589
- "required": ["country", "streetLines", "type"],
590
- "type": "object",
591
- "properties": {
592
- "type": {
593
- "type": "string",
594
- "description": "Type of address",
595
- "enum": ["BILLING", "SHIPPING", "STATEMENTS", "OTHER"]
596
- },
597
- "streetLines": {
598
- "maxItems": 4,
599
- "minItems": 1,
600
- "type": "array",
601
- "description": "Encrypted street lines using the AES algorithm",
602
- "items": {
603
- "minLength": 1,
604
- "type": "string",
605
- "description": "Street line"
606
- }
607
- },
608
- "city": {
609
- "minLength": 1,
610
- "type": "string",
611
- "description": "City"
612
- },
613
- "region": {
614
- "minLength": 1,
615
- "type": "string",
616
- "description": "Region, State or Province"
617
- },
618
- "postalCode": {
619
- "minLength": 1,
620
- "type": "string",
621
- "description": "AES encrypted postal code. This value should contain only alphanumeric characters.\nIncluding non-alphanumeric characters will result in a 400 when sent as a request.\n"
622
- },
623
- "reportablePostalCode": {
624
- "type": "string",
625
- "description": "Postal code for reporting purposes."
626
- },
627
- "country": {
628
- "$schema": "https://json-schema.org/draft/2020-12/schema",
629
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Country",
630
- "type": "string",
631
- "description": "Country ISO 3166-1 alpha-2 codes",
632
- "enum": [
633
- "AD",
634
- "AE",
635
- "AF",
636
- "AG",
637
- "AI",
638
- "AL",
639
- "AM",
640
- "AO",
641
- "AQ",
642
- "AR",
643
- "AS",
644
- "AT",
645
- "AU",
646
- "AW",
647
- "AX",
648
- "AZ",
649
- "BA",
650
- "BB",
651
- "BD",
652
- "BE",
653
- "BF",
654
- "BG",
655
- "BH",
656
- "BI",
657
- "BJ",
658
- "BL",
659
- "BM",
660
- "BN",
661
- "BO",
662
- "BQ",
663
- "BR",
664
- "BS",
665
- "BT",
666
- "BV",
667
- "BW",
668
- "BY",
669
- "BZ",
670
- "CA",
671
- "CC",
672
- "CD",
673
- "CF",
674
- "CG",
675
- "CH",
676
- "CI",
677
- "CK",
678
- "CL",
679
- "CM",
680
- "CN",
681
- "CO",
682
- "CR",
683
- "CU",
684
- "CV",
685
- "CW",
686
- "CX",
687
- "CY",
688
- "CZ",
689
- "DE",
690
- "DJ",
691
- "DK",
692
- "DM",
693
- "DO",
694
- "DZ",
695
- "EC",
696
- "EE",
697
- "EG",
698
- "EH",
699
- "ER",
700
- "ES",
701
- "ET",
702
- "FI",
703
- "FJ",
704
- "FK",
705
- "FM",
706
- "FO",
707
- "FR",
708
- "GA",
709
- "GB",
710
- "GD",
711
- "GE",
712
- "GF",
713
- "GG",
714
- "GH",
715
- "GI",
716
- "GL",
717
- "GM",
718
- "GN",
719
- "GP",
720
- "GQ",
721
- "GR",
722
- "GS",
723
- "GT",
724
- "GU",
725
- "GW",
726
- "GY",
727
- "HK",
728
- "HM",
729
- "HN",
730
- "HR",
731
- "HT",
732
- "HU",
733
- "ID",
734
- "IE",
735
- "IL",
736
- "IM",
737
- "IN",
738
- "IO",
739
- "IQ",
740
- "IR",
741
- "IS",
742
- "IT",
743
- "JE",
744
- "JM",
745
- "JO",
746
- "JP",
747
- "KE",
748
- "KG",
749
- "KH",
750
- "KI",
751
- "KM",
752
- "KN",
753
- "KP",
754
- "KR",
755
- "KW",
756
- "KY",
757
- "KZ",
758
- "LA",
759
- "LB",
760
- "LC",
761
- "LI",
762
- "LK",
763
- "LR",
764
- "LS",
765
- "LT",
766
- "LU",
767
- "LV",
768
- "LY",
769
- "MA",
770
- "MC",
771
- "MD",
772
- "ME",
773
- "MF",
774
- "MG",
775
- "MH",
776
- "MK",
777
- "ML",
778
- "MM",
779
- "MN",
780
- "MO",
781
- "MP",
782
- "MQ",
783
- "MR",
784
- "MS",
785
- "MT",
786
- "MU",
787
- "MV",
788
- "MW",
789
- "MX",
790
- "MY",
791
- "MZ",
792
- "NA",
793
- "NC",
794
- "NE",
795
- "NF",
796
- "NG",
797
- "NI",
798
- "NL",
799
- "NO",
800
- "NP",
801
- "NR",
802
- "NU",
803
- "NZ",
804
- "OM",
805
- "PA",
806
- "PE",
807
- "PF",
808
- "PG",
809
- "PH",
810
- "PK",
811
- "PL",
812
- "PM",
813
- "PN",
814
- "PR",
815
- "PS",
816
- "PT",
817
- "PW",
818
- "PY",
819
- "QA",
820
- "RE",
821
- "RO",
822
- "RS",
823
- "RU",
824
- "RW",
825
- "SA",
826
- "SB",
827
- "SC",
828
- "SD",
829
- "SE",
830
- "SG",
831
- "SH",
832
- "SI",
833
- "SJ",
834
- "SK",
835
- "SL",
836
- "SM",
837
- "SN",
838
- "SO",
839
- "SR",
840
- "SS",
841
- "ST",
842
- "SV",
843
- "SX",
844
- "SY",
845
- "SZ",
846
- "TC",
847
- "TD",
848
- "TF",
849
- "TG",
850
- "TH",
851
- "TJ",
852
- "TK",
853
- "TL",
854
- "TM",
855
- "TN",
856
- "TO",
857
- "TR",
858
- "TT",
859
- "TV",
860
- "TW",
861
- "TZ",
862
- "UA",
863
- "UG",
864
- "UM",
865
- "US",
866
- "UY",
867
- "UZ",
868
- "VA",
869
- "VC",
870
- "VE",
871
- "VG",
872
- "VI",
873
- "VN",
874
- "VU",
875
- "WF",
876
- "WS",
877
- "YE",
878
- "YT",
879
- "ZA",
880
- "ZM",
881
- "ZW"
882
- ]
883
- }
884
- }
885
- }
886
- },
887
- "phones": {
888
- "type": "array",
889
- "items": {
890
- "$schema": "https://json-schema.org/draft/2020-12/schema",
891
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Phone",
892
- "required": ["number", "type"],
893
- "type": "object",
894
- "properties": {
895
- "type": {
896
- "$schema": "https://json-schema.org/draft/2020-12/schema",
897
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/PhoneType",
898
- "type": "string",
899
- "description": "Type of phone number.",
900
- "enum": ["HOME", "WORK", "MOBILE", "FAX", "MAIN", "OTHER"]
901
- },
902
- "number": {
903
- "minLength": 1,
904
- "type": "string",
905
- "description": "Encrypted phone number using the AES algorithm"
906
- },
907
- "extension": {
908
- "minLength": 1,
909
- "type": "string",
910
- "description": "Encrypted phone number extension using the AES algorithm"
911
- }
912
- }
913
- }
914
- },
915
- "email": {
916
- "minLength": 1,
917
- "type": "string",
918
- "description": "Encrypted email address using the AES algorithm"
919
- },
920
- "language": {
921
- "minLength": 1,
922
- "type": "string",
923
- "description": "User's language preference"
924
- },
925
- "timeZone": {
926
- "minLength": 1,
927
- "type": "string",
928
- "description": "User's timezone"
929
- }
930
- }
931
- }
932
- }
933
- }
934
- },
935
- "required": ["body"],
936
- "additionalProperties": false
937
- },
938
- "404": {
939
- "$schema": "https://json-schema.org/draft/2020-12/schema",
940
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/PersonGetResponseNotFound",
941
- "type": "object",
942
- "properties": {
943
- "headers": {
944
- "type": "object",
945
- "additionalProperties": true
946
- }
947
- },
948
- "required": [],
949
- "additionalProperties": false
950
- },
951
- "default": {
952
- "$schema": "https://json-schema.org/draft/2020-12/schema",
953
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/PersonGetResponseDefault",
954
- "type": "object",
955
- "properties": {
956
- "headers": {
957
- "type": "object",
958
- "additionalProperties": true
959
- },
960
- "body": {
961
- "$schema": "https://json-schema.org/draft/2020-12/schema",
962
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Error",
963
- "type": "object",
964
- "properties": {
965
- "message": {
966
- "minLength": 1,
967
- "type": "string"
968
- },
969
- "code": {
970
- "type": "string"
971
- }
972
- },
973
- "description": "Error message"
974
- }
975
- },
976
- "required": ["body"],
977
- "additionalProperties": false
978
- }
979
- }
980
- },
981
- "put": {
982
- "request": {
983
- "$schema": "https://json-schema.org/draft/2020-12/schema",
984
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/PersonPutRequestContext",
985
- "type": "object",
986
- "properties": {
987
- "params": {
988
- "type": "object",
989
- "additionalProperties": false,
990
- "properties": {
991
- "personId": {
992
- "type": "string",
993
- "format": "uuid"
994
- }
995
- },
996
- "required": ["personId"]
997
- },
998
- "headers": {
999
- "type": "object",
1000
- "additionalProperties": true,
1001
- "properties": {
1002
- "if-match": {
1003
- "type": "string"
1004
- },
1005
- "created-on": {
1006
- "type": "string",
1007
- "format": "date-time"
1008
- },
1009
- "last-modified": {
1010
- "type": "string",
1011
- "format": "date-time"
1012
- }
1013
- }
1014
- },
1015
- "body": {
1016
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1017
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/PersonRequest",
1018
- "type": "object",
1019
- "additionalProperties": false,
1020
- "required": ["dataEncryptionKeyId", "encryptedDataEncryptionKey", "person"],
1021
- "properties": {
1022
- "dataEncryptionKeyId": {
1023
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1024
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/DataEncryptionKeyId",
1025
- "type": "string",
1026
- "description": "Reference to encryption keys Person Service used to encrypt the Person object.\n\nUpdates must use the same dataEncryptionKeyId.\n",
1027
- "format": "uuid"
1028
- },
1029
- "encryptedDataEncryptionKey": {
1030
- "description": "Encrypted version of AES-256 DEK",
1031
- "type": "string"
1032
- },
1033
- "person": {
1034
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1035
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Person",
1036
- "type": "object",
1037
- "additionalProperties": false,
1038
- "properties": {
1039
- "company": {
1040
- "minLength": 1,
1041
- "type": "string",
1042
- "description": "Encrypted company name using the AES algorithm"
1043
- },
1044
- "title": {
1045
- "minLength": 1,
1046
- "type": "string",
1047
- "description": "Encrypted title using the AES algorithm"
1048
- },
1049
- "firstName": {
1050
- "minLength": 1,
1051
- "type": "string",
1052
- "description": "Encrypted first name using the AES algorithm"
1053
- },
1054
- "middleName": {
1055
- "minLength": 1,
1056
- "type": "string",
1057
- "description": "Encrypted middle name using the AES algorithm"
1058
- },
1059
- "lastName": {
1060
- "minLength": 1,
1061
- "type": "string",
1062
- "description": "Encrypted last name using the AES algorithm"
1063
- },
1064
- "addresses": {
1065
- "type": "array",
1066
- "items": {
1067
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1068
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Address",
1069
- "required": ["country", "streetLines", "type"],
1070
- "type": "object",
1071
- "properties": {
1072
- "type": {
1073
- "type": "string",
1074
- "description": "Type of address",
1075
- "enum": ["BILLING", "SHIPPING", "STATEMENTS", "OTHER"]
1076
- },
1077
- "streetLines": {
1078
- "maxItems": 4,
1079
- "minItems": 1,
1080
- "type": "array",
1081
- "description": "Encrypted street lines using the AES algorithm",
1082
- "items": {
1083
- "minLength": 1,
1084
- "type": "string",
1085
- "description": "Street line"
1086
- }
1087
- },
1088
- "city": {
1089
- "minLength": 1,
1090
- "type": "string",
1091
- "description": "City"
1092
- },
1093
- "region": {
1094
- "minLength": 1,
1095
- "type": "string",
1096
- "description": "Region, State or Province"
1097
- },
1098
- "postalCode": {
1099
- "minLength": 1,
1100
- "type": "string",
1101
- "description": "AES encrypted postal code. This value should contain only alphanumeric characters.\nIncluding non-alphanumeric characters will result in a 400 when sent as a request.\n"
1102
- },
1103
- "reportablePostalCode": {
1104
- "type": "string",
1105
- "description": "Postal code for reporting purposes."
1106
- },
1107
- "country": {
1108
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1109
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Country",
1110
- "type": "string",
1111
- "description": "Country ISO 3166-1 alpha-2 codes",
1112
- "enum": [
1113
- "AD",
1114
- "AE",
1115
- "AF",
1116
- "AG",
1117
- "AI",
1118
- "AL",
1119
- "AM",
1120
- "AO",
1121
- "AQ",
1122
- "AR",
1123
- "AS",
1124
- "AT",
1125
- "AU",
1126
- "AW",
1127
- "AX",
1128
- "AZ",
1129
- "BA",
1130
- "BB",
1131
- "BD",
1132
- "BE",
1133
- "BF",
1134
- "BG",
1135
- "BH",
1136
- "BI",
1137
- "BJ",
1138
- "BL",
1139
- "BM",
1140
- "BN",
1141
- "BO",
1142
- "BQ",
1143
- "BR",
1144
- "BS",
1145
- "BT",
1146
- "BV",
1147
- "BW",
1148
- "BY",
1149
- "BZ",
1150
- "CA",
1151
- "CC",
1152
- "CD",
1153
- "CF",
1154
- "CG",
1155
- "CH",
1156
- "CI",
1157
- "CK",
1158
- "CL",
1159
- "CM",
1160
- "CN",
1161
- "CO",
1162
- "CR",
1163
- "CU",
1164
- "CV",
1165
- "CW",
1166
- "CX",
1167
- "CY",
1168
- "CZ",
1169
- "DE",
1170
- "DJ",
1171
- "DK",
1172
- "DM",
1173
- "DO",
1174
- "DZ",
1175
- "EC",
1176
- "EE",
1177
- "EG",
1178
- "EH",
1179
- "ER",
1180
- "ES",
1181
- "ET",
1182
- "FI",
1183
- "FJ",
1184
- "FK",
1185
- "FM",
1186
- "FO",
1187
- "FR",
1188
- "GA",
1189
- "GB",
1190
- "GD",
1191
- "GE",
1192
- "GF",
1193
- "GG",
1194
- "GH",
1195
- "GI",
1196
- "GL",
1197
- "GM",
1198
- "GN",
1199
- "GP",
1200
- "GQ",
1201
- "GR",
1202
- "GS",
1203
- "GT",
1204
- "GU",
1205
- "GW",
1206
- "GY",
1207
- "HK",
1208
- "HM",
1209
- "HN",
1210
- "HR",
1211
- "HT",
1212
- "HU",
1213
- "ID",
1214
- "IE",
1215
- "IL",
1216
- "IM",
1217
- "IN",
1218
- "IO",
1219
- "IQ",
1220
- "IR",
1221
- "IS",
1222
- "IT",
1223
- "JE",
1224
- "JM",
1225
- "JO",
1226
- "JP",
1227
- "KE",
1228
- "KG",
1229
- "KH",
1230
- "KI",
1231
- "KM",
1232
- "KN",
1233
- "KP",
1234
- "KR",
1235
- "KW",
1236
- "KY",
1237
- "KZ",
1238
- "LA",
1239
- "LB",
1240
- "LC",
1241
- "LI",
1242
- "LK",
1243
- "LR",
1244
- "LS",
1245
- "LT",
1246
- "LU",
1247
- "LV",
1248
- "LY",
1249
- "MA",
1250
- "MC",
1251
- "MD",
1252
- "ME",
1253
- "MF",
1254
- "MG",
1255
- "MH",
1256
- "MK",
1257
- "ML",
1258
- "MM",
1259
- "MN",
1260
- "MO",
1261
- "MP",
1262
- "MQ",
1263
- "MR",
1264
- "MS",
1265
- "MT",
1266
- "MU",
1267
- "MV",
1268
- "MW",
1269
- "MX",
1270
- "MY",
1271
- "MZ",
1272
- "NA",
1273
- "NC",
1274
- "NE",
1275
- "NF",
1276
- "NG",
1277
- "NI",
1278
- "NL",
1279
- "NO",
1280
- "NP",
1281
- "NR",
1282
- "NU",
1283
- "NZ",
1284
- "OM",
1285
- "PA",
1286
- "PE",
1287
- "PF",
1288
- "PG",
1289
- "PH",
1290
- "PK",
1291
- "PL",
1292
- "PM",
1293
- "PN",
1294
- "PR",
1295
- "PS",
1296
- "PT",
1297
- "PW",
1298
- "PY",
1299
- "QA",
1300
- "RE",
1301
- "RO",
1302
- "RS",
1303
- "RU",
1304
- "RW",
1305
- "SA",
1306
- "SB",
1307
- "SC",
1308
- "SD",
1309
- "SE",
1310
- "SG",
1311
- "SH",
1312
- "SI",
1313
- "SJ",
1314
- "SK",
1315
- "SL",
1316
- "SM",
1317
- "SN",
1318
- "SO",
1319
- "SR",
1320
- "SS",
1321
- "ST",
1322
- "SV",
1323
- "SX",
1324
- "SY",
1325
- "SZ",
1326
- "TC",
1327
- "TD",
1328
- "TF",
1329
- "TG",
1330
- "TH",
1331
- "TJ",
1332
- "TK",
1333
- "TL",
1334
- "TM",
1335
- "TN",
1336
- "TO",
1337
- "TR",
1338
- "TT",
1339
- "TV",
1340
- "TW",
1341
- "TZ",
1342
- "UA",
1343
- "UG",
1344
- "UM",
1345
- "US",
1346
- "UY",
1347
- "UZ",
1348
- "VA",
1349
- "VC",
1350
- "VE",
1351
- "VG",
1352
- "VI",
1353
- "VN",
1354
- "VU",
1355
- "WF",
1356
- "WS",
1357
- "YE",
1358
- "YT",
1359
- "ZA",
1360
- "ZM",
1361
- "ZW"
1362
- ]
1363
- }
1364
- }
1365
- }
1366
- },
1367
- "phones": {
1368
- "type": "array",
1369
- "items": {
1370
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1371
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Phone",
1372
- "required": ["number", "type"],
1373
- "type": "object",
1374
- "properties": {
1375
- "type": {
1376
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1377
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/PhoneType",
1378
- "type": "string",
1379
- "description": "Type of phone number.",
1380
- "enum": ["HOME", "WORK", "MOBILE", "FAX", "MAIN", "OTHER"]
1381
- },
1382
- "number": {
1383
- "minLength": 1,
1384
- "type": "string",
1385
- "description": "Encrypted phone number using the AES algorithm"
1386
- },
1387
- "extension": {
1388
- "minLength": 1,
1389
- "type": "string",
1390
- "description": "Encrypted phone number extension using the AES algorithm"
1391
- }
1392
- }
1393
- }
1394
- },
1395
- "email": {
1396
- "minLength": 1,
1397
- "type": "string",
1398
- "description": "Encrypted email address using the AES algorithm"
1399
- },
1400
- "language": {
1401
- "minLength": 1,
1402
- "type": "string",
1403
- "description": "User's language preference"
1404
- },
1405
- "timeZone": {
1406
- "minLength": 1,
1407
- "type": "string",
1408
- "description": "User's timezone"
1409
- }
1410
- }
1411
- }
1412
- }
1413
- }
1414
- },
1415
- "required": ["params", "body"],
1416
- "additionalProperties": false
1417
- },
1418
- "responses": {
1419
- "200": {
1420
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1421
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/PersonPutResponseOK",
1422
- "type": "object",
1423
- "properties": {
1424
- "headers": {
1425
- "type": "object",
1426
- "properties": {
1427
- "last-modified": {
1428
- "type": "string",
1429
- "format": "date-time"
1430
- },
1431
- "created-on": {
1432
- "type": "string",
1433
- "format": "date-time"
1434
- },
1435
- "updated-on": {
1436
- "type": "string",
1437
- "format": "date-time"
1438
- },
1439
- "etag": {
1440
- "type": "string"
1441
- }
1442
- }
1443
- },
1444
- "body": {
1445
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1446
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/PersonResponse",
1447
- "type": "object",
1448
- "additionalProperties": false,
1449
- "description": "Encrypted version of object stored and related ids and metadata. A encryptedDataEncryptionKey is included if\na publicKeyHash query parameter is supplied as part of request.\n",
1450
- "required": ["dataEncryptionKeyId", "storageKeyId", "createdOn", "updatedOn", "person"],
1451
- "properties": {
1452
- "dataEncryptionKeyId": {
1453
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1454
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/DataEncryptionKeyId",
1455
- "type": "string",
1456
- "description": "Reference to encryption keys Person Service used to encrypt the Person object.\n\nUpdates must use the same dataEncryptionKeyId.\n",
1457
- "format": "uuid"
1458
- },
1459
- "storageKeyId": {
1460
- "type": "string",
1461
- "description": "DEK's non-derived identifier to be used by Check Digit services only.\n"
1462
- },
1463
- "encryptedDataEncryptionKey": {
1464
- "description": "Encrypted DEK matching the publicKeyId sent in the request. Used to decrypt values in the Person object.\n",
1465
- "type": "string"
1466
- },
1467
- "createdOn": {
1468
- "description": "Time data was first stored",
1469
- "type": "string",
1470
- "format": "date-time"
1471
- },
1472
- "updatedOn": {
1473
- "description": "Time data was last stored",
1474
- "type": "string",
1475
- "format": "date-time"
1476
- },
1477
- "lastModified": {
1478
- "description": "Time data was last stored (deprecated, use updatedOn)",
1479
- "deprecated": true,
1480
- "type": "string",
1481
- "format": "date-time"
1482
- },
1483
- "person": {
1484
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1485
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Person",
1486
- "type": "object",
1487
- "additionalProperties": false,
1488
- "properties": {
1489
- "company": {
1490
- "minLength": 1,
1491
- "type": "string",
1492
- "description": "Encrypted company name using the AES algorithm"
1493
- },
1494
- "title": {
1495
- "minLength": 1,
1496
- "type": "string",
1497
- "description": "Encrypted title using the AES algorithm"
1498
- },
1499
- "firstName": {
1500
- "minLength": 1,
1501
- "type": "string",
1502
- "description": "Encrypted first name using the AES algorithm"
1503
- },
1504
- "middleName": {
1505
- "minLength": 1,
1506
- "type": "string",
1507
- "description": "Encrypted middle name using the AES algorithm"
1508
- },
1509
- "lastName": {
1510
- "minLength": 1,
1511
- "type": "string",
1512
- "description": "Encrypted last name using the AES algorithm"
1513
- },
1514
- "addresses": {
1515
- "type": "array",
1516
- "items": {
1517
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1518
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Address",
1519
- "required": ["country", "streetLines", "type"],
1520
- "type": "object",
1521
- "properties": {
1522
- "type": {
1523
- "type": "string",
1524
- "description": "Type of address",
1525
- "enum": ["BILLING", "SHIPPING", "STATEMENTS", "OTHER"]
1526
- },
1527
- "streetLines": {
1528
- "maxItems": 4,
1529
- "minItems": 1,
1530
- "type": "array",
1531
- "description": "Encrypted street lines using the AES algorithm",
1532
- "items": {
1533
- "minLength": 1,
1534
- "type": "string",
1535
- "description": "Street line"
1536
- }
1537
- },
1538
- "city": {
1539
- "minLength": 1,
1540
- "type": "string",
1541
- "description": "City"
1542
- },
1543
- "region": {
1544
- "minLength": 1,
1545
- "type": "string",
1546
- "description": "Region, State or Province"
1547
- },
1548
- "postalCode": {
1549
- "minLength": 1,
1550
- "type": "string",
1551
- "description": "AES encrypted postal code. This value should contain only alphanumeric characters.\nIncluding non-alphanumeric characters will result in a 400 when sent as a request.\n"
1552
- },
1553
- "reportablePostalCode": {
1554
- "type": "string",
1555
- "description": "Postal code for reporting purposes."
1556
- },
1557
- "country": {
1558
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1559
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Country",
1560
- "type": "string",
1561
- "description": "Country ISO 3166-1 alpha-2 codes",
1562
- "enum": [
1563
- "AD",
1564
- "AE",
1565
- "AF",
1566
- "AG",
1567
- "AI",
1568
- "AL",
1569
- "AM",
1570
- "AO",
1571
- "AQ",
1572
- "AR",
1573
- "AS",
1574
- "AT",
1575
- "AU",
1576
- "AW",
1577
- "AX",
1578
- "AZ",
1579
- "BA",
1580
- "BB",
1581
- "BD",
1582
- "BE",
1583
- "BF",
1584
- "BG",
1585
- "BH",
1586
- "BI",
1587
- "BJ",
1588
- "BL",
1589
- "BM",
1590
- "BN",
1591
- "BO",
1592
- "BQ",
1593
- "BR",
1594
- "BS",
1595
- "BT",
1596
- "BV",
1597
- "BW",
1598
- "BY",
1599
- "BZ",
1600
- "CA",
1601
- "CC",
1602
- "CD",
1603
- "CF",
1604
- "CG",
1605
- "CH",
1606
- "CI",
1607
- "CK",
1608
- "CL",
1609
- "CM",
1610
- "CN",
1611
- "CO",
1612
- "CR",
1613
- "CU",
1614
- "CV",
1615
- "CW",
1616
- "CX",
1617
- "CY",
1618
- "CZ",
1619
- "DE",
1620
- "DJ",
1621
- "DK",
1622
- "DM",
1623
- "DO",
1624
- "DZ",
1625
- "EC",
1626
- "EE",
1627
- "EG",
1628
- "EH",
1629
- "ER",
1630
- "ES",
1631
- "ET",
1632
- "FI",
1633
- "FJ",
1634
- "FK",
1635
- "FM",
1636
- "FO",
1637
- "FR",
1638
- "GA",
1639
- "GB",
1640
- "GD",
1641
- "GE",
1642
- "GF",
1643
- "GG",
1644
- "GH",
1645
- "GI",
1646
- "GL",
1647
- "GM",
1648
- "GN",
1649
- "GP",
1650
- "GQ",
1651
- "GR",
1652
- "GS",
1653
- "GT",
1654
- "GU",
1655
- "GW",
1656
- "GY",
1657
- "HK",
1658
- "HM",
1659
- "HN",
1660
- "HR",
1661
- "HT",
1662
- "HU",
1663
- "ID",
1664
- "IE",
1665
- "IL",
1666
- "IM",
1667
- "IN",
1668
- "IO",
1669
- "IQ",
1670
- "IR",
1671
- "IS",
1672
- "IT",
1673
- "JE",
1674
- "JM",
1675
- "JO",
1676
- "JP",
1677
- "KE",
1678
- "KG",
1679
- "KH",
1680
- "KI",
1681
- "KM",
1682
- "KN",
1683
- "KP",
1684
- "KR",
1685
- "KW",
1686
- "KY",
1687
- "KZ",
1688
- "LA",
1689
- "LB",
1690
- "LC",
1691
- "LI",
1692
- "LK",
1693
- "LR",
1694
- "LS",
1695
- "LT",
1696
- "LU",
1697
- "LV",
1698
- "LY",
1699
- "MA",
1700
- "MC",
1701
- "MD",
1702
- "ME",
1703
- "MF",
1704
- "MG",
1705
- "MH",
1706
- "MK",
1707
- "ML",
1708
- "MM",
1709
- "MN",
1710
- "MO",
1711
- "MP",
1712
- "MQ",
1713
- "MR",
1714
- "MS",
1715
- "MT",
1716
- "MU",
1717
- "MV",
1718
- "MW",
1719
- "MX",
1720
- "MY",
1721
- "MZ",
1722
- "NA",
1723
- "NC",
1724
- "NE",
1725
- "NF",
1726
- "NG",
1727
- "NI",
1728
- "NL",
1729
- "NO",
1730
- "NP",
1731
- "NR",
1732
- "NU",
1733
- "NZ",
1734
- "OM",
1735
- "PA",
1736
- "PE",
1737
- "PF",
1738
- "PG",
1739
- "PH",
1740
- "PK",
1741
- "PL",
1742
- "PM",
1743
- "PN",
1744
- "PR",
1745
- "PS",
1746
- "PT",
1747
- "PW",
1748
- "PY",
1749
- "QA",
1750
- "RE",
1751
- "RO",
1752
- "RS",
1753
- "RU",
1754
- "RW",
1755
- "SA",
1756
- "SB",
1757
- "SC",
1758
- "SD",
1759
- "SE",
1760
- "SG",
1761
- "SH",
1762
- "SI",
1763
- "SJ",
1764
- "SK",
1765
- "SL",
1766
- "SM",
1767
- "SN",
1768
- "SO",
1769
- "SR",
1770
- "SS",
1771
- "ST",
1772
- "SV",
1773
- "SX",
1774
- "SY",
1775
- "SZ",
1776
- "TC",
1777
- "TD",
1778
- "TF",
1779
- "TG",
1780
- "TH",
1781
- "TJ",
1782
- "TK",
1783
- "TL",
1784
- "TM",
1785
- "TN",
1786
- "TO",
1787
- "TR",
1788
- "TT",
1789
- "TV",
1790
- "TW",
1791
- "TZ",
1792
- "UA",
1793
- "UG",
1794
- "UM",
1795
- "US",
1796
- "UY",
1797
- "UZ",
1798
- "VA",
1799
- "VC",
1800
- "VE",
1801
- "VG",
1802
- "VI",
1803
- "VN",
1804
- "VU",
1805
- "WF",
1806
- "WS",
1807
- "YE",
1808
- "YT",
1809
- "ZA",
1810
- "ZM",
1811
- "ZW"
1812
- ]
1813
- }
1814
- }
1815
- }
1816
- },
1817
- "phones": {
1818
- "type": "array",
1819
- "items": {
1820
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1821
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Phone",
1822
- "required": ["number", "type"],
1823
- "type": "object",
1824
- "properties": {
1825
- "type": {
1826
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1827
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/PhoneType",
1828
- "type": "string",
1829
- "description": "Type of phone number.",
1830
- "enum": ["HOME", "WORK", "MOBILE", "FAX", "MAIN", "OTHER"]
1831
- },
1832
- "number": {
1833
- "minLength": 1,
1834
- "type": "string",
1835
- "description": "Encrypted phone number using the AES algorithm"
1836
- },
1837
- "extension": {
1838
- "minLength": 1,
1839
- "type": "string",
1840
- "description": "Encrypted phone number extension using the AES algorithm"
1841
- }
1842
- }
1843
- }
1844
- },
1845
- "email": {
1846
- "minLength": 1,
1847
- "type": "string",
1848
- "description": "Encrypted email address using the AES algorithm"
1849
- },
1850
- "language": {
1851
- "minLength": 1,
1852
- "type": "string",
1853
- "description": "User's language preference"
1854
- },
1855
- "timeZone": {
1856
- "minLength": 1,
1857
- "type": "string",
1858
- "description": "User's timezone"
1859
- }
1860
- }
1861
- }
1862
- }
1863
- }
1864
- },
1865
- "required": ["body"],
1866
- "additionalProperties": false
1867
- },
1868
- "409": {
1869
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1870
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/PersonPutResponseConflict",
1871
- "type": "object",
1872
- "properties": {
1873
- "headers": {
1874
- "type": "object",
1875
- "additionalProperties": true
1876
- }
1877
- },
1878
- "required": [],
1879
- "additionalProperties": false
1880
- },
1881
- "412": {
1882
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1883
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/PersonPutResponsePreconditionFailed",
1884
- "type": "object",
1885
- "properties": {
1886
- "headers": {
1887
- "type": "object",
1888
- "additionalProperties": true
1889
- }
1890
- },
1891
- "required": [],
1892
- "additionalProperties": false
1893
- },
1894
- "default": {
1895
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1896
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/PersonPutResponseDefault",
1897
- "type": "object",
1898
- "properties": {
1899
- "headers": {
1900
- "type": "object",
1901
- "additionalProperties": true
1902
- },
1903
- "body": {
1904
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1905
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Error",
1906
- "type": "object",
1907
- "properties": {
1908
- "message": {
1909
- "minLength": 1,
1910
- "type": "string"
1911
- },
1912
- "code": {
1913
- "type": "string"
1914
- }
1915
- },
1916
- "description": "Error message"
1917
- }
1918
- },
1919
- "required": ["body"],
1920
- "additionalProperties": false
1921
- }
1922
- }
1923
- }
1924
- },
1925
- "/person/v1/person/:personId/history": {
1926
- "get": {
1927
- "request": {
1928
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1929
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/PersonHistoryGetRequestContext",
1930
- "type": "object",
1931
- "properties": {
1932
- "params": {
1933
- "type": "object",
1934
- "additionalProperties": false,
1935
- "properties": {
1936
- "toDate": {
199
+ "dataEncryptionKeyId": {
200
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
201
+ "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/DataEncryptionKeyId",
1937
202
  "type": "string",
1938
- "description": "Date time in simplified extended ISO format",
1939
- "format": "date-time"
203
+ "description": "Reference to encryption keys Person Service used to encrypt the Person object.\n\nUpdates must use the same dataEncryptionKeyId.\n",
204
+ "format": "uuid"
1940
205
  },
1941
- "fromDate": {
1942
- "type": "string",
1943
- "description": "Date time in simplified extended ISO format",
1944
- "default": "1970-01-01T00:00:00.000Z",
1945
- "format": "date-time"
206
+ "encryptedDataEncryptionKey": {
207
+ "description": "Encrypted version of AES-256 DEK",
208
+ "type": "string"
1946
209
  },
1947
- "publicKeyHash": {
1948
- "type": "string",
1949
- "format": "uuid",
1950
- "example": "15a85f64-5717-4562-b3fc-2c963f66afa6"
1951
- }
1952
- },
1953
- "required": ["toDate"]
1954
- },
1955
- "headers": {
1956
- "type": "object",
1957
- "additionalProperties": true
1958
- }
1959
- },
1960
- "required": ["params", "query"],
1961
- "additionalProperties": false
1962
- },
1963
- "responses": {
1964
- "200": {
1965
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1966
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/PersonHistoryGetResponseOK",
1967
- "type": "object",
1968
- "properties": {
1969
- "headers": {
1970
- "type": "object",
1971
- "additionalProperties": true
1972
- },
1973
- "body": {
1974
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1975
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/History",
1976
- "type": "object",
1977
- "additionalProperties": false,
1978
- "required": ["updates"],
1979
- "properties": {
1980
- "dataEncryptionKeyId": {
1981
- "type": "string",
1982
- "description": "Reference to encryption keys Person Service used to encrypt the Person object.\n\nUpdates must use the same dataEncryptionKeyId.\n",
1983
- "format": "uuid"
1984
- },
1985
- "storageKeyId": {
1986
- "type": "string",
1987
- "description": "DEK's non-derived identifier to be used by Check Digit services only.\n"
1988
- },
1989
- "encryptedDataEncryptionKey": {
1990
- "description": "Encrypted DEK matching the publicKeyId sent in the request. Used to decrypt all the items in the list.\n",
1991
- "type": "string"
1992
- },
1993
- "updates": {
1994
- "type": "array",
1995
- "description": "A list of PersonRecord objects. Each object represents a change to data in the Person object.\nObjects are sorted by the lastModified date with the most recent object first.\n",
1996
- "items": {
1997
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1998
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/PersonRecord",
1999
- "type": "object",
2000
- "additionalProperties": false,
2001
- "description": "Encrypted version of object stored with created on and last modified metadata.",
2002
- "required": ["createdOn", "updatedOn", "person"],
2003
- "properties": {
2004
- "createdOn": {
2005
- "description": "Time data was first stored",
2006
- "type": "string",
2007
- "format": "date-time"
2008
- },
2009
- "updatedOn": {
2010
- "description": "Time data was last stored",
2011
- "type": "string",
2012
- "format": "date-time"
2013
- },
2014
- "lastModified": {
2015
- "description": "Time data was last stored (deprecated, use updatedOn)",
2016
- "deprecated": true,
2017
- "type": "string",
2018
- "format": "date-time"
2019
- },
2020
- "person": {
2021
- "$schema": "https://json-schema.org/draft/2020-12/schema",
2022
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Person",
2023
- "type": "object",
2024
- "additionalProperties": false,
2025
- "properties": {
2026
- "company": {
2027
- "minLength": 1,
2028
- "type": "string",
2029
- "description": "Encrypted company name using the AES algorithm"
2030
- },
2031
- "title": {
2032
- "minLength": 1,
2033
- "type": "string",
2034
- "description": "Encrypted title using the AES algorithm"
2035
- },
2036
- "firstName": {
2037
- "minLength": 1,
2038
- "type": "string",
2039
- "description": "Encrypted first name using the AES algorithm"
2040
- },
2041
- "middleName": {
2042
- "minLength": 1,
2043
- "type": "string",
2044
- "description": "Encrypted middle name using the AES algorithm"
2045
- },
2046
- "lastName": {
2047
- "minLength": 1,
2048
- "type": "string",
2049
- "description": "Encrypted last name using the AES algorithm"
2050
- },
2051
- "addresses": {
2052
- "type": "array",
2053
- "items": {
2054
- "$schema": "https://json-schema.org/draft/2020-12/schema",
2055
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Address",
2056
- "required": ["country", "streetLines", "type"],
2057
- "type": "object",
2058
- "properties": {
2059
- "type": {
2060
- "type": "string",
2061
- "description": "Type of address",
2062
- "enum": ["BILLING", "SHIPPING", "STATEMENTS", "OTHER"]
2063
- },
2064
- "streetLines": {
2065
- "maxItems": 4,
2066
- "minItems": 1,
2067
- "type": "array",
2068
- "description": "Encrypted street lines using the AES algorithm",
2069
- "items": {
2070
- "minLength": 1,
2071
- "type": "string",
2072
- "description": "Street line"
2073
- }
2074
- },
2075
- "city": {
2076
- "minLength": 1,
2077
- "type": "string",
2078
- "description": "City"
2079
- },
2080
- "region": {
2081
- "minLength": 1,
2082
- "type": "string",
2083
- "description": "Region, State or Province"
2084
- },
2085
- "postalCode": {
2086
- "minLength": 1,
2087
- "type": "string",
2088
- "description": "AES encrypted postal code. This value should contain only alphanumeric characters.\nIncluding non-alphanumeric characters will result in a 400 when sent as a request.\n"
2089
- },
2090
- "reportablePostalCode": {
2091
- "type": "string",
2092
- "description": "Postal code for reporting purposes."
2093
- },
2094
- "country": {
2095
- "$schema": "https://json-schema.org/draft/2020-12/schema",
2096
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Country",
2097
- "type": "string",
2098
- "description": "Country ISO 3166-1 alpha-2 codes",
2099
- "enum": [
2100
- "AD",
2101
- "AE",
2102
- "AF",
2103
- "AG",
2104
- "AI",
2105
- "AL",
2106
- "AM",
2107
- "AO",
2108
- "AQ",
2109
- "AR",
2110
- "AS",
2111
- "AT",
2112
- "AU",
2113
- "AW",
2114
- "AX",
2115
- "AZ",
2116
- "BA",
2117
- "BB",
2118
- "BD",
2119
- "BE",
2120
- "BF",
2121
- "BG",
2122
- "BH",
2123
- "BI",
2124
- "BJ",
2125
- "BL",
2126
- "BM",
2127
- "BN",
2128
- "BO",
2129
- "BQ",
2130
- "BR",
2131
- "BS",
2132
- "BT",
2133
- "BV",
2134
- "BW",
2135
- "BY",
2136
- "BZ",
2137
- "CA",
2138
- "CC",
2139
- "CD",
2140
- "CF",
2141
- "CG",
2142
- "CH",
2143
- "CI",
2144
- "CK",
2145
- "CL",
2146
- "CM",
2147
- "CN",
2148
- "CO",
2149
- "CR",
2150
- "CU",
2151
- "CV",
2152
- "CW",
2153
- "CX",
2154
- "CY",
2155
- "CZ",
2156
- "DE",
2157
- "DJ",
2158
- "DK",
2159
- "DM",
2160
- "DO",
2161
- "DZ",
2162
- "EC",
2163
- "EE",
2164
- "EG",
2165
- "EH",
2166
- "ER",
2167
- "ES",
2168
- "ET",
2169
- "FI",
2170
- "FJ",
2171
- "FK",
2172
- "FM",
2173
- "FO",
2174
- "FR",
2175
- "GA",
2176
- "GB",
2177
- "GD",
2178
- "GE",
2179
- "GF",
2180
- "GG",
2181
- "GH",
2182
- "GI",
2183
- "GL",
2184
- "GM",
2185
- "GN",
2186
- "GP",
2187
- "GQ",
2188
- "GR",
2189
- "GS",
2190
- "GT",
2191
- "GU",
2192
- "GW",
2193
- "GY",
2194
- "HK",
2195
- "HM",
2196
- "HN",
2197
- "HR",
2198
- "HT",
2199
- "HU",
2200
- "ID",
2201
- "IE",
2202
- "IL",
2203
- "IM",
2204
- "IN",
2205
- "IO",
2206
- "IQ",
2207
- "IR",
2208
- "IS",
2209
- "IT",
2210
- "JE",
2211
- "JM",
2212
- "JO",
2213
- "JP",
2214
- "KE",
2215
- "KG",
2216
- "KH",
2217
- "KI",
2218
- "KM",
2219
- "KN",
2220
- "KP",
2221
- "KR",
2222
- "KW",
2223
- "KY",
2224
- "KZ",
2225
- "LA",
2226
- "LB",
2227
- "LC",
2228
- "LI",
2229
- "LK",
2230
- "LR",
2231
- "LS",
2232
- "LT",
2233
- "LU",
2234
- "LV",
2235
- "LY",
2236
- "MA",
2237
- "MC",
2238
- "MD",
2239
- "ME",
2240
- "MF",
2241
- "MG",
2242
- "MH",
2243
- "MK",
2244
- "ML",
2245
- "MM",
2246
- "MN",
2247
- "MO",
2248
- "MP",
2249
- "MQ",
2250
- "MR",
2251
- "MS",
2252
- "MT",
2253
- "MU",
2254
- "MV",
2255
- "MW",
2256
- "MX",
2257
- "MY",
2258
- "MZ",
2259
- "NA",
2260
- "NC",
2261
- "NE",
2262
- "NF",
2263
- "NG",
2264
- "NI",
2265
- "NL",
2266
- "NO",
2267
- "NP",
2268
- "NR",
2269
- "NU",
2270
- "NZ",
2271
- "OM",
2272
- "PA",
2273
- "PE",
2274
- "PF",
2275
- "PG",
2276
- "PH",
2277
- "PK",
2278
- "PL",
2279
- "PM",
2280
- "PN",
2281
- "PR",
2282
- "PS",
2283
- "PT",
2284
- "PW",
2285
- "PY",
2286
- "QA",
2287
- "RE",
2288
- "RO",
2289
- "RS",
2290
- "RU",
2291
- "RW",
2292
- "SA",
2293
- "SB",
2294
- "SC",
2295
- "SD",
2296
- "SE",
2297
- "SG",
2298
- "SH",
2299
- "SI",
2300
- "SJ",
2301
- "SK",
2302
- "SL",
2303
- "SM",
2304
- "SN",
2305
- "SO",
2306
- "SR",
2307
- "SS",
2308
- "ST",
2309
- "SV",
2310
- "SX",
2311
- "SY",
2312
- "SZ",
2313
- "TC",
2314
- "TD",
2315
- "TF",
2316
- "TG",
2317
- "TH",
2318
- "TJ",
2319
- "TK",
2320
- "TL",
2321
- "TM",
2322
- "TN",
2323
- "TO",
2324
- "TR",
2325
- "TT",
2326
- "TV",
2327
- "TW",
2328
- "TZ",
2329
- "UA",
2330
- "UG",
2331
- "UM",
2332
- "US",
2333
- "UY",
2334
- "UZ",
2335
- "VA",
2336
- "VC",
2337
- "VE",
2338
- "VG",
2339
- "VI",
2340
- "VN",
2341
- "VU",
2342
- "WF",
2343
- "WS",
2344
- "YE",
2345
- "YT",
2346
- "ZA",
2347
- "ZM",
2348
- "ZW"
2349
- ]
2350
- }
2351
- }
2352
- }
2353
- },
2354
- "phones": {
2355
- "type": "array",
2356
- "items": {
2357
- "$schema": "https://json-schema.org/draft/2020-12/schema",
2358
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Phone",
2359
- "required": ["number", "type"],
2360
- "type": "object",
2361
- "properties": {
2362
- "type": {
2363
- "$schema": "https://json-schema.org/draft/2020-12/schema",
2364
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/PhoneType",
2365
- "type": "string",
2366
- "description": "Type of phone number.",
2367
- "enum": ["HOME", "WORK", "MOBILE", "FAX", "MAIN", "OTHER"]
2368
- },
2369
- "number": {
2370
- "minLength": 1,
2371
- "type": "string",
2372
- "description": "Encrypted phone number using the AES algorithm"
2373
- },
2374
- "extension": {
2375
- "minLength": 1,
2376
- "type": "string",
2377
- "description": "Encrypted phone number extension using the AES algorithm"
2378
- }
2379
- }
2380
- }
2381
- },
2382
- "email": {
2383
- "minLength": 1,
2384
- "type": "string",
2385
- "description": "Encrypted email address using the AES algorithm"
2386
- },
2387
- "language": {
2388
- "minLength": 1,
2389
- "type": "string",
2390
- "description": "User's language preference"
2391
- },
2392
- "timeZone": {
210
+ "person": {
211
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
212
+ "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Person",
213
+ "type": "object",
214
+ "additionalProperties": false,
215
+ "properties": {
216
+ "company": {
217
+ "minLength": 1,
218
+ "type": "string",
219
+ "description": "Encrypted company name using the AES algorithm"
220
+ },
221
+ "title": {
222
+ "minLength": 1,
223
+ "type": "string",
224
+ "description": "Encrypted title using the AES algorithm"
225
+ },
226
+ "firstName": {
227
+ "minLength": 1,
228
+ "type": "string",
229
+ "description": "Encrypted first name using the AES algorithm"
230
+ },
231
+ "middleName": {
232
+ "minLength": 1,
233
+ "type": "string",
234
+ "description": "Encrypted middle name using the AES algorithm"
235
+ },
236
+ "lastName": {
237
+ "minLength": 1,
238
+ "type": "string",
239
+ "description": "Encrypted last name using the AES algorithm"
240
+ },
241
+ "addresses": {
242
+ "type": "array",
243
+ "items": {
244
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
245
+ "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Address",
246
+ "required": ["country", "streetLines", "type"],
247
+ "type": "object",
248
+ "properties": {
249
+ "type": {
250
+ "type": "string",
251
+ "description": "Type of address",
252
+ "enum": ["BILLING", "SHIPPING", "STATEMENTS", "OTHER"]
253
+ },
254
+ "streetLines": {
255
+ "maxItems": 4,
256
+ "minItems": 1,
257
+ "type": "array",
258
+ "description": "Encrypted street lines using the AES algorithm",
259
+ "items": {
2393
260
  "minLength": 1,
2394
261
  "type": "string",
2395
- "description": "User's timezone"
262
+ "description": "Street line"
2396
263
  }
264
+ },
265
+ "city": {
266
+ "minLength": 1,
267
+ "type": "string",
268
+ "description": "City"
269
+ },
270
+ "region": {
271
+ "minLength": 1,
272
+ "type": "string",
273
+ "description": "Region, State or Province"
274
+ },
275
+ "postalCode": {
276
+ "minLength": 1,
277
+ "type": "string",
278
+ "description": "AES encrypted postal code. This value should contain only alphanumeric characters.\nIncluding non-alphanumeric characters will result in a 400 when sent as a request.\n"
279
+ },
280
+ "reportablePostalCode": {
281
+ "type": "string",
282
+ "description": "Postal code for reporting purposes."
283
+ },
284
+ "country": {
285
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
286
+ "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Country",
287
+ "type": "string",
288
+ "description": "Country ISO 3166-1 alpha-2 codes",
289
+ "enum": [
290
+ "AD",
291
+ "AE",
292
+ "AF",
293
+ "AG",
294
+ "AI",
295
+ "AL",
296
+ "AM",
297
+ "AO",
298
+ "AQ",
299
+ "AR",
300
+ "AS",
301
+ "AT",
302
+ "AU",
303
+ "AW",
304
+ "AX",
305
+ "AZ",
306
+ "BA",
307
+ "BB",
308
+ "BD",
309
+ "BE",
310
+ "BF",
311
+ "BG",
312
+ "BH",
313
+ "BI",
314
+ "BJ",
315
+ "BL",
316
+ "BM",
317
+ "BN",
318
+ "BO",
319
+ "BQ",
320
+ "BR",
321
+ "BS",
322
+ "BT",
323
+ "BV",
324
+ "BW",
325
+ "BY",
326
+ "BZ",
327
+ "CA",
328
+ "CC",
329
+ "CD",
330
+ "CF",
331
+ "CG",
332
+ "CH",
333
+ "CI",
334
+ "CK",
335
+ "CL",
336
+ "CM",
337
+ "CN",
338
+ "CO",
339
+ "CR",
340
+ "CU",
341
+ "CV",
342
+ "CW",
343
+ "CX",
344
+ "CY",
345
+ "CZ",
346
+ "DE",
347
+ "DJ",
348
+ "DK",
349
+ "DM",
350
+ "DO",
351
+ "DZ",
352
+ "EC",
353
+ "EE",
354
+ "EG",
355
+ "EH",
356
+ "ER",
357
+ "ES",
358
+ "ET",
359
+ "FI",
360
+ "FJ",
361
+ "FK",
362
+ "FM",
363
+ "FO",
364
+ "FR",
365
+ "GA",
366
+ "GB",
367
+ "GD",
368
+ "GE",
369
+ "GF",
370
+ "GG",
371
+ "GH",
372
+ "GI",
373
+ "GL",
374
+ "GM",
375
+ "GN",
376
+ "GP",
377
+ "GQ",
378
+ "GR",
379
+ "GS",
380
+ "GT",
381
+ "GU",
382
+ "GW",
383
+ "GY",
384
+ "HK",
385
+ "HM",
386
+ "HN",
387
+ "HR",
388
+ "HT",
389
+ "HU",
390
+ "ID",
391
+ "IE",
392
+ "IL",
393
+ "IM",
394
+ "IN",
395
+ "IO",
396
+ "IQ",
397
+ "IR",
398
+ "IS",
399
+ "IT",
400
+ "JE",
401
+ "JM",
402
+ "JO",
403
+ "JP",
404
+ "KE",
405
+ "KG",
406
+ "KH",
407
+ "KI",
408
+ "KM",
409
+ "KN",
410
+ "KP",
411
+ "KR",
412
+ "KW",
413
+ "KY",
414
+ "KZ",
415
+ "LA",
416
+ "LB",
417
+ "LC",
418
+ "LI",
419
+ "LK",
420
+ "LR",
421
+ "LS",
422
+ "LT",
423
+ "LU",
424
+ "LV",
425
+ "LY",
426
+ "MA",
427
+ "MC",
428
+ "MD",
429
+ "ME",
430
+ "MF",
431
+ "MG",
432
+ "MH",
433
+ "MK",
434
+ "ML",
435
+ "MM",
436
+ "MN",
437
+ "MO",
438
+ "MP",
439
+ "MQ",
440
+ "MR",
441
+ "MS",
442
+ "MT",
443
+ "MU",
444
+ "MV",
445
+ "MW",
446
+ "MX",
447
+ "MY",
448
+ "MZ",
449
+ "NA",
450
+ "NC",
451
+ "NE",
452
+ "NF",
453
+ "NG",
454
+ "NI",
455
+ "NL",
456
+ "NO",
457
+ "NP",
458
+ "NR",
459
+ "NU",
460
+ "NZ",
461
+ "OM",
462
+ "PA",
463
+ "PE",
464
+ "PF",
465
+ "PG",
466
+ "PH",
467
+ "PK",
468
+ "PL",
469
+ "PM",
470
+ "PN",
471
+ "PR",
472
+ "PS",
473
+ "PT",
474
+ "PW",
475
+ "PY",
476
+ "QA",
477
+ "RE",
478
+ "RO",
479
+ "RS",
480
+ "RU",
481
+ "RW",
482
+ "SA",
483
+ "SB",
484
+ "SC",
485
+ "SD",
486
+ "SE",
487
+ "SG",
488
+ "SH",
489
+ "SI",
490
+ "SJ",
491
+ "SK",
492
+ "SL",
493
+ "SM",
494
+ "SN",
495
+ "SO",
496
+ "SR",
497
+ "SS",
498
+ "ST",
499
+ "SV",
500
+ "SX",
501
+ "SY",
502
+ "SZ",
503
+ "TC",
504
+ "TD",
505
+ "TF",
506
+ "TG",
507
+ "TH",
508
+ "TJ",
509
+ "TK",
510
+ "TL",
511
+ "TM",
512
+ "TN",
513
+ "TO",
514
+ "TR",
515
+ "TT",
516
+ "TV",
517
+ "TW",
518
+ "TZ",
519
+ "UA",
520
+ "UG",
521
+ "UM",
522
+ "US",
523
+ "UY",
524
+ "UZ",
525
+ "VA",
526
+ "VC",
527
+ "VE",
528
+ "VG",
529
+ "VI",
530
+ "VN",
531
+ "VU",
532
+ "WF",
533
+ "WS",
534
+ "YE",
535
+ "YT",
536
+ "ZA",
537
+ "ZM",
538
+ "ZW"
539
+ ]
2397
540
  }
2398
541
  }
2399
542
  }
543
+ },
544
+ "phones": {
545
+ "type": "array",
546
+ "items": {
547
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
548
+ "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Phone",
549
+ "required": ["number", "type"],
550
+ "type": "object",
551
+ "properties": {
552
+ "type": {
553
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
554
+ "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/PhoneType",
555
+ "type": "string",
556
+ "description": "Type of phone number.",
557
+ "enum": ["HOME", "WORK", "MOBILE", "FAX", "MAIN", "OTHER"]
558
+ },
559
+ "number": {
560
+ "minLength": 1,
561
+ "type": "string",
562
+ "description": "Encrypted phone number using the AES algorithm"
563
+ },
564
+ "extension": {
565
+ "minLength": 1,
566
+ "type": "string",
567
+ "description": "Encrypted phone number extension using the AES algorithm"
568
+ }
569
+ }
570
+ }
571
+ },
572
+ "email": {
573
+ "minLength": 1,
574
+ "type": "string",
575
+ "description": "Encrypted email address using the AES algorithm"
576
+ },
577
+ "language": {
578
+ "minLength": 1,
579
+ "type": "string",
580
+ "description": "User's language preference"
581
+ },
582
+ "timeZone": {
583
+ "minLength": 1,
584
+ "type": "string",
585
+ "description": "User's timezone"
2400
586
  }
2401
587
  }
2402
588
  }
2403
589
  }
2404
- },
2405
- "required": ["body"],
2406
- "additionalProperties": false
2407
- },
2408
- "404": {
2409
- "$schema": "https://json-schema.org/draft/2020-12/schema",
2410
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/PersonHistoryGetResponseNotFound",
2411
- "type": "object",
2412
- "properties": {
2413
- "headers": {
2414
- "type": "object",
2415
- "additionalProperties": true
2416
- }
2417
- },
2418
- "required": [],
2419
- "additionalProperties": false
2420
- },
2421
- "default": {
2422
- "$schema": "https://json-schema.org/draft/2020-12/schema",
2423
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/PersonHistoryGetResponseDefault",
2424
- "type": "object",
2425
- "properties": {
2426
- "headers": {
2427
- "type": "object",
2428
- "additionalProperties": true
2429
- },
2430
- "body": {
2431
- "$schema": "https://json-schema.org/draft/2020-12/schema",
2432
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Error",
2433
- "type": "object",
2434
- "properties": {
2435
- "message": {
2436
- "minLength": 1,
2437
- "type": "string"
2438
- },
2439
- "code": {
2440
- "type": "string"
2441
- }
2442
- },
2443
- "description": "Error message"
2444
- }
2445
- },
2446
- "required": ["body"],
2447
- "additionalProperties": false
2448
- }
2449
- }
2450
- }
2451
- },
2452
- "/person/v1/person/:personId/masked": {
2453
- "get": {
2454
- "request": {
2455
- "$schema": "https://json-schema.org/draft/2020-12/schema",
2456
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/PersonMaskedGetRequestContext",
2457
- "type": "object",
2458
- "properties": {
2459
- "params": {
2460
- "type": "object",
2461
- "additionalProperties": false,
2462
- "properties": {
2463
- "at": {
2464
- "type": "string",
2465
- "format": "date-time"
2466
- }
2467
- },
2468
- "required": ["at"]
2469
- },
2470
- "headers": {
2471
- "type": "object",
2472
- "additionalProperties": true
2473
590
  }
2474
591
  },
2475
- "required": ["params", "query"],
592
+ "required": ["params", "body"],
2476
593
  "additionalProperties": false
2477
594
  },
2478
595
  "responses": {
2479
596
  "200": {
2480
597
  "$schema": "https://json-schema.org/draft/2020-12/schema",
2481
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/PersonMaskedGetResponseOK",
598
+ "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/PersonPutResponseOK",
2482
599
  "type": "object",
2483
600
  "properties": {
2484
601
  "headers": {
@@ -2503,12 +620,27 @@
2503
620
  },
2504
621
  "body": {
2505
622
  "$schema": "https://json-schema.org/draft/2020-12/schema",
2506
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/PersonMaskedResponse",
623
+ "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/PersonResponse",
2507
624
  "type": "object",
2508
625
  "additionalProperties": false,
2509
626
  "description": "Encrypted version of object stored and related ids and metadata. A encryptedDataEncryptionKey is included if\na publicKeyHash query parameter is supplied as part of request.\n",
2510
- "required": ["createdOn", "updatedOn", "person"],
627
+ "required": ["dataEncryptionKeyId", "storageKeyId", "createdOn", "updatedOn", "person"],
2511
628
  "properties": {
629
+ "dataEncryptionKeyId": {
630
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
631
+ "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/DataEncryptionKeyId",
632
+ "type": "string",
633
+ "description": "Reference to encryption keys Person Service used to encrypt the Person object.\n\nUpdates must use the same dataEncryptionKeyId.\n",
634
+ "format": "uuid"
635
+ },
636
+ "storageKeyId": {
637
+ "type": "string",
638
+ "description": "DEK's non-derived identifier to be used by Check Digit services only.\n"
639
+ },
640
+ "encryptedDataEncryptionKey": {
641
+ "description": "Encrypted DEK matching the publicKeyId sent in the request. Used to decrypt values in the Person object.\n",
642
+ "type": "string"
643
+ },
2512
644
  "createdOn": {
2513
645
  "description": "Time data was first stored",
2514
646
  "type": "string",
@@ -2519,66 +651,85 @@
2519
651
  "type": "string",
2520
652
  "format": "date-time"
2521
653
  },
654
+ "lastModified": {
655
+ "description": "Time data was last stored (deprecated, use updatedOn)",
656
+ "deprecated": true,
657
+ "type": "string",
658
+ "format": "date-time"
659
+ },
2522
660
  "person": {
2523
661
  "$schema": "https://json-schema.org/draft/2020-12/schema",
2524
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/PersonMasked",
662
+ "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Person",
2525
663
  "type": "object",
2526
664
  "additionalProperties": false,
2527
- "description": "This object includes masked person data.\n",
2528
665
  "properties": {
2529
666
  "company": {
667
+ "minLength": 1,
668
+ "type": "string",
669
+ "description": "Encrypted company name using the AES algorithm"
670
+ },
671
+ "title": {
672
+ "minLength": 1,
2530
673
  "type": "string",
2531
- "description": "Masked company name."
674
+ "description": "Encrypted title using the AES algorithm"
2532
675
  },
2533
676
  "firstName": {
2534
677
  "minLength": 1,
2535
678
  "type": "string",
2536
- "description": "Masked first name."
679
+ "description": "Encrypted first name using the AES algorithm"
2537
680
  },
2538
681
  "middleName": {
2539
682
  "minLength": 1,
2540
683
  "type": "string",
2541
- "description": "Masked middle name."
684
+ "description": "Encrypted middle name using the AES algorithm"
2542
685
  },
2543
686
  "lastName": {
2544
687
  "minLength": 1,
2545
688
  "type": "string",
2546
- "description": "Masked last name."
689
+ "description": "Encrypted last name using the AES algorithm"
2547
690
  },
2548
691
  "addresses": {
2549
692
  "type": "array",
2550
- "description": "Masked address information.",
2551
693
  "items": {
2552
694
  "$schema": "https://json-schema.org/draft/2020-12/schema",
2553
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/AddressMasked",
2554
- "type": "object",
695
+ "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Address",
2555
696
  "required": ["country", "streetLines", "type"],
697
+ "type": "object",
2556
698
  "properties": {
2557
699
  "type": {
2558
700
  "type": "string",
2559
- "description": "Type of address.",
701
+ "description": "Type of address",
2560
702
  "enum": ["BILLING", "SHIPPING", "STATEMENTS", "OTHER"]
2561
703
  },
2562
704
  "streetLines": {
2563
705
  "maxItems": 4,
2564
706
  "minItems": 1,
2565
707
  "type": "array",
2566
- "description": "Street lines with all non-numeric characters masked.",
708
+ "description": "Encrypted street lines using the AES algorithm",
2567
709
  "items": {
2568
710
  "minLength": 1,
2569
711
  "type": "string",
2570
- "description": "Masked street line."
712
+ "description": "Street line"
2571
713
  }
2572
714
  },
2573
715
  "city": {
2574
716
  "minLength": 1,
2575
717
  "type": "string",
2576
- "description": "Unmasked city."
718
+ "description": "City"
2577
719
  },
2578
720
  "region": {
2579
721
  "minLength": 1,
2580
722
  "type": "string",
2581
- "description": "Unmasked region, state or province."
723
+ "description": "Region, State or Province"
724
+ },
725
+ "postalCode": {
726
+ "minLength": 1,
727
+ "type": "string",
728
+ "description": "AES encrypted postal code. This value should contain only alphanumeric characters.\nIncluding non-alphanumeric characters will result in a 400 when sent as a request.\n"
729
+ },
730
+ "reportablePostalCode": {
731
+ "type": "string",
732
+ "description": "Postal code for reporting purposes."
2582
733
  },
2583
734
  "country": {
2584
735
  "$schema": "https://json-schema.org/draft/2020-12/schema",
@@ -2836,24 +987,15 @@
2836
987
  "ZM",
2837
988
  "ZW"
2838
989
  ]
2839
- },
2840
- "postalCodeLongHash": {
2841
- "minLength": 1,
2842
- "type": "string",
2843
- "description": "Long-form postal code hashed using @checkdigit/hash."
2844
- },
2845
- "postalCodeShortHash": {
2846
- "minLength": 1,
2847
- "type": "string",
2848
- "description": "Short-form postal code hashed using @checkdigit/hash."
2849
990
  }
2850
991
  }
2851
992
  }
2852
993
  },
2853
994
  "phones": {
2854
995
  "type": "array",
2855
- "description": "Masked phone information.",
2856
996
  "items": {
997
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
998
+ "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/definitions/Phone",
2857
999
  "required": ["number", "type"],
2858
1000
  "type": "object",
2859
1001
  "properties": {
@@ -2867,7 +1009,12 @@
2867
1009
  "number": {
2868
1010
  "minLength": 1,
2869
1011
  "type": "string",
2870
- "description": "Masked phone number."
1012
+ "description": "Encrypted phone number using the AES algorithm"
1013
+ },
1014
+ "extension": {
1015
+ "minLength": 1,
1016
+ "type": "string",
1017
+ "description": "Encrypted phone number extension using the AES algorithm"
2871
1018
  }
2872
1019
  }
2873
1020
  }
@@ -2875,17 +1022,17 @@
2875
1022
  "email": {
2876
1023
  "minLength": 1,
2877
1024
  "type": "string",
2878
- "description": "Masked email address."
1025
+ "description": "Encrypted email address using the AES algorithm"
2879
1026
  },
2880
1027
  "language": {
2881
1028
  "minLength": 1,
2882
1029
  "type": "string",
2883
- "description": "Unmasked language preference."
1030
+ "description": "User's language preference"
2884
1031
  },
2885
1032
  "timeZone": {
2886
1033
  "minLength": 1,
2887
1034
  "type": "string",
2888
- "description": "Unmasked time zone preference."
1035
+ "description": "User's timezone"
2889
1036
  }
2890
1037
  }
2891
1038
  }
@@ -2895,9 +1042,22 @@
2895
1042
  "required": ["body"],
2896
1043
  "additionalProperties": false
2897
1044
  },
2898
- "404": {
1045
+ "409": {
1046
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1047
+ "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/PersonPutResponseConflict",
1048
+ "type": "object",
1049
+ "properties": {
1050
+ "headers": {
1051
+ "type": "object",
1052
+ "additionalProperties": true
1053
+ }
1054
+ },
1055
+ "required": [],
1056
+ "additionalProperties": false
1057
+ },
1058
+ "412": {
2899
1059
  "$schema": "https://json-schema.org/draft/2020-12/schema",
2900
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/PersonMaskedGetResponseNotFound",
1060
+ "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/PersonPutResponsePreconditionFailed",
2901
1061
  "type": "object",
2902
1062
  "properties": {
2903
1063
  "headers": {
@@ -2910,7 +1070,7 @@
2910
1070
  },
2911
1071
  "default": {
2912
1072
  "$schema": "https://json-schema.org/draft/2020-12/schema",
2913
- "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/PersonMaskedGetResponseDefault",
1073
+ "$id": "https://eslint-plugin.checkdigit/person/v1/schemas/api/PersonPutResponseDefault",
2914
1074
  "type": "object",
2915
1075
  "properties": {
2916
1076
  "headers": {
@@ -2938,7 +1098,9 @@
2938
1098
  }
2939
1099
  }
2940
1100
  }
2941
- }
1101
+ },
1102
+ "/person/v1/person/:personId/history": {},
1103
+ "/person/v1/person/:personId/masked": {}
2942
1104
  },
2943
1105
  "definitions": {
2944
1106
  "Ping": {