@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,2181 @@
1
+ {
2
+ "apis": {
3
+ "/payment-card/v1/ping": {
4
+ "get": {
5
+ "request": {
6
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
7
+ "$id": "https://eslint-plugin.checkdigit/payment-card/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/payment-card/v1/schemas/api/PingGetResponseOK",
22
+ "type": "object",
23
+ "properties": {
24
+ "headers": {
25
+ "type": "object",
26
+ "additionalProperties": true
27
+ },
28
+ "body": {
29
+ "$ref": "/payment-card/v1/schemas/definitions/Ping"
30
+ }
31
+ },
32
+ "required": ["body"],
33
+ "additionalProperties": false
34
+ },
35
+ "default": {
36
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
37
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/PingGetResponseDefault",
38
+ "type": "object",
39
+ "properties": {
40
+ "headers": {
41
+ "type": "object",
42
+ "additionalProperties": true
43
+ },
44
+ "body": {
45
+ "$ref": "/payment-card/v1/schemas/definitions/Error"
46
+ }
47
+ },
48
+ "required": ["body"],
49
+ "additionalProperties": false
50
+ }
51
+ }
52
+ }
53
+ },
54
+ "/payment-card/v1/public-key": {
55
+ "get": {
56
+ "request": {
57
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
58
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/PublicKeyGetRequestContext",
59
+ "type": "object",
60
+ "properties": {
61
+ "headers": {
62
+ "type": "object",
63
+ "additionalProperties": true
64
+ }
65
+ },
66
+ "required": [],
67
+ "additionalProperties": false
68
+ },
69
+ "responses": {
70
+ "200": {
71
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
72
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/PublicKeyGetResponseOK",
73
+ "type": "object",
74
+ "properties": {
75
+ "headers": {
76
+ "type": "object",
77
+ "properties": {
78
+ "created-on": {
79
+ "type": "string",
80
+ "format": "date-time"
81
+ },
82
+ "updated-on": {
83
+ "type": "string",
84
+ "format": "date-time"
85
+ }
86
+ }
87
+ },
88
+ "body": {
89
+ "$ref": "/payment-card/v1/schemas/definitions/PublicKeyResponse"
90
+ }
91
+ },
92
+ "required": ["body"],
93
+ "additionalProperties": false
94
+ },
95
+ "default": {
96
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
97
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/PublicKeyGetResponseDefault",
98
+ "type": "object",
99
+ "properties": {
100
+ "headers": {
101
+ "type": "object",
102
+ "additionalProperties": true
103
+ },
104
+ "body": {
105
+ "$ref": "/payment-card/v1/schemas/definitions/Error"
106
+ }
107
+ },
108
+ "required": ["body"],
109
+ "additionalProperties": false
110
+ }
111
+ }
112
+ }
113
+ },
114
+ "/payment-card/v1/data-encryption-key/:dataEncryptionKeyId": {
115
+ "get": {
116
+ "request": {
117
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
118
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/DataEncryptionKeyGetRequestContext",
119
+ "type": "object",
120
+ "properties": {
121
+ "params": {
122
+ "type": "object",
123
+ "additionalProperties": false,
124
+ "properties": {
125
+ "dataEncryptionKeyId": {
126
+ "type": "string",
127
+ "format": "uuid"
128
+ }
129
+ },
130
+ "required": ["dataEncryptionKeyId"]
131
+ },
132
+ "headers": {
133
+ "type": "object",
134
+ "additionalProperties": true
135
+ }
136
+ },
137
+ "required": ["params"],
138
+ "additionalProperties": false
139
+ },
140
+ "responses": {
141
+ "200": {
142
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
143
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/DataEncryptionKeyGetResponseOK",
144
+ "type": "object",
145
+ "properties": {
146
+ "headers": {
147
+ "type": "object",
148
+ "properties": {
149
+ "created-on": {
150
+ "type": "string",
151
+ "format": "date-time"
152
+ },
153
+ "updated-on": {
154
+ "type": "string",
155
+ "format": "date-time"
156
+ }
157
+ }
158
+ },
159
+ "body": {
160
+ "$ref": "/payment-card/v1/schemas/definitions/DataEncryptionKeyResponse"
161
+ }
162
+ },
163
+ "required": ["body"],
164
+ "additionalProperties": false
165
+ },
166
+ "404": {
167
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
168
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/DataEncryptionKeyGetResponseNotFound",
169
+ "type": "object",
170
+ "properties": {
171
+ "headers": {
172
+ "type": "object",
173
+ "additionalProperties": true
174
+ }
175
+ },
176
+ "required": [],
177
+ "additionalProperties": false
178
+ },
179
+ "default": {
180
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
181
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/DataEncryptionKeyGetResponseDefault",
182
+ "type": "object",
183
+ "properties": {
184
+ "headers": {
185
+ "type": "object",
186
+ "additionalProperties": true
187
+ },
188
+ "body": {
189
+ "$ref": "/payment-card/v1/schemas/definitions/Error"
190
+ }
191
+ },
192
+ "required": ["body"],
193
+ "additionalProperties": false
194
+ }
195
+ }
196
+ },
197
+ "put": {
198
+ "request": {
199
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
200
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/DataEncryptionKeyPutRequestContext",
201
+ "type": "object",
202
+ "properties": {
203
+ "params": {
204
+ "type": "object",
205
+ "additionalProperties": false,
206
+ "properties": {
207
+ "dataEncryptionKeyId": {
208
+ "type": "string",
209
+ "format": "uuid"
210
+ }
211
+ },
212
+ "required": ["dataEncryptionKeyId"]
213
+ },
214
+ "headers": {
215
+ "type": "object",
216
+ "additionalProperties": true
217
+ },
218
+ "body": {
219
+ "$ref": "/payment-card/v1/schemas/definitions/DataEncryptionKeyRequest"
220
+ }
221
+ },
222
+ "required": ["params", "body"],
223
+ "additionalProperties": false
224
+ },
225
+ "responses": {
226
+ "200": {
227
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
228
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/DataEncryptionKeyPutResponseOK",
229
+ "type": "object",
230
+ "properties": {
231
+ "headers": {
232
+ "type": "object",
233
+ "properties": {
234
+ "created-on": {
235
+ "type": "string",
236
+ "format": "date-time"
237
+ },
238
+ "updated-on": {
239
+ "type": "string",
240
+ "format": "date-time"
241
+ }
242
+ }
243
+ },
244
+ "body": {
245
+ "$ref": "/payment-card/v1/schemas/definitions/DataEncryptionKeyResponse"
246
+ }
247
+ },
248
+ "required": ["body"],
249
+ "additionalProperties": false
250
+ },
251
+ "default": {
252
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
253
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/DataEncryptionKeyPutResponseDefault",
254
+ "type": "object",
255
+ "properties": {
256
+ "headers": {
257
+ "type": "object",
258
+ "additionalProperties": true
259
+ },
260
+ "body": {
261
+ "$ref": "/payment-card/v1/schemas/definitions/Error"
262
+ }
263
+ },
264
+ "required": ["body"],
265
+ "additionalProperties": false
266
+ }
267
+ }
268
+ }
269
+ },
270
+ "/payment-card/v1/card": {
271
+ "get": {
272
+ "request": {
273
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
274
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardQueryRequestContext",
275
+ "type": "object",
276
+ "properties": {
277
+ "params": {
278
+ "type": "object",
279
+ "additionalProperties": false,
280
+ "properties": {
281
+ "cardNumberHash": {
282
+ "$ref": "/payment-card/v1/schemas/definitions/Hash"
283
+ },
284
+ "at": {
285
+ "type": "string",
286
+ "format": "date-time"
287
+ }
288
+ },
289
+ "required": ["cardNumberHash", "at"]
290
+ },
291
+ "headers": {
292
+ "type": "object",
293
+ "additionalProperties": true
294
+ }
295
+ },
296
+ "required": ["query"],
297
+ "additionalProperties": false
298
+ },
299
+ "responses": {
300
+ "200": {
301
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
302
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardQueryResponseOK",
303
+ "type": "object",
304
+ "properties": {
305
+ "headers": {
306
+ "type": "object",
307
+ "additionalProperties": true
308
+ },
309
+ "body": {
310
+ "$ref": "/payment-card/v1/schemas/definitions/Query"
311
+ }
312
+ },
313
+ "required": ["body"],
314
+ "additionalProperties": false
315
+ },
316
+ "default": {
317
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
318
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardQueryResponseDefault",
319
+ "type": "object",
320
+ "properties": {
321
+ "headers": {
322
+ "type": "object",
323
+ "additionalProperties": true
324
+ },
325
+ "body": {
326
+ "$ref": "/payment-card/v1/schemas/definitions/Error"
327
+ }
328
+ },
329
+ "required": ["body"],
330
+ "additionalProperties": false
331
+ }
332
+ }
333
+ }
334
+ },
335
+ "/payment-card/v1/card/:cardId": {
336
+ "get": {
337
+ "request": {
338
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
339
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardGetRequestContext",
340
+ "type": "object",
341
+ "properties": {
342
+ "params": {
343
+ "type": "object",
344
+ "additionalProperties": false,
345
+ "properties": {
346
+ "at": {
347
+ "type": "string",
348
+ "format": "date-time"
349
+ },
350
+ "publicKeyHashQuery": {
351
+ "$ref": "/payment-card/v1/schemas/definitions/Hash"
352
+ }
353
+ },
354
+ "required": ["at"]
355
+ },
356
+ "headers": {
357
+ "type": "object",
358
+ "additionalProperties": true
359
+ }
360
+ },
361
+ "required": ["params", "query"],
362
+ "additionalProperties": false
363
+ },
364
+ "responses": {
365
+ "200": {
366
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
367
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardGetResponseOK",
368
+ "type": "object",
369
+ "properties": {
370
+ "headers": {
371
+ "type": "object",
372
+ "properties": {
373
+ "last-modified": {
374
+ "type": "string",
375
+ "format": "date-time"
376
+ },
377
+ "created-on": {
378
+ "type": "string",
379
+ "format": "date-time"
380
+ },
381
+ "updated-on": {
382
+ "type": "string",
383
+ "format": "date-time"
384
+ },
385
+ "etag": {
386
+ "type": "string"
387
+ }
388
+ }
389
+ },
390
+ "body": {
391
+ "$ref": "/payment-card/v1/schemas/definitions/CardResponse"
392
+ }
393
+ },
394
+ "required": ["body"],
395
+ "additionalProperties": false
396
+ },
397
+ "404": {
398
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
399
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardGetResponseNotFound",
400
+ "type": "object",
401
+ "properties": {
402
+ "headers": {
403
+ "type": "object",
404
+ "additionalProperties": true
405
+ }
406
+ },
407
+ "required": [],
408
+ "additionalProperties": false
409
+ },
410
+ "default": {
411
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
412
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardGetResponseDefault",
413
+ "type": "object",
414
+ "properties": {
415
+ "headers": {
416
+ "type": "object",
417
+ "additionalProperties": true
418
+ },
419
+ "body": {
420
+ "$ref": "/payment-card/v1/schemas/definitions/Error"
421
+ }
422
+ },
423
+ "required": ["body"],
424
+ "additionalProperties": false
425
+ }
426
+ }
427
+ },
428
+ "put": {
429
+ "request": {
430
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
431
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardPutRequestContext",
432
+ "type": "object",
433
+ "properties": {
434
+ "params": {
435
+ "type": "object",
436
+ "additionalProperties": false,
437
+ "properties": {
438
+ "cardId": {
439
+ "$ref": "/payment-card/v1/schemas/definitions/CardId"
440
+ }
441
+ },
442
+ "required": ["cardId"]
443
+ },
444
+ "headers": {
445
+ "type": "object",
446
+ "additionalProperties": true,
447
+ "properties": {
448
+ "created-on": {
449
+ "type": "string",
450
+ "format": "date-time"
451
+ },
452
+ "last-modified": {
453
+ "type": "string",
454
+ "format": "date-time"
455
+ }
456
+ }
457
+ },
458
+ "body": {
459
+ "$ref": "/payment-card/v1/schemas/definitions/NewCardRequest"
460
+ }
461
+ },
462
+ "required": ["params", "body"],
463
+ "additionalProperties": false
464
+ },
465
+ "responses": {
466
+ "200": {
467
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
468
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardPutResponseOK",
469
+ "type": "object",
470
+ "properties": {
471
+ "headers": {
472
+ "type": "object",
473
+ "properties": {
474
+ "last-modified": {
475
+ "type": "string",
476
+ "format": "date-time"
477
+ },
478
+ "created-on": {
479
+ "type": "string",
480
+ "format": "date-time"
481
+ },
482
+ "updated-on": {
483
+ "type": "string",
484
+ "format": "date-time"
485
+ },
486
+ "etag": {
487
+ "type": "string"
488
+ }
489
+ }
490
+ },
491
+ "body": {
492
+ "$ref": "/payment-card/v1/schemas/definitions/CardResponse"
493
+ }
494
+ },
495
+ "required": ["body"],
496
+ "additionalProperties": false
497
+ },
498
+ "409": {
499
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
500
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardPutResponseConflict",
501
+ "type": "object",
502
+ "properties": {
503
+ "headers": {
504
+ "type": "object",
505
+ "additionalProperties": true
506
+ }
507
+ },
508
+ "required": [],
509
+ "additionalProperties": false
510
+ },
511
+ "412": {
512
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
513
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardPutResponsePreconditionFailed",
514
+ "type": "object",
515
+ "properties": {
516
+ "headers": {
517
+ "type": "object",
518
+ "additionalProperties": true
519
+ }
520
+ },
521
+ "required": [],
522
+ "additionalProperties": false
523
+ },
524
+ "default": {
525
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
526
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardPutResponseDefault",
527
+ "type": "object",
528
+ "properties": {
529
+ "headers": {
530
+ "type": "object",
531
+ "additionalProperties": true
532
+ },
533
+ "body": {
534
+ "$ref": "/payment-card/v1/schemas/definitions/Error"
535
+ }
536
+ },
537
+ "required": ["body"],
538
+ "additionalProperties": false
539
+ }
540
+ }
541
+ }
542
+ },
543
+ "/payment-card/v1/card/:cardId/number": {
544
+ "put": {
545
+ "request": {
546
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
547
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardNumberPutRequestContext",
548
+ "type": "object",
549
+ "properties": {
550
+ "params": {
551
+ "type": "object",
552
+ "additionalProperties": false,
553
+ "properties": {
554
+ "cardId": {
555
+ "$ref": "/payment-card/v1/schemas/definitions/CardId"
556
+ }
557
+ },
558
+ "required": ["cardId"]
559
+ },
560
+ "headers": {
561
+ "type": "object",
562
+ "additionalProperties": true,
563
+ "properties": {
564
+ "created-on": {
565
+ "type": "string",
566
+ "format": "date-time"
567
+ },
568
+ "last-modified": {
569
+ "type": "string",
570
+ "format": "date-time"
571
+ }
572
+ }
573
+ },
574
+ "body": {
575
+ "$ref": "/payment-card/v1/schemas/definitions/NewCardRequestWithCardNumber"
576
+ }
577
+ },
578
+ "required": ["params", "body"],
579
+ "additionalProperties": false
580
+ },
581
+ "responses": {
582
+ "200": {
583
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
584
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardNumberPutResponseOK",
585
+ "type": "object",
586
+ "properties": {
587
+ "headers": {
588
+ "type": "object",
589
+ "properties": {
590
+ "last-modified": {
591
+ "type": "string",
592
+ "format": "date-time"
593
+ },
594
+ "created-on": {
595
+ "type": "string",
596
+ "format": "date-time"
597
+ },
598
+ "updated-on": {
599
+ "type": "string",
600
+ "format": "date-time"
601
+ },
602
+ "etag": {
603
+ "type": "string"
604
+ }
605
+ }
606
+ },
607
+ "body": {
608
+ "$ref": "/payment-card/v1/schemas/definitions/CardResponse"
609
+ }
610
+ },
611
+ "required": ["body"],
612
+ "additionalProperties": false
613
+ },
614
+ "409": {
615
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
616
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardNumberPutResponseConflict",
617
+ "type": "object",
618
+ "properties": {
619
+ "headers": {
620
+ "type": "object",
621
+ "additionalProperties": true
622
+ }
623
+ },
624
+ "required": [],
625
+ "additionalProperties": false
626
+ },
627
+ "412": {
628
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
629
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardNumberPutResponsePreconditionFailed",
630
+ "type": "object",
631
+ "properties": {
632
+ "headers": {
633
+ "type": "object",
634
+ "additionalProperties": true
635
+ }
636
+ },
637
+ "required": [],
638
+ "additionalProperties": false
639
+ },
640
+ "default": {
641
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
642
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardNumberPutResponseDefault",
643
+ "type": "object",
644
+ "properties": {
645
+ "headers": {
646
+ "type": "object",
647
+ "additionalProperties": true
648
+ },
649
+ "body": {
650
+ "$ref": "/payment-card/v1/schemas/definitions/Error"
651
+ }
652
+ },
653
+ "required": ["body"],
654
+ "additionalProperties": false
655
+ }
656
+ }
657
+ }
658
+ },
659
+ "/payment-card/v1/card/:cardId/active/:activeStatus": {
660
+ "put": {
661
+ "request": {
662
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
663
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardActivePutRequestContext",
664
+ "type": "object",
665
+ "properties": {
666
+ "params": {
667
+ "type": "object",
668
+ "additionalProperties": false,
669
+ "properties": {
670
+ "cardId": {
671
+ "$ref": "/payment-card/v1/schemas/definitions/CardId"
672
+ },
673
+ "activeStatus": {
674
+ "$ref": "/payment-card/v1/schemas/definitions/ActiveStatus"
675
+ }
676
+ },
677
+ "required": ["cardId", "activeStatus"]
678
+ },
679
+ "headers": {
680
+ "type": "object",
681
+ "additionalProperties": true,
682
+ "properties": {
683
+ "created-on": {
684
+ "type": "string",
685
+ "format": "date-time"
686
+ },
687
+ "last-modified": {
688
+ "type": "string",
689
+ "format": "date-time"
690
+ },
691
+ "if-match": {
692
+ "type": "string"
693
+ }
694
+ },
695
+ "required": ["If-Match"]
696
+ }
697
+ },
698
+ "required": ["params", "headers"],
699
+ "additionalProperties": false
700
+ },
701
+ "responses": {
702
+ "204": {
703
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
704
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardActivePutResponseNoContent",
705
+ "type": "object",
706
+ "properties": {
707
+ "headers": {
708
+ "type": "object",
709
+ "properties": {
710
+ "last-modified": {
711
+ "type": "string",
712
+ "format": "date-time"
713
+ },
714
+ "created-on": {
715
+ "type": "string",
716
+ "format": "date-time"
717
+ },
718
+ "updated-on": {
719
+ "type": "string",
720
+ "format": "date-time"
721
+ },
722
+ "etag": {
723
+ "type": "string"
724
+ }
725
+ }
726
+ }
727
+ },
728
+ "required": [],
729
+ "additionalProperties": false
730
+ },
731
+ "409": {
732
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
733
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardActivePutResponseConflict",
734
+ "type": "object",
735
+ "properties": {
736
+ "headers": {
737
+ "type": "object",
738
+ "additionalProperties": true
739
+ }
740
+ },
741
+ "required": [],
742
+ "additionalProperties": false
743
+ },
744
+ "412": {
745
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
746
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardActivePutResponsePreconditionFailed",
747
+ "type": "object",
748
+ "properties": {
749
+ "headers": {
750
+ "type": "object",
751
+ "additionalProperties": true
752
+ }
753
+ },
754
+ "required": [],
755
+ "additionalProperties": false
756
+ },
757
+ "default": {
758
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
759
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardActivePutResponseDefault",
760
+ "type": "object",
761
+ "properties": {
762
+ "headers": {
763
+ "type": "object",
764
+ "additionalProperties": true
765
+ },
766
+ "body": {
767
+ "$ref": "/payment-card/v1/schemas/definitions/Error"
768
+ }
769
+ },
770
+ "required": ["body"],
771
+ "additionalProperties": false
772
+ }
773
+ }
774
+ }
775
+ },
776
+ "/payment-card/v1/card/:cardId/application-transaction-counter/:applicationTransactionCounter": {
777
+ "put": {
778
+ "request": {
779
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
780
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardApplicationTransactionCounterPutRequestContext",
781
+ "type": "object",
782
+ "properties": {
783
+ "params": {
784
+ "type": "object",
785
+ "additionalProperties": false,
786
+ "properties": {
787
+ "cardId": {
788
+ "$ref": "/payment-card/v1/schemas/definitions/CardId"
789
+ },
790
+ "applicationTransactionCounter": {
791
+ "type": "integer"
792
+ }
793
+ },
794
+ "required": ["cardId", "applicationTransactionCounter"]
795
+ },
796
+ "headers": {
797
+ "type": "object",
798
+ "additionalProperties": true,
799
+ "properties": {
800
+ "created-on": {
801
+ "type": "string",
802
+ "format": "date-time"
803
+ },
804
+ "last-modified": {
805
+ "type": "string",
806
+ "format": "date-time"
807
+ },
808
+ "if-match": {
809
+ "type": "string"
810
+ }
811
+ },
812
+ "required": ["If-Match"]
813
+ }
814
+ },
815
+ "required": ["params", "headers"],
816
+ "additionalProperties": false
817
+ },
818
+ "responses": {
819
+ "204": {
820
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
821
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardApplicationTransactionCounterPutResponseNoContent",
822
+ "type": "object",
823
+ "properties": {
824
+ "headers": {
825
+ "type": "object",
826
+ "properties": {
827
+ "last-modified": {
828
+ "type": "string",
829
+ "format": "date-time"
830
+ },
831
+ "created-on": {
832
+ "type": "string",
833
+ "format": "date-time"
834
+ },
835
+ "updated-on": {
836
+ "type": "string",
837
+ "format": "date-time"
838
+ },
839
+ "etag": {
840
+ "type": "string"
841
+ }
842
+ }
843
+ }
844
+ },
845
+ "required": [],
846
+ "additionalProperties": false
847
+ },
848
+ "409": {
849
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
850
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardApplicationTransactionCounterPutResponseConflict",
851
+ "type": "object",
852
+ "properties": {
853
+ "headers": {
854
+ "type": "object",
855
+ "additionalProperties": true
856
+ }
857
+ },
858
+ "required": [],
859
+ "additionalProperties": false
860
+ },
861
+ "412": {
862
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
863
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardApplicationTransactionCounterPutResponsePreconditionFailed",
864
+ "type": "object",
865
+ "properties": {
866
+ "headers": {
867
+ "type": "object",
868
+ "additionalProperties": true
869
+ }
870
+ },
871
+ "required": [],
872
+ "additionalProperties": false
873
+ },
874
+ "default": {
875
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
876
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardApplicationTransactionCounterPutResponseDefault",
877
+ "type": "object",
878
+ "properties": {
879
+ "headers": {
880
+ "type": "object",
881
+ "additionalProperties": true
882
+ },
883
+ "body": {
884
+ "$ref": "/payment-card/v1/schemas/definitions/Error"
885
+ }
886
+ },
887
+ "required": ["body"],
888
+ "additionalProperties": false
889
+ }
890
+ }
891
+ }
892
+ },
893
+ "/payment-card/v1/card/:cardId/block/:blockStatus": {
894
+ "put": {
895
+ "request": {
896
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
897
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardBlockPutRequestContext",
898
+ "type": "object",
899
+ "properties": {
900
+ "params": {
901
+ "type": "object",
902
+ "additionalProperties": false,
903
+ "properties": {
904
+ "cardId": {
905
+ "$ref": "/payment-card/v1/schemas/definitions/CardId"
906
+ },
907
+ "blockStatus": {
908
+ "$ref": "/payment-card/v1/schemas/definitions/BlockStatus"
909
+ }
910
+ },
911
+ "required": ["cardId", "blockStatus"]
912
+ },
913
+ "headers": {
914
+ "type": "object",
915
+ "additionalProperties": true,
916
+ "properties": {
917
+ "created-on": {
918
+ "type": "string",
919
+ "format": "date-time"
920
+ },
921
+ "last-modified": {
922
+ "type": "string",
923
+ "format": "date-time"
924
+ },
925
+ "if-match": {
926
+ "type": "string"
927
+ }
928
+ },
929
+ "required": ["If-Match"]
930
+ }
931
+ },
932
+ "required": ["params", "headers"],
933
+ "additionalProperties": false
934
+ },
935
+ "responses": {
936
+ "204": {
937
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
938
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardBlockPutResponseNoContent",
939
+ "type": "object",
940
+ "properties": {
941
+ "headers": {
942
+ "type": "object",
943
+ "properties": {
944
+ "last-modified": {
945
+ "type": "string",
946
+ "format": "date-time"
947
+ },
948
+ "created-on": {
949
+ "type": "string",
950
+ "format": "date-time"
951
+ },
952
+ "updated-on": {
953
+ "type": "string",
954
+ "format": "date-time"
955
+ },
956
+ "etag": {
957
+ "type": "string"
958
+ }
959
+ }
960
+ }
961
+ },
962
+ "required": [],
963
+ "additionalProperties": false
964
+ },
965
+ "409": {
966
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
967
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardBlockPutResponseConflict",
968
+ "type": "object",
969
+ "properties": {
970
+ "headers": {
971
+ "type": "object",
972
+ "additionalProperties": true
973
+ }
974
+ },
975
+ "required": [],
976
+ "additionalProperties": false
977
+ },
978
+ "412": {
979
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
980
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardBlockPutResponsePreconditionFailed",
981
+ "type": "object",
982
+ "properties": {
983
+ "headers": {
984
+ "type": "object",
985
+ "additionalProperties": true
986
+ }
987
+ },
988
+ "required": [],
989
+ "additionalProperties": false
990
+ },
991
+ "default": {
992
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
993
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardBlockPutResponseDefault",
994
+ "type": "object",
995
+ "properties": {
996
+ "headers": {
997
+ "type": "object",
998
+ "additionalProperties": true
999
+ },
1000
+ "body": {
1001
+ "$ref": "/payment-card/v1/schemas/definitions/Error"
1002
+ }
1003
+ },
1004
+ "required": ["body"],
1005
+ "additionalProperties": false
1006
+ }
1007
+ }
1008
+ }
1009
+ },
1010
+ "/payment-card/v1/card/:cardId/capture/:captureStatus": {
1011
+ "put": {
1012
+ "request": {
1013
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1014
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardCapturePutRequestContext",
1015
+ "type": "object",
1016
+ "properties": {
1017
+ "params": {
1018
+ "type": "object",
1019
+ "additionalProperties": false,
1020
+ "properties": {
1021
+ "cardId": {
1022
+ "$ref": "/payment-card/v1/schemas/definitions/CardId"
1023
+ },
1024
+ "captureStatus": {
1025
+ "type": "boolean"
1026
+ }
1027
+ },
1028
+ "required": ["cardId", "captureStatus"]
1029
+ },
1030
+ "headers": {
1031
+ "type": "object",
1032
+ "additionalProperties": true,
1033
+ "properties": {
1034
+ "created-on": {
1035
+ "type": "string",
1036
+ "format": "date-time"
1037
+ },
1038
+ "last-modified": {
1039
+ "type": "string",
1040
+ "format": "date-time"
1041
+ },
1042
+ "if-match": {
1043
+ "type": "string"
1044
+ }
1045
+ },
1046
+ "required": ["If-Match"]
1047
+ }
1048
+ },
1049
+ "required": ["params", "headers"],
1050
+ "additionalProperties": false
1051
+ },
1052
+ "responses": {
1053
+ "204": {
1054
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1055
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardCapturePutResponseNoContent",
1056
+ "type": "object",
1057
+ "properties": {
1058
+ "headers": {
1059
+ "type": "object",
1060
+ "properties": {
1061
+ "last-modified": {
1062
+ "type": "string",
1063
+ "format": "date-time"
1064
+ },
1065
+ "created-on": {
1066
+ "type": "string",
1067
+ "format": "date-time"
1068
+ },
1069
+ "updated-on": {
1070
+ "type": "string",
1071
+ "format": "date-time"
1072
+ },
1073
+ "etag": {
1074
+ "type": "string"
1075
+ }
1076
+ }
1077
+ }
1078
+ },
1079
+ "required": [],
1080
+ "additionalProperties": false
1081
+ },
1082
+ "409": {
1083
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1084
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardCapturePutResponseConflict",
1085
+ "type": "object",
1086
+ "properties": {
1087
+ "headers": {
1088
+ "type": "object",
1089
+ "additionalProperties": true
1090
+ }
1091
+ },
1092
+ "required": [],
1093
+ "additionalProperties": false
1094
+ },
1095
+ "412": {
1096
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1097
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardCapturePutResponsePreconditionFailed",
1098
+ "type": "object",
1099
+ "properties": {
1100
+ "headers": {
1101
+ "type": "object",
1102
+ "additionalProperties": true
1103
+ }
1104
+ },
1105
+ "required": [],
1106
+ "additionalProperties": false
1107
+ },
1108
+ "default": {
1109
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1110
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardCapturePutResponseDefault",
1111
+ "type": "object",
1112
+ "properties": {
1113
+ "headers": {
1114
+ "type": "object",
1115
+ "additionalProperties": true
1116
+ },
1117
+ "body": {
1118
+ "$ref": "/payment-card/v1/schemas/definitions/Error"
1119
+ }
1120
+ },
1121
+ "required": ["body"],
1122
+ "additionalProperties": false
1123
+ }
1124
+ }
1125
+ }
1126
+ },
1127
+ "/payment-card/v1/card/:cardId/history": {
1128
+ "get": {
1129
+ "request": {
1130
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1131
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardHistoryGetRequestContext",
1132
+ "type": "object",
1133
+ "properties": {
1134
+ "params": {
1135
+ "type": "object",
1136
+ "additionalProperties": false,
1137
+ "properties": {
1138
+ "fromDate": {
1139
+ "type": "string",
1140
+ "format": "date-time"
1141
+ },
1142
+ "toDate": {
1143
+ "type": "string",
1144
+ "format": "date-time"
1145
+ },
1146
+ "publicKeyHashQuery": {
1147
+ "$ref": "/payment-card/v1/schemas/definitions/Hash"
1148
+ }
1149
+ },
1150
+ "required": ["toDate"]
1151
+ },
1152
+ "headers": {
1153
+ "type": "object",
1154
+ "additionalProperties": true
1155
+ }
1156
+ },
1157
+ "required": ["params", "query"],
1158
+ "additionalProperties": false
1159
+ },
1160
+ "responses": {
1161
+ "200": {
1162
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1163
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardHistoryGetResponseOK",
1164
+ "type": "object",
1165
+ "properties": {
1166
+ "headers": {
1167
+ "type": "object",
1168
+ "additionalProperties": true
1169
+ },
1170
+ "body": {
1171
+ "$ref": "/payment-card/v1/schemas/definitions/History"
1172
+ }
1173
+ },
1174
+ "required": ["body"],
1175
+ "additionalProperties": false
1176
+ },
1177
+ "404": {
1178
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1179
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardHistoryGetResponseNotFound",
1180
+ "type": "object",
1181
+ "properties": {
1182
+ "headers": {
1183
+ "type": "object",
1184
+ "additionalProperties": true
1185
+ }
1186
+ },
1187
+ "required": [],
1188
+ "additionalProperties": false
1189
+ },
1190
+ "default": {
1191
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1192
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardHistoryGetResponseDefault",
1193
+ "type": "object",
1194
+ "properties": {
1195
+ "headers": {
1196
+ "type": "object",
1197
+ "additionalProperties": true
1198
+ },
1199
+ "body": {
1200
+ "$ref": "/payment-card/v1/schemas/definitions/Error"
1201
+ }
1202
+ },
1203
+ "required": ["body"],
1204
+ "additionalProperties": false
1205
+ }
1206
+ }
1207
+ }
1208
+ },
1209
+ "/payment-card/v1/card/:cardId/lock/:lockStatus": {
1210
+ "put": {
1211
+ "request": {
1212
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1213
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardLockPutRequestContext",
1214
+ "type": "object",
1215
+ "properties": {
1216
+ "params": {
1217
+ "type": "object",
1218
+ "additionalProperties": false,
1219
+ "properties": {
1220
+ "cardId": {
1221
+ "$ref": "/payment-card/v1/schemas/definitions/CardId"
1222
+ },
1223
+ "lockStatus": {
1224
+ "$ref": "/payment-card/v1/schemas/definitions/LockStatus"
1225
+ }
1226
+ },
1227
+ "required": ["cardId", "lockStatus"]
1228
+ },
1229
+ "headers": {
1230
+ "type": "object",
1231
+ "additionalProperties": true,
1232
+ "properties": {
1233
+ "created-on": {
1234
+ "type": "string",
1235
+ "format": "date-time"
1236
+ },
1237
+ "last-modified": {
1238
+ "type": "string",
1239
+ "format": "date-time"
1240
+ },
1241
+ "if-match": {
1242
+ "type": "string"
1243
+ }
1244
+ },
1245
+ "required": ["If-Match"]
1246
+ }
1247
+ },
1248
+ "required": ["params", "headers"],
1249
+ "additionalProperties": false
1250
+ },
1251
+ "responses": {
1252
+ "204": {
1253
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1254
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardLockPutResponseNoContent",
1255
+ "type": "object",
1256
+ "properties": {
1257
+ "headers": {
1258
+ "type": "object",
1259
+ "properties": {
1260
+ "last-modified": {
1261
+ "type": "string",
1262
+ "format": "date-time"
1263
+ },
1264
+ "created-on": {
1265
+ "type": "string",
1266
+ "format": "date-time"
1267
+ },
1268
+ "updated-on": {
1269
+ "type": "string",
1270
+ "format": "date-time"
1271
+ },
1272
+ "etag": {
1273
+ "type": "string"
1274
+ }
1275
+ }
1276
+ }
1277
+ },
1278
+ "required": [],
1279
+ "additionalProperties": false
1280
+ },
1281
+ "409": {
1282
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1283
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardLockPutResponseConflict",
1284
+ "type": "object",
1285
+ "properties": {
1286
+ "headers": {
1287
+ "type": "object",
1288
+ "additionalProperties": true
1289
+ }
1290
+ },
1291
+ "required": [],
1292
+ "additionalProperties": false
1293
+ },
1294
+ "412": {
1295
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1296
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardLockPutResponsePreconditionFailed",
1297
+ "type": "object",
1298
+ "properties": {
1299
+ "headers": {
1300
+ "type": "object",
1301
+ "additionalProperties": true
1302
+ }
1303
+ },
1304
+ "required": [],
1305
+ "additionalProperties": false
1306
+ },
1307
+ "default": {
1308
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1309
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardLockPutResponseDefault",
1310
+ "type": "object",
1311
+ "properties": {
1312
+ "headers": {
1313
+ "type": "object",
1314
+ "additionalProperties": true
1315
+ },
1316
+ "body": {
1317
+ "$ref": "/payment-card/v1/schemas/definitions/Error"
1318
+ }
1319
+ },
1320
+ "required": ["body"],
1321
+ "additionalProperties": false
1322
+ }
1323
+ }
1324
+ }
1325
+ },
1326
+ "/payment-card/v1/card/:cardId/pin-offset": {
1327
+ "put": {
1328
+ "request": {
1329
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1330
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardPinOffsetPutRequestContext",
1331
+ "type": "object",
1332
+ "properties": {
1333
+ "params": {
1334
+ "type": "object",
1335
+ "additionalProperties": false,
1336
+ "properties": {
1337
+ "cardId": {
1338
+ "$ref": "/payment-card/v1/schemas/definitions/CardId"
1339
+ }
1340
+ },
1341
+ "required": ["cardId"]
1342
+ },
1343
+ "headers": {
1344
+ "type": "object",
1345
+ "additionalProperties": true,
1346
+ "properties": {
1347
+ "created-on": {
1348
+ "type": "string",
1349
+ "format": "date-time"
1350
+ },
1351
+ "last-modified": {
1352
+ "type": "string",
1353
+ "format": "date-time"
1354
+ },
1355
+ "if-match": {
1356
+ "type": "string"
1357
+ }
1358
+ },
1359
+ "required": ["If-Match"]
1360
+ },
1361
+ "body": {
1362
+ "$ref": "/payment-card/v1/schemas/definitions/PinOffsetRequest"
1363
+ }
1364
+ },
1365
+ "required": ["params", "headers", "body"],
1366
+ "additionalProperties": false
1367
+ },
1368
+ "responses": {
1369
+ "204": {
1370
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1371
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardPinOffsetPutResponseNoContent",
1372
+ "type": "object",
1373
+ "properties": {
1374
+ "headers": {
1375
+ "type": "object",
1376
+ "properties": {
1377
+ "last-modified": {
1378
+ "type": "string",
1379
+ "format": "date-time"
1380
+ },
1381
+ "created-on": {
1382
+ "type": "string",
1383
+ "format": "date-time"
1384
+ },
1385
+ "updated-on": {
1386
+ "type": "string",
1387
+ "format": "date-time"
1388
+ },
1389
+ "etag": {
1390
+ "type": "string"
1391
+ }
1392
+ }
1393
+ }
1394
+ },
1395
+ "required": [],
1396
+ "additionalProperties": false
1397
+ },
1398
+ "default": {
1399
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1400
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardPinOffsetPutResponseDefault",
1401
+ "type": "object",
1402
+ "properties": {
1403
+ "headers": {
1404
+ "type": "object",
1405
+ "additionalProperties": true
1406
+ },
1407
+ "body": {
1408
+ "$ref": "/payment-card/v1/schemas/definitions/Error"
1409
+ }
1410
+ },
1411
+ "required": ["body"],
1412
+ "additionalProperties": false
1413
+ }
1414
+ }
1415
+ }
1416
+ },
1417
+ "/payment-card/v1/card/:cardId/state/:stateStatus": {
1418
+ "put": {
1419
+ "request": {
1420
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1421
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardStatePutRequestContext",
1422
+ "type": "object",
1423
+ "properties": {
1424
+ "params": {
1425
+ "type": "object",
1426
+ "additionalProperties": false,
1427
+ "properties": {
1428
+ "cardId": {
1429
+ "$ref": "/payment-card/v1/schemas/definitions/CardId"
1430
+ },
1431
+ "stateStatus": {
1432
+ "$ref": "/payment-card/v1/schemas/definitions/StateStatus"
1433
+ }
1434
+ },
1435
+ "required": ["cardId", "stateStatus"]
1436
+ },
1437
+ "headers": {
1438
+ "type": "object",
1439
+ "additionalProperties": true,
1440
+ "properties": {
1441
+ "created-on": {
1442
+ "type": "string",
1443
+ "format": "date-time"
1444
+ },
1445
+ "last-modified": {
1446
+ "type": "string",
1447
+ "format": "date-time"
1448
+ },
1449
+ "if-match": {
1450
+ "type": "string"
1451
+ }
1452
+ },
1453
+ "required": ["If-Match"]
1454
+ }
1455
+ },
1456
+ "required": ["params", "headers"],
1457
+ "additionalProperties": false
1458
+ },
1459
+ "responses": {
1460
+ "204": {
1461
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1462
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardStatePutResponseNoContent",
1463
+ "type": "object",
1464
+ "properties": {
1465
+ "headers": {
1466
+ "type": "object",
1467
+ "properties": {
1468
+ "last-modified": {
1469
+ "type": "string",
1470
+ "format": "date-time"
1471
+ },
1472
+ "created-on": {
1473
+ "type": "string",
1474
+ "format": "date-time"
1475
+ },
1476
+ "updated-on": {
1477
+ "type": "string",
1478
+ "format": "date-time"
1479
+ },
1480
+ "etag": {
1481
+ "type": "string"
1482
+ }
1483
+ }
1484
+ }
1485
+ },
1486
+ "required": [],
1487
+ "additionalProperties": false
1488
+ },
1489
+ "409": {
1490
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1491
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardStatePutResponseConflict",
1492
+ "type": "object",
1493
+ "properties": {
1494
+ "headers": {
1495
+ "type": "object",
1496
+ "additionalProperties": true
1497
+ }
1498
+ },
1499
+ "required": [],
1500
+ "additionalProperties": false
1501
+ },
1502
+ "412": {
1503
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1504
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardStatePutResponsePreconditionFailed",
1505
+ "type": "object",
1506
+ "properties": {
1507
+ "headers": {
1508
+ "type": "object",
1509
+ "additionalProperties": true
1510
+ }
1511
+ },
1512
+ "required": [],
1513
+ "additionalProperties": false
1514
+ },
1515
+ "default": {
1516
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1517
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardStatePutResponseDefault",
1518
+ "type": "object",
1519
+ "properties": {
1520
+ "headers": {
1521
+ "type": "object",
1522
+ "additionalProperties": true
1523
+ },
1524
+ "body": {
1525
+ "$ref": "/payment-card/v1/schemas/definitions/Error"
1526
+ }
1527
+ },
1528
+ "required": ["body"],
1529
+ "additionalProperties": false
1530
+ }
1531
+ }
1532
+ }
1533
+ },
1534
+ "/payment-card/v1/card-number/:cardId/key/:publicKeyHashPath": {
1535
+ "put": {
1536
+ "request": {
1537
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1538
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardNumberKeyPutRequestContext",
1539
+ "type": "object",
1540
+ "properties": {
1541
+ "params": {
1542
+ "type": "object",
1543
+ "additionalProperties": false,
1544
+ "properties": {
1545
+ "cardId": {
1546
+ "$ref": "/payment-card/v1/schemas/definitions/CardId"
1547
+ },
1548
+ "publicKeyHashPath": {
1549
+ "$ref": "/payment-card/v1/schemas/definitions/Hash"
1550
+ }
1551
+ },
1552
+ "required": ["cardId", "publicKeyHashPath"]
1553
+ },
1554
+ "headers": {
1555
+ "type": "object",
1556
+ "additionalProperties": true
1557
+ },
1558
+ "body": {
1559
+ "$ref": "/payment-card/v1/schemas/definitions/CardNumberRequest"
1560
+ }
1561
+ },
1562
+ "required": ["params", "body"],
1563
+ "additionalProperties": false
1564
+ },
1565
+ "responses": {
1566
+ "200": {
1567
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1568
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardNumberKeyPutResponseOK",
1569
+ "type": "object",
1570
+ "properties": {
1571
+ "headers": {
1572
+ "type": "object",
1573
+ "additionalProperties": true
1574
+ },
1575
+ "body": {
1576
+ "$ref": "/payment-card/v1/schemas/definitions/EncryptedCardNumber"
1577
+ }
1578
+ },
1579
+ "required": ["body"],
1580
+ "additionalProperties": false
1581
+ },
1582
+ "default": {
1583
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1584
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/CardNumberKeyPutResponseDefault",
1585
+ "type": "object",
1586
+ "properties": {
1587
+ "headers": {
1588
+ "type": "object",
1589
+ "additionalProperties": true
1590
+ },
1591
+ "body": {
1592
+ "$ref": "/payment-card/v1/schemas/definitions/Error"
1593
+ }
1594
+ },
1595
+ "required": ["body"],
1596
+ "additionalProperties": false
1597
+ }
1598
+ }
1599
+ }
1600
+ },
1601
+ "/payment-card/v1/pin-offset-key/:pinOffsetKeyId": {
1602
+ "put": {
1603
+ "request": {
1604
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1605
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/PinOffsetKeyPutRequestContext",
1606
+ "type": "object",
1607
+ "properties": {
1608
+ "params": {
1609
+ "type": "object",
1610
+ "additionalProperties": false,
1611
+ "properties": {
1612
+ "pinOffsetKeyId": {
1613
+ "$ref": "/payment-card/v1/schemas/definitions/PinOffsetKeyId"
1614
+ }
1615
+ },
1616
+ "required": ["pinOffsetKeyId"]
1617
+ },
1618
+ "headers": {
1619
+ "type": "object",
1620
+ "additionalProperties": true
1621
+ }
1622
+ },
1623
+ "required": ["params"],
1624
+ "additionalProperties": false
1625
+ },
1626
+ "responses": {
1627
+ "200": {
1628
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1629
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/PinOffsetKeyPutResponseOK",
1630
+ "type": "object",
1631
+ "properties": {
1632
+ "headers": {
1633
+ "type": "object",
1634
+ "additionalProperties": true
1635
+ },
1636
+ "body": {
1637
+ "$ref": "/payment-card/v1/schemas/definitions/PinOffsetKey"
1638
+ }
1639
+ },
1640
+ "required": ["body"],
1641
+ "additionalProperties": false
1642
+ },
1643
+ "default": {
1644
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1645
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/api/PinOffsetKeyPutResponseDefault",
1646
+ "type": "object",
1647
+ "properties": {
1648
+ "headers": {
1649
+ "type": "object",
1650
+ "additionalProperties": true
1651
+ },
1652
+ "body": {
1653
+ "$ref": "/payment-card/v1/schemas/definitions/Error"
1654
+ }
1655
+ },
1656
+ "required": ["body"],
1657
+ "additionalProperties": false
1658
+ }
1659
+ }
1660
+ }
1661
+ }
1662
+ },
1663
+ "definitions": {
1664
+ "ActiveStatus": {
1665
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1666
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/ActiveStatus",
1667
+ "description": "The active/inactive status for the card",
1668
+ "type": "string",
1669
+ "enum": ["INACTIVE", "ACTIVE"]
1670
+ },
1671
+ "Bin": {
1672
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1673
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/Bin",
1674
+ "type": "string",
1675
+ "pattern": "^\\d+$",
1676
+ "description": "Bank Identification Number",
1677
+ "minLength": 6,
1678
+ "maxLength": 8
1679
+ },
1680
+ "BlockStatus": {
1681
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1682
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/BlockStatus",
1683
+ "type": "string",
1684
+ "description": "Whether the card is open or blocked for various reasons",
1685
+ "enum": ["OPEN", "BLOCKED LOST OR STOLEN", "BLOCKED NO FRAUD", "BLOCKED WITH FRAUD"]
1686
+ },
1687
+ "Card": {
1688
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1689
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/Card",
1690
+ "type": "object",
1691
+ "additionalProperties": false,
1692
+ "required": [
1693
+ "bin",
1694
+ "last4",
1695
+ "expirationDate",
1696
+ "cardNumber",
1697
+ "serviceCode",
1698
+ "pinOffset",
1699
+ "applicationTransactionCounter",
1700
+ "sequenceNumber",
1701
+ "state",
1702
+ "active",
1703
+ "block",
1704
+ "lock",
1705
+ "capture",
1706
+ "createdOn",
1707
+ "updatedOn",
1708
+ "lastModified"
1709
+ ],
1710
+ "properties": {
1711
+ "bin": {
1712
+ "$ref": "/payment-card/v1/schemas/definitions/Bin"
1713
+ },
1714
+ "last4": {
1715
+ "type": "string",
1716
+ "pattern": "^\\d+$",
1717
+ "description": "Last four digits of the card number",
1718
+ "minLength": 4,
1719
+ "maxLength": 4
1720
+ },
1721
+ "expirationDate": {
1722
+ "$ref": "/payment-card/v1/schemas/definitions/ExpirationDate"
1723
+ },
1724
+ "cardNumber": {
1725
+ "type": "string",
1726
+ "description": "Encrypted card number (PAN)"
1727
+ },
1728
+ "serviceCode": {
1729
+ "type": "string",
1730
+ "pattern": "^\\d+$",
1731
+ "description": "Service code for the card",
1732
+ "minLength": 3,
1733
+ "maxLength": 3
1734
+ },
1735
+ "pinOffset": {
1736
+ "type": "string",
1737
+ "description": "Encrypted pin offset for the card"
1738
+ },
1739
+ "applicationTransactionCounter": {
1740
+ "type": "integer",
1741
+ "description": "Application transaction counter (ATC) for the card"
1742
+ },
1743
+ "sequenceNumber": {
1744
+ "type": "integer",
1745
+ "description": "Used to differentiate issuing the same card and expiration date on multiple plastics"
1746
+ },
1747
+ "state": {
1748
+ "$ref": "/payment-card/v1/schemas/definitions/StateStatus"
1749
+ },
1750
+ "active": {
1751
+ "$ref": "/payment-card/v1/schemas/definitions/ActiveStatus"
1752
+ },
1753
+ "block": {
1754
+ "$ref": "/payment-card/v1/schemas/definitions/BlockStatus"
1755
+ },
1756
+ "lock": {
1757
+ "$ref": "/payment-card/v1/schemas/definitions/LockStatus"
1758
+ },
1759
+ "capture": {
1760
+ "type": "boolean",
1761
+ "description": "Whether the card should be captured at next use"
1762
+ },
1763
+ "updatedOn": {
1764
+ "type": "string",
1765
+ "description": "Time data was last updated",
1766
+ "format": "date-time"
1767
+ },
1768
+ "lastModified": {
1769
+ "type": "string",
1770
+ "description": "Time data was last modified (Deprecated. Use updatedOn)",
1771
+ "format": "date-time"
1772
+ },
1773
+ "createdOn": {
1774
+ "description": "Time encrypted data was first stored",
1775
+ "type": "string",
1776
+ "format": "date-time"
1777
+ }
1778
+ }
1779
+ },
1780
+ "CardResponse": {
1781
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1782
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/CardResponse",
1783
+ "type": "object",
1784
+ "additionalProperties": false,
1785
+ "required": ["dataEncryptionKeyId", "storageKeyId", "card"],
1786
+ "properties": {
1787
+ "dataEncryptionKeyId": {
1788
+ "$ref": "/payment-card/v1/schemas/definitions/DataEncryptionKeyId"
1789
+ },
1790
+ "storageKeyId": {
1791
+ "$ref": "/payment-card/v1/schemas/definitions/StorageKeyId"
1792
+ },
1793
+ "encryptedDataEncryptionKey": {
1794
+ "description": "Encrypted DEK matching the publicKeyHash sent in the request. Used to decrypt values in the Card object.\n",
1795
+ "type": "string"
1796
+ },
1797
+ "card": {
1798
+ "$ref": "/payment-card/v1/schemas/definitions/Card"
1799
+ }
1800
+ }
1801
+ },
1802
+ "CardQueryResponse": {
1803
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1804
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/CardQueryResponse",
1805
+ "type": "object",
1806
+ "additionalProperties": false,
1807
+ "required": ["dataEncryptionKeyId", "storageKeyId", "cardId", "card"],
1808
+ "properties": {
1809
+ "dataEncryptionKeyId": {
1810
+ "$ref": "/payment-card/v1/schemas/definitions/DataEncryptionKeyId"
1811
+ },
1812
+ "storageKeyId": {
1813
+ "$ref": "/payment-card/v1/schemas/definitions/StorageKeyId"
1814
+ },
1815
+ "encryptedDataEncryptionKey": {
1816
+ "description": "Encrypted DEK matching the publicKeyHash sent in the request. Used to decrypt values in the Card object.\n",
1817
+ "type": "string"
1818
+ },
1819
+ "cardId": {
1820
+ "$ref": "/payment-card/v1/schemas/definitions/CardId"
1821
+ },
1822
+ "card": {
1823
+ "$ref": "/payment-card/v1/schemas/definitions/Card"
1824
+ }
1825
+ }
1826
+ },
1827
+ "CardId": {
1828
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1829
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/CardId",
1830
+ "type": "string",
1831
+ "description": "Card identifier",
1832
+ "format": "uuid"
1833
+ },
1834
+ "Query": {
1835
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1836
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/Query",
1837
+ "description": "Response from querying /card by cardNumberHash",
1838
+ "type": "object",
1839
+ "required": ["cards"],
1840
+ "properties": {
1841
+ "cards": {
1842
+ "type": "array",
1843
+ "items": {
1844
+ "$ref": "/payment-card/v1/schemas/definitions/CardQueryResponse"
1845
+ }
1846
+ }
1847
+ }
1848
+ },
1849
+ "CardNumberRequest": {
1850
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1851
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/CardNumberRequest",
1852
+ "type": "object",
1853
+ "additionalProperties": false,
1854
+ "required": ["publicKey"],
1855
+ "properties": {
1856
+ "publicKey": {
1857
+ "$ref": "/payment-card/v1/schemas/definitions/PublicKey"
1858
+ }
1859
+ }
1860
+ },
1861
+ "EncryptedCardNumber": {
1862
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1863
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/EncryptedCardNumber",
1864
+ "type": "object",
1865
+ "additionalProperties": false,
1866
+ "required": ["encryptedDataEncryptionKey", "cardNumber"],
1867
+ "properties": {
1868
+ "encryptedDataEncryptionKey": {
1869
+ "description": "RSA encrypted data encryption key used to AES encrypt cardNumber.",
1870
+ "type": "string"
1871
+ },
1872
+ "cardNumber": {
1873
+ "type": "string",
1874
+ "description": "AES-256 encrypted card number"
1875
+ }
1876
+ }
1877
+ },
1878
+ "Error": {
1879
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1880
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/Error",
1881
+ "type": "object",
1882
+ "additionalProperties": false,
1883
+ "description": "Server error message",
1884
+ "properties": {
1885
+ "message": {
1886
+ "type": "string"
1887
+ },
1888
+ "code": {
1889
+ "type": "string"
1890
+ }
1891
+ }
1892
+ },
1893
+ "ExpirationDate": {
1894
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1895
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/ExpirationDate",
1896
+ "type": "string",
1897
+ "pattern": "([0-9][0-9])(0[1-9]|1[0-2])",
1898
+ "format": "YYMM",
1899
+ "description": "Expiration date for the card and will be assumed to be the last millisecond of the month",
1900
+ "minLength": 4,
1901
+ "maxLength": 4
1902
+ },
1903
+ "DataEncryptionKeyId": {
1904
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1905
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/DataEncryptionKeyId",
1906
+ "type": "string",
1907
+ "description": "Reference to encryption keys Payment Card Service will use to encrypt the Card object.\n",
1908
+ "format": "uuid"
1909
+ },
1910
+ "DataEncryptionKeyRequest": {
1911
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1912
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/DataEncryptionKeyRequest",
1913
+ "type": "object",
1914
+ "additionalProperties": false,
1915
+ "required": ["publicKeys"],
1916
+ "properties": {
1917
+ "publicKeys": {
1918
+ "type": "array",
1919
+ "minItems": 1,
1920
+ "description": "List of public keys in PEM format.\n\nAssociated private keys can be used to decrypt card data encrypted by Payment Card Service.\n",
1921
+ "items": {
1922
+ "$ref": "/payment-card/v1/schemas/definitions/PublicKey"
1923
+ }
1924
+ }
1925
+ }
1926
+ },
1927
+ "DataEncryptionKeyResponse": {
1928
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1929
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/DataEncryptionKeyResponse",
1930
+ "type": "object",
1931
+ "required": ["transmissionKey", "encryptedDataEncryptionKeys", "createdOn", "lastModified"],
1932
+ "properties": {
1933
+ "createdOn": {
1934
+ "description": "Time data was first stored",
1935
+ "type": "string",
1936
+ "format": "date-time"
1937
+ },
1938
+ "lastModified": {
1939
+ "description": "Time data was last modified",
1940
+ "type": "string",
1941
+ "format": "date-time"
1942
+ },
1943
+ "encryptedDataEncryptionKeys": {
1944
+ "type": "array",
1945
+ "items": {
1946
+ "type": "object",
1947
+ "additionalProperties": false,
1948
+ "description": "An object that includes an encrypted data encryption key and a hashed version of the public key used to encrypt it.\nThe publicKeyHash string is derived using @checkdigit/hash and the caller's public key included in DataEncryptionKeyRequest.\n",
1949
+ "required": ["publicKeyHash", "encryptedDataEncryptionKey"],
1950
+ "properties": {
1951
+ "publicKeyHash": {
1952
+ "$ref": "/payment-card/v1/schemas/definitions/Hash"
1953
+ },
1954
+ "encryptedDataEncryptionKey": {
1955
+ "type": "string",
1956
+ "description": "RSA encrypted data encryption key used to AES sensitive data in the Card object."
1957
+ }
1958
+ }
1959
+ }
1960
+ },
1961
+ "transmissionKey": {
1962
+ "type": "string",
1963
+ "description": "A public key in PEM format.\nWhen creating a card with a specific card number (i.e. /card/{cardId}/number), use the transmissionKey to\nencrypt the data encryption key used to encrypt the card number.\n"
1964
+ }
1965
+ }
1966
+ },
1967
+ "History": {
1968
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1969
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/History",
1970
+ "description": "The History object represents the updates to a Card object over time.\n",
1971
+ "type": "object",
1972
+ "required": ["updates"],
1973
+ "properties": {
1974
+ "dataEncryptionKeyId": {
1975
+ "type": "string",
1976
+ "description": "Reference to encryption keys Payment Card Service used to encrypt the Card object.\n",
1977
+ "format": "uuid"
1978
+ },
1979
+ "storageKeyId": {
1980
+ "type": "string",
1981
+ "description": "DEK's non-derived identifier to be used by Check Digit services only.\n"
1982
+ },
1983
+ "encryptedDataEncryptionKey": {
1984
+ "description": "RSA encrypted data encryption key used to decrypt AES encrypted values in Card objects.\n",
1985
+ "type": "string"
1986
+ },
1987
+ "updates": {
1988
+ "type": "array",
1989
+ "items": {
1990
+ "$ref": "/payment-card/v1/schemas/definitions/Card"
1991
+ }
1992
+ }
1993
+ }
1994
+ },
1995
+ "LockStatus": {
1996
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1997
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/LockStatus",
1998
+ "type": "string",
1999
+ "description": "A cardholder initiated status. A locked card will fail authorization. Locked cards can be unlocked.\n\nA cardholder may choose to lock a card while temporarily misplaced.\n",
2000
+ "enum": ["LOCKED", "UNLOCKED"]
2001
+ },
2002
+ "Ping": {
2003
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2004
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/Ping",
2005
+ "type": "object",
2006
+ "additionalProperties": false,
2007
+ "required": ["serverTime"],
2008
+ "properties": {
2009
+ "serverTime": {
2010
+ "type": "string",
2011
+ "format": "date-time",
2012
+ "description": "Current server time",
2013
+ "example": "1970-01-01T00:00:00.000Z"
2014
+ }
2015
+ }
2016
+ },
2017
+ "PinOffsetKey": {
2018
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2019
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/PinOffsetKey",
2020
+ "type": "object",
2021
+ "additionalProperties": false,
2022
+ "required": ["transmissionKey"],
2023
+ "properties": {
2024
+ "transmissionKey": {
2025
+ "description": "A PEM formatted public key to be used to RSA encrypt a data encryption key.",
2026
+ "type": "string"
2027
+ }
2028
+ }
2029
+ },
2030
+ "PinOffsetKeyId": {
2031
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2032
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/PinOffsetKeyId",
2033
+ "type": "string",
2034
+ "format": "uuid",
2035
+ "description": "Identifier for the PinOffsetKey used to encrypt the data encryption key."
2036
+ },
2037
+ "PinOffsetRequest": {
2038
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2039
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/PinOffsetRequest",
2040
+ "type": "object",
2041
+ "additionalProperties": false,
2042
+ "required": ["encryptedDataEncryptionKey", "pinOffsetKeyId", "encryptedUserDefinedPin"],
2043
+ "properties": {
2044
+ "pinOffsetKeyId": {
2045
+ "$ref": "/payment-card/v1/schemas/definitions/PinOffsetKeyId"
2046
+ },
2047
+ "encryptedDataEncryptionKey": {
2048
+ "description": "A RSA encrypted (using transmissionKey) data encryption key that encrypted the encryptedUserDefinedPin.",
2049
+ "type": "string"
2050
+ },
2051
+ "encryptedUserDefinedPin": {
2052
+ "type": "string",
2053
+ "description": "User Defined PIN encrypted with an AES generated data encryption key. This is the PIN to be used for new\noffset calculation. (plaintext pin has minLength = 4, maxLength = 12)\n"
2054
+ }
2055
+ }
2056
+ },
2057
+ "Hash": {
2058
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2059
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/Hash",
2060
+ "type": "string",
2061
+ "format": "uuid",
2062
+ "example": "15a85f64-5717-4562-b3fc-2c963f66afa6",
2063
+ "description": "UUID derived using @checkdigit/hash"
2064
+ },
2065
+ "NewCard": {
2066
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2067
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/NewCard",
2068
+ "type": "object",
2069
+ "additionalProperties": false,
2070
+ "required": ["bin", "expirationDate", "serviceCode", "sequenceNumber", "state", "active", "block", "lock"],
2071
+ "properties": {
2072
+ "bin": {
2073
+ "$ref": "/payment-card/v1/schemas/definitions/Bin"
2074
+ },
2075
+ "expirationDate": {
2076
+ "$ref": "/payment-card/v1/schemas/definitions/ExpirationDate"
2077
+ },
2078
+ "serviceCode": {
2079
+ "type": "string",
2080
+ "pattern": "^\\d+$",
2081
+ "description": "Used to set general guidelines for how the card can be used, e.g. domestic only or international, online authorizations only, etc.\n",
2082
+ "minLength": 3,
2083
+ "maxLength": 3
2084
+ },
2085
+ "sequenceNumber": {
2086
+ "type": "integer",
2087
+ "description": "Used to differentiate issuing the same card and expiration date on multiple plastics.",
2088
+ "minimum": 0,
2089
+ "maximum": 10
2090
+ },
2091
+ "state": {
2092
+ "$ref": "/payment-card/v1/schemas/definitions/StateStatus"
2093
+ },
2094
+ "active": {
2095
+ "$ref": "/payment-card/v1/schemas/definitions/ActiveStatus"
2096
+ },
2097
+ "block": {
2098
+ "$ref": "/payment-card/v1/schemas/definitions/BlockStatus"
2099
+ },
2100
+ "lock": {
2101
+ "$ref": "/payment-card/v1/schemas/definitions/LockStatus"
2102
+ }
2103
+ }
2104
+ },
2105
+ "NewCardRequest": {
2106
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2107
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/NewCardRequest",
2108
+ "type": "object",
2109
+ "required": ["dataEncryptionKeyId", "cardNumberLength", "newCard"],
2110
+ "additionalProperties": false,
2111
+ "properties": {
2112
+ "dataEncryptionKeyId": {
2113
+ "$ref": "/payment-card/v1/schemas/definitions/DataEncryptionKeyId"
2114
+ },
2115
+ "cardNumberLength": {
2116
+ "type": "integer",
2117
+ "description": "Desired number of digits in the card number.",
2118
+ "minimum": 15,
2119
+ "maximum": 19
2120
+ },
2121
+ "newCard": {
2122
+ "$ref": "/payment-card/v1/schemas/definitions/NewCard"
2123
+ }
2124
+ }
2125
+ },
2126
+ "NewCardRequestWithCardNumber": {
2127
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2128
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/NewCardRequestWithCardNumber",
2129
+ "type": "object",
2130
+ "required": ["encryptedCardNumber", "encryptedDataEncryptionKey", "dataEncryptionKeyId", "newCard"],
2131
+ "properties": {
2132
+ "encryptedCardNumber": {
2133
+ "type": "string"
2134
+ },
2135
+ "encryptedDataEncryptionKey": {
2136
+ "description": "RSA encrypted data encryption key used to AES encrypt encryptedCardNumber",
2137
+ "type": "string"
2138
+ },
2139
+ "dataEncryptionKeyId": {
2140
+ "$ref": "/payment-card/v1/schemas/definitions/DataEncryptionKeyId"
2141
+ },
2142
+ "newCard": {
2143
+ "$ref": "/payment-card/v1/schemas/definitions/NewCard"
2144
+ }
2145
+ },
2146
+ "additionalProperties": false
2147
+ },
2148
+ "PublicKey": {
2149
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2150
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/PublicKey",
2151
+ "description": "Public key in PEM format",
2152
+ "type": "string",
2153
+ "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"
2154
+ },
2155
+ "PublicKeyResponse": {
2156
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2157
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/PublicKeyResponse",
2158
+ "description": "This object contains the rsa generated public key for the Payment Card Service. This public key must be used\nwhen transmitting encrypted data to Payment Card Service APIs.\n",
2159
+ "type": "object",
2160
+ "required": ["publicKey"],
2161
+ "properties": {
2162
+ "publicKey": {
2163
+ "$ref": "/payment-card/v1/schemas/definitions/PublicKey"
2164
+ }
2165
+ }
2166
+ },
2167
+ "StateStatus": {
2168
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2169
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/StateStatus",
2170
+ "description": "The current state of the card",
2171
+ "type": "string",
2172
+ "enum": ["CURRENT", "REISSUED", "RETIRED", "FORCED"]
2173
+ },
2174
+ "StorageKeyId": {
2175
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2176
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v1/schemas/definitions/StorageKeyId",
2177
+ "type": "string",
2178
+ "description": "DEK's non-derived identifier to be used by Check Digit services only.\n"
2179
+ }
2180
+ }
2181
+ }