@hyperscale0/adl 1.0.0-alpha.1

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.
@@ -0,0 +1,757 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/hyperscale0/hyperscale-adl/main/spec/manifest.schema.json",
4
+ "title": "Hyperscale provider adapter manifest",
5
+ "description": "One provider adapter declaration. Generated from src/vocabulary.ts by scripts/emit-spec.ts; edit that, never this file.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "bindings",
10
+ "capability",
11
+ "config",
12
+ "egress",
13
+ "operationMap",
14
+ "provider",
15
+ "webhookMap"
16
+ ],
17
+ "properties": {
18
+ "provider": {
19
+ "type": "string",
20
+ "pattern": "^[a-z][a-z0-9_.-]{0,79}$"
21
+ },
22
+ "capability": {
23
+ "type": "string",
24
+ "pattern": "\\S"
25
+ },
26
+ "domain": {
27
+ "type": "string",
28
+ "pattern": "\\S"
29
+ },
30
+ "egress": {
31
+ "type": "string",
32
+ "enum": [
33
+ "none",
34
+ "rest",
35
+ "batch_reconcile",
36
+ "sync_clearance"
37
+ ]
38
+ },
39
+ "bindings": {
40
+ "type": "object",
41
+ "additionalProperties": {
42
+ "type": "string",
43
+ "enum": [
44
+ "strict",
45
+ "claim",
46
+ "confirmation_only",
47
+ "evidence_only"
48
+ ]
49
+ }
50
+ },
51
+ "config": {
52
+ "type": "object",
53
+ "additionalProperties": false,
54
+ "properties": {
55
+ "baseUrl": {
56
+ "type": "string",
57
+ "pattern": "^https?://"
58
+ },
59
+ "credentialRef": {
60
+ "oneOf": [
61
+ {
62
+ "type": "object",
63
+ "additionalProperties": false,
64
+ "required": [
65
+ "name",
66
+ "source"
67
+ ],
68
+ "properties": {
69
+ "name": {
70
+ "type": "string",
71
+ "pattern": "\\S"
72
+ },
73
+ "source": {
74
+ "const": "environment"
75
+ }
76
+ }
77
+ },
78
+ {
79
+ "type": "object",
80
+ "additionalProperties": false,
81
+ "required": [
82
+ "account",
83
+ "service",
84
+ "source"
85
+ ],
86
+ "properties": {
87
+ "account": {
88
+ "type": "string",
89
+ "pattern": "\\S"
90
+ },
91
+ "service": {
92
+ "type": "string",
93
+ "pattern": "\\S"
94
+ },
95
+ "source": {
96
+ "const": "keychain"
97
+ }
98
+ }
99
+ }
100
+ ]
101
+ }
102
+ }
103
+ },
104
+ "operationMap": {
105
+ "type": "object",
106
+ "additionalProperties": {
107
+ "$ref": "#/$defs/operationBinding"
108
+ }
109
+ },
110
+ "webhookMap": {
111
+ "type": "object",
112
+ "additionalProperties": {
113
+ "$ref": "#/$defs/webhookTransitionPlan"
114
+ }
115
+ },
116
+ "profile": {
117
+ "type": "object",
118
+ "additionalProperties": false,
119
+ "required": [
120
+ "auth",
121
+ "executedReadBack",
122
+ "financialAddressProvisioning",
123
+ "idempotencySpine",
124
+ "kind",
125
+ "lifecycleVocabulary",
126
+ "limitFacts",
127
+ "notificationMechanisms",
128
+ "statementFormats",
129
+ "windows",
130
+ "wireCodec"
131
+ ],
132
+ "properties": {
133
+ "kind": {
134
+ "const": "partner_bank"
135
+ },
136
+ "wireCodec": {
137
+ "type": "string",
138
+ "enum": [
139
+ "rest_json",
140
+ "iso20022_xml",
141
+ "swift_mt"
142
+ ]
143
+ },
144
+ "auth": {
145
+ "type": "object",
146
+ "additionalProperties": false,
147
+ "required": [
148
+ "envelope",
149
+ "signing"
150
+ ],
151
+ "properties": {
152
+ "envelope": {
153
+ "type": "string",
154
+ "enum": [
155
+ "oauth2_client_credentials",
156
+ "oauth2_password",
157
+ "bearer_out_of_band",
158
+ "mutual_tls",
159
+ "signed_file"
160
+ ]
161
+ },
162
+ "signing": {
163
+ "type": "string",
164
+ "enum": [
165
+ "jws",
166
+ "detached_signature",
167
+ "signed_file"
168
+ ]
169
+ }
170
+ }
171
+ },
172
+ "charges": {
173
+ "type": "object",
174
+ "additionalProperties": false,
175
+ "required": [
176
+ "posting",
177
+ "vat"
178
+ ],
179
+ "properties": {
180
+ "narratives": {
181
+ "type": "object",
182
+ "additionalProperties": false,
183
+ "required": [
184
+ "charge",
185
+ "vat"
186
+ ],
187
+ "properties": {
188
+ "charge": {
189
+ "type": "array",
190
+ "items": {
191
+ "type": "string",
192
+ "pattern": "\\S"
193
+ }
194
+ },
195
+ "vat": {
196
+ "type": "array",
197
+ "items": {
198
+ "type": "string",
199
+ "pattern": "\\S"
200
+ }
201
+ }
202
+ }
203
+ },
204
+ "posting": {
205
+ "type": "string",
206
+ "enum": [
207
+ "post_hoc",
208
+ "at_instruction"
209
+ ]
210
+ },
211
+ "vat": {
212
+ "type": "string",
213
+ "enum": [
214
+ "separate_line",
215
+ "included_in_charge"
216
+ ]
217
+ }
218
+ }
219
+ },
220
+ "executedReadBack": {
221
+ "type": "object",
222
+ "additionalProperties": false,
223
+ "required": [
224
+ "fxRate",
225
+ "railSubstitution"
226
+ ],
227
+ "properties": {
228
+ "fxRate": {
229
+ "type": "string",
230
+ "enum": [
231
+ "final_status_only"
232
+ ]
233
+ },
234
+ "railSubstitution": {
235
+ "type": "string",
236
+ "enum": [
237
+ "ips_to_sarie",
238
+ "none"
239
+ ]
240
+ }
241
+ }
242
+ },
243
+ "idempotencySpine": {
244
+ "type": "object",
245
+ "additionalProperties": false,
246
+ "required": [
247
+ "dedupeKeys",
248
+ "endToEndId",
249
+ "instructionId",
250
+ "paymentReference"
251
+ ],
252
+ "properties": {
253
+ "dedupeKeys": {
254
+ "type": "array",
255
+ "items": {
256
+ "type": "string",
257
+ "enum": [
258
+ "client",
259
+ "instructionId",
260
+ "endToEndId",
261
+ "paymentReference"
262
+ ]
263
+ },
264
+ "minItems": 1,
265
+ "uniqueItems": true
266
+ },
267
+ "endToEndId": {
268
+ "$ref": "#/$defs/referenceLimit"
269
+ },
270
+ "instructionId": {
271
+ "$ref": "#/$defs/referenceLimit"
272
+ },
273
+ "paymentReference": {
274
+ "$ref": "#/$defs/referenceLimit"
275
+ }
276
+ }
277
+ },
278
+ "lifecycleVocabulary": {
279
+ "type": "object",
280
+ "minProperties": 1,
281
+ "additionalProperties": {
282
+ "type": "string",
283
+ "enum": [
284
+ "received",
285
+ "accepted",
286
+ "processed",
287
+ "failed",
288
+ "returned",
289
+ "duplicate_original_succeeded",
290
+ "duplicate_original_rejected",
291
+ "duplicate_suspected_rejected"
292
+ ]
293
+ }
294
+ },
295
+ "limitFacts": {
296
+ "type": "object",
297
+ "additionalProperties": false,
298
+ "required": [
299
+ "access",
300
+ "dimensions"
301
+ ],
302
+ "properties": {
303
+ "access": {
304
+ "type": "string",
305
+ "enum": [
306
+ "read_only"
307
+ ]
308
+ },
309
+ "dimensions": {
310
+ "type": "array",
311
+ "items": {
312
+ "type": "string",
313
+ "enum": [
314
+ "daily",
315
+ "per_transaction",
316
+ "foreign_exchange"
317
+ ]
318
+ },
319
+ "uniqueItems": true
320
+ }
321
+ }
322
+ },
323
+ "notificationMechanisms": {
324
+ "type": "array",
325
+ "items": {
326
+ "type": "string",
327
+ "enum": [
328
+ "poll",
329
+ "webhook"
330
+ ]
331
+ },
332
+ "uniqueItems": true,
333
+ "contains": {
334
+ "const": "poll"
335
+ }
336
+ },
337
+ "statementDebitReference": {
338
+ "type": "string",
339
+ "enum": [
340
+ "bank_reference",
341
+ "customer_reference"
342
+ ]
343
+ },
344
+ "statementFormats": {
345
+ "type": "array",
346
+ "items": {
347
+ "type": "string",
348
+ "enum": [
349
+ "mt940",
350
+ "mt942",
351
+ "camt_052",
352
+ "camt_053",
353
+ "obie_json"
354
+ ]
355
+ },
356
+ "uniqueItems": true
357
+ },
358
+ "financialAddressProvisioning": {
359
+ "type": "object",
360
+ "additionalProperties": false,
361
+ "required": [
362
+ "mechanism",
363
+ "pricing",
364
+ "quota"
365
+ ],
366
+ "properties": {
367
+ "mechanism": {
368
+ "type": "string",
369
+ "enum": [
370
+ "api",
371
+ "scheme_file"
372
+ ]
373
+ },
374
+ "pricing": {
375
+ "type": "string",
376
+ "enum": [
377
+ "none",
378
+ "per_address"
379
+ ]
380
+ },
381
+ "quota": {
382
+ "type": "string",
383
+ "enum": [
384
+ "none",
385
+ "provider_enforced"
386
+ ]
387
+ }
388
+ }
389
+ },
390
+ "windows": {
391
+ "type": "object",
392
+ "additionalProperties": false,
393
+ "required": [
394
+ "paymentCutoff",
395
+ "statements",
396
+ "valueDateMaxDaysAhead"
397
+ ],
398
+ "properties": {
399
+ "paymentCutoff": {
400
+ "type": "object",
401
+ "additionalProperties": false,
402
+ "required": [
403
+ "afterCutoffValueDate",
404
+ "beforeCutoffValueDate",
405
+ "time",
406
+ "timeZone"
407
+ ],
408
+ "properties": {
409
+ "afterCutoffValueDate": {
410
+ "$ref": "#/$defs/valueDateOffset"
411
+ },
412
+ "beforeCutoffValueDate": {
413
+ "$ref": "#/$defs/valueDateOffset"
414
+ },
415
+ "time": {
416
+ "type": "string",
417
+ "pattern": "^\\d{2}:\\d{2}$"
418
+ },
419
+ "timeZone": {
420
+ "type": "string",
421
+ "pattern": "\\S"
422
+ }
423
+ }
424
+ },
425
+ "statements": {
426
+ "type": "object",
427
+ "additionalProperties": false,
428
+ "properties": {
429
+ "mt940": {
430
+ "type": "object",
431
+ "additionalProperties": false,
432
+ "required": [
433
+ "availability"
434
+ ],
435
+ "properties": {
436
+ "availability": {
437
+ "type": "string",
438
+ "enum": [
439
+ "T-1",
440
+ "today_only"
441
+ ]
442
+ },
443
+ "lookbackDays": {
444
+ "type": "integer",
445
+ "minimum": 1
446
+ },
447
+ "statementDaysPerRequest": {
448
+ "type": "integer",
449
+ "minimum": 1
450
+ }
451
+ }
452
+ },
453
+ "mt942": {
454
+ "type": "object",
455
+ "additionalProperties": false,
456
+ "required": [
457
+ "availability"
458
+ ],
459
+ "properties": {
460
+ "availability": {
461
+ "type": "string",
462
+ "enum": [
463
+ "T-1",
464
+ "today_only"
465
+ ]
466
+ },
467
+ "lookbackDays": {
468
+ "type": "integer",
469
+ "minimum": 1
470
+ },
471
+ "statementDaysPerRequest": {
472
+ "type": "integer",
473
+ "minimum": 1
474
+ }
475
+ }
476
+ },
477
+ "camt_052": {
478
+ "type": "object",
479
+ "additionalProperties": false,
480
+ "required": [
481
+ "availability"
482
+ ],
483
+ "properties": {
484
+ "availability": {
485
+ "type": "string",
486
+ "enum": [
487
+ "T-1",
488
+ "today_only"
489
+ ]
490
+ },
491
+ "lookbackDays": {
492
+ "type": "integer",
493
+ "minimum": 1
494
+ },
495
+ "statementDaysPerRequest": {
496
+ "type": "integer",
497
+ "minimum": 1
498
+ }
499
+ }
500
+ },
501
+ "camt_053": {
502
+ "type": "object",
503
+ "additionalProperties": false,
504
+ "required": [
505
+ "availability"
506
+ ],
507
+ "properties": {
508
+ "availability": {
509
+ "type": "string",
510
+ "enum": [
511
+ "T-1",
512
+ "today_only"
513
+ ]
514
+ },
515
+ "lookbackDays": {
516
+ "type": "integer",
517
+ "minimum": 1
518
+ },
519
+ "statementDaysPerRequest": {
520
+ "type": "integer",
521
+ "minimum": 1
522
+ }
523
+ }
524
+ },
525
+ "obie_json": {
526
+ "type": "object",
527
+ "additionalProperties": false,
528
+ "required": [
529
+ "availability"
530
+ ],
531
+ "properties": {
532
+ "availability": {
533
+ "type": "string",
534
+ "enum": [
535
+ "T-1",
536
+ "today_only"
537
+ ]
538
+ },
539
+ "lookbackDays": {
540
+ "type": "integer",
541
+ "minimum": 1
542
+ },
543
+ "statementDaysPerRequest": {
544
+ "type": "integer",
545
+ "minimum": 1
546
+ }
547
+ }
548
+ }
549
+ }
550
+ },
551
+ "valueDateMaxDaysAhead": {
552
+ "type": "integer",
553
+ "minimum": 1
554
+ }
555
+ }
556
+ }
557
+ }
558
+ }
559
+ },
560
+ "$defs": {
561
+ "referenceLimit": {
562
+ "type": "object",
563
+ "additionalProperties": false,
564
+ "required": [
565
+ "maxLength"
566
+ ],
567
+ "properties": {
568
+ "maxLength": {
569
+ "type": "integer",
570
+ "minimum": 1
571
+ }
572
+ }
573
+ },
574
+ "valueDateOffset": {
575
+ "type": "string",
576
+ "description": "Banking days after the instruction date.",
577
+ "pattern": "^D\\+(0|[1-9]\\d*)$"
578
+ },
579
+ "operationBinding": {
580
+ "type": "object",
581
+ "additionalProperties": false,
582
+ "required": [
583
+ "direction",
584
+ "obligationKind",
585
+ "operation",
586
+ "resourceIdPath",
587
+ "resourceKind"
588
+ ],
589
+ "properties": {
590
+ "operation": {
591
+ "type": "string",
592
+ "pattern": "\\S"
593
+ },
594
+ "direction": {
595
+ "type": "string",
596
+ "enum": [
597
+ "tenant_initiated",
598
+ "system_settlement"
599
+ ]
600
+ },
601
+ "envelope": {
602
+ "type": "string",
603
+ "enum": [
604
+ "http_200_body_status",
605
+ "http_status_error_body",
606
+ "unconfirmed_until_live"
607
+ ]
608
+ },
609
+ "meter": {
610
+ "type": "string",
611
+ "pattern": "\\S"
612
+ },
613
+ "obligationKind": {
614
+ "type": "string",
615
+ "pattern": "\\S"
616
+ },
617
+ "resourceIdPath": {
618
+ "type": "string",
619
+ "pattern": "\\S"
620
+ },
621
+ "resourceKind": {
622
+ "type": "string",
623
+ "pattern": "\\S"
624
+ },
625
+ "statusEnquiry": {
626
+ "$ref": "#/$defs/statusEnquiry"
627
+ }
628
+ }
629
+ },
630
+ "statusEnquiry": {
631
+ "type": "object",
632
+ "additionalProperties": false,
633
+ "required": [
634
+ "keys",
635
+ "pathTemplate"
636
+ ],
637
+ "properties": {
638
+ "keys": {
639
+ "type": "string",
640
+ "enum": [
641
+ "instruction_id",
642
+ "provider_reference"
643
+ ]
644
+ },
645
+ "pathTemplate": {
646
+ "type": "string",
647
+ "pattern": "\\S"
648
+ }
649
+ },
650
+ "allOf": [
651
+ {
652
+ "if": {
653
+ "properties": {
654
+ "keys": {
655
+ "const": "instruction_id"
656
+ }
657
+ }
658
+ },
659
+ "then": {
660
+ "properties": {
661
+ "pathTemplate": {
662
+ "pattern": "\\{instructionId\\}"
663
+ }
664
+ }
665
+ }
666
+ },
667
+ {
668
+ "if": {
669
+ "properties": {
670
+ "keys": {
671
+ "const": "provider_reference"
672
+ }
673
+ }
674
+ },
675
+ "then": {
676
+ "properties": {
677
+ "pathTemplate": {
678
+ "pattern": "\\{providerReference\\}"
679
+ }
680
+ }
681
+ }
682
+ }
683
+ ]
684
+ },
685
+ "webhookTransitionPlan": {
686
+ "type": "object",
687
+ "additionalProperties": false,
688
+ "required": [
689
+ "eventKind",
690
+ "operationName",
691
+ "optionalPayloadFields",
692
+ "requiredFieldGroups",
693
+ "requiredPayloadFields",
694
+ "resourceIdField",
695
+ "resourceKind",
696
+ "timestampField"
697
+ ],
698
+ "properties": {
699
+ "eventKind": {
700
+ "type": "string",
701
+ "pattern": "\\S"
702
+ },
703
+ "operationName": {
704
+ "type": "string",
705
+ "pattern": "\\S"
706
+ },
707
+ "optionalPayloadFields": {
708
+ "type": "array",
709
+ "items": {
710
+ "type": "string",
711
+ "pattern": "\\S"
712
+ }
713
+ },
714
+ "requiredFieldGroups": {
715
+ "type": "array",
716
+ "items": {
717
+ "type": "array",
718
+ "items": {
719
+ "type": "string",
720
+ "pattern": "\\S"
721
+ }
722
+ }
723
+ },
724
+ "requiredPayloadFields": {
725
+ "type": "array",
726
+ "items": {
727
+ "type": "string",
728
+ "pattern": "\\S"
729
+ }
730
+ },
731
+ "resourceIdField": {
732
+ "type": "string",
733
+ "pattern": "\\S"
734
+ },
735
+ "resourceKind": {
736
+ "type": "string",
737
+ "pattern": "\\S"
738
+ },
739
+ "timestampField": {
740
+ "type": "string",
741
+ "enum": [
742
+ "activeAt",
743
+ "completedAt",
744
+ "failedAt",
745
+ "returnedAt",
746
+ "receivedAt",
747
+ "clearedAt",
748
+ "expiredAt",
749
+ "voidedAt",
750
+ "postedAt",
751
+ "refundedAt"
752
+ ]
753
+ }
754
+ }
755
+ }
756
+ }
757
+ }