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

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 +328 -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 +488 -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,1149 @@
1
+ openapi: 3.0.0
2
+ info:
3
+ title: Payment Card
4
+ version: 2.4.0
5
+ contact:
6
+ name: Check Digit
7
+ description: |
8
+ ## Description
9
+ Securely create and obtain cards by id or card number.
10
+
11
+ ## Other features
12
+ - Update active, state, block, lock, and capture statuses
13
+ - Retrieve card record by hashed card number
14
+ - Retrieve card history
15
+ - Update user defined PIN (by updating pin-offset)
16
+ - Retrieve card number decryptable by a caller not involved in card creation
17
+
18
+ © Check Digit LLC. 2021-2024
19
+
20
+ servers:
21
+ - url: /payment-card/v2
22
+
23
+ tags:
24
+ - name: Service Health
25
+ - name: API
26
+
27
+ x-firehose-logged: false
28
+
29
+ paths:
30
+ /ping:
31
+ get:
32
+ operationId: 'ping-get'
33
+ tags:
34
+ - Service Health
35
+ description: Tests the availability of the service and returns the current server time
36
+ responses:
37
+ '200':
38
+ $ref: '#/components/responses/Ping'
39
+ default:
40
+ $ref: '#/components/responses/ServerError'
41
+
42
+ /tenant/{tenantId}/public-key:
43
+ get:
44
+ operationId: 'public-key-get'
45
+ tags:
46
+ - API
47
+ description: Retrieves Payment Card Service's rsa public key. This key is used to securely transmit data to Payment Card Service APIs.
48
+ parameters:
49
+ - $ref: '#/components/parameters/tenantId'
50
+ responses:
51
+ '200':
52
+ $ref: '#/components/responses/PublicKeyResponse'
53
+ default:
54
+ $ref: '#/components/responses/ServerError'
55
+
56
+ /tenant/{tenantId}/data-encryption-key/{dataEncryptionKeyId}:
57
+ get:
58
+ operationId: 'data-encryption-key-get'
59
+ tags:
60
+ - API
61
+ description: |
62
+ Retrieves data encryption keys. Data encryption keys are RSA encrypted and paired with a hashed version of
63
+ the public key used to encrypt them.
64
+ parameters:
65
+ - $ref: '#/components/parameters/tenantId'
66
+ - $ref: '#/components/parameters/dataEncryptionKeyId'
67
+ responses:
68
+ '200':
69
+ $ref: '#/components/responses/DataEncryptionKeyResponse'
70
+ '404':
71
+ $ref: '#/components/responses/NotFound'
72
+ default:
73
+ $ref: '#/components/responses/ServerError'
74
+ put:
75
+ x-firehose-logged: true
76
+ operationId: 'data-encryption-key-put'
77
+ tags:
78
+ - API
79
+ description: |
80
+ Creates data encryption keys used by Payment Card service to encrypt the Card object. The dataEncryptionKeyId is included
81
+ in the NewCardRequest when creating a Payment Card object.
82
+
83
+ Data encryption keys can be reused when creating new Payment Card objects. This is particularly useful for batch
84
+ operations.
85
+ parameters:
86
+ - $ref: '#/components/parameters/tenantId'
87
+ - $ref: '#/components/parameters/dataEncryptionKeyId'
88
+ requestBody:
89
+ $ref: '#/components/requestBodies/DataEncryptionKeyRequest'
90
+ responses:
91
+ '200':
92
+ $ref: '#/components/responses/DataEncryptionKeyResponse'
93
+ default:
94
+ $ref: '#/components/responses/ServerError'
95
+
96
+ /tenant/{tenantId}/card:
97
+ get:
98
+ operationId: 'card-query'
99
+ tags:
100
+ - API
101
+ description: |
102
+ Retrieves cards by card number. Card number must be hashed using @checkdigit/hash.
103
+ parameters:
104
+ - $ref: '#/components/parameters/tenantId'
105
+ - $ref: '#/components/parameters/cardNumberHash'
106
+ - $ref: '#/components/parameters/at'
107
+ responses:
108
+ '200':
109
+ $ref: '#/components/responses/Query'
110
+ default:
111
+ $ref: '#/components/responses/ServerError'
112
+
113
+ /tenant/{tenantId}/card/{cardId}:
114
+ get:
115
+ tags:
116
+ - API
117
+ operationId: 'card-get'
118
+ description: Retrieves a card by id.
119
+ parameters:
120
+ - $ref: '#/components/parameters/tenantId'
121
+ - $ref: '#/components/parameters/cardId'
122
+ - $ref: '#/components/parameters/at'
123
+ - $ref: '#/components/parameters/publicKeyHashQuery'
124
+ responses:
125
+ '200':
126
+ $ref: '#/components/responses/CardResponse'
127
+ '404':
128
+ $ref: '#/components/responses/NotFound'
129
+ default:
130
+ $ref: '#/components/responses/ServerError'
131
+ put:
132
+ x-firehose-logged: true
133
+ tags:
134
+ - API
135
+ operationId: 'card-put'
136
+ description: Creates a new card.
137
+ parameters:
138
+ - $ref: '#/components/parameters/tenantId'
139
+ - $ref: '#/components/parameters/cardId'
140
+ - $ref: '#/components/parameters/createdOn'
141
+ requestBody:
142
+ $ref: '#/components/requestBodies/NewCardRequest'
143
+ responses:
144
+ '200':
145
+ $ref: '#/components/responses/CardResponse'
146
+ '409':
147
+ $ref: '#/components/responses/Conflict'
148
+ '412':
149
+ $ref: '#/components/responses/PreconditionFailed'
150
+ default:
151
+ $ref: '#/components/responses/ServerError'
152
+
153
+ /tenant/{tenantId}/card/{cardId}/number:
154
+ put:
155
+ x-firehose-logged: true
156
+ tags:
157
+ - API
158
+ operationId: 'card-number-put'
159
+ description: Creates new card with a card number
160
+ parameters:
161
+ - $ref: '#/components/parameters/tenantId'
162
+ - $ref: '#/components/parameters/cardId'
163
+ - $ref: '#/components/parameters/createdOn'
164
+ requestBody:
165
+ $ref: '#/components/requestBodies/NewCardRequestWithCardNumber'
166
+ responses:
167
+ '200':
168
+ $ref: '#/components/responses/CardResponse'
169
+ '409':
170
+ $ref: '#/components/responses/Conflict'
171
+ '412':
172
+ $ref: '#/components/responses/PreconditionFailed'
173
+ default:
174
+ $ref: '#/components/responses/ServerError'
175
+
176
+ /tenant/{tenantId}/card/{cardId}/active/{activeStatus}:
177
+ put:
178
+ x-firehose-logged: true
179
+ tags:
180
+ - API
181
+ operationId: 'card-active-put'
182
+ description: Updates active status
183
+ parameters:
184
+ - $ref: '#/components/parameters/tenantId'
185
+ - $ref: '#/components/parameters/cardId'
186
+ - $ref: '#/components/parameters/activeStatus'
187
+ - $ref: '#/components/parameters/createdOn'
188
+ - $ref: '#/components/parameters/ifMatch'
189
+ responses:
190
+ '204':
191
+ $ref: '#/components/responses/NoContent'
192
+ '409':
193
+ $ref: '#/components/responses/Conflict'
194
+ '412':
195
+ $ref: '#/components/responses/PreconditionFailed'
196
+ '422':
197
+ $ref: '#/components/responses/UnprocessableContent'
198
+ default:
199
+ $ref: '#/components/responses/ServerError'
200
+
201
+ /tenant/{tenantId}/card/{cardId}/block/{blockStatus}:
202
+ put:
203
+ x-firehose-logged: true
204
+ tags:
205
+ - API
206
+ operationId: 'card-block-put'
207
+ description: Updates block status
208
+ parameters:
209
+ - $ref: '#/components/parameters/tenantId'
210
+ - $ref: '#/components/parameters/cardId'
211
+ - $ref: '#/components/parameters/blockStatus'
212
+ - $ref: '#/components/parameters/createdOn'
213
+ - $ref: '#/components/parameters/ifMatch'
214
+ responses:
215
+ '204':
216
+ $ref: '#/components/responses/NoContent'
217
+ '409':
218
+ $ref: '#/components/responses/Conflict'
219
+ '412':
220
+ $ref: '#/components/responses/PreconditionFailed'
221
+ '422':
222
+ $ref: '#/components/responses/UnprocessableContent'
223
+ default:
224
+ $ref: '#/components/responses/ServerError'
225
+
226
+ /tenant/{tenantId}/card/{cardId}/capture/{captureStatus}:
227
+ put:
228
+ x-firehose-logged: true
229
+ tags:
230
+ - API
231
+ operationId: 'card-capture-put'
232
+ description: Updates capture status
233
+ parameters:
234
+ - $ref: '#/components/parameters/tenantId'
235
+ - $ref: '#/components/parameters/cardId'
236
+ - $ref: '#/components/parameters/captureStatus'
237
+ - $ref: '#/components/parameters/createdOn'
238
+ - $ref: '#/components/parameters/ifMatch'
239
+ responses:
240
+ '204':
241
+ $ref: '#/components/responses/NoContent'
242
+ '409':
243
+ $ref: '#/components/responses/Conflict'
244
+ '412':
245
+ $ref: '#/components/responses/PreconditionFailed'
246
+ '422':
247
+ $ref: '#/components/responses/UnprocessableContent'
248
+ default:
249
+ $ref: '#/components/responses/ServerError'
250
+
251
+ /tenant/{tenantId}/card/{cardId}/history:
252
+ get:
253
+ tags:
254
+ - API
255
+ operationId: 'card-history-get'
256
+ description: Obtains card history by id
257
+ parameters:
258
+ - $ref: '#/components/parameters/tenantId'
259
+ - $ref: '#/components/parameters/cardId'
260
+ - $ref: '#/components/parameters/fromDate'
261
+ - $ref: '#/components/parameters/toDate'
262
+ - $ref: '#/components/parameters/publicKeyHashQuery'
263
+ responses:
264
+ '200':
265
+ $ref: '#/components/responses/History'
266
+ '404':
267
+ $ref: '#/components/responses/NotFound'
268
+ default:
269
+ $ref: '#/components/responses/ServerError'
270
+
271
+ /tenant/{tenantId}/card/{cardId}/lock/{lockStatus}:
272
+ put:
273
+ x-firehose-logged: true
274
+ tags:
275
+ - API
276
+ operationId: 'card-lock-put'
277
+ description: Updates lock status
278
+ parameters:
279
+ - $ref: '#/components/parameters/tenantId'
280
+ - $ref: '#/components/parameters/cardId'
281
+ - $ref: '#/components/parameters/lockStatus'
282
+ - $ref: '#/components/parameters/createdOn'
283
+ - $ref: '#/components/parameters/ifMatch'
284
+ responses:
285
+ '204':
286
+ $ref: '#/components/responses/NoContent'
287
+ '409':
288
+ $ref: '#/components/responses/Conflict'
289
+ '412':
290
+ $ref: '#/components/responses/PreconditionFailed'
291
+ '422':
292
+ $ref: '#/components/responses/UnprocessableContent'
293
+ default:
294
+ $ref: '#/components/responses/ServerError'
295
+
296
+ /tenant/{tenantId}/card/{cardId}/pin-offset:
297
+ put:
298
+ x-firehose-logged: true
299
+ tags:
300
+ - API
301
+ operationId: 'card-pin-offset-put'
302
+ description: Updates pin-offset using a one-time use pin-offset-key
303
+ parameters:
304
+ - $ref: '#/components/parameters/tenantId'
305
+ - $ref: '#/components/parameters/cardId'
306
+ - $ref: '#/components/parameters/createdOn'
307
+ - $ref: '#/components/parameters/ifMatch'
308
+ requestBody:
309
+ $ref: '#/components/requestBodies/PinOffsetRequest'
310
+ responses:
311
+ '204':
312
+ $ref: '#/components/responses/NoContent'
313
+ '409':
314
+ $ref: '#/components/responses/Conflict'
315
+ '412':
316
+ $ref: '#/components/responses/PreconditionFailed'
317
+ default:
318
+ $ref: '#/components/responses/ServerError'
319
+
320
+ /tenant/{tenantId}/card/{cardId}/state/{stateStatus}:
321
+ put:
322
+ x-firehose-logged: true
323
+ tags:
324
+ - API
325
+ operationId: 'card-state-put'
326
+ description: Updates state status
327
+ parameters:
328
+ - $ref: '#/components/parameters/tenantId'
329
+ - $ref: '#/components/parameters/cardId'
330
+ - $ref: '#/components/parameters/stateStatus'
331
+ - $ref: '#/components/parameters/createdOn'
332
+ - $ref: '#/components/parameters/ifMatch'
333
+ responses:
334
+ '204':
335
+ $ref: '#/components/responses/NoContent'
336
+ '409':
337
+ $ref: '#/components/responses/Conflict'
338
+ '412':
339
+ $ref: '#/components/responses/PreconditionFailed'
340
+ '422':
341
+ $ref: '#/components/responses/UnprocessableContent'
342
+ default:
343
+ $ref: '#/components/responses/ServerError'
344
+
345
+ /tenant/{tenantId}/card-number/{cardId}/key/{publicKeyHashPath}:
346
+ put:
347
+ tags:
348
+ - API
349
+ operationId: 'card-number-key-put'
350
+ description: |
351
+ Obtains an encrypted card number decryptable by caller's private key.
352
+ parameters:
353
+ - $ref: '#/components/parameters/tenantId'
354
+ - $ref: '#/components/parameters/cardId'
355
+ - $ref: '#/components/parameters/publicKeyHashPath'
356
+ requestBody:
357
+ $ref: '#/components/requestBodies/CardNumberRequest'
358
+ responses:
359
+ '200':
360
+ $ref: '#/components/responses/EncryptedCardNumber'
361
+ default:
362
+ $ref: '#/components/responses/ServerError'
363
+
364
+ /tenant/{tenantId}/pin-offset-key/{pinOffsetKeyId}:
365
+ put:
366
+ x-firehose-logged: true
367
+ tags:
368
+ - API
369
+ operationId: 'pin-offset-key-put'
370
+ description: Creates a one-time use transmission key to transmit the user defined pin during pin changes
371
+ parameters:
372
+ - $ref: '#/components/parameters/tenantId'
373
+ - $ref: '#/components/parameters/pinOffsetKeyId'
374
+ responses:
375
+ '200':
376
+ $ref: '#/components/responses/PinOffsetKey'
377
+ default:
378
+ $ref: '#/components/responses/ServerError'
379
+
380
+ components:
381
+ schemas:
382
+ ActiveStatus:
383
+ description: The active/inactive status for the card
384
+ type: string
385
+ enum:
386
+ - INACTIVE
387
+ - ACTIVE
388
+
389
+ Bin:
390
+ type: string
391
+ pattern: '^\d+$'
392
+ description: Bank Identification Number
393
+ minLength: 6
394
+ maxLength: 8
395
+
396
+ BlockStatus:
397
+ type: string
398
+ description: Whether the card is open or blocked for various reasons
399
+ enum:
400
+ - OPEN
401
+ - BLOCKED LOST OR STOLEN
402
+ - BLOCKED NO FRAUD
403
+ - BLOCKED WITH FRAUD
404
+
405
+ Card:
406
+ type: object
407
+ additionalProperties: false
408
+ required:
409
+ - bin
410
+ - last4
411
+ - expirationDate
412
+ - cardNumber
413
+ - serviceCode
414
+ - pinOffset
415
+ - sequenceNumber
416
+ - state
417
+ - active
418
+ - block
419
+ - lock
420
+ - capture
421
+ properties:
422
+ bin:
423
+ $ref: '#/components/schemas/Bin'
424
+ last4:
425
+ type: string
426
+ pattern: '^\d+$'
427
+ description: Last four digits of the card number
428
+ minLength: 4
429
+ maxLength: 4
430
+ expirationDate:
431
+ $ref: '#/components/schemas/ExpirationDate'
432
+ cardNumber:
433
+ type: string
434
+ description: Encrypted card number (PAN)
435
+ serviceCode:
436
+ type: string
437
+ pattern: '^\d+$'
438
+ description: Service code for the card
439
+ minLength: 3
440
+ maxLength: 3
441
+ pinOffset:
442
+ type: string
443
+ description: Pin offset for the card. Cards created using the Payment Card V1 API will return an encrypted pin offset.
444
+ sequenceNumber:
445
+ type: integer
446
+ description: Used to differentiate issuing the same card and expiration date on multiple plastics
447
+ state:
448
+ $ref: '#/components/schemas/StateStatus'
449
+ active:
450
+ $ref: '#/components/schemas/ActiveStatus'
451
+ block:
452
+ $ref: '#/components/schemas/BlockStatus'
453
+ lock:
454
+ $ref: '#/components/schemas/LockStatus'
455
+ capture:
456
+ type: boolean
457
+ description: Whether the card should be captured at next use
458
+ pinId:
459
+ type: string
460
+ description: Identifier for the PIN (Personal Identification Number) used for this card.
461
+
462
+ CardUpdate:
463
+ type: object
464
+ additionalProperties: false
465
+ required:
466
+ - card
467
+ - updatedOn
468
+ - createdOn
469
+ properties:
470
+ card:
471
+ $ref: '#/components/schemas/Card'
472
+ updatedOn:
473
+ type: string
474
+ description: Time data was last updated
475
+ format: date-time
476
+ createdOn:
477
+ description: Time encrypted data was first stored
478
+ type: string
479
+ format: date-time
480
+
481
+ CardResponse:
482
+ type: object
483
+ additionalProperties: false
484
+ required:
485
+ - dataEncryptionKeyId
486
+ - storageKeyId
487
+ - card
488
+ properties:
489
+ dataEncryptionKeyId:
490
+ $ref: '#/components/schemas/DataEncryptionKeyId'
491
+ storageKeyId:
492
+ $ref: '#/components/schemas/StorageKeyId'
493
+ encryptedDataEncryptionKey:
494
+ description: |
495
+ Encrypted DEK matching the publicKeyHash sent in the request. Used to decrypt values in the Card object.
496
+ type: string
497
+ card:
498
+ $ref: '#/components/schemas/Card'
499
+
500
+ CardQueryResponse:
501
+ type: object
502
+ additionalProperties: false
503
+ required:
504
+ - dataEncryptionKeyId
505
+ - storageKeyId
506
+ - cardId
507
+ - card
508
+ - updatedOn
509
+ - createdOn
510
+ properties:
511
+ dataEncryptionKeyId:
512
+ $ref: '#/components/schemas/DataEncryptionKeyId'
513
+ storageKeyId:
514
+ $ref: '#/components/schemas/StorageKeyId'
515
+ encryptedDataEncryptionKey:
516
+ description: |
517
+ Encrypted DEK matching the publicKeyHash sent in the request. Used to decrypt values in the Card object.
518
+ type: string
519
+ cardId:
520
+ $ref: '#/components/schemas/CardId'
521
+ card:
522
+ $ref: '#/components/schemas/Card'
523
+ updatedOn:
524
+ type: string
525
+ description: Time data was last updated
526
+ format: date-time
527
+ createdOn:
528
+ description: Time encrypted data was first stored
529
+ type: string
530
+ format: date-time
531
+
532
+ CardId:
533
+ type: string
534
+ description: Card identifier
535
+ format: uuid
536
+
537
+ Query:
538
+ description: Response from querying /card by cardNumberHash
539
+ type: object
540
+ required:
541
+ - cards
542
+ properties:
543
+ cards:
544
+ type: array
545
+ minItems: 0
546
+ items:
547
+ $ref: '#/components/schemas/CardQueryResponse'
548
+
549
+ CardNumberRequest:
550
+ type: object
551
+ additionalProperties: false
552
+ required:
553
+ - publicKey
554
+ properties:
555
+ publicKey:
556
+ $ref: '#/components/schemas/PublicKey'
557
+
558
+ EncryptedCardNumber:
559
+ type: object
560
+ additionalProperties: false
561
+ required:
562
+ - encryptedDataEncryptionKey
563
+ - cardNumber
564
+ properties:
565
+ encryptedDataEncryptionKey:
566
+ description: RSA encrypted data encryption key used to AES encrypt cardNumber.
567
+ type: string
568
+ cardNumber:
569
+ type: string
570
+ description: AES-256 encrypted card number
571
+
572
+ Error:
573
+ type: object
574
+ additionalProperties: false
575
+ description: Server error message
576
+ properties:
577
+ message:
578
+ type: string
579
+ code:
580
+ type: string
581
+
582
+ ExpirationDate:
583
+ type: string
584
+ pattern: '([0-9][0-9])(0[1-9]|1[0-2])'
585
+ format: YYMM
586
+ description: Expiration date for the card and will be assumed to be the last millisecond of the month
587
+ minLength: 4
588
+ maxLength: 4
589
+
590
+ DataEncryptionKeyId:
591
+ type: string
592
+ description: |
593
+ Reference to encryption keys Payment Card Service will use to encrypt the Card object.
594
+ format: uuid
595
+
596
+ DataEncryptionKeyRequest:
597
+ type: object
598
+ additionalProperties: false
599
+ required:
600
+ - publicKeys
601
+ properties:
602
+ publicKeys:
603
+ type: array
604
+ minItems: 1
605
+ description: |
606
+ List of public keys in PEM format.
607
+
608
+ Associated private keys can be used to decrypt card data encrypted by Payment Card Service.
609
+ items:
610
+ $ref: '#/components/schemas/PublicKey'
611
+
612
+ DataEncryptionKeyResponse:
613
+ type: object
614
+ required:
615
+ - encryptedDataEncryptionKeys
616
+ - createdOn
617
+ properties:
618
+ createdOn:
619
+ description: Time data was first stored
620
+ type: string
621
+ format: date-time
622
+ encryptedDataEncryptionKeys:
623
+ type: array
624
+ items:
625
+ type: object
626
+ additionalProperties: false
627
+ description: |
628
+ An object that includes an encrypted data encryption key and a hashed version of the public key used to encrypt it.
629
+ The publicKeyHash string is derived using @checkdigit/hash and the caller's public key included in DataEncryptionKeyRequest.
630
+ required:
631
+ - publicKeyHash
632
+ - encryptedDataEncryptionKey
633
+ properties:
634
+ publicKeyHash:
635
+ $ref: '#/components/schemas/Hash'
636
+ encryptedDataEncryptionKey:
637
+ type: string
638
+ description: RSA encrypted data encryption key used to AES sensitive data in the Card object.
639
+
640
+ History:
641
+ description: |
642
+ The History object represents the updates to a Card object over time.
643
+ type: object
644
+ required:
645
+ - updates
646
+ properties:
647
+ dataEncryptionKeyId:
648
+ type: string
649
+ description: |
650
+ Reference to encryption keys Payment Card Service used to encrypt the Card object.
651
+ format: uuid
652
+ storageKeyId:
653
+ type: string
654
+ description: |
655
+ DEK's non-derived identifier to be used by Check Digit services only.
656
+ encryptedDataEncryptionKey:
657
+ description: |
658
+ RSA encrypted data encryption key used to decrypt AES encrypted values in Card objects.
659
+ type: string
660
+ updates:
661
+ type: array
662
+ minItems: 0
663
+ items:
664
+ $ref: '#/components/schemas/CardUpdate'
665
+
666
+ LockStatus:
667
+ type: string
668
+ description: |
669
+ A cardholder initiated status. A locked card will fail authorization. Locked cards can be unlocked.
670
+
671
+ A cardholder may choose to lock a card while temporarily misplaced.
672
+ enum:
673
+ - LOCKED
674
+ - UNLOCKED
675
+
676
+ Ping:
677
+ type: object
678
+ additionalProperties: false
679
+ required:
680
+ - serverTime
681
+ properties:
682
+ serverTime:
683
+ type: string
684
+ format: date-time
685
+ description: Current server time
686
+ example: '1970-01-01T00:00:00.000Z'
687
+
688
+ PinOffsetKey:
689
+ type: object
690
+ additionalProperties: false
691
+ required:
692
+ - transmissionKey
693
+ properties:
694
+ transmissionKey:
695
+ description: A PEM formatted public key to be used to RSA encrypt a data encryption key.
696
+ type: string
697
+
698
+ PinOffsetKeyId:
699
+ type: string
700
+ format: uuid
701
+ description: Identifier for the PinOffsetKey used to encrypt the data encryption key.
702
+
703
+ PinOffsetRequest:
704
+ type: object
705
+ additionalProperties: false
706
+ required:
707
+ - encryptedDataEncryptionKey
708
+ - pinOffsetKeyId
709
+ - encryptedUserDefinedPin
710
+ properties:
711
+ pinOffsetKeyId:
712
+ $ref: '#/components/schemas/PinOffsetKeyId'
713
+ encryptedDataEncryptionKey:
714
+ description: A RSA encrypted (using transmissionKey) data encryption key that encrypted the encryptedUserDefinedPin.
715
+ type: string
716
+ encryptedUserDefinedPin:
717
+ type: string
718
+ description: |
719
+ User Defined PIN encrypted with an AES generated data encryption key. This is the PIN to be used for new
720
+ offset calculation. (plaintext pin has minLength = 4, maxLength = 12)
721
+
722
+ Hash:
723
+ type: string
724
+ format: uuid
725
+ example: '15a85f64-5717-4562-b3fc-2c963f66afa6'
726
+ description: UUID derived using @checkdigit/hash
727
+
728
+ NewCard:
729
+ type: object
730
+ additionalProperties: false
731
+ required:
732
+ - bin
733
+ - expirationDate
734
+ - serviceCode
735
+ - sequenceNumber
736
+ - state
737
+ - active
738
+ - block
739
+ - lock
740
+ properties:
741
+ bin:
742
+ $ref: '#/components/schemas/Bin'
743
+ expirationDate:
744
+ $ref: '#/components/schemas/ExpirationDate'
745
+ serviceCode:
746
+ type: string
747
+ pattern: '^\d+$'
748
+ description: |
749
+ Used to set general guidelines for how the card can be used, e.g. domestic only or international, online authorizations only, etc.
750
+ minLength: 3
751
+ maxLength: 3
752
+ sequenceNumber:
753
+ type: integer
754
+ description: Used to differentiate issuing the same card and expiration date on multiple plastics.
755
+ minimum: 0
756
+ maximum: 10
757
+ state:
758
+ $ref: '#/components/schemas/StateStatus'
759
+ active:
760
+ $ref: '#/components/schemas/ActiveStatus'
761
+ block:
762
+ $ref: '#/components/schemas/BlockStatus'
763
+ lock:
764
+ $ref: '#/components/schemas/LockStatus'
765
+
766
+ NewCardRequest:
767
+ type: object
768
+ required:
769
+ - dataEncryptionKeyId
770
+ - cardNumberLength
771
+ - newCard
772
+ additionalProperties: false
773
+ properties:
774
+ dataEncryptionKeyId:
775
+ $ref: '#/components/schemas/DataEncryptionKeyId'
776
+ cardNumberLength:
777
+ type: integer
778
+ description: Desired number of digits in the card number.
779
+ minimum: 15
780
+ maximum: 19
781
+ newCard:
782
+ $ref: '#/components/schemas/NewCard'
783
+
784
+ NewCardRequestWithCardNumber:
785
+ type: object
786
+ required:
787
+ - encryptedCardNumber
788
+ - encryptedDataEncryptionKey
789
+ - dataEncryptionKeyId
790
+ - newCard
791
+ properties:
792
+ encryptedCardNumber:
793
+ description: The card number must be encrypted with an AES generated secret key, i.e. data encryption key (DEK). That DEK must be RSA encrypted with the PublicKey returned by this service's GET /public-key operation. The encrypted DEK must be included in this request object as the encryptedDataEncryptionKey.
794
+ type: string
795
+ encryptedDataEncryptionKey:
796
+ description: RSA encrypted data encryption key used to AES encrypt encryptedCardNumber
797
+ type: string
798
+ dataEncryptionKeyId:
799
+ $ref: '#/components/schemas/DataEncryptionKeyId'
800
+ newCard:
801
+ $ref: '#/components/schemas/NewCard'
802
+ additionalProperties: false
803
+
804
+ PublicKey:
805
+ description: Public key in PEM format
806
+ type: string
807
+ example: |
808
+ -----BEGIN PUBLIC KEY-----
809
+ MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwm2sxmRdTF7ZIBA6+ngO
810
+ 8jOTCHmID0PpQB1q85+hrcLSfB1rWY9bzNNLabBo/ajDnA4Pcadq/x6gpg70qZcR
811
+ 9Wxm6TttKzBPZsxasGXgSTDqEi2KcYZgq1mL4qyxUvyIms7/llGy+W9b5huZaVcO
812
+ xdT1tw/zctbOhb6S2t5vH+zkta/2ncUXjG7i8XdLsJ1qe4K1kYbA4KVkOMmAtw7O
813
+ 4STk0TZDD0YARdmrciorJjbIVt0Xj1CrYQ5QbDGrlfeXgrcZwX5f9wT2MnKlY5oZ
814
+ 5Wtb57oGtLkVf8g6vN/2jGtAmOmHK2hHwNd/+zUet5G/S5uwEli4RgMPP4pUoKgd
815
+ GQIDAQAB
816
+ -----END PUBLIC KEY-----
817
+
818
+ PublicKeyResponse:
819
+ description: |
820
+ This object contains the rsa generated public key for the Payment Card Service. This public key must be used
821
+ when transmitting encrypted data to Payment Card Service APIs.
822
+ type: object
823
+ required:
824
+ - publicKey
825
+ properties:
826
+ publicKey:
827
+ $ref: '#/components/schemas/PublicKey'
828
+
829
+ StateStatus:
830
+ description: The current state of the card
831
+ type: string
832
+ enum:
833
+ - CURRENT
834
+ - REISSUED
835
+ - RETIRED
836
+ - FORCED
837
+
838
+ StorageKeyId:
839
+ type: string
840
+ description: |
841
+ DEK's non-derived identifier to be used by Check Digit services only.
842
+
843
+ parameters:
844
+ tenantId:
845
+ in: path
846
+ name: tenantId
847
+ description: Specifies tenant of Sentinel service
848
+ required: true
849
+ schema:
850
+ type: string
851
+
852
+ activeStatus:
853
+ name: activeStatus
854
+ in: path
855
+ description: Updated active status of the card
856
+ required: true
857
+ schema:
858
+ $ref: '#/components/schemas/ActiveStatus'
859
+
860
+ at:
861
+ name: at
862
+ in: query
863
+ description: Return data as it was at this time. Must be at least 1 second in the past.
864
+ example: '1970-01-01T00:00:00.000Z'
865
+ required: true
866
+ schema:
867
+ type: string
868
+ format: date-time
869
+
870
+ blockStatus:
871
+ name: blockStatus
872
+ in: path
873
+ description: Updated block status of the card
874
+ required: true
875
+ schema:
876
+ $ref: '#/components/schemas/BlockStatus'
877
+
878
+ captureStatus:
879
+ name: captureStatus
880
+ in: path
881
+ description: Updated capture status of the card
882
+ required: true
883
+ schema:
884
+ type: boolean
885
+
886
+ cardId:
887
+ name: cardId
888
+ in: path
889
+ description: An id unique to each card in uuid format
890
+ required: true
891
+ schema:
892
+ $ref: '#/components/schemas/CardId'
893
+
894
+ cardNumberHash:
895
+ name: cardNumberHash
896
+ in: query
897
+ description: UUID derived from a card number (PAN) using @checkdigit/hash
898
+ required: true
899
+ schema:
900
+ $ref: '#/components/schemas/Hash'
901
+
902
+ createdOn:
903
+ name: Created-On
904
+ in: header
905
+ description: |
906
+ Created-On header, establishes createdOn, and updatedOn values for the created data.
907
+ example: '1970-01-01T00:00:00.000Z'
908
+ required: false
909
+ schema:
910
+ type: string
911
+ format: date-time
912
+
913
+ fromDate:
914
+ name: fromDate
915
+ in: query
916
+ description: Return data created on or after this date
917
+ example: '1970-01-01T00:00:00.000Z'
918
+ schema:
919
+ type: string
920
+ format: date-time
921
+
922
+ ifMatch:
923
+ name: If-Match
924
+ in: header
925
+ description: If-Match header
926
+ required: true
927
+ schema:
928
+ type: string
929
+
930
+ dataEncryptionKeyId:
931
+ in: path
932
+ name: dataEncryptionKeyId
933
+ description: Parameter used to represent a DEK
934
+ required: true
935
+ schema:
936
+ type: string
937
+ format: uuid
938
+
939
+ lockStatus:
940
+ name: lockStatus
941
+ in: path
942
+ description: Updated lock status of the card
943
+ required: true
944
+ schema:
945
+ $ref: '#/components/schemas/LockStatus'
946
+
947
+ pinOffsetKeyId:
948
+ name: pinOffsetKeyId
949
+ in: path
950
+ description: A unique id associated with a one time use encryption key
951
+ required: true
952
+ schema:
953
+ $ref: '#/components/schemas/PinOffsetKeyId'
954
+
955
+ publicKeyHashPath:
956
+ name: publicKeyHashPath
957
+ in: path
958
+ description: UUID derived from a PEM formatted Public Key using @checkdigit/hash
959
+ required: true
960
+ schema:
961
+ $ref: '#/components/schemas/Hash'
962
+
963
+ publicKeyHashQuery:
964
+ name: publicKeyHashQuery
965
+ in: query
966
+ description: UUID derived from a PEM formatted Public Key using @checkdigit/hash
967
+ required: false
968
+ schema:
969
+ $ref: '#/components/schemas/Hash'
970
+
971
+ stateStatus:
972
+ name: stateStatus
973
+ in: path
974
+ description: Updated state status of the card
975
+ required: true
976
+ schema:
977
+ $ref: '#/components/schemas/StateStatus'
978
+
979
+ toDate:
980
+ name: toDate
981
+ in: query
982
+ description: Return data created before this date. Must be at least 1 second in the past.
983
+ example: '1970-01-01T00:00:00.000Z'
984
+ required: true
985
+ schema:
986
+ type: string
987
+ format: date-time
988
+
989
+ requestBodies:
990
+ CardNumberRequest:
991
+ required: true
992
+ content:
993
+ application/json:
994
+ schema:
995
+ $ref: '#/components/schemas/CardNumberRequest'
996
+
997
+ DataEncryptionKeyRequest:
998
+ required: true
999
+ content:
1000
+ application/json:
1001
+ schema:
1002
+ $ref: '#/components/schemas/DataEncryptionKeyRequest'
1003
+
1004
+ NewCardRequest:
1005
+ required: true
1006
+ content:
1007
+ application/json:
1008
+ schema:
1009
+ $ref: '#/components/schemas/NewCardRequest'
1010
+
1011
+ NewCardRequestWithCardNumber:
1012
+ required: true
1013
+ content:
1014
+ application/json:
1015
+ schema:
1016
+ $ref: '#/components/schemas/NewCardRequestWithCardNumber'
1017
+
1018
+ PinOffsetRequest:
1019
+ description: Encrypted user defined PIN
1020
+ required: true
1021
+ content:
1022
+ application/json:
1023
+ schema:
1024
+ $ref: '#/components/schemas/PinOffsetRequest'
1025
+
1026
+ responses:
1027
+ CardResponse:
1028
+ description: Card retrieved
1029
+ content:
1030
+ application/json:
1031
+ schema:
1032
+ $ref: '#/components/schemas/CardResponse'
1033
+ headers:
1034
+ Created-On:
1035
+ $ref: '#/components/headers/Created-On'
1036
+ Updated-On:
1037
+ $ref: '#/components/headers/Updated-On'
1038
+ ETag:
1039
+ $ref: '#/components/headers/ETag'
1040
+
1041
+ Query:
1042
+ description: Response from querying /card by cardNumberHash
1043
+ content:
1044
+ application/json:
1045
+ schema:
1046
+ $ref: '#/components/schemas/Query'
1047
+
1048
+ Conflict:
1049
+ description: Record exists but with different data
1050
+
1051
+ EncryptedCardNumber:
1052
+ description: Encrypted card information retrieved
1053
+ content:
1054
+ application/json:
1055
+ schema:
1056
+ $ref: '#/components/schemas/EncryptedCardNumber'
1057
+
1058
+ DataEncryptionKeyResponse:
1059
+ description: Set of public keys request
1060
+ content:
1061
+ application/json:
1062
+ schema:
1063
+ $ref: '#/components/schemas/DataEncryptionKeyResponse'
1064
+ headers:
1065
+ Created-On:
1066
+ $ref: '#/components/headers/Created-On'
1067
+ Updated-On:
1068
+ $ref: '#/components/headers/Updated-On'
1069
+
1070
+ History:
1071
+ description: Response from
1072
+ content:
1073
+ application/json:
1074
+ schema:
1075
+ $ref: '#/components/schemas/History'
1076
+
1077
+ Ping:
1078
+ description: Successful Ping response
1079
+ content:
1080
+ application/json:
1081
+ schema:
1082
+ $ref: '#/components/schemas/Ping'
1083
+
1084
+ PinOffsetKey:
1085
+ description: Response from creating or requesting a key to encrypt a user defined pin
1086
+ content:
1087
+ application/json:
1088
+ schema:
1089
+ $ref: '#/components/schemas/PinOffsetKey'
1090
+
1091
+ PublicKeyResponse:
1092
+ description: Public Key response.
1093
+ content:
1094
+ application/json:
1095
+ schema:
1096
+ $ref: '#/components/schemas/PublicKeyResponse'
1097
+ headers:
1098
+ Created-On:
1099
+ $ref: '#/components/headers/Created-On'
1100
+ Updated-On:
1101
+ $ref: '#/components/headers/Updated-On'
1102
+
1103
+ PreconditionFailed:
1104
+ description: Precondition failed
1105
+
1106
+ NotFound:
1107
+ description: Not found
1108
+
1109
+ UnprocessableContent:
1110
+ description: Unprocessable Content
1111
+ content:
1112
+ application/json:
1113
+ schema:
1114
+ $ref: '#/components/schemas/Error'
1115
+
1116
+ NoContent:
1117
+ description: Success/No Content
1118
+ headers:
1119
+ Created-On:
1120
+ $ref: '#/components/headers/Created-On'
1121
+ Updated-On:
1122
+ $ref: '#/components/headers/Updated-On'
1123
+ ETag:
1124
+ $ref: '#/components/headers/ETag'
1125
+
1126
+ ServerError:
1127
+ description: Server Error response
1128
+ content:
1129
+ application/json:
1130
+ schema:
1131
+ $ref: '#/components/schemas/Error'
1132
+
1133
+ headers:
1134
+ ETag:
1135
+ description: Version information for record
1136
+ schema:
1137
+ type: string
1138
+
1139
+ Created-On:
1140
+ description: CreatedOn timestamp for the newly created record
1141
+ schema:
1142
+ type: string
1143
+ format: date-time
1144
+
1145
+ Updated-On:
1146
+ description: UpdatedOn timestamp for the existing record
1147
+ schema:
1148
+ type: string
1149
+ format: date-time