@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,4336 @@
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
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
30
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Ping",
31
+ "type": "object",
32
+ "additionalProperties": false,
33
+ "required": ["serverTime"],
34
+ "properties": {
35
+ "serverTime": {
36
+ "type": "string",
37
+ "format": "date-time",
38
+ "description": "Current server time",
39
+ "example": "1970-01-01T00:00:00.000Z"
40
+ }
41
+ }
42
+ }
43
+ },
44
+ "required": ["body"],
45
+ "additionalProperties": false
46
+ },
47
+ "default": {
48
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
49
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/PingGetResponseDefault",
50
+ "type": "object",
51
+ "properties": {
52
+ "headers": {
53
+ "type": "object",
54
+ "additionalProperties": true
55
+ },
56
+ "body": {
57
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
58
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Error",
59
+ "type": "object",
60
+ "additionalProperties": false,
61
+ "description": "Server error message",
62
+ "properties": {
63
+ "message": {
64
+ "type": "string"
65
+ },
66
+ "code": {
67
+ "type": "string"
68
+ }
69
+ }
70
+ }
71
+ },
72
+ "required": ["body"],
73
+ "additionalProperties": false
74
+ }
75
+ }
76
+ }
77
+ },
78
+ "/payment-card/v2/tenant/:tenantId/public-key": {
79
+ "get": {
80
+ "request": {
81
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
82
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/PublicKeyGetRequestContext",
83
+ "type": "object",
84
+ "properties": {
85
+ "params": {
86
+ "type": "object",
87
+ "additionalProperties": false,
88
+ "properties": {
89
+ "tenantId": {
90
+ "type": "string"
91
+ }
92
+ },
93
+ "required": ["tenantId"]
94
+ },
95
+ "headers": {
96
+ "type": "object",
97
+ "additionalProperties": true
98
+ }
99
+ },
100
+ "required": ["params"],
101
+ "additionalProperties": false
102
+ },
103
+ "responses": {
104
+ "200": {
105
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
106
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/PublicKeyGetResponseOK",
107
+ "type": "object",
108
+ "properties": {
109
+ "headers": {
110
+ "type": "object",
111
+ "properties": {
112
+ "created-on": {
113
+ "type": "string",
114
+ "format": "date-time"
115
+ },
116
+ "updated-on": {
117
+ "type": "string",
118
+ "format": "date-time"
119
+ }
120
+ }
121
+ },
122
+ "body": {
123
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
124
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/PublicKeyResponse",
125
+ "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",
126
+ "type": "object",
127
+ "required": ["publicKey"],
128
+ "properties": {
129
+ "publicKey": {
130
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
131
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/PublicKey",
132
+ "description": "Public key in PEM format",
133
+ "type": "string",
134
+ "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"
135
+ }
136
+ }
137
+ }
138
+ },
139
+ "required": ["body"],
140
+ "additionalProperties": false
141
+ },
142
+ "default": {
143
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
144
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/PublicKeyGetResponseDefault",
145
+ "type": "object",
146
+ "properties": {
147
+ "headers": {
148
+ "type": "object",
149
+ "additionalProperties": true
150
+ },
151
+ "body": {
152
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
153
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Error",
154
+ "type": "object",
155
+ "additionalProperties": false,
156
+ "description": "Server error message",
157
+ "properties": {
158
+ "message": {
159
+ "type": "string"
160
+ },
161
+ "code": {
162
+ "type": "string"
163
+ }
164
+ }
165
+ }
166
+ },
167
+ "required": ["body"],
168
+ "additionalProperties": false
169
+ }
170
+ }
171
+ }
172
+ },
173
+ "/payment-card/v2/tenant/:tenantId/data-encryption-key/:dataEncryptionKeyId": {
174
+ "get": {
175
+ "request": {
176
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
177
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/DataEncryptionKeyGetRequestContext",
178
+ "type": "object",
179
+ "properties": {
180
+ "params": {
181
+ "type": "object",
182
+ "additionalProperties": false,
183
+ "properties": {
184
+ "tenantId": {
185
+ "type": "string"
186
+ },
187
+ "dataEncryptionKeyId": {
188
+ "type": "string",
189
+ "format": "uuid"
190
+ }
191
+ },
192
+ "required": ["tenantId", "dataEncryptionKeyId"]
193
+ },
194
+ "headers": {
195
+ "type": "object",
196
+ "additionalProperties": true
197
+ }
198
+ },
199
+ "required": ["params"],
200
+ "additionalProperties": false
201
+ },
202
+ "responses": {
203
+ "200": {
204
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
205
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/DataEncryptionKeyGetResponseOK",
206
+ "type": "object",
207
+ "properties": {
208
+ "headers": {
209
+ "type": "object",
210
+ "properties": {
211
+ "created-on": {
212
+ "type": "string",
213
+ "format": "date-time"
214
+ },
215
+ "updated-on": {
216
+ "type": "string",
217
+ "format": "date-time"
218
+ }
219
+ }
220
+ },
221
+ "body": {
222
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
223
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/DataEncryptionKeyResponse",
224
+ "type": "object",
225
+ "required": ["encryptedDataEncryptionKeys", "createdOn"],
226
+ "properties": {
227
+ "createdOn": {
228
+ "description": "Time data was first stored",
229
+ "type": "string",
230
+ "format": "date-time"
231
+ },
232
+ "encryptedDataEncryptionKeys": {
233
+ "type": "array",
234
+ "items": {
235
+ "type": "object",
236
+ "additionalProperties": false,
237
+ "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",
238
+ "required": ["publicKeyHash", "encryptedDataEncryptionKey"],
239
+ "properties": {
240
+ "publicKeyHash": {
241
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
242
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Hash",
243
+ "type": "string",
244
+ "format": "uuid",
245
+ "example": "15a85f64-5717-4562-b3fc-2c963f66afa6",
246
+ "description": "UUID derived using @checkdigit/hash"
247
+ },
248
+ "encryptedDataEncryptionKey": {
249
+ "type": "string",
250
+ "description": "RSA encrypted data encryption key used to AES sensitive data in the Card object."
251
+ }
252
+ }
253
+ }
254
+ }
255
+ }
256
+ }
257
+ },
258
+ "required": ["body"],
259
+ "additionalProperties": false
260
+ },
261
+ "404": {
262
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
263
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/DataEncryptionKeyGetResponseNotFound",
264
+ "type": "object",
265
+ "properties": {
266
+ "headers": {
267
+ "type": "object",
268
+ "additionalProperties": true
269
+ }
270
+ },
271
+ "required": [],
272
+ "additionalProperties": false
273
+ },
274
+ "default": {
275
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
276
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/DataEncryptionKeyGetResponseDefault",
277
+ "type": "object",
278
+ "properties": {
279
+ "headers": {
280
+ "type": "object",
281
+ "additionalProperties": true
282
+ },
283
+ "body": {
284
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
285
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Error",
286
+ "type": "object",
287
+ "additionalProperties": false,
288
+ "description": "Server error message",
289
+ "properties": {
290
+ "message": {
291
+ "type": "string"
292
+ },
293
+ "code": {
294
+ "type": "string"
295
+ }
296
+ }
297
+ }
298
+ },
299
+ "required": ["body"],
300
+ "additionalProperties": false
301
+ }
302
+ }
303
+ },
304
+ "put": {
305
+ "request": {
306
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
307
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/DataEncryptionKeyPutRequestContext",
308
+ "type": "object",
309
+ "properties": {
310
+ "params": {
311
+ "type": "object",
312
+ "additionalProperties": false,
313
+ "properties": {
314
+ "tenantId": {
315
+ "type": "string"
316
+ },
317
+ "dataEncryptionKeyId": {
318
+ "type": "string",
319
+ "format": "uuid"
320
+ }
321
+ },
322
+ "required": ["tenantId", "dataEncryptionKeyId"]
323
+ },
324
+ "headers": {
325
+ "type": "object",
326
+ "additionalProperties": true
327
+ },
328
+ "body": {
329
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
330
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/DataEncryptionKeyRequest",
331
+ "type": "object",
332
+ "additionalProperties": false,
333
+ "required": ["publicKeys"],
334
+ "properties": {
335
+ "publicKeys": {
336
+ "type": "array",
337
+ "minItems": 1,
338
+ "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",
339
+ "items": {
340
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
341
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/PublicKey",
342
+ "description": "Public key in PEM format",
343
+ "type": "string",
344
+ "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"
345
+ }
346
+ }
347
+ }
348
+ }
349
+ },
350
+ "required": ["params", "body"],
351
+ "additionalProperties": false
352
+ },
353
+ "responses": {
354
+ "200": {
355
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
356
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/DataEncryptionKeyPutResponseOK",
357
+ "type": "object",
358
+ "properties": {
359
+ "headers": {
360
+ "type": "object",
361
+ "properties": {
362
+ "created-on": {
363
+ "type": "string",
364
+ "format": "date-time"
365
+ },
366
+ "updated-on": {
367
+ "type": "string",
368
+ "format": "date-time"
369
+ }
370
+ }
371
+ },
372
+ "body": {
373
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
374
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/DataEncryptionKeyResponse",
375
+ "type": "object",
376
+ "required": ["encryptedDataEncryptionKeys", "createdOn"],
377
+ "properties": {
378
+ "createdOn": {
379
+ "description": "Time data was first stored",
380
+ "type": "string",
381
+ "format": "date-time"
382
+ },
383
+ "encryptedDataEncryptionKeys": {
384
+ "type": "array",
385
+ "items": {
386
+ "type": "object",
387
+ "additionalProperties": false,
388
+ "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",
389
+ "required": ["publicKeyHash", "encryptedDataEncryptionKey"],
390
+ "properties": {
391
+ "publicKeyHash": {
392
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
393
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Hash",
394
+ "type": "string",
395
+ "format": "uuid",
396
+ "example": "15a85f64-5717-4562-b3fc-2c963f66afa6",
397
+ "description": "UUID derived using @checkdigit/hash"
398
+ },
399
+ "encryptedDataEncryptionKey": {
400
+ "type": "string",
401
+ "description": "RSA encrypted data encryption key used to AES sensitive data in the Card object."
402
+ }
403
+ }
404
+ }
405
+ }
406
+ }
407
+ }
408
+ },
409
+ "required": ["body"],
410
+ "additionalProperties": false
411
+ },
412
+ "default": {
413
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
414
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/DataEncryptionKeyPutResponseDefault",
415
+ "type": "object",
416
+ "properties": {
417
+ "headers": {
418
+ "type": "object",
419
+ "additionalProperties": true
420
+ },
421
+ "body": {
422
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
423
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Error",
424
+ "type": "object",
425
+ "additionalProperties": false,
426
+ "description": "Server error message",
427
+ "properties": {
428
+ "message": {
429
+ "type": "string"
430
+ },
431
+ "code": {
432
+ "type": "string"
433
+ }
434
+ }
435
+ }
436
+ },
437
+ "required": ["body"],
438
+ "additionalProperties": false
439
+ }
440
+ }
441
+ }
442
+ },
443
+ "/payment-card/v2/tenant/:tenantId/card": {
444
+ "get": {
445
+ "request": {
446
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
447
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardQueryRequestContext",
448
+ "type": "object",
449
+ "properties": {
450
+ "params": {
451
+ "type": "object",
452
+ "additionalProperties": false,
453
+ "properties": {
454
+ "cardNumberHash": {
455
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
456
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Hash",
457
+ "type": "string",
458
+ "format": "uuid",
459
+ "example": "15a85f64-5717-4562-b3fc-2c963f66afa6",
460
+ "description": "UUID derived using @checkdigit/hash"
461
+ },
462
+ "at": {
463
+ "type": "string",
464
+ "format": "date-time"
465
+ }
466
+ },
467
+ "required": ["cardNumberHash", "at"]
468
+ },
469
+ "headers": {
470
+ "type": "object",
471
+ "additionalProperties": true
472
+ }
473
+ },
474
+ "required": ["params", "query"],
475
+ "additionalProperties": false
476
+ },
477
+ "responses": {
478
+ "200": {
479
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
480
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardQueryResponseOK",
481
+ "type": "object",
482
+ "properties": {
483
+ "headers": {
484
+ "type": "object",
485
+ "additionalProperties": true
486
+ },
487
+ "body": {
488
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
489
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Query",
490
+ "description": "Response from querying /card by cardNumberHash",
491
+ "type": "object",
492
+ "required": ["cards"],
493
+ "properties": {
494
+ "cards": {
495
+ "type": "array",
496
+ "minItems": 0,
497
+ "items": {
498
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
499
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/CardQueryResponse",
500
+ "type": "object",
501
+ "additionalProperties": false,
502
+ "required": ["dataEncryptionKeyId", "storageKeyId", "cardId", "card", "updatedOn", "createdOn"],
503
+ "properties": {
504
+ "dataEncryptionKeyId": {
505
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
506
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/DataEncryptionKeyId",
507
+ "type": "string",
508
+ "description": "Reference to encryption keys Payment Card Service will use to encrypt the Card object.\n",
509
+ "format": "uuid"
510
+ },
511
+ "storageKeyId": {
512
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
513
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/StorageKeyId",
514
+ "type": "string",
515
+ "description": "DEK's non-derived identifier to be used by Check Digit services only.\n"
516
+ },
517
+ "encryptedDataEncryptionKey": {
518
+ "description": "Encrypted DEK matching the publicKeyHash sent in the request. Used to decrypt values in the Card object.\n",
519
+ "type": "string"
520
+ },
521
+ "cardId": {
522
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
523
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/CardId",
524
+ "type": "string",
525
+ "description": "Card identifier",
526
+ "format": "uuid"
527
+ },
528
+ "card": {
529
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
530
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Card",
531
+ "type": "object",
532
+ "additionalProperties": false,
533
+ "required": [
534
+ "bin",
535
+ "last4",
536
+ "expirationDate",
537
+ "cardNumber",
538
+ "serviceCode",
539
+ "pinOffset",
540
+ "sequenceNumber",
541
+ "state",
542
+ "active",
543
+ "block",
544
+ "lock",
545
+ "capture"
546
+ ],
547
+ "properties": {
548
+ "bin": {
549
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
550
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Bin",
551
+ "type": "string",
552
+ "pattern": "^\\d+$",
553
+ "description": "Bank Identification Number",
554
+ "minLength": 6,
555
+ "maxLength": 8
556
+ },
557
+ "last4": {
558
+ "type": "string",
559
+ "pattern": "^\\d+$",
560
+ "description": "Last four digits of the card number",
561
+ "minLength": 4,
562
+ "maxLength": 4
563
+ },
564
+ "expirationDate": {
565
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
566
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ExpirationDate",
567
+ "type": "string",
568
+ "pattern": "([0-9][0-9])(0[1-9]|1[0-2])",
569
+ "format": "YYMM",
570
+ "description": "Expiration date for the card and will be assumed to be the last millisecond of the month",
571
+ "minLength": 4,
572
+ "maxLength": 4
573
+ },
574
+ "cardNumber": {
575
+ "type": "string",
576
+ "description": "Encrypted card number (PAN)"
577
+ },
578
+ "serviceCode": {
579
+ "type": "string",
580
+ "pattern": "^\\d+$",
581
+ "description": "Service code for the card",
582
+ "minLength": 3,
583
+ "maxLength": 3
584
+ },
585
+ "pinOffset": {
586
+ "type": "string",
587
+ "description": "Pin offset for the card. Cards created using the Payment Card V1 API will return an encrypted pin offset."
588
+ },
589
+ "sequenceNumber": {
590
+ "type": "integer",
591
+ "description": "Used to differentiate issuing the same card and expiration date on multiple plastics"
592
+ },
593
+ "state": {
594
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
595
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/StateStatus",
596
+ "description": "The current state of the card",
597
+ "type": "string",
598
+ "enum": ["CURRENT", "REISSUED", "RETIRED", "FORCED"]
599
+ },
600
+ "active": {
601
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
602
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ActiveStatus",
603
+ "description": "The active/inactive status for the card",
604
+ "type": "string",
605
+ "enum": ["INACTIVE", "ACTIVE"]
606
+ },
607
+ "block": {
608
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
609
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/BlockStatus",
610
+ "type": "string",
611
+ "description": "Whether the card is open or blocked for various reasons",
612
+ "enum": ["OPEN", "BLOCKED LOST OR STOLEN", "BLOCKED NO FRAUD", "BLOCKED WITH FRAUD"]
613
+ },
614
+ "lock": {
615
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
616
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/LockStatus",
617
+ "type": "string",
618
+ "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",
619
+ "enum": ["LOCKED", "UNLOCKED"]
620
+ },
621
+ "capture": {
622
+ "type": "boolean",
623
+ "description": "Whether the card should be captured at next use"
624
+ },
625
+ "pinId": {
626
+ "type": "string",
627
+ "description": "Identifier for the PIN (Personal Identification Number) used for this card."
628
+ }
629
+ }
630
+ },
631
+ "updatedOn": {
632
+ "type": "string",
633
+ "description": "Time data was last updated",
634
+ "format": "date-time"
635
+ },
636
+ "createdOn": {
637
+ "description": "Time encrypted data was first stored",
638
+ "type": "string",
639
+ "format": "date-time"
640
+ }
641
+ }
642
+ }
643
+ }
644
+ }
645
+ }
646
+ },
647
+ "required": ["body"],
648
+ "additionalProperties": false
649
+ },
650
+ "default": {
651
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
652
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardQueryResponseDefault",
653
+ "type": "object",
654
+ "properties": {
655
+ "headers": {
656
+ "type": "object",
657
+ "additionalProperties": true
658
+ },
659
+ "body": {
660
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
661
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Error",
662
+ "type": "object",
663
+ "additionalProperties": false,
664
+ "description": "Server error message",
665
+ "properties": {
666
+ "message": {
667
+ "type": "string"
668
+ },
669
+ "code": {
670
+ "type": "string"
671
+ }
672
+ }
673
+ }
674
+ },
675
+ "required": ["body"],
676
+ "additionalProperties": false
677
+ }
678
+ }
679
+ }
680
+ },
681
+ "/payment-card/v2/tenant/:tenantId/card/:cardId": {
682
+ "get": {
683
+ "request": {
684
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
685
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardGetRequestContext",
686
+ "type": "object",
687
+ "properties": {
688
+ "params": {
689
+ "type": "object",
690
+ "additionalProperties": false,
691
+ "properties": {
692
+ "at": {
693
+ "type": "string",
694
+ "format": "date-time"
695
+ },
696
+ "publicKeyHashQuery": {
697
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
698
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Hash",
699
+ "type": "string",
700
+ "format": "uuid",
701
+ "example": "15a85f64-5717-4562-b3fc-2c963f66afa6",
702
+ "description": "UUID derived using @checkdigit/hash"
703
+ }
704
+ },
705
+ "required": ["at"]
706
+ },
707
+ "headers": {
708
+ "type": "object",
709
+ "additionalProperties": true
710
+ }
711
+ },
712
+ "required": ["params", "query"],
713
+ "additionalProperties": false
714
+ },
715
+ "responses": {
716
+ "200": {
717
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
718
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardGetResponseOK",
719
+ "type": "object",
720
+ "properties": {
721
+ "headers": {
722
+ "type": "object",
723
+ "properties": {
724
+ "created-on": {
725
+ "type": "string",
726
+ "format": "date-time"
727
+ },
728
+ "updated-on": {
729
+ "type": "string",
730
+ "format": "date-time"
731
+ },
732
+ "etag": {
733
+ "type": "string"
734
+ }
735
+ }
736
+ },
737
+ "body": {
738
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
739
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/CardResponse",
740
+ "type": "object",
741
+ "additionalProperties": false,
742
+ "required": ["dataEncryptionKeyId", "storageKeyId", "card"],
743
+ "properties": {
744
+ "dataEncryptionKeyId": {
745
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
746
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/DataEncryptionKeyId",
747
+ "type": "string",
748
+ "description": "Reference to encryption keys Payment Card Service will use to encrypt the Card object.\n",
749
+ "format": "uuid"
750
+ },
751
+ "storageKeyId": {
752
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
753
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/StorageKeyId",
754
+ "type": "string",
755
+ "description": "DEK's non-derived identifier to be used by Check Digit services only.\n"
756
+ },
757
+ "encryptedDataEncryptionKey": {
758
+ "description": "Encrypted DEK matching the publicKeyHash sent in the request. Used to decrypt values in the Card object.\n",
759
+ "type": "string"
760
+ },
761
+ "card": {
762
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
763
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Card",
764
+ "type": "object",
765
+ "additionalProperties": false,
766
+ "required": [
767
+ "bin",
768
+ "last4",
769
+ "expirationDate",
770
+ "cardNumber",
771
+ "serviceCode",
772
+ "pinOffset",
773
+ "sequenceNumber",
774
+ "state",
775
+ "active",
776
+ "block",
777
+ "lock",
778
+ "capture"
779
+ ],
780
+ "properties": {
781
+ "bin": {
782
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
783
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Bin",
784
+ "type": "string",
785
+ "pattern": "^\\d+$",
786
+ "description": "Bank Identification Number",
787
+ "minLength": 6,
788
+ "maxLength": 8
789
+ },
790
+ "last4": {
791
+ "type": "string",
792
+ "pattern": "^\\d+$",
793
+ "description": "Last four digits of the card number",
794
+ "minLength": 4,
795
+ "maxLength": 4
796
+ },
797
+ "expirationDate": {
798
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
799
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ExpirationDate",
800
+ "type": "string",
801
+ "pattern": "([0-9][0-9])(0[1-9]|1[0-2])",
802
+ "format": "YYMM",
803
+ "description": "Expiration date for the card and will be assumed to be the last millisecond of the month",
804
+ "minLength": 4,
805
+ "maxLength": 4
806
+ },
807
+ "cardNumber": {
808
+ "type": "string",
809
+ "description": "Encrypted card number (PAN)"
810
+ },
811
+ "serviceCode": {
812
+ "type": "string",
813
+ "pattern": "^\\d+$",
814
+ "description": "Service code for the card",
815
+ "minLength": 3,
816
+ "maxLength": 3
817
+ },
818
+ "pinOffset": {
819
+ "type": "string",
820
+ "description": "Pin offset for the card. Cards created using the Payment Card V1 API will return an encrypted pin offset."
821
+ },
822
+ "sequenceNumber": {
823
+ "type": "integer",
824
+ "description": "Used to differentiate issuing the same card and expiration date on multiple plastics"
825
+ },
826
+ "state": {
827
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
828
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/StateStatus",
829
+ "description": "The current state of the card",
830
+ "type": "string",
831
+ "enum": ["CURRENT", "REISSUED", "RETIRED", "FORCED"]
832
+ },
833
+ "active": {
834
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
835
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ActiveStatus",
836
+ "description": "The active/inactive status for the card",
837
+ "type": "string",
838
+ "enum": ["INACTIVE", "ACTIVE"]
839
+ },
840
+ "block": {
841
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
842
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/BlockStatus",
843
+ "type": "string",
844
+ "description": "Whether the card is open or blocked for various reasons",
845
+ "enum": ["OPEN", "BLOCKED LOST OR STOLEN", "BLOCKED NO FRAUD", "BLOCKED WITH FRAUD"]
846
+ },
847
+ "lock": {
848
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
849
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/LockStatus",
850
+ "type": "string",
851
+ "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",
852
+ "enum": ["LOCKED", "UNLOCKED"]
853
+ },
854
+ "capture": {
855
+ "type": "boolean",
856
+ "description": "Whether the card should be captured at next use"
857
+ },
858
+ "pinId": {
859
+ "type": "string",
860
+ "description": "Identifier for the PIN (Personal Identification Number) used for this card."
861
+ }
862
+ }
863
+ }
864
+ }
865
+ }
866
+ },
867
+ "required": ["body"],
868
+ "additionalProperties": false
869
+ },
870
+ "404": {
871
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
872
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardGetResponseNotFound",
873
+ "type": "object",
874
+ "properties": {
875
+ "headers": {
876
+ "type": "object",
877
+ "additionalProperties": true
878
+ }
879
+ },
880
+ "required": [],
881
+ "additionalProperties": false
882
+ },
883
+ "default": {
884
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
885
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardGetResponseDefault",
886
+ "type": "object",
887
+ "properties": {
888
+ "headers": {
889
+ "type": "object",
890
+ "additionalProperties": true
891
+ },
892
+ "body": {
893
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
894
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Error",
895
+ "type": "object",
896
+ "additionalProperties": false,
897
+ "description": "Server error message",
898
+ "properties": {
899
+ "message": {
900
+ "type": "string"
901
+ },
902
+ "code": {
903
+ "type": "string"
904
+ }
905
+ }
906
+ }
907
+ },
908
+ "required": ["body"],
909
+ "additionalProperties": false
910
+ }
911
+ }
912
+ },
913
+ "put": {
914
+ "request": {
915
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
916
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardPutRequestContext",
917
+ "type": "object",
918
+ "properties": {
919
+ "params": {
920
+ "type": "object",
921
+ "additionalProperties": false,
922
+ "properties": {
923
+ "tenantId": {
924
+ "type": "string"
925
+ },
926
+ "cardId": {
927
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
928
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/CardId",
929
+ "type": "string",
930
+ "description": "Card identifier",
931
+ "format": "uuid"
932
+ }
933
+ },
934
+ "required": ["tenantId", "cardId"]
935
+ },
936
+ "headers": {
937
+ "type": "object",
938
+ "additionalProperties": true,
939
+ "properties": {
940
+ "created-on": {
941
+ "type": "string",
942
+ "format": "date-time"
943
+ }
944
+ }
945
+ },
946
+ "body": {
947
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
948
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/NewCardRequest",
949
+ "type": "object",
950
+ "required": ["dataEncryptionKeyId", "cardNumberLength", "newCard"],
951
+ "additionalProperties": false,
952
+ "properties": {
953
+ "dataEncryptionKeyId": {
954
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
955
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/DataEncryptionKeyId",
956
+ "type": "string",
957
+ "description": "Reference to encryption keys Payment Card Service will use to encrypt the Card object.\n",
958
+ "format": "uuid"
959
+ },
960
+ "cardNumberLength": {
961
+ "type": "integer",
962
+ "description": "Desired number of digits in the card number.",
963
+ "minimum": 15,
964
+ "maximum": 19
965
+ },
966
+ "newCard": {
967
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
968
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/NewCard",
969
+ "type": "object",
970
+ "additionalProperties": false,
971
+ "required": [
972
+ "bin",
973
+ "expirationDate",
974
+ "serviceCode",
975
+ "sequenceNumber",
976
+ "state",
977
+ "active",
978
+ "block",
979
+ "lock"
980
+ ],
981
+ "properties": {
982
+ "bin": {
983
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
984
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Bin",
985
+ "type": "string",
986
+ "pattern": "^\\d+$",
987
+ "description": "Bank Identification Number",
988
+ "minLength": 6,
989
+ "maxLength": 8
990
+ },
991
+ "expirationDate": {
992
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
993
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ExpirationDate",
994
+ "type": "string",
995
+ "pattern": "([0-9][0-9])(0[1-9]|1[0-2])",
996
+ "format": "YYMM",
997
+ "description": "Expiration date for the card and will be assumed to be the last millisecond of the month",
998
+ "minLength": 4,
999
+ "maxLength": 4
1000
+ },
1001
+ "serviceCode": {
1002
+ "type": "string",
1003
+ "pattern": "^\\d+$",
1004
+ "description": "Used to set general guidelines for how the card can be used, e.g. domestic only or international, online authorizations only, etc.\n",
1005
+ "minLength": 3,
1006
+ "maxLength": 3
1007
+ },
1008
+ "sequenceNumber": {
1009
+ "type": "integer",
1010
+ "description": "Used to differentiate issuing the same card and expiration date on multiple plastics.",
1011
+ "minimum": 0,
1012
+ "maximum": 10
1013
+ },
1014
+ "state": {
1015
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1016
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/StateStatus",
1017
+ "description": "The current state of the card",
1018
+ "type": "string",
1019
+ "enum": ["CURRENT", "REISSUED", "RETIRED", "FORCED"]
1020
+ },
1021
+ "active": {
1022
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1023
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ActiveStatus",
1024
+ "description": "The active/inactive status for the card",
1025
+ "type": "string",
1026
+ "enum": ["INACTIVE", "ACTIVE"]
1027
+ },
1028
+ "block": {
1029
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1030
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/BlockStatus",
1031
+ "type": "string",
1032
+ "description": "Whether the card is open or blocked for various reasons",
1033
+ "enum": ["OPEN", "BLOCKED LOST OR STOLEN", "BLOCKED NO FRAUD", "BLOCKED WITH FRAUD"]
1034
+ },
1035
+ "lock": {
1036
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1037
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/LockStatus",
1038
+ "type": "string",
1039
+ "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",
1040
+ "enum": ["LOCKED", "UNLOCKED"]
1041
+ }
1042
+ }
1043
+ }
1044
+ }
1045
+ }
1046
+ },
1047
+ "required": ["params", "body"],
1048
+ "additionalProperties": false
1049
+ },
1050
+ "responses": {
1051
+ "200": {
1052
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1053
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardPutResponseOK",
1054
+ "type": "object",
1055
+ "properties": {
1056
+ "headers": {
1057
+ "type": "object",
1058
+ "properties": {
1059
+ "created-on": {
1060
+ "type": "string",
1061
+ "format": "date-time"
1062
+ },
1063
+ "updated-on": {
1064
+ "type": "string",
1065
+ "format": "date-time"
1066
+ },
1067
+ "etag": {
1068
+ "type": "string"
1069
+ }
1070
+ }
1071
+ },
1072
+ "body": {
1073
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1074
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/CardResponse",
1075
+ "type": "object",
1076
+ "additionalProperties": false,
1077
+ "required": ["dataEncryptionKeyId", "storageKeyId", "card"],
1078
+ "properties": {
1079
+ "dataEncryptionKeyId": {
1080
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1081
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/DataEncryptionKeyId",
1082
+ "type": "string",
1083
+ "description": "Reference to encryption keys Payment Card Service will use to encrypt the Card object.\n",
1084
+ "format": "uuid"
1085
+ },
1086
+ "storageKeyId": {
1087
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1088
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/StorageKeyId",
1089
+ "type": "string",
1090
+ "description": "DEK's non-derived identifier to be used by Check Digit services only.\n"
1091
+ },
1092
+ "encryptedDataEncryptionKey": {
1093
+ "description": "Encrypted DEK matching the publicKeyHash sent in the request. Used to decrypt values in the Card object.\n",
1094
+ "type": "string"
1095
+ },
1096
+ "card": {
1097
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1098
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Card",
1099
+ "type": "object",
1100
+ "additionalProperties": false,
1101
+ "required": [
1102
+ "bin",
1103
+ "last4",
1104
+ "expirationDate",
1105
+ "cardNumber",
1106
+ "serviceCode",
1107
+ "pinOffset",
1108
+ "sequenceNumber",
1109
+ "state",
1110
+ "active",
1111
+ "block",
1112
+ "lock",
1113
+ "capture"
1114
+ ],
1115
+ "properties": {
1116
+ "bin": {
1117
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1118
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Bin",
1119
+ "type": "string",
1120
+ "pattern": "^\\d+$",
1121
+ "description": "Bank Identification Number",
1122
+ "minLength": 6,
1123
+ "maxLength": 8
1124
+ },
1125
+ "last4": {
1126
+ "type": "string",
1127
+ "pattern": "^\\d+$",
1128
+ "description": "Last four digits of the card number",
1129
+ "minLength": 4,
1130
+ "maxLength": 4
1131
+ },
1132
+ "expirationDate": {
1133
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1134
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ExpirationDate",
1135
+ "type": "string",
1136
+ "pattern": "([0-9][0-9])(0[1-9]|1[0-2])",
1137
+ "format": "YYMM",
1138
+ "description": "Expiration date for the card and will be assumed to be the last millisecond of the month",
1139
+ "minLength": 4,
1140
+ "maxLength": 4
1141
+ },
1142
+ "cardNumber": {
1143
+ "type": "string",
1144
+ "description": "Encrypted card number (PAN)"
1145
+ },
1146
+ "serviceCode": {
1147
+ "type": "string",
1148
+ "pattern": "^\\d+$",
1149
+ "description": "Service code for the card",
1150
+ "minLength": 3,
1151
+ "maxLength": 3
1152
+ },
1153
+ "pinOffset": {
1154
+ "type": "string",
1155
+ "description": "Pin offset for the card. Cards created using the Payment Card V1 API will return an encrypted pin offset."
1156
+ },
1157
+ "sequenceNumber": {
1158
+ "type": "integer",
1159
+ "description": "Used to differentiate issuing the same card and expiration date on multiple plastics"
1160
+ },
1161
+ "state": {
1162
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1163
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/StateStatus",
1164
+ "description": "The current state of the card",
1165
+ "type": "string",
1166
+ "enum": ["CURRENT", "REISSUED", "RETIRED", "FORCED"]
1167
+ },
1168
+ "active": {
1169
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1170
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ActiveStatus",
1171
+ "description": "The active/inactive status for the card",
1172
+ "type": "string",
1173
+ "enum": ["INACTIVE", "ACTIVE"]
1174
+ },
1175
+ "block": {
1176
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1177
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/BlockStatus",
1178
+ "type": "string",
1179
+ "description": "Whether the card is open or blocked for various reasons",
1180
+ "enum": ["OPEN", "BLOCKED LOST OR STOLEN", "BLOCKED NO FRAUD", "BLOCKED WITH FRAUD"]
1181
+ },
1182
+ "lock": {
1183
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1184
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/LockStatus",
1185
+ "type": "string",
1186
+ "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",
1187
+ "enum": ["LOCKED", "UNLOCKED"]
1188
+ },
1189
+ "capture": {
1190
+ "type": "boolean",
1191
+ "description": "Whether the card should be captured at next use"
1192
+ },
1193
+ "pinId": {
1194
+ "type": "string",
1195
+ "description": "Identifier for the PIN (Personal Identification Number) used for this card."
1196
+ }
1197
+ }
1198
+ }
1199
+ }
1200
+ }
1201
+ },
1202
+ "required": ["body"],
1203
+ "additionalProperties": false
1204
+ },
1205
+ "409": {
1206
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1207
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardPutResponseConflict",
1208
+ "type": "object",
1209
+ "properties": {
1210
+ "headers": {
1211
+ "type": "object",
1212
+ "additionalProperties": true
1213
+ }
1214
+ },
1215
+ "required": [],
1216
+ "additionalProperties": false
1217
+ },
1218
+ "412": {
1219
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1220
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardPutResponsePreconditionFailed",
1221
+ "type": "object",
1222
+ "properties": {
1223
+ "headers": {
1224
+ "type": "object",
1225
+ "additionalProperties": true
1226
+ }
1227
+ },
1228
+ "required": [],
1229
+ "additionalProperties": false
1230
+ },
1231
+ "default": {
1232
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1233
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardPutResponseDefault",
1234
+ "type": "object",
1235
+ "properties": {
1236
+ "headers": {
1237
+ "type": "object",
1238
+ "additionalProperties": true
1239
+ },
1240
+ "body": {
1241
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1242
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Error",
1243
+ "type": "object",
1244
+ "additionalProperties": false,
1245
+ "description": "Server error message",
1246
+ "properties": {
1247
+ "message": {
1248
+ "type": "string"
1249
+ },
1250
+ "code": {
1251
+ "type": "string"
1252
+ }
1253
+ }
1254
+ }
1255
+ },
1256
+ "required": ["body"],
1257
+ "additionalProperties": false
1258
+ }
1259
+ }
1260
+ }
1261
+ },
1262
+ "/payment-card/v2/tenant/:tenantId/card/:cardId/number": {
1263
+ "put": {
1264
+ "request": {
1265
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1266
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardNumberPutRequestContext",
1267
+ "type": "object",
1268
+ "properties": {
1269
+ "params": {
1270
+ "type": "object",
1271
+ "additionalProperties": false,
1272
+ "properties": {
1273
+ "tenantId": {
1274
+ "type": "string"
1275
+ },
1276
+ "cardId": {
1277
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1278
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/CardId",
1279
+ "type": "string",
1280
+ "description": "Card identifier",
1281
+ "format": "uuid"
1282
+ }
1283
+ },
1284
+ "required": ["tenantId", "cardId"]
1285
+ },
1286
+ "headers": {
1287
+ "type": "object",
1288
+ "additionalProperties": true,
1289
+ "properties": {
1290
+ "created-on": {
1291
+ "type": "string",
1292
+ "format": "date-time"
1293
+ }
1294
+ }
1295
+ },
1296
+ "body": {
1297
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1298
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/NewCardRequestWithCardNumber",
1299
+ "type": "object",
1300
+ "required": ["encryptedCardNumber", "encryptedDataEncryptionKey", "dataEncryptionKeyId", "newCard"],
1301
+ "properties": {
1302
+ "encryptedCardNumber": {
1303
+ "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.",
1304
+ "type": "string"
1305
+ },
1306
+ "encryptedDataEncryptionKey": {
1307
+ "description": "RSA encrypted data encryption key used to AES encrypt encryptedCardNumber",
1308
+ "type": "string"
1309
+ },
1310
+ "dataEncryptionKeyId": {
1311
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1312
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/DataEncryptionKeyId",
1313
+ "type": "string",
1314
+ "description": "Reference to encryption keys Payment Card Service will use to encrypt the Card object.\n",
1315
+ "format": "uuid"
1316
+ },
1317
+ "newCard": {
1318
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1319
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/NewCard",
1320
+ "type": "object",
1321
+ "additionalProperties": false,
1322
+ "required": [
1323
+ "bin",
1324
+ "expirationDate",
1325
+ "serviceCode",
1326
+ "sequenceNumber",
1327
+ "state",
1328
+ "active",
1329
+ "block",
1330
+ "lock"
1331
+ ],
1332
+ "properties": {
1333
+ "bin": {
1334
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1335
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Bin",
1336
+ "type": "string",
1337
+ "pattern": "^\\d+$",
1338
+ "description": "Bank Identification Number",
1339
+ "minLength": 6,
1340
+ "maxLength": 8
1341
+ },
1342
+ "expirationDate": {
1343
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1344
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ExpirationDate",
1345
+ "type": "string",
1346
+ "pattern": "([0-9][0-9])(0[1-9]|1[0-2])",
1347
+ "format": "YYMM",
1348
+ "description": "Expiration date for the card and will be assumed to be the last millisecond of the month",
1349
+ "minLength": 4,
1350
+ "maxLength": 4
1351
+ },
1352
+ "serviceCode": {
1353
+ "type": "string",
1354
+ "pattern": "^\\d+$",
1355
+ "description": "Used to set general guidelines for how the card can be used, e.g. domestic only or international, online authorizations only, etc.\n",
1356
+ "minLength": 3,
1357
+ "maxLength": 3
1358
+ },
1359
+ "sequenceNumber": {
1360
+ "type": "integer",
1361
+ "description": "Used to differentiate issuing the same card and expiration date on multiple plastics.",
1362
+ "minimum": 0,
1363
+ "maximum": 10
1364
+ },
1365
+ "state": {
1366
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1367
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/StateStatus",
1368
+ "description": "The current state of the card",
1369
+ "type": "string",
1370
+ "enum": ["CURRENT", "REISSUED", "RETIRED", "FORCED"]
1371
+ },
1372
+ "active": {
1373
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1374
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ActiveStatus",
1375
+ "description": "The active/inactive status for the card",
1376
+ "type": "string",
1377
+ "enum": ["INACTIVE", "ACTIVE"]
1378
+ },
1379
+ "block": {
1380
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1381
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/BlockStatus",
1382
+ "type": "string",
1383
+ "description": "Whether the card is open or blocked for various reasons",
1384
+ "enum": ["OPEN", "BLOCKED LOST OR STOLEN", "BLOCKED NO FRAUD", "BLOCKED WITH FRAUD"]
1385
+ },
1386
+ "lock": {
1387
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1388
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/LockStatus",
1389
+ "type": "string",
1390
+ "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",
1391
+ "enum": ["LOCKED", "UNLOCKED"]
1392
+ }
1393
+ }
1394
+ }
1395
+ },
1396
+ "additionalProperties": false
1397
+ }
1398
+ },
1399
+ "required": ["params", "body"],
1400
+ "additionalProperties": false
1401
+ },
1402
+ "responses": {
1403
+ "200": {
1404
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1405
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardNumberPutResponseOK",
1406
+ "type": "object",
1407
+ "properties": {
1408
+ "headers": {
1409
+ "type": "object",
1410
+ "properties": {
1411
+ "created-on": {
1412
+ "type": "string",
1413
+ "format": "date-time"
1414
+ },
1415
+ "updated-on": {
1416
+ "type": "string",
1417
+ "format": "date-time"
1418
+ },
1419
+ "etag": {
1420
+ "type": "string"
1421
+ }
1422
+ }
1423
+ },
1424
+ "body": {
1425
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1426
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/CardResponse",
1427
+ "type": "object",
1428
+ "additionalProperties": false,
1429
+ "required": ["dataEncryptionKeyId", "storageKeyId", "card"],
1430
+ "properties": {
1431
+ "dataEncryptionKeyId": {
1432
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1433
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/DataEncryptionKeyId",
1434
+ "type": "string",
1435
+ "description": "Reference to encryption keys Payment Card Service will use to encrypt the Card object.\n",
1436
+ "format": "uuid"
1437
+ },
1438
+ "storageKeyId": {
1439
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1440
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/StorageKeyId",
1441
+ "type": "string",
1442
+ "description": "DEK's non-derived identifier to be used by Check Digit services only.\n"
1443
+ },
1444
+ "encryptedDataEncryptionKey": {
1445
+ "description": "Encrypted DEK matching the publicKeyHash sent in the request. Used to decrypt values in the Card object.\n",
1446
+ "type": "string"
1447
+ },
1448
+ "card": {
1449
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1450
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Card",
1451
+ "type": "object",
1452
+ "additionalProperties": false,
1453
+ "required": [
1454
+ "bin",
1455
+ "last4",
1456
+ "expirationDate",
1457
+ "cardNumber",
1458
+ "serviceCode",
1459
+ "pinOffset",
1460
+ "sequenceNumber",
1461
+ "state",
1462
+ "active",
1463
+ "block",
1464
+ "lock",
1465
+ "capture"
1466
+ ],
1467
+ "properties": {
1468
+ "bin": {
1469
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1470
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Bin",
1471
+ "type": "string",
1472
+ "pattern": "^\\d+$",
1473
+ "description": "Bank Identification Number",
1474
+ "minLength": 6,
1475
+ "maxLength": 8
1476
+ },
1477
+ "last4": {
1478
+ "type": "string",
1479
+ "pattern": "^\\d+$",
1480
+ "description": "Last four digits of the card number",
1481
+ "minLength": 4,
1482
+ "maxLength": 4
1483
+ },
1484
+ "expirationDate": {
1485
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1486
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ExpirationDate",
1487
+ "type": "string",
1488
+ "pattern": "([0-9][0-9])(0[1-9]|1[0-2])",
1489
+ "format": "YYMM",
1490
+ "description": "Expiration date for the card and will be assumed to be the last millisecond of the month",
1491
+ "minLength": 4,
1492
+ "maxLength": 4
1493
+ },
1494
+ "cardNumber": {
1495
+ "type": "string",
1496
+ "description": "Encrypted card number (PAN)"
1497
+ },
1498
+ "serviceCode": {
1499
+ "type": "string",
1500
+ "pattern": "^\\d+$",
1501
+ "description": "Service code for the card",
1502
+ "minLength": 3,
1503
+ "maxLength": 3
1504
+ },
1505
+ "pinOffset": {
1506
+ "type": "string",
1507
+ "description": "Pin offset for the card. Cards created using the Payment Card V1 API will return an encrypted pin offset."
1508
+ },
1509
+ "sequenceNumber": {
1510
+ "type": "integer",
1511
+ "description": "Used to differentiate issuing the same card and expiration date on multiple plastics"
1512
+ },
1513
+ "state": {
1514
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1515
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/StateStatus",
1516
+ "description": "The current state of the card",
1517
+ "type": "string",
1518
+ "enum": ["CURRENT", "REISSUED", "RETIRED", "FORCED"]
1519
+ },
1520
+ "active": {
1521
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1522
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ActiveStatus",
1523
+ "description": "The active/inactive status for the card",
1524
+ "type": "string",
1525
+ "enum": ["INACTIVE", "ACTIVE"]
1526
+ },
1527
+ "block": {
1528
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1529
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/BlockStatus",
1530
+ "type": "string",
1531
+ "description": "Whether the card is open or blocked for various reasons",
1532
+ "enum": ["OPEN", "BLOCKED LOST OR STOLEN", "BLOCKED NO FRAUD", "BLOCKED WITH FRAUD"]
1533
+ },
1534
+ "lock": {
1535
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1536
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/LockStatus",
1537
+ "type": "string",
1538
+ "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",
1539
+ "enum": ["LOCKED", "UNLOCKED"]
1540
+ },
1541
+ "capture": {
1542
+ "type": "boolean",
1543
+ "description": "Whether the card should be captured at next use"
1544
+ },
1545
+ "pinId": {
1546
+ "type": "string",
1547
+ "description": "Identifier for the PIN (Personal Identification Number) used for this card."
1548
+ }
1549
+ }
1550
+ }
1551
+ }
1552
+ }
1553
+ },
1554
+ "required": ["body"],
1555
+ "additionalProperties": false
1556
+ },
1557
+ "409": {
1558
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1559
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardNumberPutResponseConflict",
1560
+ "type": "object",
1561
+ "properties": {
1562
+ "headers": {
1563
+ "type": "object",
1564
+ "additionalProperties": true
1565
+ }
1566
+ },
1567
+ "required": [],
1568
+ "additionalProperties": false
1569
+ },
1570
+ "412": {
1571
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1572
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardNumberPutResponsePreconditionFailed",
1573
+ "type": "object",
1574
+ "properties": {
1575
+ "headers": {
1576
+ "type": "object",
1577
+ "additionalProperties": true
1578
+ }
1579
+ },
1580
+ "required": [],
1581
+ "additionalProperties": false
1582
+ },
1583
+ "default": {
1584
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1585
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardNumberPutResponseDefault",
1586
+ "type": "object",
1587
+ "properties": {
1588
+ "headers": {
1589
+ "type": "object",
1590
+ "additionalProperties": true
1591
+ },
1592
+ "body": {
1593
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1594
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Error",
1595
+ "type": "object",
1596
+ "additionalProperties": false,
1597
+ "description": "Server error message",
1598
+ "properties": {
1599
+ "message": {
1600
+ "type": "string"
1601
+ },
1602
+ "code": {
1603
+ "type": "string"
1604
+ }
1605
+ }
1606
+ }
1607
+ },
1608
+ "required": ["body"],
1609
+ "additionalProperties": false
1610
+ }
1611
+ }
1612
+ }
1613
+ },
1614
+ "/payment-card/v2/tenant/:tenantId/card/:cardId/active/:activeStatus": {
1615
+ "put": {
1616
+ "request": {
1617
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1618
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardActivePutRequestContext",
1619
+ "type": "object",
1620
+ "properties": {
1621
+ "params": {
1622
+ "type": "object",
1623
+ "additionalProperties": false,
1624
+ "properties": {
1625
+ "tenantId": {
1626
+ "type": "string"
1627
+ },
1628
+ "cardId": {
1629
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1630
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/CardId",
1631
+ "type": "string",
1632
+ "description": "Card identifier",
1633
+ "format": "uuid"
1634
+ },
1635
+ "activeStatus": {
1636
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1637
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ActiveStatus",
1638
+ "description": "The active/inactive status for the card",
1639
+ "type": "string",
1640
+ "enum": ["INACTIVE", "ACTIVE"]
1641
+ }
1642
+ },
1643
+ "required": ["tenantId", "cardId", "activeStatus"]
1644
+ },
1645
+ "headers": {
1646
+ "type": "object",
1647
+ "additionalProperties": true,
1648
+ "properties": {
1649
+ "created-on": {
1650
+ "type": "string",
1651
+ "format": "date-time"
1652
+ },
1653
+ "if-match": {
1654
+ "type": "string"
1655
+ }
1656
+ },
1657
+ "required": ["If-Match"]
1658
+ }
1659
+ },
1660
+ "required": ["params", "headers"],
1661
+ "additionalProperties": false
1662
+ },
1663
+ "responses": {
1664
+ "204": {
1665
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1666
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardActivePutResponseNoContent",
1667
+ "type": "object",
1668
+ "properties": {
1669
+ "headers": {
1670
+ "type": "object",
1671
+ "properties": {
1672
+ "created-on": {
1673
+ "type": "string",
1674
+ "format": "date-time"
1675
+ },
1676
+ "updated-on": {
1677
+ "type": "string",
1678
+ "format": "date-time"
1679
+ },
1680
+ "etag": {
1681
+ "type": "string"
1682
+ }
1683
+ }
1684
+ }
1685
+ },
1686
+ "required": [],
1687
+ "additionalProperties": false
1688
+ },
1689
+ "409": {
1690
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1691
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardActivePutResponseConflict",
1692
+ "type": "object",
1693
+ "properties": {
1694
+ "headers": {
1695
+ "type": "object",
1696
+ "additionalProperties": true
1697
+ }
1698
+ },
1699
+ "required": [],
1700
+ "additionalProperties": false
1701
+ },
1702
+ "412": {
1703
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1704
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardActivePutResponsePreconditionFailed",
1705
+ "type": "object",
1706
+ "properties": {
1707
+ "headers": {
1708
+ "type": "object",
1709
+ "additionalProperties": true
1710
+ }
1711
+ },
1712
+ "required": [],
1713
+ "additionalProperties": false
1714
+ },
1715
+ "422": {
1716
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1717
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardActivePutResponseUnprocessableEntity",
1718
+ "type": "object",
1719
+ "properties": {
1720
+ "headers": {
1721
+ "type": "object",
1722
+ "additionalProperties": true
1723
+ },
1724
+ "body": {
1725
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1726
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Error",
1727
+ "type": "object",
1728
+ "additionalProperties": false,
1729
+ "description": "Server error message",
1730
+ "properties": {
1731
+ "message": {
1732
+ "type": "string"
1733
+ },
1734
+ "code": {
1735
+ "type": "string"
1736
+ }
1737
+ }
1738
+ }
1739
+ },
1740
+ "required": ["body"],
1741
+ "additionalProperties": false
1742
+ },
1743
+ "default": {
1744
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1745
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardActivePutResponseDefault",
1746
+ "type": "object",
1747
+ "properties": {
1748
+ "headers": {
1749
+ "type": "object",
1750
+ "additionalProperties": true
1751
+ },
1752
+ "body": {
1753
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1754
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Error",
1755
+ "type": "object",
1756
+ "additionalProperties": false,
1757
+ "description": "Server error message",
1758
+ "properties": {
1759
+ "message": {
1760
+ "type": "string"
1761
+ },
1762
+ "code": {
1763
+ "type": "string"
1764
+ }
1765
+ }
1766
+ }
1767
+ },
1768
+ "required": ["body"],
1769
+ "additionalProperties": false
1770
+ }
1771
+ }
1772
+ }
1773
+ },
1774
+ "/payment-card/v2/tenant/:tenantId/card/:cardId/block/:blockStatus": {
1775
+ "put": {
1776
+ "request": {
1777
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1778
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardBlockPutRequestContext",
1779
+ "type": "object",
1780
+ "properties": {
1781
+ "params": {
1782
+ "type": "object",
1783
+ "additionalProperties": false,
1784
+ "properties": {
1785
+ "tenantId": {
1786
+ "type": "string"
1787
+ },
1788
+ "cardId": {
1789
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1790
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/CardId",
1791
+ "type": "string",
1792
+ "description": "Card identifier",
1793
+ "format": "uuid"
1794
+ },
1795
+ "blockStatus": {
1796
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1797
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/BlockStatus",
1798
+ "type": "string",
1799
+ "description": "Whether the card is open or blocked for various reasons",
1800
+ "enum": ["OPEN", "BLOCKED LOST OR STOLEN", "BLOCKED NO FRAUD", "BLOCKED WITH FRAUD"]
1801
+ }
1802
+ },
1803
+ "required": ["tenantId", "cardId", "blockStatus"]
1804
+ },
1805
+ "headers": {
1806
+ "type": "object",
1807
+ "additionalProperties": true,
1808
+ "properties": {
1809
+ "created-on": {
1810
+ "type": "string",
1811
+ "format": "date-time"
1812
+ },
1813
+ "if-match": {
1814
+ "type": "string"
1815
+ }
1816
+ },
1817
+ "required": ["If-Match"]
1818
+ }
1819
+ },
1820
+ "required": ["params", "headers"],
1821
+ "additionalProperties": false
1822
+ },
1823
+ "responses": {
1824
+ "204": {
1825
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1826
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardBlockPutResponseNoContent",
1827
+ "type": "object",
1828
+ "properties": {
1829
+ "headers": {
1830
+ "type": "object",
1831
+ "properties": {
1832
+ "created-on": {
1833
+ "type": "string",
1834
+ "format": "date-time"
1835
+ },
1836
+ "updated-on": {
1837
+ "type": "string",
1838
+ "format": "date-time"
1839
+ },
1840
+ "etag": {
1841
+ "type": "string"
1842
+ }
1843
+ }
1844
+ }
1845
+ },
1846
+ "required": [],
1847
+ "additionalProperties": false
1848
+ },
1849
+ "409": {
1850
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1851
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardBlockPutResponseConflict",
1852
+ "type": "object",
1853
+ "properties": {
1854
+ "headers": {
1855
+ "type": "object",
1856
+ "additionalProperties": true
1857
+ }
1858
+ },
1859
+ "required": [],
1860
+ "additionalProperties": false
1861
+ },
1862
+ "412": {
1863
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1864
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardBlockPutResponsePreconditionFailed",
1865
+ "type": "object",
1866
+ "properties": {
1867
+ "headers": {
1868
+ "type": "object",
1869
+ "additionalProperties": true
1870
+ }
1871
+ },
1872
+ "required": [],
1873
+ "additionalProperties": false
1874
+ },
1875
+ "422": {
1876
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1877
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardBlockPutResponseUnprocessableEntity",
1878
+ "type": "object",
1879
+ "properties": {
1880
+ "headers": {
1881
+ "type": "object",
1882
+ "additionalProperties": true
1883
+ },
1884
+ "body": {
1885
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1886
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Error",
1887
+ "type": "object",
1888
+ "additionalProperties": false,
1889
+ "description": "Server error message",
1890
+ "properties": {
1891
+ "message": {
1892
+ "type": "string"
1893
+ },
1894
+ "code": {
1895
+ "type": "string"
1896
+ }
1897
+ }
1898
+ }
1899
+ },
1900
+ "required": ["body"],
1901
+ "additionalProperties": false
1902
+ },
1903
+ "default": {
1904
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1905
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardBlockPutResponseDefault",
1906
+ "type": "object",
1907
+ "properties": {
1908
+ "headers": {
1909
+ "type": "object",
1910
+ "additionalProperties": true
1911
+ },
1912
+ "body": {
1913
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1914
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Error",
1915
+ "type": "object",
1916
+ "additionalProperties": false,
1917
+ "description": "Server error message",
1918
+ "properties": {
1919
+ "message": {
1920
+ "type": "string"
1921
+ },
1922
+ "code": {
1923
+ "type": "string"
1924
+ }
1925
+ }
1926
+ }
1927
+ },
1928
+ "required": ["body"],
1929
+ "additionalProperties": false
1930
+ }
1931
+ }
1932
+ }
1933
+ },
1934
+ "/payment-card/v2/tenant/:tenantId/card/:cardId/capture/:captureStatus": {
1935
+ "put": {
1936
+ "request": {
1937
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1938
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardCapturePutRequestContext",
1939
+ "type": "object",
1940
+ "properties": {
1941
+ "params": {
1942
+ "type": "object",
1943
+ "additionalProperties": false,
1944
+ "properties": {
1945
+ "tenantId": {
1946
+ "type": "string"
1947
+ },
1948
+ "cardId": {
1949
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1950
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/CardId",
1951
+ "type": "string",
1952
+ "description": "Card identifier",
1953
+ "format": "uuid"
1954
+ },
1955
+ "captureStatus": {
1956
+ "type": "boolean"
1957
+ }
1958
+ },
1959
+ "required": ["tenantId", "cardId", "captureStatus"]
1960
+ },
1961
+ "headers": {
1962
+ "type": "object",
1963
+ "additionalProperties": true,
1964
+ "properties": {
1965
+ "created-on": {
1966
+ "type": "string",
1967
+ "format": "date-time"
1968
+ },
1969
+ "if-match": {
1970
+ "type": "string"
1971
+ }
1972
+ },
1973
+ "required": ["If-Match"]
1974
+ }
1975
+ },
1976
+ "required": ["params", "headers"],
1977
+ "additionalProperties": false
1978
+ },
1979
+ "responses": {
1980
+ "204": {
1981
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1982
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardCapturePutResponseNoContent",
1983
+ "type": "object",
1984
+ "properties": {
1985
+ "headers": {
1986
+ "type": "object",
1987
+ "properties": {
1988
+ "created-on": {
1989
+ "type": "string",
1990
+ "format": "date-time"
1991
+ },
1992
+ "updated-on": {
1993
+ "type": "string",
1994
+ "format": "date-time"
1995
+ },
1996
+ "etag": {
1997
+ "type": "string"
1998
+ }
1999
+ }
2000
+ }
2001
+ },
2002
+ "required": [],
2003
+ "additionalProperties": false
2004
+ },
2005
+ "409": {
2006
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2007
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardCapturePutResponseConflict",
2008
+ "type": "object",
2009
+ "properties": {
2010
+ "headers": {
2011
+ "type": "object",
2012
+ "additionalProperties": true
2013
+ }
2014
+ },
2015
+ "required": [],
2016
+ "additionalProperties": false
2017
+ },
2018
+ "412": {
2019
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2020
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardCapturePutResponsePreconditionFailed",
2021
+ "type": "object",
2022
+ "properties": {
2023
+ "headers": {
2024
+ "type": "object",
2025
+ "additionalProperties": true
2026
+ }
2027
+ },
2028
+ "required": [],
2029
+ "additionalProperties": false
2030
+ },
2031
+ "422": {
2032
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2033
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardCapturePutResponseUnprocessableEntity",
2034
+ "type": "object",
2035
+ "properties": {
2036
+ "headers": {
2037
+ "type": "object",
2038
+ "additionalProperties": true
2039
+ },
2040
+ "body": {
2041
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2042
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Error",
2043
+ "type": "object",
2044
+ "additionalProperties": false,
2045
+ "description": "Server error message",
2046
+ "properties": {
2047
+ "message": {
2048
+ "type": "string"
2049
+ },
2050
+ "code": {
2051
+ "type": "string"
2052
+ }
2053
+ }
2054
+ }
2055
+ },
2056
+ "required": ["body"],
2057
+ "additionalProperties": false
2058
+ },
2059
+ "default": {
2060
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2061
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardCapturePutResponseDefault",
2062
+ "type": "object",
2063
+ "properties": {
2064
+ "headers": {
2065
+ "type": "object",
2066
+ "additionalProperties": true
2067
+ },
2068
+ "body": {
2069
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2070
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Error",
2071
+ "type": "object",
2072
+ "additionalProperties": false,
2073
+ "description": "Server error message",
2074
+ "properties": {
2075
+ "message": {
2076
+ "type": "string"
2077
+ },
2078
+ "code": {
2079
+ "type": "string"
2080
+ }
2081
+ }
2082
+ }
2083
+ },
2084
+ "required": ["body"],
2085
+ "additionalProperties": false
2086
+ }
2087
+ }
2088
+ }
2089
+ },
2090
+ "/payment-card/v2/tenant/:tenantId/card/:cardId/history": {
2091
+ "get": {
2092
+ "request": {
2093
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2094
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardHistoryGetRequestContext",
2095
+ "type": "object",
2096
+ "properties": {
2097
+ "params": {
2098
+ "type": "object",
2099
+ "additionalProperties": false,
2100
+ "properties": {
2101
+ "fromDate": {
2102
+ "type": "string",
2103
+ "format": "date-time"
2104
+ },
2105
+ "toDate": {
2106
+ "type": "string",
2107
+ "format": "date-time"
2108
+ },
2109
+ "publicKeyHashQuery": {
2110
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2111
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Hash",
2112
+ "type": "string",
2113
+ "format": "uuid",
2114
+ "example": "15a85f64-5717-4562-b3fc-2c963f66afa6",
2115
+ "description": "UUID derived using @checkdigit/hash"
2116
+ }
2117
+ },
2118
+ "required": ["toDate"]
2119
+ },
2120
+ "headers": {
2121
+ "type": "object",
2122
+ "additionalProperties": true
2123
+ }
2124
+ },
2125
+ "required": ["params", "query"],
2126
+ "additionalProperties": false
2127
+ },
2128
+ "responses": {
2129
+ "200": {
2130
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2131
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardHistoryGetResponseOK",
2132
+ "type": "object",
2133
+ "properties": {
2134
+ "headers": {
2135
+ "type": "object",
2136
+ "additionalProperties": true
2137
+ },
2138
+ "body": {
2139
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2140
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/History",
2141
+ "description": "The History object represents the updates to a Card object over time.\n",
2142
+ "type": "object",
2143
+ "required": ["updates"],
2144
+ "properties": {
2145
+ "dataEncryptionKeyId": {
2146
+ "type": "string",
2147
+ "description": "Reference to encryption keys Payment Card Service used to encrypt the Card object.\n",
2148
+ "format": "uuid"
2149
+ },
2150
+ "storageKeyId": {
2151
+ "type": "string",
2152
+ "description": "DEK's non-derived identifier to be used by Check Digit services only.\n"
2153
+ },
2154
+ "encryptedDataEncryptionKey": {
2155
+ "description": "RSA encrypted data encryption key used to decrypt AES encrypted values in Card objects.\n",
2156
+ "type": "string"
2157
+ },
2158
+ "updates": {
2159
+ "type": "array",
2160
+ "minItems": 0,
2161
+ "items": {
2162
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2163
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/CardUpdate",
2164
+ "type": "object",
2165
+ "additionalProperties": false,
2166
+ "required": ["card", "updatedOn", "createdOn"],
2167
+ "properties": {
2168
+ "card": {
2169
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2170
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Card",
2171
+ "type": "object",
2172
+ "additionalProperties": false,
2173
+ "required": [
2174
+ "bin",
2175
+ "last4",
2176
+ "expirationDate",
2177
+ "cardNumber",
2178
+ "serviceCode",
2179
+ "pinOffset",
2180
+ "sequenceNumber",
2181
+ "state",
2182
+ "active",
2183
+ "block",
2184
+ "lock",
2185
+ "capture"
2186
+ ],
2187
+ "properties": {
2188
+ "bin": {
2189
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2190
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Bin",
2191
+ "type": "string",
2192
+ "pattern": "^\\d+$",
2193
+ "description": "Bank Identification Number",
2194
+ "minLength": 6,
2195
+ "maxLength": 8
2196
+ },
2197
+ "last4": {
2198
+ "type": "string",
2199
+ "pattern": "^\\d+$",
2200
+ "description": "Last four digits of the card number",
2201
+ "minLength": 4,
2202
+ "maxLength": 4
2203
+ },
2204
+ "expirationDate": {
2205
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2206
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ExpirationDate",
2207
+ "type": "string",
2208
+ "pattern": "([0-9][0-9])(0[1-9]|1[0-2])",
2209
+ "format": "YYMM",
2210
+ "description": "Expiration date for the card and will be assumed to be the last millisecond of the month",
2211
+ "minLength": 4,
2212
+ "maxLength": 4
2213
+ },
2214
+ "cardNumber": {
2215
+ "type": "string",
2216
+ "description": "Encrypted card number (PAN)"
2217
+ },
2218
+ "serviceCode": {
2219
+ "type": "string",
2220
+ "pattern": "^\\d+$",
2221
+ "description": "Service code for the card",
2222
+ "minLength": 3,
2223
+ "maxLength": 3
2224
+ },
2225
+ "pinOffset": {
2226
+ "type": "string",
2227
+ "description": "Pin offset for the card. Cards created using the Payment Card V1 API will return an encrypted pin offset."
2228
+ },
2229
+ "sequenceNumber": {
2230
+ "type": "integer",
2231
+ "description": "Used to differentiate issuing the same card and expiration date on multiple plastics"
2232
+ },
2233
+ "state": {
2234
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2235
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/StateStatus",
2236
+ "description": "The current state of the card",
2237
+ "type": "string",
2238
+ "enum": ["CURRENT", "REISSUED", "RETIRED", "FORCED"]
2239
+ },
2240
+ "active": {
2241
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2242
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ActiveStatus",
2243
+ "description": "The active/inactive status for the card",
2244
+ "type": "string",
2245
+ "enum": ["INACTIVE", "ACTIVE"]
2246
+ },
2247
+ "block": {
2248
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2249
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/BlockStatus",
2250
+ "type": "string",
2251
+ "description": "Whether the card is open or blocked for various reasons",
2252
+ "enum": ["OPEN", "BLOCKED LOST OR STOLEN", "BLOCKED NO FRAUD", "BLOCKED WITH FRAUD"]
2253
+ },
2254
+ "lock": {
2255
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2256
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/LockStatus",
2257
+ "type": "string",
2258
+ "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",
2259
+ "enum": ["LOCKED", "UNLOCKED"]
2260
+ },
2261
+ "capture": {
2262
+ "type": "boolean",
2263
+ "description": "Whether the card should be captured at next use"
2264
+ },
2265
+ "pinId": {
2266
+ "type": "string",
2267
+ "description": "Identifier for the PIN (Personal Identification Number) used for this card."
2268
+ }
2269
+ }
2270
+ },
2271
+ "updatedOn": {
2272
+ "type": "string",
2273
+ "description": "Time data was last updated",
2274
+ "format": "date-time"
2275
+ },
2276
+ "createdOn": {
2277
+ "description": "Time encrypted data was first stored",
2278
+ "type": "string",
2279
+ "format": "date-time"
2280
+ }
2281
+ }
2282
+ }
2283
+ }
2284
+ }
2285
+ }
2286
+ },
2287
+ "required": ["body"],
2288
+ "additionalProperties": false
2289
+ },
2290
+ "404": {
2291
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2292
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardHistoryGetResponseNotFound",
2293
+ "type": "object",
2294
+ "properties": {
2295
+ "headers": {
2296
+ "type": "object",
2297
+ "additionalProperties": true
2298
+ }
2299
+ },
2300
+ "required": [],
2301
+ "additionalProperties": false
2302
+ },
2303
+ "default": {
2304
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2305
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardHistoryGetResponseDefault",
2306
+ "type": "object",
2307
+ "properties": {
2308
+ "headers": {
2309
+ "type": "object",
2310
+ "additionalProperties": true
2311
+ },
2312
+ "body": {
2313
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2314
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Error",
2315
+ "type": "object",
2316
+ "additionalProperties": false,
2317
+ "description": "Server error message",
2318
+ "properties": {
2319
+ "message": {
2320
+ "type": "string"
2321
+ },
2322
+ "code": {
2323
+ "type": "string"
2324
+ }
2325
+ }
2326
+ }
2327
+ },
2328
+ "required": ["body"],
2329
+ "additionalProperties": false
2330
+ }
2331
+ }
2332
+ }
2333
+ },
2334
+ "/payment-card/v2/tenant/:tenantId/card/:cardId/lock/:lockStatus": {
2335
+ "put": {
2336
+ "request": {
2337
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2338
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardLockPutRequestContext",
2339
+ "type": "object",
2340
+ "properties": {
2341
+ "params": {
2342
+ "type": "object",
2343
+ "additionalProperties": false,
2344
+ "properties": {
2345
+ "tenantId": {
2346
+ "type": "string"
2347
+ },
2348
+ "cardId": {
2349
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2350
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/CardId",
2351
+ "type": "string",
2352
+ "description": "Card identifier",
2353
+ "format": "uuid"
2354
+ },
2355
+ "lockStatus": {
2356
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2357
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/LockStatus",
2358
+ "type": "string",
2359
+ "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",
2360
+ "enum": ["LOCKED", "UNLOCKED"]
2361
+ }
2362
+ },
2363
+ "required": ["tenantId", "cardId", "lockStatus"]
2364
+ },
2365
+ "headers": {
2366
+ "type": "object",
2367
+ "additionalProperties": true,
2368
+ "properties": {
2369
+ "created-on": {
2370
+ "type": "string",
2371
+ "format": "date-time"
2372
+ },
2373
+ "if-match": {
2374
+ "type": "string"
2375
+ }
2376
+ },
2377
+ "required": ["If-Match"]
2378
+ }
2379
+ },
2380
+ "required": ["params", "headers"],
2381
+ "additionalProperties": false
2382
+ },
2383
+ "responses": {
2384
+ "204": {
2385
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2386
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardLockPutResponseNoContent",
2387
+ "type": "object",
2388
+ "properties": {
2389
+ "headers": {
2390
+ "type": "object",
2391
+ "properties": {
2392
+ "created-on": {
2393
+ "type": "string",
2394
+ "format": "date-time"
2395
+ },
2396
+ "updated-on": {
2397
+ "type": "string",
2398
+ "format": "date-time"
2399
+ },
2400
+ "etag": {
2401
+ "type": "string"
2402
+ }
2403
+ }
2404
+ }
2405
+ },
2406
+ "required": [],
2407
+ "additionalProperties": false
2408
+ },
2409
+ "409": {
2410
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2411
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardLockPutResponseConflict",
2412
+ "type": "object",
2413
+ "properties": {
2414
+ "headers": {
2415
+ "type": "object",
2416
+ "additionalProperties": true
2417
+ }
2418
+ },
2419
+ "required": [],
2420
+ "additionalProperties": false
2421
+ },
2422
+ "412": {
2423
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2424
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardLockPutResponsePreconditionFailed",
2425
+ "type": "object",
2426
+ "properties": {
2427
+ "headers": {
2428
+ "type": "object",
2429
+ "additionalProperties": true
2430
+ }
2431
+ },
2432
+ "required": [],
2433
+ "additionalProperties": false
2434
+ },
2435
+ "422": {
2436
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2437
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardLockPutResponseUnprocessableEntity",
2438
+ "type": "object",
2439
+ "properties": {
2440
+ "headers": {
2441
+ "type": "object",
2442
+ "additionalProperties": true
2443
+ },
2444
+ "body": {
2445
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2446
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Error",
2447
+ "type": "object",
2448
+ "additionalProperties": false,
2449
+ "description": "Server error message",
2450
+ "properties": {
2451
+ "message": {
2452
+ "type": "string"
2453
+ },
2454
+ "code": {
2455
+ "type": "string"
2456
+ }
2457
+ }
2458
+ }
2459
+ },
2460
+ "required": ["body"],
2461
+ "additionalProperties": false
2462
+ },
2463
+ "default": {
2464
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2465
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardLockPutResponseDefault",
2466
+ "type": "object",
2467
+ "properties": {
2468
+ "headers": {
2469
+ "type": "object",
2470
+ "additionalProperties": true
2471
+ },
2472
+ "body": {
2473
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2474
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Error",
2475
+ "type": "object",
2476
+ "additionalProperties": false,
2477
+ "description": "Server error message",
2478
+ "properties": {
2479
+ "message": {
2480
+ "type": "string"
2481
+ },
2482
+ "code": {
2483
+ "type": "string"
2484
+ }
2485
+ }
2486
+ }
2487
+ },
2488
+ "required": ["body"],
2489
+ "additionalProperties": false
2490
+ }
2491
+ }
2492
+ }
2493
+ },
2494
+ "/payment-card/v2/tenant/:tenantId/card/:cardId/pin-offset": {
2495
+ "put": {
2496
+ "request": {
2497
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2498
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardPinOffsetPutRequestContext",
2499
+ "type": "object",
2500
+ "properties": {
2501
+ "params": {
2502
+ "type": "object",
2503
+ "additionalProperties": false,
2504
+ "properties": {
2505
+ "tenantId": {
2506
+ "type": "string"
2507
+ },
2508
+ "cardId": {
2509
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2510
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/CardId",
2511
+ "type": "string",
2512
+ "description": "Card identifier",
2513
+ "format": "uuid"
2514
+ }
2515
+ },
2516
+ "required": ["tenantId", "cardId"]
2517
+ },
2518
+ "headers": {
2519
+ "type": "object",
2520
+ "additionalProperties": true,
2521
+ "properties": {
2522
+ "created-on": {
2523
+ "type": "string",
2524
+ "format": "date-time"
2525
+ },
2526
+ "if-match": {
2527
+ "type": "string"
2528
+ }
2529
+ },
2530
+ "required": ["If-Match"]
2531
+ },
2532
+ "body": {
2533
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2534
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/PinOffsetRequest",
2535
+ "type": "object",
2536
+ "additionalProperties": false,
2537
+ "required": ["encryptedDataEncryptionKey", "pinOffsetKeyId", "encryptedUserDefinedPin"],
2538
+ "properties": {
2539
+ "pinOffsetKeyId": {
2540
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2541
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/PinOffsetKeyId",
2542
+ "type": "string",
2543
+ "format": "uuid",
2544
+ "description": "Identifier for the PinOffsetKey used to encrypt the data encryption key."
2545
+ },
2546
+ "encryptedDataEncryptionKey": {
2547
+ "description": "A RSA encrypted (using transmissionKey) data encryption key that encrypted the encryptedUserDefinedPin.",
2548
+ "type": "string"
2549
+ },
2550
+ "encryptedUserDefinedPin": {
2551
+ "type": "string",
2552
+ "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"
2553
+ }
2554
+ }
2555
+ }
2556
+ },
2557
+ "required": ["params", "headers", "body"],
2558
+ "additionalProperties": false
2559
+ },
2560
+ "responses": {
2561
+ "204": {
2562
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2563
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardPinOffsetPutResponseNoContent",
2564
+ "type": "object",
2565
+ "properties": {
2566
+ "headers": {
2567
+ "type": "object",
2568
+ "properties": {
2569
+ "created-on": {
2570
+ "type": "string",
2571
+ "format": "date-time"
2572
+ },
2573
+ "updated-on": {
2574
+ "type": "string",
2575
+ "format": "date-time"
2576
+ },
2577
+ "etag": {
2578
+ "type": "string"
2579
+ }
2580
+ }
2581
+ }
2582
+ },
2583
+ "required": [],
2584
+ "additionalProperties": false
2585
+ },
2586
+ "409": {
2587
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2588
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardPinOffsetPutResponseConflict",
2589
+ "type": "object",
2590
+ "properties": {
2591
+ "headers": {
2592
+ "type": "object",
2593
+ "additionalProperties": true
2594
+ }
2595
+ },
2596
+ "required": [],
2597
+ "additionalProperties": false
2598
+ },
2599
+ "412": {
2600
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2601
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardPinOffsetPutResponsePreconditionFailed",
2602
+ "type": "object",
2603
+ "properties": {
2604
+ "headers": {
2605
+ "type": "object",
2606
+ "additionalProperties": true
2607
+ }
2608
+ },
2609
+ "required": [],
2610
+ "additionalProperties": false
2611
+ },
2612
+ "default": {
2613
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2614
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardPinOffsetPutResponseDefault",
2615
+ "type": "object",
2616
+ "properties": {
2617
+ "headers": {
2618
+ "type": "object",
2619
+ "additionalProperties": true
2620
+ },
2621
+ "body": {
2622
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2623
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Error",
2624
+ "type": "object",
2625
+ "additionalProperties": false,
2626
+ "description": "Server error message",
2627
+ "properties": {
2628
+ "message": {
2629
+ "type": "string"
2630
+ },
2631
+ "code": {
2632
+ "type": "string"
2633
+ }
2634
+ }
2635
+ }
2636
+ },
2637
+ "required": ["body"],
2638
+ "additionalProperties": false
2639
+ }
2640
+ }
2641
+ }
2642
+ },
2643
+ "/payment-card/v2/tenant/:tenantId/card/:cardId/state/:stateStatus": {
2644
+ "put": {
2645
+ "request": {
2646
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2647
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardStatePutRequestContext",
2648
+ "type": "object",
2649
+ "properties": {
2650
+ "params": {
2651
+ "type": "object",
2652
+ "additionalProperties": false,
2653
+ "properties": {
2654
+ "tenantId": {
2655
+ "type": "string"
2656
+ },
2657
+ "cardId": {
2658
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2659
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/CardId",
2660
+ "type": "string",
2661
+ "description": "Card identifier",
2662
+ "format": "uuid"
2663
+ },
2664
+ "stateStatus": {
2665
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2666
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/StateStatus",
2667
+ "description": "The current state of the card",
2668
+ "type": "string",
2669
+ "enum": ["CURRENT", "REISSUED", "RETIRED", "FORCED"]
2670
+ }
2671
+ },
2672
+ "required": ["tenantId", "cardId", "stateStatus"]
2673
+ },
2674
+ "headers": {
2675
+ "type": "object",
2676
+ "additionalProperties": true,
2677
+ "properties": {
2678
+ "created-on": {
2679
+ "type": "string",
2680
+ "format": "date-time"
2681
+ },
2682
+ "if-match": {
2683
+ "type": "string"
2684
+ }
2685
+ },
2686
+ "required": ["If-Match"]
2687
+ }
2688
+ },
2689
+ "required": ["params", "headers"],
2690
+ "additionalProperties": false
2691
+ },
2692
+ "responses": {
2693
+ "204": {
2694
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2695
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardStatePutResponseNoContent",
2696
+ "type": "object",
2697
+ "properties": {
2698
+ "headers": {
2699
+ "type": "object",
2700
+ "properties": {
2701
+ "created-on": {
2702
+ "type": "string",
2703
+ "format": "date-time"
2704
+ },
2705
+ "updated-on": {
2706
+ "type": "string",
2707
+ "format": "date-time"
2708
+ },
2709
+ "etag": {
2710
+ "type": "string"
2711
+ }
2712
+ }
2713
+ }
2714
+ },
2715
+ "required": [],
2716
+ "additionalProperties": false
2717
+ },
2718
+ "409": {
2719
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2720
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardStatePutResponseConflict",
2721
+ "type": "object",
2722
+ "properties": {
2723
+ "headers": {
2724
+ "type": "object",
2725
+ "additionalProperties": true
2726
+ }
2727
+ },
2728
+ "required": [],
2729
+ "additionalProperties": false
2730
+ },
2731
+ "412": {
2732
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2733
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardStatePutResponsePreconditionFailed",
2734
+ "type": "object",
2735
+ "properties": {
2736
+ "headers": {
2737
+ "type": "object",
2738
+ "additionalProperties": true
2739
+ }
2740
+ },
2741
+ "required": [],
2742
+ "additionalProperties": false
2743
+ },
2744
+ "422": {
2745
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2746
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardStatePutResponseUnprocessableEntity",
2747
+ "type": "object",
2748
+ "properties": {
2749
+ "headers": {
2750
+ "type": "object",
2751
+ "additionalProperties": true
2752
+ },
2753
+ "body": {
2754
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2755
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Error",
2756
+ "type": "object",
2757
+ "additionalProperties": false,
2758
+ "description": "Server error message",
2759
+ "properties": {
2760
+ "message": {
2761
+ "type": "string"
2762
+ },
2763
+ "code": {
2764
+ "type": "string"
2765
+ }
2766
+ }
2767
+ }
2768
+ },
2769
+ "required": ["body"],
2770
+ "additionalProperties": false
2771
+ },
2772
+ "default": {
2773
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2774
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardStatePutResponseDefault",
2775
+ "type": "object",
2776
+ "properties": {
2777
+ "headers": {
2778
+ "type": "object",
2779
+ "additionalProperties": true
2780
+ },
2781
+ "body": {
2782
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2783
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Error",
2784
+ "type": "object",
2785
+ "additionalProperties": false,
2786
+ "description": "Server error message",
2787
+ "properties": {
2788
+ "message": {
2789
+ "type": "string"
2790
+ },
2791
+ "code": {
2792
+ "type": "string"
2793
+ }
2794
+ }
2795
+ }
2796
+ },
2797
+ "required": ["body"],
2798
+ "additionalProperties": false
2799
+ }
2800
+ }
2801
+ }
2802
+ },
2803
+ "/payment-card/v2/tenant/:tenantId/card-number/:cardId/key/:publicKeyHashPath": {
2804
+ "put": {
2805
+ "request": {
2806
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2807
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardNumberKeyPutRequestContext",
2808
+ "type": "object",
2809
+ "properties": {
2810
+ "params": {
2811
+ "type": "object",
2812
+ "additionalProperties": false,
2813
+ "properties": {
2814
+ "tenantId": {
2815
+ "type": "string"
2816
+ },
2817
+ "cardId": {
2818
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2819
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/CardId",
2820
+ "type": "string",
2821
+ "description": "Card identifier",
2822
+ "format": "uuid"
2823
+ },
2824
+ "publicKeyHashPath": {
2825
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2826
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Hash",
2827
+ "type": "string",
2828
+ "format": "uuid",
2829
+ "example": "15a85f64-5717-4562-b3fc-2c963f66afa6",
2830
+ "description": "UUID derived using @checkdigit/hash"
2831
+ }
2832
+ },
2833
+ "required": ["tenantId", "cardId", "publicKeyHashPath"]
2834
+ },
2835
+ "headers": {
2836
+ "type": "object",
2837
+ "additionalProperties": true
2838
+ },
2839
+ "body": {
2840
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2841
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/CardNumberRequest",
2842
+ "type": "object",
2843
+ "additionalProperties": false,
2844
+ "required": ["publicKey"],
2845
+ "properties": {
2846
+ "publicKey": {
2847
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2848
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/PublicKey",
2849
+ "description": "Public key in PEM format",
2850
+ "type": "string",
2851
+ "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"
2852
+ }
2853
+ }
2854
+ }
2855
+ },
2856
+ "required": ["params", "body"],
2857
+ "additionalProperties": false
2858
+ },
2859
+ "responses": {
2860
+ "200": {
2861
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2862
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardNumberKeyPutResponseOK",
2863
+ "type": "object",
2864
+ "properties": {
2865
+ "headers": {
2866
+ "type": "object",
2867
+ "additionalProperties": true
2868
+ },
2869
+ "body": {
2870
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2871
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/EncryptedCardNumber",
2872
+ "type": "object",
2873
+ "additionalProperties": false,
2874
+ "required": ["encryptedDataEncryptionKey", "cardNumber"],
2875
+ "properties": {
2876
+ "encryptedDataEncryptionKey": {
2877
+ "description": "RSA encrypted data encryption key used to AES encrypt cardNumber.",
2878
+ "type": "string"
2879
+ },
2880
+ "cardNumber": {
2881
+ "type": "string",
2882
+ "description": "AES-256 encrypted card number"
2883
+ }
2884
+ }
2885
+ }
2886
+ },
2887
+ "required": ["body"],
2888
+ "additionalProperties": false
2889
+ },
2890
+ "default": {
2891
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2892
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/CardNumberKeyPutResponseDefault",
2893
+ "type": "object",
2894
+ "properties": {
2895
+ "headers": {
2896
+ "type": "object",
2897
+ "additionalProperties": true
2898
+ },
2899
+ "body": {
2900
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2901
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Error",
2902
+ "type": "object",
2903
+ "additionalProperties": false,
2904
+ "description": "Server error message",
2905
+ "properties": {
2906
+ "message": {
2907
+ "type": "string"
2908
+ },
2909
+ "code": {
2910
+ "type": "string"
2911
+ }
2912
+ }
2913
+ }
2914
+ },
2915
+ "required": ["body"],
2916
+ "additionalProperties": false
2917
+ }
2918
+ }
2919
+ }
2920
+ },
2921
+ "/payment-card/v2/tenant/:tenantId/pin-offset-key/:pinOffsetKeyId": {
2922
+ "put": {
2923
+ "request": {
2924
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2925
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/PinOffsetKeyPutRequestContext",
2926
+ "type": "object",
2927
+ "properties": {
2928
+ "params": {
2929
+ "type": "object",
2930
+ "additionalProperties": false,
2931
+ "properties": {
2932
+ "tenantId": {
2933
+ "type": "string"
2934
+ },
2935
+ "pinOffsetKeyId": {
2936
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2937
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/PinOffsetKeyId",
2938
+ "type": "string",
2939
+ "format": "uuid",
2940
+ "description": "Identifier for the PinOffsetKey used to encrypt the data encryption key."
2941
+ }
2942
+ },
2943
+ "required": ["tenantId", "pinOffsetKeyId"]
2944
+ },
2945
+ "headers": {
2946
+ "type": "object",
2947
+ "additionalProperties": true
2948
+ }
2949
+ },
2950
+ "required": ["params"],
2951
+ "additionalProperties": false
2952
+ },
2953
+ "responses": {
2954
+ "200": {
2955
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2956
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/PinOffsetKeyPutResponseOK",
2957
+ "type": "object",
2958
+ "properties": {
2959
+ "headers": {
2960
+ "type": "object",
2961
+ "additionalProperties": true
2962
+ },
2963
+ "body": {
2964
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2965
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/PinOffsetKey",
2966
+ "type": "object",
2967
+ "additionalProperties": false,
2968
+ "required": ["transmissionKey"],
2969
+ "properties": {
2970
+ "transmissionKey": {
2971
+ "description": "A PEM formatted public key to be used to RSA encrypt a data encryption key.",
2972
+ "type": "string"
2973
+ }
2974
+ }
2975
+ }
2976
+ },
2977
+ "required": ["body"],
2978
+ "additionalProperties": false
2979
+ },
2980
+ "default": {
2981
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2982
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/api/PinOffsetKeyPutResponseDefault",
2983
+ "type": "object",
2984
+ "properties": {
2985
+ "headers": {
2986
+ "type": "object",
2987
+ "additionalProperties": true
2988
+ },
2989
+ "body": {
2990
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2991
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Error",
2992
+ "type": "object",
2993
+ "additionalProperties": false,
2994
+ "description": "Server error message",
2995
+ "properties": {
2996
+ "message": {
2997
+ "type": "string"
2998
+ },
2999
+ "code": {
3000
+ "type": "string"
3001
+ }
3002
+ }
3003
+ }
3004
+ },
3005
+ "required": ["body"],
3006
+ "additionalProperties": false
3007
+ }
3008
+ }
3009
+ }
3010
+ }
3011
+ },
3012
+ "definitions": {
3013
+ "ActiveStatus": {
3014
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3015
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ActiveStatus",
3016
+ "description": "The active/inactive status for the card",
3017
+ "type": "string",
3018
+ "enum": ["INACTIVE", "ACTIVE"]
3019
+ },
3020
+ "Bin": {
3021
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3022
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Bin",
3023
+ "type": "string",
3024
+ "pattern": "^\\d+$",
3025
+ "description": "Bank Identification Number",
3026
+ "minLength": 6,
3027
+ "maxLength": 8
3028
+ },
3029
+ "BlockStatus": {
3030
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3031
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/BlockStatus",
3032
+ "type": "string",
3033
+ "description": "Whether the card is open or blocked for various reasons",
3034
+ "enum": ["OPEN", "BLOCKED LOST OR STOLEN", "BLOCKED NO FRAUD", "BLOCKED WITH FRAUD"]
3035
+ },
3036
+ "Card": {
3037
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3038
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Card",
3039
+ "type": "object",
3040
+ "additionalProperties": false,
3041
+ "required": [
3042
+ "bin",
3043
+ "last4",
3044
+ "expirationDate",
3045
+ "cardNumber",
3046
+ "serviceCode",
3047
+ "pinOffset",
3048
+ "sequenceNumber",
3049
+ "state",
3050
+ "active",
3051
+ "block",
3052
+ "lock",
3053
+ "capture"
3054
+ ],
3055
+ "properties": {
3056
+ "bin": {
3057
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3058
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Bin",
3059
+ "type": "string",
3060
+ "pattern": "^\\d+$",
3061
+ "description": "Bank Identification Number",
3062
+ "minLength": 6,
3063
+ "maxLength": 8
3064
+ },
3065
+ "last4": {
3066
+ "type": "string",
3067
+ "pattern": "^\\d+$",
3068
+ "description": "Last four digits of the card number",
3069
+ "minLength": 4,
3070
+ "maxLength": 4
3071
+ },
3072
+ "expirationDate": {
3073
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3074
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ExpirationDate",
3075
+ "type": "string",
3076
+ "pattern": "([0-9][0-9])(0[1-9]|1[0-2])",
3077
+ "format": "YYMM",
3078
+ "description": "Expiration date for the card and will be assumed to be the last millisecond of the month",
3079
+ "minLength": 4,
3080
+ "maxLength": 4
3081
+ },
3082
+ "cardNumber": {
3083
+ "type": "string",
3084
+ "description": "Encrypted card number (PAN)"
3085
+ },
3086
+ "serviceCode": {
3087
+ "type": "string",
3088
+ "pattern": "^\\d+$",
3089
+ "description": "Service code for the card",
3090
+ "minLength": 3,
3091
+ "maxLength": 3
3092
+ },
3093
+ "pinOffset": {
3094
+ "type": "string",
3095
+ "description": "Pin offset for the card. Cards created using the Payment Card V1 API will return an encrypted pin offset."
3096
+ },
3097
+ "sequenceNumber": {
3098
+ "type": "integer",
3099
+ "description": "Used to differentiate issuing the same card and expiration date on multiple plastics"
3100
+ },
3101
+ "state": {
3102
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3103
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/StateStatus",
3104
+ "description": "The current state of the card",
3105
+ "type": "string",
3106
+ "enum": ["CURRENT", "REISSUED", "RETIRED", "FORCED"]
3107
+ },
3108
+ "active": {
3109
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3110
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ActiveStatus",
3111
+ "description": "The active/inactive status for the card",
3112
+ "type": "string",
3113
+ "enum": ["INACTIVE", "ACTIVE"]
3114
+ },
3115
+ "block": {
3116
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3117
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/BlockStatus",
3118
+ "type": "string",
3119
+ "description": "Whether the card is open or blocked for various reasons",
3120
+ "enum": ["OPEN", "BLOCKED LOST OR STOLEN", "BLOCKED NO FRAUD", "BLOCKED WITH FRAUD"]
3121
+ },
3122
+ "lock": {
3123
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3124
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/LockStatus",
3125
+ "type": "string",
3126
+ "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",
3127
+ "enum": ["LOCKED", "UNLOCKED"]
3128
+ },
3129
+ "capture": {
3130
+ "type": "boolean",
3131
+ "description": "Whether the card should be captured at next use"
3132
+ },
3133
+ "pinId": {
3134
+ "type": "string",
3135
+ "description": "Identifier for the PIN (Personal Identification Number) used for this card."
3136
+ }
3137
+ }
3138
+ },
3139
+ "CardUpdate": {
3140
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3141
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/CardUpdate",
3142
+ "type": "object",
3143
+ "additionalProperties": false,
3144
+ "required": ["card", "updatedOn", "createdOn"],
3145
+ "properties": {
3146
+ "card": {
3147
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3148
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Card",
3149
+ "type": "object",
3150
+ "additionalProperties": false,
3151
+ "required": [
3152
+ "bin",
3153
+ "last4",
3154
+ "expirationDate",
3155
+ "cardNumber",
3156
+ "serviceCode",
3157
+ "pinOffset",
3158
+ "sequenceNumber",
3159
+ "state",
3160
+ "active",
3161
+ "block",
3162
+ "lock",
3163
+ "capture"
3164
+ ],
3165
+ "properties": {
3166
+ "bin": {
3167
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3168
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Bin",
3169
+ "type": "string",
3170
+ "pattern": "^\\d+$",
3171
+ "description": "Bank Identification Number",
3172
+ "minLength": 6,
3173
+ "maxLength": 8
3174
+ },
3175
+ "last4": {
3176
+ "type": "string",
3177
+ "pattern": "^\\d+$",
3178
+ "description": "Last four digits of the card number",
3179
+ "minLength": 4,
3180
+ "maxLength": 4
3181
+ },
3182
+ "expirationDate": {
3183
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3184
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ExpirationDate",
3185
+ "type": "string",
3186
+ "pattern": "([0-9][0-9])(0[1-9]|1[0-2])",
3187
+ "format": "YYMM",
3188
+ "description": "Expiration date for the card and will be assumed to be the last millisecond of the month",
3189
+ "minLength": 4,
3190
+ "maxLength": 4
3191
+ },
3192
+ "cardNumber": {
3193
+ "type": "string",
3194
+ "description": "Encrypted card number (PAN)"
3195
+ },
3196
+ "serviceCode": {
3197
+ "type": "string",
3198
+ "pattern": "^\\d+$",
3199
+ "description": "Service code for the card",
3200
+ "minLength": 3,
3201
+ "maxLength": 3
3202
+ },
3203
+ "pinOffset": {
3204
+ "type": "string",
3205
+ "description": "Pin offset for the card. Cards created using the Payment Card V1 API will return an encrypted pin offset."
3206
+ },
3207
+ "sequenceNumber": {
3208
+ "type": "integer",
3209
+ "description": "Used to differentiate issuing the same card and expiration date on multiple plastics"
3210
+ },
3211
+ "state": {
3212
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3213
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/StateStatus",
3214
+ "description": "The current state of the card",
3215
+ "type": "string",
3216
+ "enum": ["CURRENT", "REISSUED", "RETIRED", "FORCED"]
3217
+ },
3218
+ "active": {
3219
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3220
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ActiveStatus",
3221
+ "description": "The active/inactive status for the card",
3222
+ "type": "string",
3223
+ "enum": ["INACTIVE", "ACTIVE"]
3224
+ },
3225
+ "block": {
3226
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3227
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/BlockStatus",
3228
+ "type": "string",
3229
+ "description": "Whether the card is open or blocked for various reasons",
3230
+ "enum": ["OPEN", "BLOCKED LOST OR STOLEN", "BLOCKED NO FRAUD", "BLOCKED WITH FRAUD"]
3231
+ },
3232
+ "lock": {
3233
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3234
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/LockStatus",
3235
+ "type": "string",
3236
+ "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",
3237
+ "enum": ["LOCKED", "UNLOCKED"]
3238
+ },
3239
+ "capture": {
3240
+ "type": "boolean",
3241
+ "description": "Whether the card should be captured at next use"
3242
+ },
3243
+ "pinId": {
3244
+ "type": "string",
3245
+ "description": "Identifier for the PIN (Personal Identification Number) used for this card."
3246
+ }
3247
+ }
3248
+ },
3249
+ "updatedOn": {
3250
+ "type": "string",
3251
+ "description": "Time data was last updated",
3252
+ "format": "date-time"
3253
+ },
3254
+ "createdOn": {
3255
+ "description": "Time encrypted data was first stored",
3256
+ "type": "string",
3257
+ "format": "date-time"
3258
+ }
3259
+ }
3260
+ },
3261
+ "CardResponse": {
3262
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3263
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/CardResponse",
3264
+ "type": "object",
3265
+ "additionalProperties": false,
3266
+ "required": ["dataEncryptionKeyId", "storageKeyId", "card"],
3267
+ "properties": {
3268
+ "dataEncryptionKeyId": {
3269
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3270
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/DataEncryptionKeyId",
3271
+ "type": "string",
3272
+ "description": "Reference to encryption keys Payment Card Service will use to encrypt the Card object.\n",
3273
+ "format": "uuid"
3274
+ },
3275
+ "storageKeyId": {
3276
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3277
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/StorageKeyId",
3278
+ "type": "string",
3279
+ "description": "DEK's non-derived identifier to be used by Check Digit services only.\n"
3280
+ },
3281
+ "encryptedDataEncryptionKey": {
3282
+ "description": "Encrypted DEK matching the publicKeyHash sent in the request. Used to decrypt values in the Card object.\n",
3283
+ "type": "string"
3284
+ },
3285
+ "card": {
3286
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3287
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Card",
3288
+ "type": "object",
3289
+ "additionalProperties": false,
3290
+ "required": [
3291
+ "bin",
3292
+ "last4",
3293
+ "expirationDate",
3294
+ "cardNumber",
3295
+ "serviceCode",
3296
+ "pinOffset",
3297
+ "sequenceNumber",
3298
+ "state",
3299
+ "active",
3300
+ "block",
3301
+ "lock",
3302
+ "capture"
3303
+ ],
3304
+ "properties": {
3305
+ "bin": {
3306
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3307
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Bin",
3308
+ "type": "string",
3309
+ "pattern": "^\\d+$",
3310
+ "description": "Bank Identification Number",
3311
+ "minLength": 6,
3312
+ "maxLength": 8
3313
+ },
3314
+ "last4": {
3315
+ "type": "string",
3316
+ "pattern": "^\\d+$",
3317
+ "description": "Last four digits of the card number",
3318
+ "minLength": 4,
3319
+ "maxLength": 4
3320
+ },
3321
+ "expirationDate": {
3322
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3323
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ExpirationDate",
3324
+ "type": "string",
3325
+ "pattern": "([0-9][0-9])(0[1-9]|1[0-2])",
3326
+ "format": "YYMM",
3327
+ "description": "Expiration date for the card and will be assumed to be the last millisecond of the month",
3328
+ "minLength": 4,
3329
+ "maxLength": 4
3330
+ },
3331
+ "cardNumber": {
3332
+ "type": "string",
3333
+ "description": "Encrypted card number (PAN)"
3334
+ },
3335
+ "serviceCode": {
3336
+ "type": "string",
3337
+ "pattern": "^\\d+$",
3338
+ "description": "Service code for the card",
3339
+ "minLength": 3,
3340
+ "maxLength": 3
3341
+ },
3342
+ "pinOffset": {
3343
+ "type": "string",
3344
+ "description": "Pin offset for the card. Cards created using the Payment Card V1 API will return an encrypted pin offset."
3345
+ },
3346
+ "sequenceNumber": {
3347
+ "type": "integer",
3348
+ "description": "Used to differentiate issuing the same card and expiration date on multiple plastics"
3349
+ },
3350
+ "state": {
3351
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3352
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/StateStatus",
3353
+ "description": "The current state of the card",
3354
+ "type": "string",
3355
+ "enum": ["CURRENT", "REISSUED", "RETIRED", "FORCED"]
3356
+ },
3357
+ "active": {
3358
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3359
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ActiveStatus",
3360
+ "description": "The active/inactive status for the card",
3361
+ "type": "string",
3362
+ "enum": ["INACTIVE", "ACTIVE"]
3363
+ },
3364
+ "block": {
3365
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3366
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/BlockStatus",
3367
+ "type": "string",
3368
+ "description": "Whether the card is open or blocked for various reasons",
3369
+ "enum": ["OPEN", "BLOCKED LOST OR STOLEN", "BLOCKED NO FRAUD", "BLOCKED WITH FRAUD"]
3370
+ },
3371
+ "lock": {
3372
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3373
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/LockStatus",
3374
+ "type": "string",
3375
+ "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",
3376
+ "enum": ["LOCKED", "UNLOCKED"]
3377
+ },
3378
+ "capture": {
3379
+ "type": "boolean",
3380
+ "description": "Whether the card should be captured at next use"
3381
+ },
3382
+ "pinId": {
3383
+ "type": "string",
3384
+ "description": "Identifier for the PIN (Personal Identification Number) used for this card."
3385
+ }
3386
+ }
3387
+ }
3388
+ }
3389
+ },
3390
+ "CardQueryResponse": {
3391
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3392
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/CardQueryResponse",
3393
+ "type": "object",
3394
+ "additionalProperties": false,
3395
+ "required": ["dataEncryptionKeyId", "storageKeyId", "cardId", "card", "updatedOn", "createdOn"],
3396
+ "properties": {
3397
+ "dataEncryptionKeyId": {
3398
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3399
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/DataEncryptionKeyId",
3400
+ "type": "string",
3401
+ "description": "Reference to encryption keys Payment Card Service will use to encrypt the Card object.\n",
3402
+ "format": "uuid"
3403
+ },
3404
+ "storageKeyId": {
3405
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3406
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/StorageKeyId",
3407
+ "type": "string",
3408
+ "description": "DEK's non-derived identifier to be used by Check Digit services only.\n"
3409
+ },
3410
+ "encryptedDataEncryptionKey": {
3411
+ "description": "Encrypted DEK matching the publicKeyHash sent in the request. Used to decrypt values in the Card object.\n",
3412
+ "type": "string"
3413
+ },
3414
+ "cardId": {
3415
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3416
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/CardId",
3417
+ "type": "string",
3418
+ "description": "Card identifier",
3419
+ "format": "uuid"
3420
+ },
3421
+ "card": {
3422
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3423
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Card",
3424
+ "type": "object",
3425
+ "additionalProperties": false,
3426
+ "required": [
3427
+ "bin",
3428
+ "last4",
3429
+ "expirationDate",
3430
+ "cardNumber",
3431
+ "serviceCode",
3432
+ "pinOffset",
3433
+ "sequenceNumber",
3434
+ "state",
3435
+ "active",
3436
+ "block",
3437
+ "lock",
3438
+ "capture"
3439
+ ],
3440
+ "properties": {
3441
+ "bin": {
3442
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3443
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Bin",
3444
+ "type": "string",
3445
+ "pattern": "^\\d+$",
3446
+ "description": "Bank Identification Number",
3447
+ "minLength": 6,
3448
+ "maxLength": 8
3449
+ },
3450
+ "last4": {
3451
+ "type": "string",
3452
+ "pattern": "^\\d+$",
3453
+ "description": "Last four digits of the card number",
3454
+ "minLength": 4,
3455
+ "maxLength": 4
3456
+ },
3457
+ "expirationDate": {
3458
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3459
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ExpirationDate",
3460
+ "type": "string",
3461
+ "pattern": "([0-9][0-9])(0[1-9]|1[0-2])",
3462
+ "format": "YYMM",
3463
+ "description": "Expiration date for the card and will be assumed to be the last millisecond of the month",
3464
+ "minLength": 4,
3465
+ "maxLength": 4
3466
+ },
3467
+ "cardNumber": {
3468
+ "type": "string",
3469
+ "description": "Encrypted card number (PAN)"
3470
+ },
3471
+ "serviceCode": {
3472
+ "type": "string",
3473
+ "pattern": "^\\d+$",
3474
+ "description": "Service code for the card",
3475
+ "minLength": 3,
3476
+ "maxLength": 3
3477
+ },
3478
+ "pinOffset": {
3479
+ "type": "string",
3480
+ "description": "Pin offset for the card. Cards created using the Payment Card V1 API will return an encrypted pin offset."
3481
+ },
3482
+ "sequenceNumber": {
3483
+ "type": "integer",
3484
+ "description": "Used to differentiate issuing the same card and expiration date on multiple plastics"
3485
+ },
3486
+ "state": {
3487
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3488
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/StateStatus",
3489
+ "description": "The current state of the card",
3490
+ "type": "string",
3491
+ "enum": ["CURRENT", "REISSUED", "RETIRED", "FORCED"]
3492
+ },
3493
+ "active": {
3494
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3495
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ActiveStatus",
3496
+ "description": "The active/inactive status for the card",
3497
+ "type": "string",
3498
+ "enum": ["INACTIVE", "ACTIVE"]
3499
+ },
3500
+ "block": {
3501
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3502
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/BlockStatus",
3503
+ "type": "string",
3504
+ "description": "Whether the card is open or blocked for various reasons",
3505
+ "enum": ["OPEN", "BLOCKED LOST OR STOLEN", "BLOCKED NO FRAUD", "BLOCKED WITH FRAUD"]
3506
+ },
3507
+ "lock": {
3508
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3509
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/LockStatus",
3510
+ "type": "string",
3511
+ "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",
3512
+ "enum": ["LOCKED", "UNLOCKED"]
3513
+ },
3514
+ "capture": {
3515
+ "type": "boolean",
3516
+ "description": "Whether the card should be captured at next use"
3517
+ },
3518
+ "pinId": {
3519
+ "type": "string",
3520
+ "description": "Identifier for the PIN (Personal Identification Number) used for this card."
3521
+ }
3522
+ }
3523
+ },
3524
+ "updatedOn": {
3525
+ "type": "string",
3526
+ "description": "Time data was last updated",
3527
+ "format": "date-time"
3528
+ },
3529
+ "createdOn": {
3530
+ "description": "Time encrypted data was first stored",
3531
+ "type": "string",
3532
+ "format": "date-time"
3533
+ }
3534
+ }
3535
+ },
3536
+ "CardId": {
3537
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3538
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/CardId",
3539
+ "type": "string",
3540
+ "description": "Card identifier",
3541
+ "format": "uuid"
3542
+ },
3543
+ "Query": {
3544
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3545
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Query",
3546
+ "description": "Response from querying /card by cardNumberHash",
3547
+ "type": "object",
3548
+ "required": ["cards"],
3549
+ "properties": {
3550
+ "cards": {
3551
+ "type": "array",
3552
+ "minItems": 0,
3553
+ "items": {
3554
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3555
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/CardQueryResponse",
3556
+ "type": "object",
3557
+ "additionalProperties": false,
3558
+ "required": ["dataEncryptionKeyId", "storageKeyId", "cardId", "card", "updatedOn", "createdOn"],
3559
+ "properties": {
3560
+ "dataEncryptionKeyId": {
3561
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3562
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/DataEncryptionKeyId",
3563
+ "type": "string",
3564
+ "description": "Reference to encryption keys Payment Card Service will use to encrypt the Card object.\n",
3565
+ "format": "uuid"
3566
+ },
3567
+ "storageKeyId": {
3568
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3569
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/StorageKeyId",
3570
+ "type": "string",
3571
+ "description": "DEK's non-derived identifier to be used by Check Digit services only.\n"
3572
+ },
3573
+ "encryptedDataEncryptionKey": {
3574
+ "description": "Encrypted DEK matching the publicKeyHash sent in the request. Used to decrypt values in the Card object.\n",
3575
+ "type": "string"
3576
+ },
3577
+ "cardId": {
3578
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3579
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/CardId",
3580
+ "type": "string",
3581
+ "description": "Card identifier",
3582
+ "format": "uuid"
3583
+ },
3584
+ "card": {
3585
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3586
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Card",
3587
+ "type": "object",
3588
+ "additionalProperties": false,
3589
+ "required": [
3590
+ "bin",
3591
+ "last4",
3592
+ "expirationDate",
3593
+ "cardNumber",
3594
+ "serviceCode",
3595
+ "pinOffset",
3596
+ "sequenceNumber",
3597
+ "state",
3598
+ "active",
3599
+ "block",
3600
+ "lock",
3601
+ "capture"
3602
+ ],
3603
+ "properties": {
3604
+ "bin": {
3605
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3606
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Bin",
3607
+ "type": "string",
3608
+ "pattern": "^\\d+$",
3609
+ "description": "Bank Identification Number",
3610
+ "minLength": 6,
3611
+ "maxLength": 8
3612
+ },
3613
+ "last4": {
3614
+ "type": "string",
3615
+ "pattern": "^\\d+$",
3616
+ "description": "Last four digits of the card number",
3617
+ "minLength": 4,
3618
+ "maxLength": 4
3619
+ },
3620
+ "expirationDate": {
3621
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3622
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ExpirationDate",
3623
+ "type": "string",
3624
+ "pattern": "([0-9][0-9])(0[1-9]|1[0-2])",
3625
+ "format": "YYMM",
3626
+ "description": "Expiration date for the card and will be assumed to be the last millisecond of the month",
3627
+ "minLength": 4,
3628
+ "maxLength": 4
3629
+ },
3630
+ "cardNumber": {
3631
+ "type": "string",
3632
+ "description": "Encrypted card number (PAN)"
3633
+ },
3634
+ "serviceCode": {
3635
+ "type": "string",
3636
+ "pattern": "^\\d+$",
3637
+ "description": "Service code for the card",
3638
+ "minLength": 3,
3639
+ "maxLength": 3
3640
+ },
3641
+ "pinOffset": {
3642
+ "type": "string",
3643
+ "description": "Pin offset for the card. Cards created using the Payment Card V1 API will return an encrypted pin offset."
3644
+ },
3645
+ "sequenceNumber": {
3646
+ "type": "integer",
3647
+ "description": "Used to differentiate issuing the same card and expiration date on multiple plastics"
3648
+ },
3649
+ "state": {
3650
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3651
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/StateStatus",
3652
+ "description": "The current state of the card",
3653
+ "type": "string",
3654
+ "enum": ["CURRENT", "REISSUED", "RETIRED", "FORCED"]
3655
+ },
3656
+ "active": {
3657
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3658
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ActiveStatus",
3659
+ "description": "The active/inactive status for the card",
3660
+ "type": "string",
3661
+ "enum": ["INACTIVE", "ACTIVE"]
3662
+ },
3663
+ "block": {
3664
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3665
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/BlockStatus",
3666
+ "type": "string",
3667
+ "description": "Whether the card is open or blocked for various reasons",
3668
+ "enum": ["OPEN", "BLOCKED LOST OR STOLEN", "BLOCKED NO FRAUD", "BLOCKED WITH FRAUD"]
3669
+ },
3670
+ "lock": {
3671
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3672
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/LockStatus",
3673
+ "type": "string",
3674
+ "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",
3675
+ "enum": ["LOCKED", "UNLOCKED"]
3676
+ },
3677
+ "capture": {
3678
+ "type": "boolean",
3679
+ "description": "Whether the card should be captured at next use"
3680
+ },
3681
+ "pinId": {
3682
+ "type": "string",
3683
+ "description": "Identifier for the PIN (Personal Identification Number) used for this card."
3684
+ }
3685
+ }
3686
+ },
3687
+ "updatedOn": {
3688
+ "type": "string",
3689
+ "description": "Time data was last updated",
3690
+ "format": "date-time"
3691
+ },
3692
+ "createdOn": {
3693
+ "description": "Time encrypted data was first stored",
3694
+ "type": "string",
3695
+ "format": "date-time"
3696
+ }
3697
+ }
3698
+ }
3699
+ }
3700
+ }
3701
+ },
3702
+ "CardNumberRequest": {
3703
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3704
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/CardNumberRequest",
3705
+ "type": "object",
3706
+ "additionalProperties": false,
3707
+ "required": ["publicKey"],
3708
+ "properties": {
3709
+ "publicKey": {
3710
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3711
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/PublicKey",
3712
+ "description": "Public key in PEM format",
3713
+ "type": "string",
3714
+ "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"
3715
+ }
3716
+ }
3717
+ },
3718
+ "EncryptedCardNumber": {
3719
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3720
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/EncryptedCardNumber",
3721
+ "type": "object",
3722
+ "additionalProperties": false,
3723
+ "required": ["encryptedDataEncryptionKey", "cardNumber"],
3724
+ "properties": {
3725
+ "encryptedDataEncryptionKey": {
3726
+ "description": "RSA encrypted data encryption key used to AES encrypt cardNumber.",
3727
+ "type": "string"
3728
+ },
3729
+ "cardNumber": {
3730
+ "type": "string",
3731
+ "description": "AES-256 encrypted card number"
3732
+ }
3733
+ }
3734
+ },
3735
+ "Error": {
3736
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3737
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Error",
3738
+ "type": "object",
3739
+ "additionalProperties": false,
3740
+ "description": "Server error message",
3741
+ "properties": {
3742
+ "message": {
3743
+ "type": "string"
3744
+ },
3745
+ "code": {
3746
+ "type": "string"
3747
+ }
3748
+ }
3749
+ },
3750
+ "ExpirationDate": {
3751
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3752
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ExpirationDate",
3753
+ "type": "string",
3754
+ "pattern": "([0-9][0-9])(0[1-9]|1[0-2])",
3755
+ "format": "YYMM",
3756
+ "description": "Expiration date for the card and will be assumed to be the last millisecond of the month",
3757
+ "minLength": 4,
3758
+ "maxLength": 4
3759
+ },
3760
+ "DataEncryptionKeyId": {
3761
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3762
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/DataEncryptionKeyId",
3763
+ "type": "string",
3764
+ "description": "Reference to encryption keys Payment Card Service will use to encrypt the Card object.\n",
3765
+ "format": "uuid"
3766
+ },
3767
+ "DataEncryptionKeyRequest": {
3768
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3769
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/DataEncryptionKeyRequest",
3770
+ "type": "object",
3771
+ "additionalProperties": false,
3772
+ "required": ["publicKeys"],
3773
+ "properties": {
3774
+ "publicKeys": {
3775
+ "type": "array",
3776
+ "minItems": 1,
3777
+ "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",
3778
+ "items": {
3779
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3780
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/PublicKey",
3781
+ "description": "Public key in PEM format",
3782
+ "type": "string",
3783
+ "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"
3784
+ }
3785
+ }
3786
+ }
3787
+ },
3788
+ "DataEncryptionKeyResponse": {
3789
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3790
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/DataEncryptionKeyResponse",
3791
+ "type": "object",
3792
+ "required": ["encryptedDataEncryptionKeys", "createdOn"],
3793
+ "properties": {
3794
+ "createdOn": {
3795
+ "description": "Time data was first stored",
3796
+ "type": "string",
3797
+ "format": "date-time"
3798
+ },
3799
+ "encryptedDataEncryptionKeys": {
3800
+ "type": "array",
3801
+ "items": {
3802
+ "type": "object",
3803
+ "additionalProperties": false,
3804
+ "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",
3805
+ "required": ["publicKeyHash", "encryptedDataEncryptionKey"],
3806
+ "properties": {
3807
+ "publicKeyHash": {
3808
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3809
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Hash",
3810
+ "type": "string",
3811
+ "format": "uuid",
3812
+ "example": "15a85f64-5717-4562-b3fc-2c963f66afa6",
3813
+ "description": "UUID derived using @checkdigit/hash"
3814
+ },
3815
+ "encryptedDataEncryptionKey": {
3816
+ "type": "string",
3817
+ "description": "RSA encrypted data encryption key used to AES sensitive data in the Card object."
3818
+ }
3819
+ }
3820
+ }
3821
+ }
3822
+ }
3823
+ },
3824
+ "History": {
3825
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3826
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/History",
3827
+ "description": "The History object represents the updates to a Card object over time.\n",
3828
+ "type": "object",
3829
+ "required": ["updates"],
3830
+ "properties": {
3831
+ "dataEncryptionKeyId": {
3832
+ "type": "string",
3833
+ "description": "Reference to encryption keys Payment Card Service used to encrypt the Card object.\n",
3834
+ "format": "uuid"
3835
+ },
3836
+ "storageKeyId": {
3837
+ "type": "string",
3838
+ "description": "DEK's non-derived identifier to be used by Check Digit services only.\n"
3839
+ },
3840
+ "encryptedDataEncryptionKey": {
3841
+ "description": "RSA encrypted data encryption key used to decrypt AES encrypted values in Card objects.\n",
3842
+ "type": "string"
3843
+ },
3844
+ "updates": {
3845
+ "type": "array",
3846
+ "minItems": 0,
3847
+ "items": {
3848
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3849
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/CardUpdate",
3850
+ "type": "object",
3851
+ "additionalProperties": false,
3852
+ "required": ["card", "updatedOn", "createdOn"],
3853
+ "properties": {
3854
+ "card": {
3855
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3856
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Card",
3857
+ "type": "object",
3858
+ "additionalProperties": false,
3859
+ "required": [
3860
+ "bin",
3861
+ "last4",
3862
+ "expirationDate",
3863
+ "cardNumber",
3864
+ "serviceCode",
3865
+ "pinOffset",
3866
+ "sequenceNumber",
3867
+ "state",
3868
+ "active",
3869
+ "block",
3870
+ "lock",
3871
+ "capture"
3872
+ ],
3873
+ "properties": {
3874
+ "bin": {
3875
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3876
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Bin",
3877
+ "type": "string",
3878
+ "pattern": "^\\d+$",
3879
+ "description": "Bank Identification Number",
3880
+ "minLength": 6,
3881
+ "maxLength": 8
3882
+ },
3883
+ "last4": {
3884
+ "type": "string",
3885
+ "pattern": "^\\d+$",
3886
+ "description": "Last four digits of the card number",
3887
+ "minLength": 4,
3888
+ "maxLength": 4
3889
+ },
3890
+ "expirationDate": {
3891
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3892
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ExpirationDate",
3893
+ "type": "string",
3894
+ "pattern": "([0-9][0-9])(0[1-9]|1[0-2])",
3895
+ "format": "YYMM",
3896
+ "description": "Expiration date for the card and will be assumed to be the last millisecond of the month",
3897
+ "minLength": 4,
3898
+ "maxLength": 4
3899
+ },
3900
+ "cardNumber": {
3901
+ "type": "string",
3902
+ "description": "Encrypted card number (PAN)"
3903
+ },
3904
+ "serviceCode": {
3905
+ "type": "string",
3906
+ "pattern": "^\\d+$",
3907
+ "description": "Service code for the card",
3908
+ "minLength": 3,
3909
+ "maxLength": 3
3910
+ },
3911
+ "pinOffset": {
3912
+ "type": "string",
3913
+ "description": "Pin offset for the card. Cards created using the Payment Card V1 API will return an encrypted pin offset."
3914
+ },
3915
+ "sequenceNumber": {
3916
+ "type": "integer",
3917
+ "description": "Used to differentiate issuing the same card and expiration date on multiple plastics"
3918
+ },
3919
+ "state": {
3920
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3921
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/StateStatus",
3922
+ "description": "The current state of the card",
3923
+ "type": "string",
3924
+ "enum": ["CURRENT", "REISSUED", "RETIRED", "FORCED"]
3925
+ },
3926
+ "active": {
3927
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3928
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ActiveStatus",
3929
+ "description": "The active/inactive status for the card",
3930
+ "type": "string",
3931
+ "enum": ["INACTIVE", "ACTIVE"]
3932
+ },
3933
+ "block": {
3934
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3935
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/BlockStatus",
3936
+ "type": "string",
3937
+ "description": "Whether the card is open or blocked for various reasons",
3938
+ "enum": ["OPEN", "BLOCKED LOST OR STOLEN", "BLOCKED NO FRAUD", "BLOCKED WITH FRAUD"]
3939
+ },
3940
+ "lock": {
3941
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3942
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/LockStatus",
3943
+ "type": "string",
3944
+ "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",
3945
+ "enum": ["LOCKED", "UNLOCKED"]
3946
+ },
3947
+ "capture": {
3948
+ "type": "boolean",
3949
+ "description": "Whether the card should be captured at next use"
3950
+ },
3951
+ "pinId": {
3952
+ "type": "string",
3953
+ "description": "Identifier for the PIN (Personal Identification Number) used for this card."
3954
+ }
3955
+ }
3956
+ },
3957
+ "updatedOn": {
3958
+ "type": "string",
3959
+ "description": "Time data was last updated",
3960
+ "format": "date-time"
3961
+ },
3962
+ "createdOn": {
3963
+ "description": "Time encrypted data was first stored",
3964
+ "type": "string",
3965
+ "format": "date-time"
3966
+ }
3967
+ }
3968
+ }
3969
+ }
3970
+ }
3971
+ },
3972
+ "LockStatus": {
3973
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3974
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/LockStatus",
3975
+ "type": "string",
3976
+ "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",
3977
+ "enum": ["LOCKED", "UNLOCKED"]
3978
+ },
3979
+ "Ping": {
3980
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3981
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Ping",
3982
+ "type": "object",
3983
+ "additionalProperties": false,
3984
+ "required": ["serverTime"],
3985
+ "properties": {
3986
+ "serverTime": {
3987
+ "type": "string",
3988
+ "format": "date-time",
3989
+ "description": "Current server time",
3990
+ "example": "1970-01-01T00:00:00.000Z"
3991
+ }
3992
+ }
3993
+ },
3994
+ "PinOffsetKey": {
3995
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3996
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/PinOffsetKey",
3997
+ "type": "object",
3998
+ "additionalProperties": false,
3999
+ "required": ["transmissionKey"],
4000
+ "properties": {
4001
+ "transmissionKey": {
4002
+ "description": "A PEM formatted public key to be used to RSA encrypt a data encryption key.",
4003
+ "type": "string"
4004
+ }
4005
+ }
4006
+ },
4007
+ "PinOffsetKeyId": {
4008
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4009
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/PinOffsetKeyId",
4010
+ "type": "string",
4011
+ "format": "uuid",
4012
+ "description": "Identifier for the PinOffsetKey used to encrypt the data encryption key."
4013
+ },
4014
+ "PinOffsetRequest": {
4015
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4016
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/PinOffsetRequest",
4017
+ "type": "object",
4018
+ "additionalProperties": false,
4019
+ "required": ["encryptedDataEncryptionKey", "pinOffsetKeyId", "encryptedUserDefinedPin"],
4020
+ "properties": {
4021
+ "pinOffsetKeyId": {
4022
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4023
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/PinOffsetKeyId",
4024
+ "type": "string",
4025
+ "format": "uuid",
4026
+ "description": "Identifier for the PinOffsetKey used to encrypt the data encryption key."
4027
+ },
4028
+ "encryptedDataEncryptionKey": {
4029
+ "description": "A RSA encrypted (using transmissionKey) data encryption key that encrypted the encryptedUserDefinedPin.",
4030
+ "type": "string"
4031
+ },
4032
+ "encryptedUserDefinedPin": {
4033
+ "type": "string",
4034
+ "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"
4035
+ }
4036
+ }
4037
+ },
4038
+ "Hash": {
4039
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4040
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Hash",
4041
+ "type": "string",
4042
+ "format": "uuid",
4043
+ "example": "15a85f64-5717-4562-b3fc-2c963f66afa6",
4044
+ "description": "UUID derived using @checkdigit/hash"
4045
+ },
4046
+ "NewCard": {
4047
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4048
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/NewCard",
4049
+ "type": "object",
4050
+ "additionalProperties": false,
4051
+ "required": ["bin", "expirationDate", "serviceCode", "sequenceNumber", "state", "active", "block", "lock"],
4052
+ "properties": {
4053
+ "bin": {
4054
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4055
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Bin",
4056
+ "type": "string",
4057
+ "pattern": "^\\d+$",
4058
+ "description": "Bank Identification Number",
4059
+ "minLength": 6,
4060
+ "maxLength": 8
4061
+ },
4062
+ "expirationDate": {
4063
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4064
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ExpirationDate",
4065
+ "type": "string",
4066
+ "pattern": "([0-9][0-9])(0[1-9]|1[0-2])",
4067
+ "format": "YYMM",
4068
+ "description": "Expiration date for the card and will be assumed to be the last millisecond of the month",
4069
+ "minLength": 4,
4070
+ "maxLength": 4
4071
+ },
4072
+ "serviceCode": {
4073
+ "type": "string",
4074
+ "pattern": "^\\d+$",
4075
+ "description": "Used to set general guidelines for how the card can be used, e.g. domestic only or international, online authorizations only, etc.\n",
4076
+ "minLength": 3,
4077
+ "maxLength": 3
4078
+ },
4079
+ "sequenceNumber": {
4080
+ "type": "integer",
4081
+ "description": "Used to differentiate issuing the same card and expiration date on multiple plastics.",
4082
+ "minimum": 0,
4083
+ "maximum": 10
4084
+ },
4085
+ "state": {
4086
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4087
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/StateStatus",
4088
+ "description": "The current state of the card",
4089
+ "type": "string",
4090
+ "enum": ["CURRENT", "REISSUED", "RETIRED", "FORCED"]
4091
+ },
4092
+ "active": {
4093
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4094
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ActiveStatus",
4095
+ "description": "The active/inactive status for the card",
4096
+ "type": "string",
4097
+ "enum": ["INACTIVE", "ACTIVE"]
4098
+ },
4099
+ "block": {
4100
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4101
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/BlockStatus",
4102
+ "type": "string",
4103
+ "description": "Whether the card is open or blocked for various reasons",
4104
+ "enum": ["OPEN", "BLOCKED LOST OR STOLEN", "BLOCKED NO FRAUD", "BLOCKED WITH FRAUD"]
4105
+ },
4106
+ "lock": {
4107
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4108
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/LockStatus",
4109
+ "type": "string",
4110
+ "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",
4111
+ "enum": ["LOCKED", "UNLOCKED"]
4112
+ }
4113
+ }
4114
+ },
4115
+ "NewCardRequest": {
4116
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4117
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/NewCardRequest",
4118
+ "type": "object",
4119
+ "required": ["dataEncryptionKeyId", "cardNumberLength", "newCard"],
4120
+ "additionalProperties": false,
4121
+ "properties": {
4122
+ "dataEncryptionKeyId": {
4123
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4124
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/DataEncryptionKeyId",
4125
+ "type": "string",
4126
+ "description": "Reference to encryption keys Payment Card Service will use to encrypt the Card object.\n",
4127
+ "format": "uuid"
4128
+ },
4129
+ "cardNumberLength": {
4130
+ "type": "integer",
4131
+ "description": "Desired number of digits in the card number.",
4132
+ "minimum": 15,
4133
+ "maximum": 19
4134
+ },
4135
+ "newCard": {
4136
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4137
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/NewCard",
4138
+ "type": "object",
4139
+ "additionalProperties": false,
4140
+ "required": ["bin", "expirationDate", "serviceCode", "sequenceNumber", "state", "active", "block", "lock"],
4141
+ "properties": {
4142
+ "bin": {
4143
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4144
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Bin",
4145
+ "type": "string",
4146
+ "pattern": "^\\d+$",
4147
+ "description": "Bank Identification Number",
4148
+ "minLength": 6,
4149
+ "maxLength": 8
4150
+ },
4151
+ "expirationDate": {
4152
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4153
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ExpirationDate",
4154
+ "type": "string",
4155
+ "pattern": "([0-9][0-9])(0[1-9]|1[0-2])",
4156
+ "format": "YYMM",
4157
+ "description": "Expiration date for the card and will be assumed to be the last millisecond of the month",
4158
+ "minLength": 4,
4159
+ "maxLength": 4
4160
+ },
4161
+ "serviceCode": {
4162
+ "type": "string",
4163
+ "pattern": "^\\d+$",
4164
+ "description": "Used to set general guidelines for how the card can be used, e.g. domestic only or international, online authorizations only, etc.\n",
4165
+ "minLength": 3,
4166
+ "maxLength": 3
4167
+ },
4168
+ "sequenceNumber": {
4169
+ "type": "integer",
4170
+ "description": "Used to differentiate issuing the same card and expiration date on multiple plastics.",
4171
+ "minimum": 0,
4172
+ "maximum": 10
4173
+ },
4174
+ "state": {
4175
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4176
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/StateStatus",
4177
+ "description": "The current state of the card",
4178
+ "type": "string",
4179
+ "enum": ["CURRENT", "REISSUED", "RETIRED", "FORCED"]
4180
+ },
4181
+ "active": {
4182
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4183
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ActiveStatus",
4184
+ "description": "The active/inactive status for the card",
4185
+ "type": "string",
4186
+ "enum": ["INACTIVE", "ACTIVE"]
4187
+ },
4188
+ "block": {
4189
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4190
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/BlockStatus",
4191
+ "type": "string",
4192
+ "description": "Whether the card is open or blocked for various reasons",
4193
+ "enum": ["OPEN", "BLOCKED LOST OR STOLEN", "BLOCKED NO FRAUD", "BLOCKED WITH FRAUD"]
4194
+ },
4195
+ "lock": {
4196
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4197
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/LockStatus",
4198
+ "type": "string",
4199
+ "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",
4200
+ "enum": ["LOCKED", "UNLOCKED"]
4201
+ }
4202
+ }
4203
+ }
4204
+ }
4205
+ },
4206
+ "NewCardRequestWithCardNumber": {
4207
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4208
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/NewCardRequestWithCardNumber",
4209
+ "type": "object",
4210
+ "required": ["encryptedCardNumber", "encryptedDataEncryptionKey", "dataEncryptionKeyId", "newCard"],
4211
+ "properties": {
4212
+ "encryptedCardNumber": {
4213
+ "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.",
4214
+ "type": "string"
4215
+ },
4216
+ "encryptedDataEncryptionKey": {
4217
+ "description": "RSA encrypted data encryption key used to AES encrypt encryptedCardNumber",
4218
+ "type": "string"
4219
+ },
4220
+ "dataEncryptionKeyId": {
4221
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4222
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/DataEncryptionKeyId",
4223
+ "type": "string",
4224
+ "description": "Reference to encryption keys Payment Card Service will use to encrypt the Card object.\n",
4225
+ "format": "uuid"
4226
+ },
4227
+ "newCard": {
4228
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4229
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/NewCard",
4230
+ "type": "object",
4231
+ "additionalProperties": false,
4232
+ "required": ["bin", "expirationDate", "serviceCode", "sequenceNumber", "state", "active", "block", "lock"],
4233
+ "properties": {
4234
+ "bin": {
4235
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4236
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/Bin",
4237
+ "type": "string",
4238
+ "pattern": "^\\d+$",
4239
+ "description": "Bank Identification Number",
4240
+ "minLength": 6,
4241
+ "maxLength": 8
4242
+ },
4243
+ "expirationDate": {
4244
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4245
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ExpirationDate",
4246
+ "type": "string",
4247
+ "pattern": "([0-9][0-9])(0[1-9]|1[0-2])",
4248
+ "format": "YYMM",
4249
+ "description": "Expiration date for the card and will be assumed to be the last millisecond of the month",
4250
+ "minLength": 4,
4251
+ "maxLength": 4
4252
+ },
4253
+ "serviceCode": {
4254
+ "type": "string",
4255
+ "pattern": "^\\d+$",
4256
+ "description": "Used to set general guidelines for how the card can be used, e.g. domestic only or international, online authorizations only, etc.\n",
4257
+ "minLength": 3,
4258
+ "maxLength": 3
4259
+ },
4260
+ "sequenceNumber": {
4261
+ "type": "integer",
4262
+ "description": "Used to differentiate issuing the same card and expiration date on multiple plastics.",
4263
+ "minimum": 0,
4264
+ "maximum": 10
4265
+ },
4266
+ "state": {
4267
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4268
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/StateStatus",
4269
+ "description": "The current state of the card",
4270
+ "type": "string",
4271
+ "enum": ["CURRENT", "REISSUED", "RETIRED", "FORCED"]
4272
+ },
4273
+ "active": {
4274
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4275
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/ActiveStatus",
4276
+ "description": "The active/inactive status for the card",
4277
+ "type": "string",
4278
+ "enum": ["INACTIVE", "ACTIVE"]
4279
+ },
4280
+ "block": {
4281
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4282
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/BlockStatus",
4283
+ "type": "string",
4284
+ "description": "Whether the card is open or blocked for various reasons",
4285
+ "enum": ["OPEN", "BLOCKED LOST OR STOLEN", "BLOCKED NO FRAUD", "BLOCKED WITH FRAUD"]
4286
+ },
4287
+ "lock": {
4288
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4289
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/LockStatus",
4290
+ "type": "string",
4291
+ "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",
4292
+ "enum": ["LOCKED", "UNLOCKED"]
4293
+ }
4294
+ }
4295
+ }
4296
+ },
4297
+ "additionalProperties": false
4298
+ },
4299
+ "PublicKey": {
4300
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4301
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/PublicKey",
4302
+ "description": "Public key in PEM format",
4303
+ "type": "string",
4304
+ "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"
4305
+ },
4306
+ "PublicKeyResponse": {
4307
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4308
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/PublicKeyResponse",
4309
+ "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",
4310
+ "type": "object",
4311
+ "required": ["publicKey"],
4312
+ "properties": {
4313
+ "publicKey": {
4314
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4315
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/PublicKey",
4316
+ "description": "Public key in PEM format",
4317
+ "type": "string",
4318
+ "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"
4319
+ }
4320
+ }
4321
+ },
4322
+ "StateStatus": {
4323
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4324
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/StateStatus",
4325
+ "description": "The current state of the card",
4326
+ "type": "string",
4327
+ "enum": ["CURRENT", "REISSUED", "RETIRED", "FORCED"]
4328
+ },
4329
+ "StorageKeyId": {
4330
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4331
+ "$id": "https://eslint-plugin.checkdigit/payment-card/v2/schemas/definitions/StorageKeyId",
4332
+ "type": "string",
4333
+ "description": "DEK's non-derived identifier to be used by Check Digit services only.\n"
4334
+ }
4335
+ }
4336
+ }