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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist-mjs/athena/api-locator.mjs +30 -0
  2. package/dist-mjs/athena/api-matcher.mjs +108 -0
  3. package/dist-mjs/athena/athena.mjs +328 -0
  4. package/dist-mjs/athena/column.mjs +1 -0
  5. package/dist-mjs/athena/context.mjs +21 -0
  6. package/dist-mjs/athena/index.mjs +1 -0
  7. package/dist-mjs/athena/service-table.mjs +32 -0
  8. package/dist-mjs/athena/types.mjs +1 -0
  9. package/dist-mjs/athena/visitor.mjs +258 -0
  10. package/dist-mjs/index.mjs +8 -4
  11. package/dist-mjs/no-status-code-assert.mjs +1 -1
  12. package/dist-mjs/openapi/deref-schema.mjs +14 -0
  13. package/dist-mjs/openapi/generate-schema.mjs +273 -0
  14. package/dist-mjs/openapi/service-schema-generator.mjs +147 -0
  15. package/dist-mjs/peggy/athena-peggy.mjs +20629 -0
  16. package/dist-types/athena/api-locator.d.ts +2 -0
  17. package/dist-types/athena/api-matcher.d.ts +14 -0
  18. package/dist-types/athena/athena.d.ts +6 -0
  19. package/dist-types/athena/column.d.ts +1 -0
  20. package/dist-types/athena/context.d.ts +21 -0
  21. package/dist-types/athena/index.d.ts +8 -0
  22. package/dist-types/athena/service-table.d.ts +8 -0
  23. package/dist-types/athena/types.d.ts +474 -0
  24. package/dist-types/athena/visitor.d.ts +63 -0
  25. package/dist-types/no-status-code-assert.d.ts +1 -1
  26. package/dist-types/openapi/deref-schema.d.ts +1 -0
  27. package/dist-types/openapi/generate-schema.d.ts +33 -0
  28. package/dist-types/openapi/service-schema-generator.d.ts +5 -0
  29. package/dist-types/peggy/athena-peggy.d.ts +13 -0
  30. package/package.json +1 -96
  31. package/src/athena/ATHENA.md +387 -0
  32. package/src/athena/PLAN.md +355 -0
  33. package/src/athena/api-locator.ts +39 -0
  34. package/src/athena/api-matcher.ts +169 -0
  35. package/src/athena/athena.ts +488 -0
  36. package/src/athena/column.ts +2 -0
  37. package/src/athena/context.ts +47 -0
  38. package/src/athena/index.ts +11 -0
  39. package/src/athena/service-table.ts +55 -0
  40. package/src/athena/types.ts +526 -0
  41. package/src/athena/visitor.ts +365 -0
  42. package/src/index.ts +4 -0
  43. package/src/no-side-effects.ts +1 -1
  44. package/src/no-status-code-assert.ts +2 -2
  45. package/src/openapi/deref-schema.ts +14 -0
  46. package/src/openapi/generate-schema.ts +422 -0
  47. package/src/openapi/service-schema-generator.ts +189 -0
  48. package/src/peggy/athena-chat.peggy +608 -0
  49. package/src/peggy/athena-peggy.ts +22078 -0
  50. package/src/peggy/athena.peggy +2967 -0
  51. package/src/require-service-call-response-declaration.ts +2 -2
  52. package/src/services/interchange/v1/swagger.schema.deref.json +849 -0
  53. package/src/services/interchange/v1/swagger.schema.json +473 -0
  54. package/src/services/interchange/v1/swagger.yml +414 -0
  55. package/src/services/ledger/v1/swagger.schema.deref.json +6694 -0
  56. package/src/services/ledger/v1/swagger.schema.json +1820 -0
  57. package/src/services/ledger/v1/swagger.yml +1094 -0
  58. package/src/services/link/v1/swagger.schema.deref.json +648 -0
  59. package/src/services/link/v1/swagger.schema.json +444 -0
  60. package/src/services/link/v1/swagger.yml +343 -0
  61. package/src/services/message/v1/swagger.schema.deref.json +22049 -0
  62. package/src/services/message/v1/swagger.schema.json +3470 -0
  63. package/src/services/message/v1/swagger.yml +2798 -0
  64. package/src/services/message/v2/swagger.schema.deref.json +72221 -0
  65. package/src/services/message/v2/swagger.schema.json +3558 -0
  66. package/src/services/message/v2/swagger.yml +3009 -0
  67. package/src/services/paymentCard/v1/swagger.schema.deref.json +4346 -0
  68. package/src/services/paymentCard/v1/swagger.schema.json +2181 -0
  69. package/src/services/paymentCard/v1/swagger.yml +1161 -0
  70. package/src/services/paymentCard/v2/swagger.schema.deref.json +4336 -0
  71. package/src/services/paymentCard/v2/swagger.schema.json +2155 -0
  72. package/src/services/paymentCard/v2/swagger.yml +1149 -0
  73. package/src/services/person/v1/swagger.schema.deref.json +6786 -0
  74. package/src/services/person/v1/swagger.schema.json +1445 -0
  75. package/src/services/person/v1/swagger.yml +1157 -0
  76. package/src/services/teampayApproval/v1/swagger.schema.deref.json +9898 -0
  77. package/src/services/teampayCardManagement/v1/swagger.schema.deref.json +6187 -0
  78. package/src/services/teampayClientManagement/v1/swagger.schema.deref.json +4914 -0
  79. package/src/services/teampayClientManagement/v1/swagger.schema.json +1964 -0
  80. package/src/services/teampayClientManagement/v1/swagger.yml +1376 -0
@@ -0,0 +1,1820 @@
1
+ {
2
+ "apis": {
3
+ "/ledger/v1/ping": {
4
+ "get": {
5
+ "request": {
6
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
7
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/PingGetRequestContext",
8
+ "type": "object",
9
+ "properties": {
10
+ "headers": {
11
+ "type": "object",
12
+ "additionalProperties": true
13
+ }
14
+ },
15
+ "required": [],
16
+ "additionalProperties": false
17
+ },
18
+ "responses": {
19
+ "200": {
20
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
21
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/PingGetResponseOK",
22
+ "type": "object",
23
+ "properties": {
24
+ "headers": {
25
+ "type": "object",
26
+ "additionalProperties": true
27
+ },
28
+ "body": {
29
+ "$ref": "/ledger/v1/schemas/definitions/Ping"
30
+ }
31
+ },
32
+ "required": ["body"],
33
+ "additionalProperties": false
34
+ },
35
+ "default": {
36
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
37
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/PingGetResponseDefault",
38
+ "type": "object",
39
+ "properties": {
40
+ "headers": {
41
+ "type": "object",
42
+ "additionalProperties": true
43
+ },
44
+ "body": {
45
+ "$ref": "/ledger/v1/schemas/definitions/Error"
46
+ }
47
+ },
48
+ "required": ["body"],
49
+ "additionalProperties": false
50
+ }
51
+ }
52
+ }
53
+ },
54
+ "/ledger/v1/account/:accountId": {
55
+ "get": {
56
+ "request": {
57
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
58
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountGetRequestContext",
59
+ "type": "object",
60
+ "properties": {
61
+ "params": {
62
+ "type": "object",
63
+ "additionalProperties": false,
64
+ "properties": {
65
+ "at": {
66
+ "type": "string",
67
+ "format": "date-time"
68
+ }
69
+ },
70
+ "required": ["at"]
71
+ },
72
+ "headers": {
73
+ "type": "object",
74
+ "additionalProperties": true
75
+ }
76
+ },
77
+ "required": ["params", "query"],
78
+ "additionalProperties": false
79
+ },
80
+ "responses": {
81
+ "200": {
82
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
83
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountGetResponseOK",
84
+ "type": "object",
85
+ "properties": {
86
+ "headers": {
87
+ "type": "object",
88
+ "properties": {
89
+ "created-on": {
90
+ "type": "string",
91
+ "format": "date-time"
92
+ },
93
+ "updated-on": {
94
+ "type": "string",
95
+ "format": "date-time"
96
+ },
97
+ "last-modified": {
98
+ "type": "string",
99
+ "format": "date-time"
100
+ }
101
+ },
102
+ "required": ["created-on", "updated-on", "last-modified"]
103
+ },
104
+ "body": {
105
+ "$ref": "/ledger/v1/schemas/definitions/Account"
106
+ }
107
+ },
108
+ "required": ["headers", "body"],
109
+ "additionalProperties": false
110
+ },
111
+ "404": {
112
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
113
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountGetResponseNotFound",
114
+ "type": "object",
115
+ "properties": {
116
+ "headers": {
117
+ "type": "object",
118
+ "additionalProperties": true
119
+ }
120
+ },
121
+ "required": [],
122
+ "additionalProperties": false
123
+ },
124
+ "default": {
125
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
126
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountGetResponseDefault",
127
+ "type": "object",
128
+ "properties": {
129
+ "headers": {
130
+ "type": "object",
131
+ "additionalProperties": true
132
+ },
133
+ "body": {
134
+ "$ref": "/ledger/v1/schemas/definitions/Error"
135
+ }
136
+ },
137
+ "required": ["body"],
138
+ "additionalProperties": false
139
+ }
140
+ }
141
+ },
142
+ "put": {
143
+ "request": {
144
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
145
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountPutRequestContext",
146
+ "type": "object",
147
+ "properties": {
148
+ "params": {
149
+ "type": "object",
150
+ "additionalProperties": false,
151
+ "properties": {
152
+ "accountId": {
153
+ "type": "string"
154
+ }
155
+ },
156
+ "required": ["accountId"]
157
+ },
158
+ "headers": {
159
+ "type": "object",
160
+ "additionalProperties": true,
161
+ "properties": {
162
+ "created-on": {
163
+ "type": "string",
164
+ "format": "date-time"
165
+ },
166
+ "last-modified": {
167
+ "type": "string",
168
+ "format": "date-time"
169
+ }
170
+ }
171
+ },
172
+ "body": {
173
+ "$ref": "/ledger/v1/schemas/definitions/NewAccount"
174
+ }
175
+ },
176
+ "required": ["params", "body"],
177
+ "additionalProperties": false
178
+ },
179
+ "responses": {
180
+ "204": {
181
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
182
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountPutResponseNoContent",
183
+ "type": "object",
184
+ "properties": {
185
+ "headers": {
186
+ "type": "object",
187
+ "properties": {
188
+ "created-on": {
189
+ "type": "string",
190
+ "format": "date-time"
191
+ },
192
+ "updated-on": {
193
+ "type": "string",
194
+ "format": "date-time"
195
+ },
196
+ "last-modified": {
197
+ "type": "string",
198
+ "format": "date-time"
199
+ }
200
+ },
201
+ "required": ["created-on", "updated-on", "last-modified"]
202
+ }
203
+ },
204
+ "required": ["headers"],
205
+ "additionalProperties": false
206
+ },
207
+ "409": {
208
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
209
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountPutResponseConflict",
210
+ "type": "object",
211
+ "properties": {
212
+ "headers": {
213
+ "type": "object",
214
+ "additionalProperties": true
215
+ }
216
+ },
217
+ "required": [],
218
+ "additionalProperties": false
219
+ },
220
+ "default": {
221
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
222
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountPutResponseDefault",
223
+ "type": "object",
224
+ "properties": {
225
+ "headers": {
226
+ "type": "object",
227
+ "additionalProperties": true
228
+ },
229
+ "body": {
230
+ "$ref": "/ledger/v1/schemas/definitions/Error"
231
+ }
232
+ },
233
+ "required": ["body"],
234
+ "additionalProperties": false
235
+ }
236
+ }
237
+ }
238
+ },
239
+ "/ledger/v1/account/:accountId/:idFragment1": {
240
+ "get": {
241
+ "request": {
242
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
243
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountGetFragment1RequestContext",
244
+ "type": "object",
245
+ "properties": {
246
+ "params": {
247
+ "type": "object",
248
+ "additionalProperties": false,
249
+ "properties": {
250
+ "at": {
251
+ "type": "string",
252
+ "format": "date-time"
253
+ }
254
+ },
255
+ "required": ["at"]
256
+ },
257
+ "headers": {
258
+ "type": "object",
259
+ "additionalProperties": true
260
+ }
261
+ },
262
+ "required": ["params", "query"],
263
+ "additionalProperties": false
264
+ },
265
+ "responses": {
266
+ "200": {
267
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
268
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountGetFragment1ResponseOK",
269
+ "type": "object",
270
+ "properties": {
271
+ "headers": {
272
+ "type": "object",
273
+ "properties": {
274
+ "created-on": {
275
+ "type": "string",
276
+ "format": "date-time"
277
+ },
278
+ "updated-on": {
279
+ "type": "string",
280
+ "format": "date-time"
281
+ },
282
+ "last-modified": {
283
+ "type": "string",
284
+ "format": "date-time"
285
+ }
286
+ },
287
+ "required": ["created-on", "updated-on", "last-modified"]
288
+ },
289
+ "body": {
290
+ "$ref": "/ledger/v1/schemas/definitions/Account"
291
+ }
292
+ },
293
+ "required": ["headers", "body"],
294
+ "additionalProperties": false
295
+ },
296
+ "404": {
297
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
298
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountGetFragment1ResponseNotFound",
299
+ "type": "object",
300
+ "properties": {
301
+ "headers": {
302
+ "type": "object",
303
+ "additionalProperties": true
304
+ }
305
+ },
306
+ "required": [],
307
+ "additionalProperties": false
308
+ },
309
+ "default": {
310
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
311
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountGetFragment1ResponseDefault",
312
+ "type": "object",
313
+ "properties": {
314
+ "headers": {
315
+ "type": "object",
316
+ "additionalProperties": true
317
+ },
318
+ "body": {
319
+ "$ref": "/ledger/v1/schemas/definitions/Error"
320
+ }
321
+ },
322
+ "required": ["body"],
323
+ "additionalProperties": false
324
+ }
325
+ }
326
+ },
327
+ "put": {
328
+ "request": {
329
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
330
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountPutFragment1RequestContext",
331
+ "type": "object",
332
+ "properties": {
333
+ "params": {
334
+ "type": "object",
335
+ "additionalProperties": false,
336
+ "properties": {
337
+ "accountId": {
338
+ "type": "string"
339
+ },
340
+ "idFragment1": {
341
+ "type": "string"
342
+ }
343
+ },
344
+ "required": ["accountId", "idFragment1"]
345
+ },
346
+ "headers": {
347
+ "type": "object",
348
+ "additionalProperties": true,
349
+ "properties": {
350
+ "created-on": {
351
+ "type": "string",
352
+ "format": "date-time"
353
+ },
354
+ "last-modified": {
355
+ "type": "string",
356
+ "format": "date-time"
357
+ }
358
+ }
359
+ },
360
+ "body": {
361
+ "$ref": "/ledger/v1/schemas/definitions/NewAccount"
362
+ }
363
+ },
364
+ "required": ["params", "body"],
365
+ "additionalProperties": false
366
+ },
367
+ "responses": {
368
+ "204": {
369
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
370
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountPutFragment1ResponseNoContent",
371
+ "type": "object",
372
+ "properties": {
373
+ "headers": {
374
+ "type": "object",
375
+ "properties": {
376
+ "created-on": {
377
+ "type": "string",
378
+ "format": "date-time"
379
+ },
380
+ "updated-on": {
381
+ "type": "string",
382
+ "format": "date-time"
383
+ },
384
+ "last-modified": {
385
+ "type": "string",
386
+ "format": "date-time"
387
+ }
388
+ },
389
+ "required": ["created-on", "updated-on", "last-modified"]
390
+ }
391
+ },
392
+ "required": ["headers"],
393
+ "additionalProperties": false
394
+ },
395
+ "409": {
396
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
397
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountPutFragment1ResponseConflict",
398
+ "type": "object",
399
+ "properties": {
400
+ "headers": {
401
+ "type": "object",
402
+ "additionalProperties": true
403
+ }
404
+ },
405
+ "required": [],
406
+ "additionalProperties": false
407
+ },
408
+ "default": {
409
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
410
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountPutFragment1ResponseDefault",
411
+ "type": "object",
412
+ "properties": {
413
+ "headers": {
414
+ "type": "object",
415
+ "additionalProperties": true
416
+ },
417
+ "body": {
418
+ "$ref": "/ledger/v1/schemas/definitions/Error"
419
+ }
420
+ },
421
+ "required": ["body"],
422
+ "additionalProperties": false
423
+ }
424
+ }
425
+ }
426
+ },
427
+ "/ledger/v1/account/:accountId/:idFragment1/:idFragment2": {
428
+ "get": {
429
+ "request": {
430
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
431
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountGetFragment2RequestContext",
432
+ "type": "object",
433
+ "properties": {
434
+ "params": {
435
+ "type": "object",
436
+ "additionalProperties": false,
437
+ "properties": {
438
+ "at": {
439
+ "type": "string",
440
+ "format": "date-time"
441
+ }
442
+ },
443
+ "required": ["at"]
444
+ },
445
+ "headers": {
446
+ "type": "object",
447
+ "additionalProperties": true
448
+ }
449
+ },
450
+ "required": ["params", "query"],
451
+ "additionalProperties": false
452
+ },
453
+ "responses": {
454
+ "200": {
455
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
456
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountGetFragment2ResponseOK",
457
+ "type": "object",
458
+ "properties": {
459
+ "headers": {
460
+ "type": "object",
461
+ "properties": {
462
+ "created-on": {
463
+ "type": "string",
464
+ "format": "date-time"
465
+ },
466
+ "updated-on": {
467
+ "type": "string",
468
+ "format": "date-time"
469
+ },
470
+ "last-modified": {
471
+ "type": "string",
472
+ "format": "date-time"
473
+ }
474
+ },
475
+ "required": ["created-on", "updated-on", "last-modified"]
476
+ },
477
+ "body": {
478
+ "$ref": "/ledger/v1/schemas/definitions/Account"
479
+ }
480
+ },
481
+ "required": ["headers", "body"],
482
+ "additionalProperties": false
483
+ },
484
+ "404": {
485
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
486
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountGetFragment2ResponseNotFound",
487
+ "type": "object",
488
+ "properties": {
489
+ "headers": {
490
+ "type": "object",
491
+ "additionalProperties": true
492
+ }
493
+ },
494
+ "required": [],
495
+ "additionalProperties": false
496
+ },
497
+ "default": {
498
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
499
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountGetFragment2ResponseDefault",
500
+ "type": "object",
501
+ "properties": {
502
+ "headers": {
503
+ "type": "object",
504
+ "additionalProperties": true
505
+ },
506
+ "body": {
507
+ "$ref": "/ledger/v1/schemas/definitions/Error"
508
+ }
509
+ },
510
+ "required": ["body"],
511
+ "additionalProperties": false
512
+ }
513
+ }
514
+ },
515
+ "put": {
516
+ "request": {
517
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
518
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountPutFragment2RequestContext",
519
+ "type": "object",
520
+ "properties": {
521
+ "params": {
522
+ "type": "object",
523
+ "additionalProperties": false,
524
+ "properties": {
525
+ "accountId": {
526
+ "type": "string"
527
+ },
528
+ "idFragment1": {
529
+ "type": "string"
530
+ },
531
+ "idFragment2": {
532
+ "type": "string"
533
+ }
534
+ },
535
+ "required": ["accountId", "idFragment1", "idFragment2"]
536
+ },
537
+ "headers": {
538
+ "type": "object",
539
+ "additionalProperties": true,
540
+ "properties": {
541
+ "created-on": {
542
+ "type": "string",
543
+ "format": "date-time"
544
+ },
545
+ "last-modified": {
546
+ "type": "string",
547
+ "format": "date-time"
548
+ }
549
+ }
550
+ },
551
+ "body": {
552
+ "$ref": "/ledger/v1/schemas/definitions/NewAccount"
553
+ }
554
+ },
555
+ "required": ["params", "body"],
556
+ "additionalProperties": false
557
+ },
558
+ "responses": {
559
+ "204": {
560
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
561
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountPutFragment2ResponseNoContent",
562
+ "type": "object",
563
+ "properties": {
564
+ "headers": {
565
+ "type": "object",
566
+ "properties": {
567
+ "created-on": {
568
+ "type": "string",
569
+ "format": "date-time"
570
+ },
571
+ "updated-on": {
572
+ "type": "string",
573
+ "format": "date-time"
574
+ },
575
+ "last-modified": {
576
+ "type": "string",
577
+ "format": "date-time"
578
+ }
579
+ },
580
+ "required": ["created-on", "updated-on", "last-modified"]
581
+ }
582
+ },
583
+ "required": ["headers"],
584
+ "additionalProperties": false
585
+ },
586
+ "409": {
587
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
588
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountPutFragment2ResponseConflict",
589
+ "type": "object",
590
+ "properties": {
591
+ "headers": {
592
+ "type": "object",
593
+ "additionalProperties": true
594
+ }
595
+ },
596
+ "required": [],
597
+ "additionalProperties": false
598
+ },
599
+ "default": {
600
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
601
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountPutFragment2ResponseDefault",
602
+ "type": "object",
603
+ "properties": {
604
+ "headers": {
605
+ "type": "object",
606
+ "additionalProperties": true
607
+ },
608
+ "body": {
609
+ "$ref": "/ledger/v1/schemas/definitions/Error"
610
+ }
611
+ },
612
+ "required": ["body"],
613
+ "additionalProperties": false
614
+ }
615
+ }
616
+ }
617
+ },
618
+ "/ledger/v1/account/:accountId/:idFragment1/:idFragment2/:idFragment3": {
619
+ "get": {
620
+ "request": {
621
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
622
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountGetFragment3RequestContext",
623
+ "type": "object",
624
+ "properties": {
625
+ "params": {
626
+ "type": "object",
627
+ "additionalProperties": false,
628
+ "properties": {
629
+ "at": {
630
+ "type": "string",
631
+ "format": "date-time"
632
+ }
633
+ },
634
+ "required": ["at"]
635
+ },
636
+ "headers": {
637
+ "type": "object",
638
+ "additionalProperties": true
639
+ }
640
+ },
641
+ "required": ["params", "query"],
642
+ "additionalProperties": false
643
+ },
644
+ "responses": {
645
+ "200": {
646
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
647
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountGetFragment3ResponseOK",
648
+ "type": "object",
649
+ "properties": {
650
+ "headers": {
651
+ "type": "object",
652
+ "properties": {
653
+ "created-on": {
654
+ "type": "string",
655
+ "format": "date-time"
656
+ },
657
+ "updated-on": {
658
+ "type": "string",
659
+ "format": "date-time"
660
+ },
661
+ "last-modified": {
662
+ "type": "string",
663
+ "format": "date-time"
664
+ }
665
+ },
666
+ "required": ["created-on", "updated-on", "last-modified"]
667
+ },
668
+ "body": {
669
+ "$ref": "/ledger/v1/schemas/definitions/Account"
670
+ }
671
+ },
672
+ "required": ["headers", "body"],
673
+ "additionalProperties": false
674
+ },
675
+ "404": {
676
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
677
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountGetFragment3ResponseNotFound",
678
+ "type": "object",
679
+ "properties": {
680
+ "headers": {
681
+ "type": "object",
682
+ "additionalProperties": true
683
+ }
684
+ },
685
+ "required": [],
686
+ "additionalProperties": false
687
+ },
688
+ "default": {
689
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
690
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountGetFragment3ResponseDefault",
691
+ "type": "object",
692
+ "properties": {
693
+ "headers": {
694
+ "type": "object",
695
+ "additionalProperties": true
696
+ },
697
+ "body": {
698
+ "$ref": "/ledger/v1/schemas/definitions/Error"
699
+ }
700
+ },
701
+ "required": ["body"],
702
+ "additionalProperties": false
703
+ }
704
+ }
705
+ },
706
+ "put": {
707
+ "request": {
708
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
709
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountPutFragment3RequestContext",
710
+ "type": "object",
711
+ "properties": {
712
+ "params": {
713
+ "type": "object",
714
+ "additionalProperties": false,
715
+ "properties": {
716
+ "accountId": {
717
+ "type": "string"
718
+ },
719
+ "idFragment1": {
720
+ "type": "string"
721
+ },
722
+ "idFragment2": {
723
+ "type": "string"
724
+ },
725
+ "idFragment3": {
726
+ "type": "string"
727
+ }
728
+ },
729
+ "required": ["accountId", "idFragment1", "idFragment2", "idFragment3"]
730
+ },
731
+ "headers": {
732
+ "type": "object",
733
+ "additionalProperties": true,
734
+ "properties": {
735
+ "created-on": {
736
+ "type": "string",
737
+ "format": "date-time"
738
+ },
739
+ "last-modified": {
740
+ "type": "string",
741
+ "format": "date-time"
742
+ }
743
+ }
744
+ },
745
+ "body": {
746
+ "$ref": "/ledger/v1/schemas/definitions/NewAccount"
747
+ }
748
+ },
749
+ "required": ["params", "body"],
750
+ "additionalProperties": false
751
+ },
752
+ "responses": {
753
+ "204": {
754
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
755
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountPutFragment3ResponseNoContent",
756
+ "type": "object",
757
+ "properties": {
758
+ "headers": {
759
+ "type": "object",
760
+ "properties": {
761
+ "created-on": {
762
+ "type": "string",
763
+ "format": "date-time"
764
+ },
765
+ "updated-on": {
766
+ "type": "string",
767
+ "format": "date-time"
768
+ },
769
+ "last-modified": {
770
+ "type": "string",
771
+ "format": "date-time"
772
+ }
773
+ },
774
+ "required": ["created-on", "updated-on", "last-modified"]
775
+ }
776
+ },
777
+ "required": ["headers"],
778
+ "additionalProperties": false
779
+ },
780
+ "409": {
781
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
782
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountPutFragment3ResponseConflict",
783
+ "type": "object",
784
+ "properties": {
785
+ "headers": {
786
+ "type": "object",
787
+ "additionalProperties": true
788
+ }
789
+ },
790
+ "required": [],
791
+ "additionalProperties": false
792
+ },
793
+ "default": {
794
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
795
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountPutFragment3ResponseDefault",
796
+ "type": "object",
797
+ "properties": {
798
+ "headers": {
799
+ "type": "object",
800
+ "additionalProperties": true
801
+ },
802
+ "body": {
803
+ "$ref": "/ledger/v1/schemas/definitions/Error"
804
+ }
805
+ },
806
+ "required": ["body"],
807
+ "additionalProperties": false
808
+ }
809
+ }
810
+ }
811
+ },
812
+ "/ledger/v1/account-entries": {
813
+ "get": {
814
+ "request": {
815
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
816
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountEntriesQueryGetRequestContext",
817
+ "type": "object",
818
+ "properties": {
819
+ "params": {
820
+ "type": "object",
821
+ "additionalProperties": false,
822
+ "properties": {
823
+ "toDate": {
824
+ "type": "string",
825
+ "format": "date-time"
826
+ },
827
+ "fromDate": {
828
+ "type": "string",
829
+ "format": "date-time"
830
+ },
831
+ "accountIds": {
832
+ "type": "array",
833
+ "minItems": 1,
834
+ "items": {
835
+ "type": "string"
836
+ }
837
+ }
838
+ },
839
+ "required": ["toDate", "accountIds"]
840
+ },
841
+ "headers": {
842
+ "type": "object",
843
+ "additionalProperties": true
844
+ }
845
+ },
846
+ "required": ["query"],
847
+ "additionalProperties": false
848
+ },
849
+ "responses": {
850
+ "200": {
851
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
852
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountEntriesQueryGetResponseOK",
853
+ "type": "object",
854
+ "properties": {
855
+ "headers": {
856
+ "type": "object",
857
+ "additionalProperties": true
858
+ },
859
+ "body": {
860
+ "$ref": "/ledger/v1/schemas/definitions/EntriesList"
861
+ }
862
+ },
863
+ "required": ["body"],
864
+ "additionalProperties": false
865
+ },
866
+ "404": {
867
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
868
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountEntriesQueryGetResponseNotFound",
869
+ "type": "object",
870
+ "properties": {
871
+ "headers": {
872
+ "type": "object",
873
+ "additionalProperties": true
874
+ }
875
+ },
876
+ "required": [],
877
+ "additionalProperties": false
878
+ },
879
+ "default": {
880
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
881
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/AccountEntriesQueryGetResponseDefault",
882
+ "type": "object",
883
+ "properties": {
884
+ "headers": {
885
+ "type": "object",
886
+ "additionalProperties": true
887
+ },
888
+ "body": {
889
+ "$ref": "/ledger/v1/schemas/definitions/Error"
890
+ }
891
+ },
892
+ "required": ["body"],
893
+ "additionalProperties": false
894
+ }
895
+ }
896
+ }
897
+ },
898
+ "/ledger/v1/entry/:entryId": {
899
+ "get": {
900
+ "request": {
901
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
902
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/EntryGetRequestContext",
903
+ "type": "object",
904
+ "properties": {
905
+ "params": {
906
+ "type": "object",
907
+ "additionalProperties": false,
908
+ "properties": {
909
+ "at": {
910
+ "type": "string",
911
+ "format": "date-time"
912
+ }
913
+ },
914
+ "required": ["at"]
915
+ },
916
+ "headers": {
917
+ "type": "object",
918
+ "additionalProperties": true
919
+ }
920
+ },
921
+ "required": ["params", "query"],
922
+ "additionalProperties": false
923
+ },
924
+ "responses": {
925
+ "200": {
926
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
927
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/EntryGetResponseOK",
928
+ "type": "object",
929
+ "properties": {
930
+ "headers": {
931
+ "type": "object",
932
+ "properties": {
933
+ "created-on": {
934
+ "type": "string",
935
+ "format": "date-time"
936
+ },
937
+ "updated-on": {
938
+ "type": "string",
939
+ "format": "date-time"
940
+ },
941
+ "last-modified": {
942
+ "type": "string",
943
+ "format": "date-time"
944
+ }
945
+ },
946
+ "required": ["created-on", "updated-on", "last-modified"]
947
+ },
948
+ "body": {
949
+ "$ref": "/ledger/v1/schemas/definitions/ResponseEntry"
950
+ }
951
+ },
952
+ "required": ["headers", "body"],
953
+ "additionalProperties": false
954
+ },
955
+ "404": {
956
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
957
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/EntryGetResponseNotFound",
958
+ "type": "object",
959
+ "properties": {
960
+ "headers": {
961
+ "type": "object",
962
+ "additionalProperties": true
963
+ }
964
+ },
965
+ "required": [],
966
+ "additionalProperties": false
967
+ },
968
+ "default": {
969
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
970
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/EntryGetResponseDefault",
971
+ "type": "object",
972
+ "properties": {
973
+ "headers": {
974
+ "type": "object",
975
+ "additionalProperties": true
976
+ },
977
+ "body": {
978
+ "$ref": "/ledger/v1/schemas/definitions/Error"
979
+ }
980
+ },
981
+ "required": ["body"],
982
+ "additionalProperties": false
983
+ }
984
+ }
985
+ },
986
+ "put": {
987
+ "request": {
988
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
989
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/EntryPutRequestContext",
990
+ "type": "object",
991
+ "properties": {
992
+ "params": {
993
+ "type": "object",
994
+ "additionalProperties": false,
995
+ "properties": {
996
+ "entryId": {
997
+ "type": "string"
998
+ }
999
+ },
1000
+ "required": ["entryId"]
1001
+ },
1002
+ "headers": {
1003
+ "type": "object",
1004
+ "additionalProperties": true,
1005
+ "properties": {
1006
+ "if-match": {
1007
+ "type": "string"
1008
+ },
1009
+ "created-on": {
1010
+ "type": "string",
1011
+ "format": "date-time"
1012
+ },
1013
+ "last-modified": {
1014
+ "type": "string",
1015
+ "format": "date-time"
1016
+ }
1017
+ }
1018
+ },
1019
+ "body": {
1020
+ "$ref": "/ledger/v1/schemas/definitions/NewEntry"
1021
+ }
1022
+ },
1023
+ "required": ["params", "body"],
1024
+ "additionalProperties": false
1025
+ },
1026
+ "responses": {
1027
+ "204": {
1028
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1029
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/EntryPutResponseNoContent",
1030
+ "type": "object",
1031
+ "properties": {
1032
+ "headers": {
1033
+ "type": "object",
1034
+ "properties": {
1035
+ "created-on": {
1036
+ "type": "string",
1037
+ "format": "date-time"
1038
+ },
1039
+ "updated-on": {
1040
+ "type": "string",
1041
+ "format": "date-time"
1042
+ },
1043
+ "last-modified": {
1044
+ "type": "string",
1045
+ "format": "date-time"
1046
+ }
1047
+ },
1048
+ "required": ["created-on", "updated-on", "last-modified"]
1049
+ }
1050
+ },
1051
+ "required": ["headers"],
1052
+ "additionalProperties": false
1053
+ },
1054
+ "409": {
1055
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1056
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/EntryPutResponseConflict",
1057
+ "type": "object",
1058
+ "properties": {
1059
+ "headers": {
1060
+ "type": "object",
1061
+ "additionalProperties": true
1062
+ }
1063
+ },
1064
+ "required": [],
1065
+ "additionalProperties": false
1066
+ },
1067
+ "412": {
1068
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1069
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/EntryPutResponsePreconditionFailed",
1070
+ "type": "object",
1071
+ "properties": {
1072
+ "headers": {
1073
+ "type": "object",
1074
+ "additionalProperties": true
1075
+ }
1076
+ },
1077
+ "required": [],
1078
+ "additionalProperties": false
1079
+ },
1080
+ "default": {
1081
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1082
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/EntryPutResponseDefault",
1083
+ "type": "object",
1084
+ "properties": {
1085
+ "headers": {
1086
+ "type": "object",
1087
+ "additionalProperties": true
1088
+ },
1089
+ "body": {
1090
+ "$ref": "/ledger/v1/schemas/definitions/Error"
1091
+ }
1092
+ },
1093
+ "required": ["body"],
1094
+ "additionalProperties": false
1095
+ }
1096
+ }
1097
+ }
1098
+ },
1099
+ "/ledger/v1/balance": {
1100
+ "get": {
1101
+ "request": {
1102
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1103
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/BalanceGetRequestContext",
1104
+ "type": "object",
1105
+ "properties": {
1106
+ "params": {
1107
+ "type": "object",
1108
+ "additionalProperties": false,
1109
+ "properties": {
1110
+ "accountIds": {
1111
+ "type": "array",
1112
+ "minItems": 1,
1113
+ "items": {
1114
+ "type": "string"
1115
+ }
1116
+ },
1117
+ "at": {
1118
+ "type": "string",
1119
+ "format": "date-time"
1120
+ }
1121
+ },
1122
+ "required": ["accountIds", "at"]
1123
+ },
1124
+ "headers": {
1125
+ "type": "object",
1126
+ "additionalProperties": true,
1127
+ "properties": {
1128
+ "if-none-match": {
1129
+ "type": "string"
1130
+ }
1131
+ }
1132
+ }
1133
+ },
1134
+ "required": ["query"],
1135
+ "additionalProperties": false
1136
+ },
1137
+ "responses": {
1138
+ "200": {
1139
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1140
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/BalanceGetResponseOK",
1141
+ "type": "object",
1142
+ "properties": {
1143
+ "headers": {
1144
+ "type": "object",
1145
+ "properties": {
1146
+ "etag": {
1147
+ "type": "string"
1148
+ }
1149
+ },
1150
+ "required": ["etag"]
1151
+ },
1152
+ "body": {
1153
+ "$ref": "/ledger/v1/schemas/definitions/BalanceList"
1154
+ }
1155
+ },
1156
+ "required": ["headers", "body"],
1157
+ "additionalProperties": false
1158
+ },
1159
+ "400": {
1160
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1161
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/BalanceGetResponseBadRequest",
1162
+ "type": "object",
1163
+ "properties": {
1164
+ "headers": {
1165
+ "type": "object",
1166
+ "additionalProperties": true
1167
+ },
1168
+ "body": {
1169
+ "$ref": "/ledger/v1/schemas/definitions/Error"
1170
+ }
1171
+ },
1172
+ "required": ["body"],
1173
+ "additionalProperties": false
1174
+ },
1175
+ "default": {
1176
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1177
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/BalanceGetResponseDefault",
1178
+ "type": "object",
1179
+ "properties": {
1180
+ "headers": {
1181
+ "type": "object",
1182
+ "additionalProperties": true
1183
+ },
1184
+ "body": {
1185
+ "$ref": "/ledger/v1/schemas/definitions/Error"
1186
+ }
1187
+ },
1188
+ "required": ["body"],
1189
+ "additionalProperties": false
1190
+ }
1191
+ }
1192
+ }
1193
+ },
1194
+ "/ledger/v1/total": {
1195
+ "get": {
1196
+ "request": {
1197
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1198
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/TotalGetRequestContext",
1199
+ "type": "object",
1200
+ "properties": {
1201
+ "params": {
1202
+ "type": "object",
1203
+ "additionalProperties": false,
1204
+ "properties": {
1205
+ "accountIds": {
1206
+ "type": "array",
1207
+ "minItems": 1,
1208
+ "items": {
1209
+ "type": "string"
1210
+ }
1211
+ },
1212
+ "filteredAccounts": {
1213
+ "type": "array",
1214
+ "minItems": 1,
1215
+ "items": {
1216
+ "type": "string"
1217
+ }
1218
+ },
1219
+ "fromDate": {
1220
+ "type": "string",
1221
+ "format": "date-time"
1222
+ },
1223
+ "toDate": {
1224
+ "type": "string",
1225
+ "format": "date-time"
1226
+ }
1227
+ },
1228
+ "required": ["accountIds", "toDate"]
1229
+ },
1230
+ "headers": {
1231
+ "type": "object",
1232
+ "additionalProperties": true
1233
+ }
1234
+ },
1235
+ "required": ["query"],
1236
+ "additionalProperties": false
1237
+ },
1238
+ "responses": {
1239
+ "200": {
1240
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1241
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/TotalGetResponseOK",
1242
+ "type": "object",
1243
+ "properties": {
1244
+ "headers": {
1245
+ "type": "object",
1246
+ "additionalProperties": true
1247
+ },
1248
+ "body": {
1249
+ "$ref": "/ledger/v1/schemas/definitions/TotalsList"
1250
+ }
1251
+ },
1252
+ "required": ["body"],
1253
+ "additionalProperties": false
1254
+ },
1255
+ "400": {
1256
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1257
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/TotalGetResponseBadRequest",
1258
+ "type": "object",
1259
+ "properties": {
1260
+ "headers": {
1261
+ "type": "object",
1262
+ "additionalProperties": true
1263
+ },
1264
+ "body": {
1265
+ "$ref": "/ledger/v1/schemas/definitions/Error"
1266
+ }
1267
+ },
1268
+ "required": ["body"],
1269
+ "additionalProperties": false
1270
+ },
1271
+ "404": {
1272
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1273
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/TotalGetResponseNotFound",
1274
+ "type": "object",
1275
+ "properties": {
1276
+ "headers": {
1277
+ "type": "object",
1278
+ "additionalProperties": true
1279
+ }
1280
+ },
1281
+ "required": [],
1282
+ "additionalProperties": false
1283
+ },
1284
+ "default": {
1285
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1286
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/api/TotalGetResponseDefault",
1287
+ "type": "object",
1288
+ "properties": {
1289
+ "headers": {
1290
+ "type": "object",
1291
+ "additionalProperties": true
1292
+ },
1293
+ "body": {
1294
+ "$ref": "/ledger/v1/schemas/definitions/Error"
1295
+ }
1296
+ },
1297
+ "required": ["body"],
1298
+ "additionalProperties": false
1299
+ }
1300
+ }
1301
+ }
1302
+ }
1303
+ },
1304
+ "definitions": {
1305
+ "Ping": {
1306
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1307
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/definitions/Ping",
1308
+ "type": "object",
1309
+ "additionalProperties": false,
1310
+ "required": ["serverTime"],
1311
+ "properties": {
1312
+ "serverTime": {
1313
+ "type": "string",
1314
+ "format": "date-time",
1315
+ "description": "Current server time."
1316
+ }
1317
+ }
1318
+ },
1319
+ "Error": {
1320
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1321
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/definitions/Error",
1322
+ "type": "object",
1323
+ "additionalProperties": false,
1324
+ "description": "Error message.",
1325
+ "required": ["code"],
1326
+ "properties": {
1327
+ "message": {
1328
+ "type": "string"
1329
+ },
1330
+ "code": {
1331
+ "type": "string",
1332
+ "enum": [
1333
+ "INVALID_AT",
1334
+ "INVALID_FROM",
1335
+ "INVALID_TO",
1336
+ "INVALID_CREATED_ON",
1337
+ "INVALID_LAST_MODIFIED",
1338
+ "INVALID_IF_MATCH",
1339
+ "FROM_GREATER_THAN_TO",
1340
+ "ACCOUNT_NOT_FOUND",
1341
+ "POSTING_AMOUNT_NOT_AN_INTEGER",
1342
+ "ACCOUNT_MULTIPLE_POSTINGS",
1343
+ "LAST_MODIFIED_BEFORE_ACCOUNT_CREATED_ON",
1344
+ "POSTING_WITH_ZERO_AMOUNT",
1345
+ "POSTING_WITH_NEGATIVE_AMOUNT",
1346
+ "VERSION_SUPPLIED_FOR_UNVERSIONED_ACCOUNT",
1347
+ "NO_POSTINGS",
1348
+ "INSUFFICIENT_POSTINGS",
1349
+ "UNEQUAL_CREDIT_DEBIT",
1350
+ "VERSION_BALANCE_MISMATCH",
1351
+ "VERSION_MISMATCH",
1352
+ "CURRENCY_MISMATCH",
1353
+ "UNHANDLED_ERROR"
1354
+ ]
1355
+ }
1356
+ }
1357
+ },
1358
+ "Currency": {
1359
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1360
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/definitions/Currency",
1361
+ "type": "string",
1362
+ "enum": [
1363
+ "AED",
1364
+ "AFN",
1365
+ "ALL",
1366
+ "AMD",
1367
+ "ANG",
1368
+ "AOA",
1369
+ "ARS",
1370
+ "AUD",
1371
+ "AWG",
1372
+ "AZN",
1373
+ "BAM",
1374
+ "BBD",
1375
+ "BDT",
1376
+ "BGN",
1377
+ "BHD",
1378
+ "BIF",
1379
+ "BMD",
1380
+ "BND",
1381
+ "BOB",
1382
+ "BOV",
1383
+ "BRL",
1384
+ "BSD",
1385
+ "BTN",
1386
+ "BWP",
1387
+ "BYN",
1388
+ "BZD",
1389
+ "CAD",
1390
+ "CDF",
1391
+ "CHE",
1392
+ "CHF",
1393
+ "CHW",
1394
+ "CLF",
1395
+ "CLP",
1396
+ "CNY",
1397
+ "COP",
1398
+ "COU",
1399
+ "CRC",
1400
+ "CUC",
1401
+ "CUP",
1402
+ "CVE",
1403
+ "CZK",
1404
+ "DJF",
1405
+ "DKK",
1406
+ "DOP",
1407
+ "DZD",
1408
+ "EGP",
1409
+ "ERN",
1410
+ "ETB",
1411
+ "EUR",
1412
+ "FJD",
1413
+ "FKP",
1414
+ "GBP",
1415
+ "GEL",
1416
+ "GHS",
1417
+ "GIP",
1418
+ "GMD",
1419
+ "GNF",
1420
+ "GTQ",
1421
+ "GYD",
1422
+ "HKD",
1423
+ "HNL",
1424
+ "HRK",
1425
+ "HTG",
1426
+ "HUF",
1427
+ "IDR",
1428
+ "ILS",
1429
+ "INR",
1430
+ "IQD",
1431
+ "IRR",
1432
+ "ISK",
1433
+ "JMD",
1434
+ "JOD",
1435
+ "JPY",
1436
+ "KES",
1437
+ "KGS",
1438
+ "KHR",
1439
+ "KMF",
1440
+ "KPW",
1441
+ "KRW",
1442
+ "KWD",
1443
+ "KYD",
1444
+ "KZT",
1445
+ "LAK",
1446
+ "LBP",
1447
+ "LKR",
1448
+ "LRD",
1449
+ "LSL",
1450
+ "LYD",
1451
+ "MAD",
1452
+ "MDL",
1453
+ "MGA",
1454
+ "MKD",
1455
+ "MMK",
1456
+ "MNT",
1457
+ "MOP",
1458
+ "MRU",
1459
+ "MUR",
1460
+ "MVR",
1461
+ "MWK",
1462
+ "MXN",
1463
+ "MXV",
1464
+ "MYR",
1465
+ "MZN",
1466
+ "NAD",
1467
+ "NGN",
1468
+ "NIO",
1469
+ "NOK",
1470
+ "NPR",
1471
+ "NZD",
1472
+ "OMR",
1473
+ "PAB",
1474
+ "PEN",
1475
+ "PGK",
1476
+ "PHP",
1477
+ "PKR",
1478
+ "PLN",
1479
+ "PYG",
1480
+ "QAR",
1481
+ "RON",
1482
+ "RSD",
1483
+ "RUB",
1484
+ "RWF",
1485
+ "SAR",
1486
+ "SBD",
1487
+ "SCR",
1488
+ "SDG",
1489
+ "SEK",
1490
+ "SGD",
1491
+ "SHP",
1492
+ "SLL",
1493
+ "SOS",
1494
+ "SRD",
1495
+ "SSP",
1496
+ "STN",
1497
+ "SVC",
1498
+ "SYP",
1499
+ "SZL",
1500
+ "THB",
1501
+ "TJS",
1502
+ "TMT",
1503
+ "TND",
1504
+ "TOP",
1505
+ "TRY",
1506
+ "TTD",
1507
+ "TWD",
1508
+ "TZS",
1509
+ "UAH",
1510
+ "UGX",
1511
+ "USD",
1512
+ "USN",
1513
+ "UYI",
1514
+ "UYU",
1515
+ "UYW",
1516
+ "UZS",
1517
+ "VES",
1518
+ "VND",
1519
+ "VUV",
1520
+ "WST",
1521
+ "XAF",
1522
+ "XAG",
1523
+ "XAU",
1524
+ "XBA",
1525
+ "XBB",
1526
+ "XBC",
1527
+ "XBD",
1528
+ "XCD",
1529
+ "XDR",
1530
+ "XOF",
1531
+ "XPD",
1532
+ "XPF",
1533
+ "XPT",
1534
+ "XSU",
1535
+ "XTS",
1536
+ "XUA",
1537
+ "XXX",
1538
+ "YER",
1539
+ "ZAR",
1540
+ "ZMW",
1541
+ "ZWL"
1542
+ ]
1543
+ },
1544
+ "Account": {
1545
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1546
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/definitions/Account",
1547
+ "type": "object",
1548
+ "additionalProperties": false,
1549
+ "required": ["accountId", "createdOn", "currency", "type"],
1550
+ "properties": {
1551
+ "accountId": {
1552
+ "type": "string",
1553
+ "description": "Account ID"
1554
+ },
1555
+ "createdOn": {
1556
+ "type": "string",
1557
+ "format": "date-time",
1558
+ "description": "Account creation date/time."
1559
+ },
1560
+ "currency": {
1561
+ "$ref": "/ledger/v1/schemas/definitions/Currency"
1562
+ },
1563
+ "name": {
1564
+ "type": "string",
1565
+ "description": "Account short name."
1566
+ },
1567
+ "type": {
1568
+ "type": "string",
1569
+ "enum": ["VERSIONED", "UNVERSIONED"]
1570
+ }
1571
+ }
1572
+ },
1573
+ "NewAccount": {
1574
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1575
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/definitions/NewAccount",
1576
+ "type": "object",
1577
+ "additionalProperties": false,
1578
+ "required": ["currency"],
1579
+ "properties": {
1580
+ "currency": {
1581
+ "$ref": "/ledger/v1/schemas/definitions/Currency"
1582
+ },
1583
+ "name": {
1584
+ "type": "string",
1585
+ "description": "Account short name"
1586
+ },
1587
+ "type": {
1588
+ "type": "string",
1589
+ "enum": ["VERSIONED", "UNVERSIONED"],
1590
+ "description": "Determines whether performing a posting is dependent on the balance of the account or not. Defaults to VERSIONED if not supplied."
1591
+ }
1592
+ }
1593
+ },
1594
+ "BalanceList": {
1595
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1596
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/definitions/BalanceList",
1597
+ "type": "object",
1598
+ "additionalProperties": false,
1599
+ "description": "Balances for the accounts requested.",
1600
+ "required": ["at", "balances"],
1601
+ "properties": {
1602
+ "at": {
1603
+ "type": "string",
1604
+ "format": "date-time",
1605
+ "description": "Account balance at this date/time"
1606
+ },
1607
+ "balances": {
1608
+ "type": "array",
1609
+ "items": {
1610
+ "$ref": "/ledger/v1/schemas/definitions/Balance"
1611
+ }
1612
+ }
1613
+ }
1614
+ },
1615
+ "Balance": {
1616
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1617
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/definitions/Balance",
1618
+ "type": "object",
1619
+ "additionalProperties": false,
1620
+ "description": "Ledger balance at a point in time.",
1621
+ "required": ["accountId", "balance"],
1622
+ "properties": {
1623
+ "accountId": {
1624
+ "type": "string",
1625
+ "description": "Account ID"
1626
+ },
1627
+ "balance": {
1628
+ "type": "string"
1629
+ }
1630
+ }
1631
+ },
1632
+ "EntriesList": {
1633
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1634
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/definitions/EntriesList",
1635
+ "type": "object",
1636
+ "additionalProperties": false,
1637
+ "required": ["accountEntries"],
1638
+ "properties": {
1639
+ "accountEntries": {
1640
+ "type": "array",
1641
+ "items": {
1642
+ "$ref": "/ledger/v1/schemas/definitions/Entries"
1643
+ }
1644
+ }
1645
+ }
1646
+ },
1647
+ "Entries": {
1648
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1649
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/definitions/Entries",
1650
+ "type": "object",
1651
+ "additionalProperties": false,
1652
+ "required": ["entries", "accountId"],
1653
+ "properties": {
1654
+ "accountId": {
1655
+ "type": "string",
1656
+ "description": "Account ID"
1657
+ },
1658
+ "entries": {
1659
+ "type": "array",
1660
+ "minItems": 0,
1661
+ "items": {
1662
+ "$ref": "/ledger/v1/schemas/definitions/Entry"
1663
+ }
1664
+ }
1665
+ }
1666
+ },
1667
+ "Entry": {
1668
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1669
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/definitions/Entry",
1670
+ "type": "object",
1671
+ "additionalProperties": false,
1672
+ "required": ["entryId", "createdOn", "postings"],
1673
+ "properties": {
1674
+ "entryId": {
1675
+ "type": "string",
1676
+ "description": "Journal entry ID"
1677
+ },
1678
+ "createdOn": {
1679
+ "type": "string",
1680
+ "format": "date-time",
1681
+ "description": "Journal entry creation date/time"
1682
+ },
1683
+ "postings": {
1684
+ "type": "array",
1685
+ "items": {
1686
+ "$ref": "/ledger/v1/schemas/definitions/Post"
1687
+ }
1688
+ }
1689
+ }
1690
+ },
1691
+ "ResponseEntry": {
1692
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1693
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/definitions/ResponseEntry",
1694
+ "type": "object",
1695
+ "additionalProperties": false,
1696
+ "required": ["entryId", "createdOn", "postings"],
1697
+ "properties": {
1698
+ "entryId": {
1699
+ "type": "string",
1700
+ "description": "Journal entry ID"
1701
+ },
1702
+ "createdOn": {
1703
+ "type": "string",
1704
+ "format": "date-time",
1705
+ "description": "Journal entry creation date/time"
1706
+ },
1707
+ "postings": {
1708
+ "type": "array",
1709
+ "items": {
1710
+ "$ref": "/ledger/v1/schemas/definitions/ResponsePost"
1711
+ }
1712
+ }
1713
+ }
1714
+ },
1715
+ "NewEntry": {
1716
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1717
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/definitions/NewEntry",
1718
+ "type": "object",
1719
+ "additionalProperties": false,
1720
+ "required": ["postings"],
1721
+ "properties": {
1722
+ "postings": {
1723
+ "type": "array",
1724
+ "description": "List of posts contained within the journal entry.",
1725
+ "items": {
1726
+ "$ref": "/ledger/v1/schemas/definitions/Post"
1727
+ }
1728
+ }
1729
+ }
1730
+ },
1731
+ "Post": {
1732
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1733
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/definitions/Post",
1734
+ "type": "object",
1735
+ "additionalProperties": false,
1736
+ "required": ["amount", "currency", "type", "accountId"],
1737
+ "properties": {
1738
+ "amount": {
1739
+ "type": "string"
1740
+ },
1741
+ "currency": {
1742
+ "$ref": "/ledger/v1/schemas/definitions/Currency"
1743
+ },
1744
+ "type": {
1745
+ "$ref": "/ledger/v1/schemas/definitions/Type"
1746
+ },
1747
+ "createdOn": {
1748
+ "type": "string",
1749
+ "format": "date-time"
1750
+ },
1751
+ "accountId": {
1752
+ "type": "string",
1753
+ "description": "account ID"
1754
+ }
1755
+ }
1756
+ },
1757
+ "ResponsePost": {
1758
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1759
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/definitions/ResponsePost",
1760
+ "type": "object",
1761
+ "additionalProperties": false,
1762
+ "required": ["amount", "currency", "type", "accountId", "createdOn"],
1763
+ "properties": {
1764
+ "amount": {
1765
+ "type": "string"
1766
+ },
1767
+ "currency": {
1768
+ "$ref": "/ledger/v1/schemas/definitions/Currency"
1769
+ },
1770
+ "type": {
1771
+ "$ref": "/ledger/v1/schemas/definitions/Type"
1772
+ },
1773
+ "createdOn": {
1774
+ "type": "string",
1775
+ "format": "date-time"
1776
+ },
1777
+ "accountId": {
1778
+ "type": "string",
1779
+ "description": "account ID"
1780
+ }
1781
+ }
1782
+ },
1783
+ "Type": {
1784
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1785
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/definitions/Type",
1786
+ "type": "string",
1787
+ "description": "CREDIT or DEBIT",
1788
+ "enum": ["CREDIT", "DEBIT"]
1789
+ },
1790
+ "TotalsList": {
1791
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1792
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/definitions/TotalsList",
1793
+ "type": "array",
1794
+ "additionalProperties": false,
1795
+ "description": "Totals of filtered entries for the accounts requested.",
1796
+ "items": {
1797
+ "$ref": "/ledger/v1/schemas/definitions/Total"
1798
+ },
1799
+ "minItems": 1
1800
+ },
1801
+ "Total": {
1802
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1803
+ "$id": "https://eslint-plugin.checkdigit/ledger/v1/schemas/definitions/Total",
1804
+ "type": "object",
1805
+ "additionalProperties": false,
1806
+ "description": "- The total debit or credit to an account.\n- If debits exceed credits the total value will be negative.\n- AccountIds may include idFragments formatted as: :accountId/:idFragment1/:idFragment2/:idFragment3.\n",
1807
+ "required": ["accountId", "total"],
1808
+ "properties": {
1809
+ "accountId": {
1810
+ "type": "string",
1811
+ "description": "account ID"
1812
+ },
1813
+ "total": {
1814
+ "type": "string",
1815
+ "minLength": 1
1816
+ }
1817
+ }
1818
+ }
1819
+ }
1820
+ }