@checkdigit/eslint-plugin 7.17.1 → 7.18.0-PR.143-8290

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.
Files changed (80) hide show
  1. package/dist-mjs/athena/api-locator.mjs +30 -0
  2. package/dist-mjs/athena/api-matcher.mjs +108 -0
  3. package/dist-mjs/athena/athena.mjs +331 -0
  4. package/dist-mjs/athena/column.mjs +1 -0
  5. package/dist-mjs/athena/context.mjs +21 -0
  6. package/dist-mjs/athena/index.mjs +1 -0
  7. package/dist-mjs/athena/service-table.mjs +32 -0
  8. package/dist-mjs/athena/types.mjs +1 -0
  9. package/dist-mjs/athena/visitor.mjs +258 -0
  10. package/dist-mjs/index.mjs +8 -4
  11. package/dist-mjs/no-status-code-assert.mjs +1 -1
  12. package/dist-mjs/openapi/deref-schema.mjs +14 -0
  13. package/dist-mjs/openapi/generate-schema.mjs +273 -0
  14. package/dist-mjs/openapi/service-schema-generator.mjs +147 -0
  15. package/dist-mjs/peggy/athena-peggy.mjs +20629 -0
  16. package/dist-types/athena/api-locator.d.ts +2 -0
  17. package/dist-types/athena/api-matcher.d.ts +14 -0
  18. package/dist-types/athena/athena.d.ts +6 -0
  19. package/dist-types/athena/column.d.ts +1 -0
  20. package/dist-types/athena/context.d.ts +21 -0
  21. package/dist-types/athena/index.d.ts +8 -0
  22. package/dist-types/athena/service-table.d.ts +8 -0
  23. package/dist-types/athena/types.d.ts +474 -0
  24. package/dist-types/athena/visitor.d.ts +63 -0
  25. package/dist-types/no-status-code-assert.d.ts +1 -1
  26. package/dist-types/openapi/deref-schema.d.ts +1 -0
  27. package/dist-types/openapi/generate-schema.d.ts +33 -0
  28. package/dist-types/openapi/service-schema-generator.d.ts +5 -0
  29. package/dist-types/peggy/athena-peggy.d.ts +13 -0
  30. package/package.json +1 -96
  31. package/src/athena/ATHENA.md +387 -0
  32. package/src/athena/PLAN.md +355 -0
  33. package/src/athena/api-locator.ts +39 -0
  34. package/src/athena/api-matcher.ts +169 -0
  35. package/src/athena/athena.ts +491 -0
  36. package/src/athena/column.ts +2 -0
  37. package/src/athena/context.ts +47 -0
  38. package/src/athena/index.ts +11 -0
  39. package/src/athena/service-table.ts +55 -0
  40. package/src/athena/types.ts +526 -0
  41. package/src/athena/visitor.ts +365 -0
  42. package/src/index.ts +4 -0
  43. package/src/no-side-effects.ts +1 -1
  44. package/src/no-status-code-assert.ts +2 -2
  45. package/src/openapi/deref-schema.ts +14 -0
  46. package/src/openapi/generate-schema.ts +422 -0
  47. package/src/openapi/service-schema-generator.ts +189 -0
  48. package/src/peggy/athena-chat.peggy +608 -0
  49. package/src/peggy/athena-peggy.ts +22078 -0
  50. package/src/peggy/athena.peggy +2967 -0
  51. package/src/require-service-call-response-declaration.ts +2 -2
  52. package/src/services/interchange/v1/swagger.schema.deref.json +849 -0
  53. package/src/services/interchange/v1/swagger.schema.json +473 -0
  54. package/src/services/interchange/v1/swagger.yml +414 -0
  55. package/src/services/ledger/v1/swagger.schema.deref.json +6694 -0
  56. package/src/services/ledger/v1/swagger.schema.json +1820 -0
  57. package/src/services/ledger/v1/swagger.yml +1094 -0
  58. package/src/services/link/v1/swagger.schema.deref.json +648 -0
  59. package/src/services/link/v1/swagger.schema.json +444 -0
  60. package/src/services/link/v1/swagger.yml +343 -0
  61. package/src/services/message/v1/swagger.schema.deref.json +22049 -0
  62. package/src/services/message/v1/swagger.schema.json +3470 -0
  63. package/src/services/message/v1/swagger.yml +2798 -0
  64. package/src/services/message/v2/swagger.schema.deref.json +72221 -0
  65. package/src/services/message/v2/swagger.schema.json +3558 -0
  66. package/src/services/message/v2/swagger.yml +3009 -0
  67. package/src/services/paymentCard/v1/swagger.schema.deref.json +4346 -0
  68. package/src/services/paymentCard/v1/swagger.schema.json +2181 -0
  69. package/src/services/paymentCard/v1/swagger.yml +1161 -0
  70. package/src/services/paymentCard/v2/swagger.schema.deref.json +4336 -0
  71. package/src/services/paymentCard/v2/swagger.schema.json +2155 -0
  72. package/src/services/paymentCard/v2/swagger.yml +1149 -0
  73. package/src/services/person/v1/swagger.schema.deref.json +6786 -0
  74. package/src/services/person/v1/swagger.schema.json +1445 -0
  75. package/src/services/person/v1/swagger.yml +1157 -0
  76. package/src/services/teampayApproval/v1/swagger.schema.deref.json +9898 -0
  77. package/src/services/teampayCardManagement/v1/swagger.schema.deref.json +6187 -0
  78. package/src/services/teampayClientManagement/v1/swagger.schema.deref.json +4914 -0
  79. package/src/services/teampayClientManagement/v1/swagger.schema.json +1964 -0
  80. package/src/services/teampayClientManagement/v1/swagger.yml +1376 -0
@@ -0,0 +1,1157 @@
1
+ openapi: 3.0.0
2
+ info:
3
+ title: Person
4
+ description: |
5
+ Person is a service used to create, update, or retrieve data about a person.
6
+
7
+ Primary API operations:
8
+ - create and update a person
9
+ - retrieve a person
10
+ - retrieve a history of changes to the person record
11
+ - retrieve masked person data
12
+
13
+ **Personally Identifiable Information (PII)**
14
+
15
+ Personally Identifiable Information (PII) is any information that can be used to determine an individual's identity,
16
+ either alone or when combined with other data.
17
+
18
+ Person Service returns encrypted PII and non-encrypted non-PII. Whether information is PII may depend on its
19
+ relationship to other data. For example, a city is non-PII, while a city paired with a last name is PII. In cases
20
+ where information is unlikely PII, but significantly narrowing, and encryption is unavailable, extra steps will
21
+ be taken to obfuscate the information.
22
+
23
+ ### Create a Person
24
+ Before creating a person, encryption keys must be created using `PUT /data-encryption-key/{dataEncryptionKeyId}`.
25
+
26
+ To create a person, send a `PersonRequest` object using `PUT /person/{personId}`.
27
+ PII properties in the `Person` object must be encrypted with a data encryption key (DEK). Include the
28
+ `dataEncryptionKeyId` used to create the encryption keys.
29
+
30
+ #### Encrypting Person object
31
+
32
+ To encrypt the values in the `Person` object use an AES algorithm and a DEK.
33
+
34
+ #### EncryptedDataEncryptionKey
35
+ To create the `encryptedDataEncryptionKey`, encrypt the DEK using the `transmissionKey` in the
36
+ `DataEncryptionKeyResponse` object and the RSA algorithm.
37
+
38
+ ### Updating a Person
39
+ When updating a person, use the same `dataEncryptionKeyId` used when the person was created.
40
+
41
+ ### Retrieving a Person
42
+ In the `PersonResponse` object, Person data is encrypted using a DEK generated by Person Service. This DEK is
43
+ encrypted with each `PublicKey` included in the `DataEncryptionKeyRequest` object. Each encrypted DEK is paired
44
+ with a hashed version of the `PublicKey` used to encrypt it. See [hash](https://github.com/checkdigit/hash).
45
+
46
+ #### Decrypting the encryptedDataEncryptionKey
47
+
48
+ The encrypted data encryption key is paired with a hashed version of the public key used to encrypt it.
49
+ See [hash](https://github.com/checkdigit/hash).
50
+
51
+ To decrypt, use the RSA algorithm and the private key for the public key that's hashed.
52
+
53
+ #### Decrypting person data
54
+
55
+ Decrypt each field using the AES algorithm and the decrypted encryptedDataEncryptionKey (i.e. DEK).
56
+
57
+ © Check Digit LLC. 2020-2024
58
+ version: 1.8.1
59
+ contact:
60
+ name: Check Digit
61
+
62
+ servers:
63
+ - url: /person/v1
64
+
65
+ tags:
66
+ - name: Service Health
67
+ - name: API
68
+
69
+ x-firehose-logged: false
70
+
71
+ paths:
72
+ /ping:
73
+ get:
74
+ operationId: 'ping-get'
75
+ tags:
76
+ - Service Health
77
+ description: Tests the availability of the service and returns the current server
78
+ time.
79
+ responses:
80
+ '200':
81
+ $ref: '#/components/responses/Ping'
82
+ default:
83
+ $ref: '#/components/responses/ServerError'
84
+
85
+ /public-key:
86
+ get:
87
+ operationId: 'public-key-get'
88
+ tags:
89
+ - API
90
+ description: Retrieves Person Service's rsa public key. This key is used to securely transmit data to Person Service APIs.
91
+ responses:
92
+ '200':
93
+ $ref: '#/components/responses/PublicKeyResponse'
94
+ default:
95
+ $ref: '#/components/responses/ServerError'
96
+
97
+ /data-encryption-key/{dataEncryptionKeyId}:
98
+ get:
99
+ operationId: 'data-encryption-key-get'
100
+ tags:
101
+ - API
102
+ description: |
103
+ Retrieves data encryption keys. Data encryption keys are RSA encrypted and paired with a hashed version of
104
+ the public key used to encrypt.
105
+ parameters:
106
+ - $ref: '#/components/parameters/dataEncryptionKeyId'
107
+ responses:
108
+ '200':
109
+ $ref: '#/components/responses/DataEncryptionKeyResponse'
110
+ '404':
111
+ $ref: '#/components/responses/NotFound'
112
+ default:
113
+ $ref: '#/components/responses/ServerError'
114
+ put:
115
+ x-firehose-logged: true
116
+ operationId: 'data-encryption-key-put'
117
+ tags:
118
+ - API
119
+ description: |
120
+ Creates data encryption keys used by Person Service to encrypt a Person object. The dataEncryptionKeyId is included
121
+ in the PersonRequest when creating a Person object.
122
+
123
+ Data encryption keys can be reused when creating new Person objects. This is particularly useful for batch
124
+ operations.
125
+ parameters:
126
+ - $ref: '#/components/parameters/dataEncryptionKeyId'
127
+ requestBody:
128
+ $ref: '#/components/requestBodies/DataEncryptionKeyRequest'
129
+ responses:
130
+ '200':
131
+ $ref: '#/components/responses/DataEncryptionKeyResponse'
132
+ default:
133
+ $ref: '#/components/responses/ServerError'
134
+
135
+ /person/{personId}:
136
+ get:
137
+ operationId: 'person-get'
138
+ tags:
139
+ - API
140
+ description: Retrieves encrypted person data.
141
+ parameters:
142
+ - $ref: '#/components/parameters/personId'
143
+ - $ref: '#/components/parameters/at'
144
+ - $ref: '#/components/parameters/publicKeyHash'
145
+ responses:
146
+ '200':
147
+ $ref: '#/components/responses/PersonResponse'
148
+ '404':
149
+ $ref: '#/components/responses/NotFound'
150
+ default:
151
+ $ref: '#/components/responses/ServerError'
152
+ put:
153
+ x-firehose-logged: true
154
+ operationId: 'person-put'
155
+ tags:
156
+ - API
157
+ description: |
158
+ Store or update person data. Use ifMatch to verify version for updates.
159
+
160
+ Person object properties described as encrypted must be encrypted using an AES generated secret key. The secret
161
+ key used must also be encrypted with the RSA algorithm using the transmissionKey returned from /data-encryption-key.
162
+ parameters:
163
+ - $ref: '#/components/parameters/personId'
164
+ - $ref: '#/components/parameters/ifMatch'
165
+ - $ref: '#/components/parameters/createdOn'
166
+ - $ref: '#/components/parameters/lastModified'
167
+ requestBody:
168
+ $ref: '#/components/requestBodies/PersonRequest'
169
+ responses:
170
+ '200':
171
+ $ref: '#/components/responses/PersonResponse'
172
+ '409':
173
+ description: Person record exists but with different data.
174
+ '412':
175
+ $ref: '#/components/responses/PreconditionFailed'
176
+ default:
177
+ $ref: '#/components/responses/ServerError'
178
+
179
+ /person/{personId}/history:
180
+ get:
181
+ operationId: 'person-history-get'
182
+ tags:
183
+ - API
184
+ description: |
185
+ Returns a History object that includes a list of Response objects. Each Response object
186
+ represents a change to data in the Person object.
187
+ parameters:
188
+ - $ref: '#/components/parameters/personId'
189
+ - $ref: '#/components/parameters/toDate'
190
+ - $ref: '#/components/parameters/fromDate'
191
+ - $ref: '#/components/parameters/publicKeyHash'
192
+ responses:
193
+ '200':
194
+ $ref: '#/components/responses/History'
195
+ '404':
196
+ $ref: '#/components/responses/NotFound'
197
+ default:
198
+ $ref: '#/components/responses/ServerError'
199
+
200
+ /person/{personId}/masked:
201
+ get:
202
+ operationId: 'person-masked-get'
203
+ tags:
204
+ - API
205
+ description: Retrieves a person record with identifying data masked.
206
+ parameters:
207
+ - $ref: '#/components/parameters/personId'
208
+ - $ref: '#/components/parameters/at'
209
+ responses:
210
+ '200':
211
+ $ref: '#/components/responses/PersonMaskedResponse'
212
+ '404':
213
+ $ref: '#/components/responses/NotFound'
214
+ default:
215
+ $ref: '#/components/responses/ServerError'
216
+
217
+ components:
218
+ schemas:
219
+ Ping:
220
+ type: object
221
+ additionalProperties: false
222
+ required:
223
+ - serverTime
224
+ properties:
225
+ serverTime:
226
+ type: string
227
+ format: date-time
228
+ description: Current server time
229
+
230
+ DataEncryptionKeyId:
231
+ type: string
232
+ description: |
233
+ Reference to encryption keys Person Service used to encrypt the Person object.
234
+
235
+ Updates must use the same dataEncryptionKeyId.
236
+ format: uuid
237
+
238
+ DataEncryptionKeyResponse:
239
+ type: object
240
+ required:
241
+ - encryptedDataEncryptionKeys
242
+ - transmissionKey
243
+ - createdOn
244
+ - lastModified
245
+ properties:
246
+ createdOn:
247
+ description: Time data was first stored
248
+ type: string
249
+ format: date-time
250
+ lastModified:
251
+ description: Time data was last modified
252
+ type: string
253
+ format: date-time
254
+ encryptedDataEncryptionKeys:
255
+ type: array
256
+ items:
257
+ $ref: '#/components/schemas/EncryptedDataEncryptionKey'
258
+ transmissionKey:
259
+ type: string
260
+ description: |
261
+ A PEM formatted public key to use when transmitting data to Person service.
262
+ Encrypt the data encryption key used to encrypt data being sent using the transmissionKey.
263
+
264
+ DataEncryptionKeyRequest:
265
+ type: object
266
+ additionalProperties: false
267
+ required:
268
+ - publicKeys
269
+ properties:
270
+ publicKeys:
271
+ type: array
272
+ minItems: 1
273
+ description: |
274
+ List of public keys in PEM format.
275
+
276
+ Associated private keys can be used to decrypt person data encrypted by Person Service.
277
+ items:
278
+ $ref: '#/components/schemas/PublicKey'
279
+
280
+ PersonRequest:
281
+ type: object
282
+ additionalProperties: false
283
+ required:
284
+ - dataEncryptionKeyId
285
+ - encryptedDataEncryptionKey
286
+ - person
287
+ properties:
288
+ dataEncryptionKeyId:
289
+ $ref: '#/components/schemas/DataEncryptionKeyId'
290
+ encryptedDataEncryptionKey:
291
+ description: Encrypted version of AES-256 DEK
292
+ type: string
293
+ person:
294
+ $ref: '#/components/schemas/Person'
295
+
296
+ PersonRecord:
297
+ type: object
298
+ additionalProperties: false
299
+ description: Encrypted version of object stored with created on and last modified metadata.
300
+ required:
301
+ - createdOn
302
+ - updatedOn
303
+ - person
304
+ properties:
305
+ createdOn:
306
+ description: Time data was first stored
307
+ type: string
308
+ format: date-time
309
+ updatedOn:
310
+ description: Time data was last stored
311
+ type: string
312
+ format: date-time
313
+ lastModified:
314
+ description: Time data was last stored (deprecated, use updatedOn)
315
+ deprecated: true
316
+ type: string
317
+ format: date-time
318
+ person:
319
+ $ref: '#/components/schemas/Person'
320
+
321
+ PersonResponse:
322
+ type: object
323
+ additionalProperties: false
324
+ description: |
325
+ Encrypted version of object stored and related ids and metadata. A encryptedDataEncryptionKey is included if
326
+ a publicKeyHash query parameter is supplied as part of request.
327
+ required:
328
+ - dataEncryptionKeyId
329
+ - storageKeyId
330
+ - createdOn
331
+ - updatedOn
332
+ - person
333
+ properties:
334
+ dataEncryptionKeyId:
335
+ $ref: '#/components/schemas/DataEncryptionKeyId'
336
+ storageKeyId:
337
+ type: string
338
+ description: |
339
+ DEK's non-derived identifier to be used by Check Digit services only.
340
+ encryptedDataEncryptionKey:
341
+ description: |
342
+ Encrypted DEK matching the publicKeyId sent in the request. Used to decrypt values in the Person object.
343
+ type: string
344
+ createdOn:
345
+ description: Time data was first stored
346
+ type: string
347
+ format: date-time
348
+ updatedOn:
349
+ description: Time data was last stored
350
+ type: string
351
+ format: date-time
352
+ lastModified:
353
+ description: Time data was last stored (deprecated, use updatedOn)
354
+ deprecated: true
355
+ type: string
356
+ format: date-time
357
+ person:
358
+ $ref: '#/components/schemas/Person'
359
+
360
+ PersonMaskedResponse:
361
+ type: object
362
+ additionalProperties: false
363
+ description: |
364
+ Encrypted version of object stored and related ids and metadata. A encryptedDataEncryptionKey is included if
365
+ a publicKeyHash query parameter is supplied as part of request.
366
+ required:
367
+ - createdOn
368
+ - updatedOn
369
+ - person
370
+ properties:
371
+ createdOn:
372
+ description: Time data was first stored
373
+ type: string
374
+ format: date-time
375
+ updatedOn:
376
+ description: Time data was last stored
377
+ type: string
378
+ format: date-time
379
+ person:
380
+ $ref: '#/components/schemas/PersonMasked'
381
+
382
+ PhoneType:
383
+ type: string
384
+ description: Type of phone number.
385
+ enum:
386
+ - HOME
387
+ - WORK
388
+ - MOBILE
389
+ - FAX
390
+ - MAIN
391
+ - OTHER
392
+
393
+ PersonMasked:
394
+ type: object
395
+ additionalProperties: false
396
+ description: |
397
+ This object includes masked person data.
398
+ properties:
399
+ company:
400
+ type: string
401
+ description: Masked company name.
402
+ firstName:
403
+ minLength: 1
404
+ type: string
405
+ description: Masked first name.
406
+ middleName:
407
+ minLength: 1
408
+ type: string
409
+ description: Masked middle name.
410
+ lastName:
411
+ minLength: 1
412
+ type: string
413
+ description: Masked last name.
414
+ addresses:
415
+ type: array
416
+ description: Masked address information.
417
+ items:
418
+ $ref: '#/components/schemas/AddressMasked'
419
+ phones:
420
+ type: array
421
+ description: Masked phone information.
422
+ items:
423
+ required:
424
+ - number
425
+ - type
426
+ type: object
427
+ properties:
428
+ type:
429
+ $ref: '#/components/schemas/PhoneType'
430
+ number:
431
+ minLength: 1
432
+ type: string
433
+ description: Masked phone number.
434
+ email:
435
+ minLength: 1
436
+ type: string
437
+ description: Masked email address.
438
+ language:
439
+ minLength: 1
440
+ type: string
441
+ description: Unmasked language preference.
442
+ timeZone:
443
+ minLength: 1
444
+ type: string
445
+ description: Unmasked time zone preference.
446
+
447
+ EncryptedDataEncryptionKey:
448
+ type: object
449
+ additionalProperties: false
450
+ description: |
451
+ An object that includes an encrypted data encryption key and a hashed version of the public key used to encrypt it.
452
+ required:
453
+ - publicKeyHash
454
+ - encryptedDataEncryptionKey
455
+ properties:
456
+ publicKeyHash:
457
+ $ref: '#/components/schemas/PublicKeyHash'
458
+ encryptedDataEncryptionKey:
459
+ description: Data encryption key encrypted with a public key.
460
+ type: string
461
+
462
+ PublicKeyHash:
463
+ type: string
464
+ description: UUID derived using @checkdigit/hash
465
+ format: uuid
466
+ example: '15a85f64-5717-4562-b3fc-2c963f66afa6'
467
+
468
+ Person:
469
+ type: object
470
+ additionalProperties: false
471
+ properties:
472
+ company:
473
+ minLength: 1
474
+ type: string
475
+ description: Encrypted company name using the AES algorithm
476
+ title:
477
+ minLength: 1
478
+ type: string
479
+ description: Encrypted title using the AES algorithm
480
+ firstName:
481
+ minLength: 1
482
+ type: string
483
+ description: Encrypted first name using the AES algorithm
484
+ middleName:
485
+ minLength: 1
486
+ type: string
487
+ description: Encrypted middle name using the AES algorithm
488
+ lastName:
489
+ minLength: 1
490
+ type: string
491
+ description: Encrypted last name using the AES algorithm
492
+ addresses:
493
+ type: array
494
+ items:
495
+ $ref: '#/components/schemas/Address'
496
+ phones:
497
+ type: array
498
+ items:
499
+ $ref: '#/components/schemas/Phone'
500
+ email:
501
+ minLength: 1
502
+ type: string
503
+ description: Encrypted email address using the AES algorithm
504
+ language:
505
+ minLength: 1
506
+ type: string
507
+ description: User's language preference
508
+ timeZone:
509
+ minLength: 1
510
+ type: string
511
+ description: User's timezone
512
+
513
+ History:
514
+ type: object
515
+ additionalProperties: false
516
+ required:
517
+ - updates
518
+ properties:
519
+ dataEncryptionKeyId:
520
+ type: string
521
+ description: |
522
+ Reference to encryption keys Person Service used to encrypt the Person object.
523
+
524
+ Updates must use the same dataEncryptionKeyId.
525
+ format: uuid
526
+ storageKeyId:
527
+ type: string
528
+ description: |
529
+ DEK's non-derived identifier to be used by Check Digit services only.
530
+ encryptedDataEncryptionKey:
531
+ description: |
532
+ Encrypted DEK matching the publicKeyId sent in the request. Used to decrypt all the items in the list.
533
+ type: string
534
+ updates:
535
+ type: array
536
+ description: |
537
+ A list of PersonRecord objects. Each object represents a change to data in the Person object.
538
+ Objects are sorted by the lastModified date with the most recent object first.
539
+ items:
540
+ $ref: '#/components/schemas/PersonRecord'
541
+
542
+ Address:
543
+ required:
544
+ - country
545
+ - streetLines
546
+ - type
547
+ type: object
548
+ properties:
549
+ type:
550
+ type: string
551
+ description: Type of address
552
+ enum:
553
+ - BILLING
554
+ - SHIPPING
555
+ - STATEMENTS
556
+ - OTHER
557
+ streetLines:
558
+ maxItems: 4
559
+ minItems: 1
560
+ type: array
561
+ description: Encrypted street lines using the AES algorithm
562
+ items:
563
+ minLength: 1
564
+ type: string
565
+ description: Street line
566
+ city:
567
+ minLength: 1
568
+ type: string
569
+ description: City
570
+ region:
571
+ minLength: 1
572
+ type: string
573
+ description: Region, State or Province
574
+ postalCode:
575
+ minLength: 1
576
+ type: string
577
+ description: |
578
+ AES encrypted postal code. This value should contain only alphanumeric characters.
579
+ Including non-alphanumeric characters will result in a 400 when sent as a request.
580
+ reportablePostalCode:
581
+ type: string
582
+ description: Postal code for reporting purposes.
583
+ country:
584
+ $ref: '#/components/schemas/Country'
585
+
586
+ AddressMasked:
587
+ type: object
588
+ required:
589
+ - country
590
+ - streetLines
591
+ - type
592
+ properties:
593
+ type:
594
+ type: string
595
+ description: Type of address.
596
+ enum:
597
+ - BILLING
598
+ - SHIPPING
599
+ - STATEMENTS
600
+ - OTHER
601
+ streetLines:
602
+ maxItems: 4
603
+ minItems: 1
604
+ type: array
605
+ description: Street lines with all non-numeric characters masked.
606
+ items:
607
+ minLength: 1
608
+ type: string
609
+ description: Masked street line.
610
+ city:
611
+ minLength: 1
612
+ type: string
613
+ description: Unmasked city.
614
+ region:
615
+ minLength: 1
616
+ type: string
617
+ description: Unmasked region, state or province.
618
+ country:
619
+ $ref: '#/components/schemas/Country'
620
+ postalCodeLongHash:
621
+ minLength: 1
622
+ type: string
623
+ description: Long-form postal code hashed using @checkdigit/hash.
624
+ postalCodeShortHash:
625
+ minLength: 1
626
+ type: string
627
+ description: Short-form postal code hashed using @checkdigit/hash.
628
+
629
+ Phone:
630
+ required:
631
+ - number
632
+ - type
633
+ type: object
634
+ properties:
635
+ type:
636
+ $ref: '#/components/schemas/PhoneType'
637
+ number:
638
+ minLength: 1
639
+ type: string
640
+ description: Encrypted phone number using the AES algorithm
641
+ extension:
642
+ minLength: 1
643
+ type: string
644
+ description: Encrypted phone number extension using the AES algorithm
645
+
646
+ Error:
647
+ type: object
648
+ properties:
649
+ message:
650
+ minLength: 1
651
+ type: string
652
+ code:
653
+ type: string
654
+ description: Error message
655
+
656
+ PublicKey:
657
+ description: RSA generated public key in PEM format
658
+ type: string
659
+ example: |
660
+ -----BEGIN PUBLIC KEY-----
661
+ MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwm2sxmRdTF7ZIBA6+ngO
662
+ 8jOTCHmID0PpQB1q85+hrcLSfB1rWY9bzNNLabBo/ajDnA4Pcadq/x6gpg70qZcR
663
+ 9Wxm6TttKzBPZsxasGXgSTDqEi2KcYZgq1mL4qyxUvyIms7/llGy+W9b5huZaVcO
664
+ xdT1tw/zctbOhb6S2t5vH+zkta/2ncUXjG7i8XdLsJ1qe4K1kYbA4KVkOMmAtw7O
665
+ 4STk0TZDD0YARdmrciorJjbIVt0Xj1CrYQ5QbDGrlfeXgrcZwX5f9wT2MnKlY5oZ
666
+ 5Wtb57oGtLkVf8g6vN/2jGtAmOmHK2hHwNd/+zUet5G/S5uwEli4RgMPP4pUoKgd
667
+ GQIDAQAB
668
+ -----END PUBLIC KEY-----
669
+
670
+ PublicKeyResponse:
671
+ description: |
672
+ This object contains the rsa generated public key for the Person Service. This public key must be used
673
+ when transmitting encrypted data to Person Service APIs.
674
+ type: object
675
+ required:
676
+ - publicKey
677
+ properties:
678
+ publicKey:
679
+ $ref: '#/components/schemas/PublicKey'
680
+
681
+ Country:
682
+ type: string
683
+ description: Country ISO 3166-1 alpha-2 codes
684
+ enum:
685
+ - AD
686
+ - AE
687
+ - AF
688
+ - AG
689
+ - AI
690
+ - AL
691
+ - AM
692
+ - AO
693
+ - AQ
694
+ - AR
695
+ - AS
696
+ - AT
697
+ - AU
698
+ - AW
699
+ - AX
700
+ - AZ
701
+ - BA
702
+ - BB
703
+ - BD
704
+ - BE
705
+ - BF
706
+ - BG
707
+ - BH
708
+ - BI
709
+ - BJ
710
+ - BL
711
+ - BM
712
+ - BN
713
+ - BO
714
+ - BQ
715
+ - BR
716
+ - BS
717
+ - BT
718
+ - BV
719
+ - BW
720
+ - BY
721
+ - BZ
722
+ - CA
723
+ - CC
724
+ - CD
725
+ - CF
726
+ - CG
727
+ - CH
728
+ - CI
729
+ - CK
730
+ - CL
731
+ - CM
732
+ - CN
733
+ - CO
734
+ - CR
735
+ - CU
736
+ - CV
737
+ - CW
738
+ - CX
739
+ - CY
740
+ - CZ
741
+ - DE
742
+ - DJ
743
+ - DK
744
+ - DM
745
+ - DO
746
+ - DZ
747
+ - EC
748
+ - EE
749
+ - EG
750
+ - EH
751
+ - ER
752
+ - ES
753
+ - ET
754
+ - FI
755
+ - FJ
756
+ - FK
757
+ - FM
758
+ - FO
759
+ - FR
760
+ - GA
761
+ - GB
762
+ - GD
763
+ - GE
764
+ - GF
765
+ - GG
766
+ - GH
767
+ - GI
768
+ - GL
769
+ - GM
770
+ - GN
771
+ - GP
772
+ - GQ
773
+ - GR
774
+ - GS
775
+ - GT
776
+ - GU
777
+ - GW
778
+ - GY
779
+ - HK
780
+ - HM
781
+ - HN
782
+ - HR
783
+ - HT
784
+ - HU
785
+ - ID
786
+ - IE
787
+ - IL
788
+ - IM
789
+ - IN
790
+ - IO
791
+ - IQ
792
+ - IR
793
+ - IS
794
+ - IT
795
+ - JE
796
+ - JM
797
+ - JO
798
+ - JP
799
+ - KE
800
+ - KG
801
+ - KH
802
+ - KI
803
+ - KM
804
+ - KN
805
+ - KP
806
+ - KR
807
+ - KW
808
+ - KY
809
+ - KZ
810
+ - LA
811
+ - LB
812
+ - LC
813
+ - LI
814
+ - LK
815
+ - LR
816
+ - LS
817
+ - LT
818
+ - LU
819
+ - LV
820
+ - LY
821
+ - MA
822
+ - MC
823
+ - MD
824
+ - ME
825
+ - MF
826
+ - MG
827
+ - MH
828
+ - MK
829
+ - ML
830
+ - MM
831
+ - MN
832
+ - MO
833
+ - MP
834
+ - MQ
835
+ - MR
836
+ - MS
837
+ - MT
838
+ - MU
839
+ - MV
840
+ - MW
841
+ - MX
842
+ - MY
843
+ - MZ
844
+ - NA
845
+ - NC
846
+ - NE
847
+ - NF
848
+ - NG
849
+ - NI
850
+ - NL
851
+ - NO
852
+ - NP
853
+ - NR
854
+ - NU
855
+ - NZ
856
+ - OM
857
+ - PA
858
+ - PE
859
+ - PF
860
+ - PG
861
+ - PH
862
+ - PK
863
+ - PL
864
+ - PM
865
+ - PN
866
+ - PR
867
+ - PS
868
+ - PT
869
+ - PW
870
+ - PY
871
+ - QA
872
+ - RE
873
+ - RO
874
+ - RS
875
+ - RU
876
+ - RW
877
+ - SA
878
+ - SB
879
+ - SC
880
+ - SD
881
+ - SE
882
+ - SG
883
+ - SH
884
+ - SI
885
+ - SJ
886
+ - SK
887
+ - SL
888
+ - SM
889
+ - SN
890
+ - SO
891
+ - SR
892
+ - SS
893
+ - ST
894
+ - SV
895
+ - SX
896
+ - SY
897
+ - SZ
898
+ - TC
899
+ - TD
900
+ - TF
901
+ - TG
902
+ - TH
903
+ - TJ
904
+ - TK
905
+ - TL
906
+ - TM
907
+ - TN
908
+ - TO
909
+ - TR
910
+ - TT
911
+ - TV
912
+ - TW
913
+ - TZ
914
+ - UA
915
+ - UG
916
+ - UM
917
+ - US
918
+ - UY
919
+ - UZ
920
+ - VA
921
+ - VC
922
+ - VE
923
+ - VG
924
+ - VI
925
+ - VN
926
+ - VU
927
+ - WF
928
+ - WS
929
+ - YE
930
+ - YT
931
+ - ZA
932
+ - ZM
933
+ - ZW
934
+
935
+ parameters:
936
+ at:
937
+ name: at
938
+ in: query
939
+ description: Return data as it was at this time. Must be at least 1 second
940
+ in the past.
941
+ required: true
942
+ schema:
943
+ type: string
944
+ format: date-time
945
+
946
+ dataEncryptionKeyId:
947
+ name: dataEncryptionKeyId
948
+ in: path
949
+ description: UUID for key
950
+ required: true
951
+ schema:
952
+ type: string
953
+ format: uuid
954
+
955
+ personId:
956
+ name: personId
957
+ in: path
958
+ description: UUID for person
959
+ required: true
960
+ schema:
961
+ type: string
962
+ format: uuid
963
+
964
+ publicKeyHash:
965
+ name: publicKeyHash
966
+ in: query
967
+ description: UUID derived using @checkdigit/hash
968
+ required: false
969
+ schema:
970
+ type: string
971
+ format: uuid
972
+ example: '15a85f64-5717-4562-b3fc-2c963f66afa6'
973
+
974
+ ifMatch:
975
+ name: If-Match
976
+ in: header
977
+ description: |
978
+ Required to make idempotent updates to a person.
979
+ schema:
980
+ type: string
981
+
982
+ createdOn:
983
+ name: Created-On
984
+ in: header
985
+ description: |
986
+ Created-On header, establishes createdOn and last-modified values for the created data.
987
+ If both Created-On and Last-Modified values are provided, the value provided in Created-On
988
+ will be used for creating the data and the value provided in Last-Modified will be ignored.
989
+ example: '1970-01-01T00:00:00.000Z'
990
+ required: false
991
+ schema:
992
+ type: string
993
+ format: date-time
994
+
995
+ lastModified:
996
+ name: Last-Modified
997
+ in: header
998
+ description: Can be used to set createdOn or lastModified when creating or updating data respectively.
999
+ required: false
1000
+ schema:
1001
+ type: string
1002
+ format: date-time
1003
+
1004
+ toDate:
1005
+ name: toDate
1006
+ in: query
1007
+ description: Returns items created before this time. Must be at least 1 second in the past
1008
+ required: true
1009
+ schema:
1010
+ type: string
1011
+ description: Date time in simplified extended ISO format
1012
+ format: date-time
1013
+
1014
+ fromDate:
1015
+ name: fromDate
1016
+ in: query
1017
+ description: Returns elements created at or after this time. Must be at least 1 second in the past
1018
+ required: false
1019
+ schema:
1020
+ type: string
1021
+ description: Date time in simplified extended ISO format
1022
+ default: '1970-01-01T00:00:00.000Z'
1023
+ format: date-time
1024
+
1025
+ requestBodies:
1026
+ PersonRequest:
1027
+ required: true
1028
+ content:
1029
+ application/json:
1030
+ schema:
1031
+ $ref: '#/components/schemas/PersonRequest'
1032
+
1033
+ DataEncryptionKeyRequest:
1034
+ required: true
1035
+ content:
1036
+ application/json:
1037
+ schema:
1038
+ $ref: '#/components/schemas/DataEncryptionKeyRequest'
1039
+
1040
+ responses:
1041
+ Ping:
1042
+ description: ping successful response
1043
+ content:
1044
+ application/json:
1045
+ schema:
1046
+ $ref: '#/components/schemas/Ping'
1047
+
1048
+ PublicKeyResponse:
1049
+ description: Public Key response.
1050
+ content:
1051
+ application/json:
1052
+ schema:
1053
+ $ref: '#/components/schemas/PublicKeyResponse'
1054
+ headers:
1055
+ Created-On:
1056
+ description: CreatedOn timestamp for the newly created record
1057
+ required: true
1058
+ schema:
1059
+ type: string
1060
+ format: date-time
1061
+
1062
+ Updated-On:
1063
+ description: UpdatedOn timestamp for the existing record
1064
+ required: true
1065
+ schema:
1066
+ type: string
1067
+ format: date-time
1068
+
1069
+ DataEncryptionKeyResponse:
1070
+ description: |
1071
+ content:
1072
+ application/json:
1073
+ schema:
1074
+ $ref: '#/components/schemas/DataEncryptionKeyResponse'
1075
+ headers:
1076
+ Created-On:
1077
+ $ref: '#/components/headers/Created-On'
1078
+ Updated-On:
1079
+ $ref: '#/components/headers/Updated-On'
1080
+ Last-Modified:
1081
+ $ref: '#/components/headers/Last-Modified'
1082
+
1083
+ PersonResponse:
1084
+ description: PersonResponse response.
1085
+ content:
1086
+ application/json:
1087
+ schema:
1088
+ $ref: '#/components/schemas/PersonResponse'
1089
+ headers:
1090
+ Last-Modified:
1091
+ $ref: '#/components/headers/Last-Modified'
1092
+ Created-On:
1093
+ $ref: '#/components/headers/Created-On'
1094
+ Updated-On:
1095
+ $ref: '#/components/headers/Updated-On'
1096
+ ETag:
1097
+ $ref: '#/components/headers/ETag'
1098
+
1099
+ PersonMaskedResponse:
1100
+ description: PersonMaskedResponse response.
1101
+ content:
1102
+ application/json:
1103
+ schema:
1104
+ $ref: '#/components/schemas/PersonMaskedResponse'
1105
+ headers:
1106
+ Last-Modified:
1107
+ $ref: '#/components/headers/Last-Modified'
1108
+ Created-On:
1109
+ $ref: '#/components/headers/Created-On'
1110
+ Updated-On:
1111
+ $ref: '#/components/headers/Updated-On'
1112
+ ETag:
1113
+ $ref: '#/components/headers/ETag'
1114
+
1115
+ PreconditionFailed:
1116
+ description: Precondition failed
1117
+
1118
+ NotFound:
1119
+ description: Not found
1120
+
1121
+ ServerError:
1122
+ description: Server Error response
1123
+ content:
1124
+ application/json:
1125
+ schema:
1126
+ $ref: '#/components/schemas/Error'
1127
+
1128
+ History:
1129
+ description: A successful history response
1130
+ content:
1131
+ application/json:
1132
+ schema:
1133
+ $ref: '#/components/schemas/History'
1134
+
1135
+ headers:
1136
+ ETag:
1137
+ description: Version information
1138
+ schema:
1139
+ type: string
1140
+
1141
+ Last-Modified:
1142
+ description: Date and time at which the record was last modified
1143
+ schema:
1144
+ type: string
1145
+ format: date-time
1146
+
1147
+ Created-On:
1148
+ description: CreatedOn timestamp for the newly created record
1149
+ schema:
1150
+ type: string
1151
+ format: date-time
1152
+
1153
+ Updated-On:
1154
+ description: UpdatedOn timestamp for the existing record
1155
+ schema:
1156
+ type: string
1157
+ format: date-time