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

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