@andco/protocol 0.0.14 → 0.1.0-ti.0

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 (101) hide show
  1. package/README.md +2 -2
  2. package/dist/api-errors.d.ts +9 -9
  3. package/dist/api-errors.js +9 -9
  4. package/dist/authorization-preparation.d.ts +1 -1
  5. package/dist/authorization-preparation.js +2 -2
  6. package/dist/authorization.d.ts +1 -1
  7. package/dist/authorization.js +1 -1
  8. package/dist/consent.d.ts +2 -2
  9. package/dist/consent.js +2 -2
  10. package/dist/errors.d.ts +10 -10
  11. package/dist/errors.js +10 -10
  12. package/dist/index.d.ts +1 -0
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +1 -0
  15. package/dist/intent-input.d.ts +452 -880
  16. package/dist/intent-input.d.ts.map +1 -1
  17. package/dist/intent-input.js +164 -127
  18. package/dist/intent-status.d.ts +5 -6
  19. package/dist/intent-status.d.ts.map +1 -1
  20. package/dist/intent-status.js +12 -7
  21. package/dist/miniapp-manifest.d.ts +3 -3
  22. package/dist/miniapp-manifest.js +1 -1
  23. package/dist/native-intent.d.ts +82 -68
  24. package/dist/native-intent.d.ts.map +1 -1
  25. package/dist/native-intent.js +137 -84
  26. package/dist/native.d.ts +1 -1
  27. package/dist/rar/account-matchers.d.ts +35 -30
  28. package/dist/rar/account-matchers.d.ts.map +1 -1
  29. package/dist/rar/account-matchers.js +27 -21
  30. package/dist/rar/bank.d.ts +357 -85
  31. package/dist/rar/bank.d.ts.map +1 -1
  32. package/dist/rar/bank.js +43 -5
  33. package/dist/rar/catalog.d.ts +174 -49
  34. package/dist/rar/catalog.d.ts.map +1 -1
  35. package/dist/rar/catalog.js +6 -6
  36. package/dist/rar/detail.d.ts +1 -1
  37. package/dist/rar/detail.js +1 -1
  38. package/dist/rar/json-schemas.generated.d.ts +1 -1
  39. package/dist/rar/json-schemas.generated.d.ts.map +1 -1
  40. package/dist/rar/json-schemas.generated.js +393 -21
  41. package/dist/rar/money.d.ts +1 -1
  42. package/dist/rar/money.js +1 -1
  43. package/dist/rar/subject-data.d.ts +1 -1
  44. package/dist/rar/subject-data.js +1 -1
  45. package/dist/rar/subject.d.ts +1 -1
  46. package/dist/rar/subject.js +1 -1
  47. package/dist/rest/accounts.d.ts +28 -28
  48. package/dist/rest/accounts.d.ts.map +1 -1
  49. package/dist/rest/accounts.js +22 -22
  50. package/dist/rest/api-error.d.ts +1 -1
  51. package/dist/rest/api-error.js +1 -1
  52. package/dist/rest/catalog.d.ts +3 -3
  53. package/dist/rest/catalog.js +2 -2
  54. package/dist/rest/common.d.ts +3 -3
  55. package/dist/rest/common.js +3 -3
  56. package/dist/rest/contract.d.ts +1183 -547
  57. package/dist/rest/contract.d.ts.map +1 -1
  58. package/dist/rest/contract.js +21 -5
  59. package/dist/rest/events.d.ts +1 -1
  60. package/dist/rest/events.d.ts.map +1 -1
  61. package/dist/rest/events.js +2 -2
  62. package/dist/rest/identity.d.ts +22 -22
  63. package/dist/rest/identity.d.ts.map +1 -1
  64. package/dist/rest/identity.js +5 -5
  65. package/dist/rest/index.d.ts +1 -0
  66. package/dist/rest/index.d.ts.map +1 -1
  67. package/dist/rest/index.js +1 -0
  68. package/dist/rest/intents.d.ts +973 -743
  69. package/dist/rest/intents.d.ts.map +1 -1
  70. package/dist/rest/intents.js +112 -89
  71. package/dist/rest/signatures.d.ts +25 -5
  72. package/dist/rest/signatures.d.ts.map +1 -1
  73. package/dist/rest/signatures.js +52 -0
  74. package/dist/rest/transfers.d.ts +988 -0
  75. package/dist/rest/transfers.d.ts.map +1 -0
  76. package/dist/rest/transfers.js +142 -0
  77. package/dist/scopes.d.ts +1 -1
  78. package/dist/signing.d.ts +17 -3
  79. package/dist/signing.d.ts.map +1 -1
  80. package/dist/signing.js +8 -1
  81. package/dist/transfer.d.ts +399 -0
  82. package/dist/transfer.d.ts.map +1 -0
  83. package/dist/transfer.js +313 -0
  84. package/dist/transport/financial-events.d.ts +82 -27
  85. package/dist/transport/financial-events.d.ts.map +1 -1
  86. package/dist/transport/financial-events.js +34 -0
  87. package/dist/transport/generated/oauth-api.d.ts +1420 -333
  88. package/dist/transport/generated/oauth-api.d.ts.map +1 -1
  89. package/dist/transport/intents.d.ts +29 -13
  90. package/dist/transport/intents.d.ts.map +1 -1
  91. package/dist/transport/intents.js +1 -1
  92. package/dist/transport/rest.d.ts +5 -5
  93. package/dist/urls.d.ts +2 -2
  94. package/dist/urls.js +3 -3
  95. package/dist/userinfo.d.ts +2 -2
  96. package/dist/userinfo.js +2 -2
  97. package/dist/webhooks.d.ts +16 -16
  98. package/dist/webhooks.js +14 -14
  99. package/dist/window-features.d.ts +2 -2
  100. package/dist/window-features.js +2 -2
  101. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- /** The draft-07 JSON Schema of every Andco authorization detail type, in both forms. */
1
+ /** The draft-07 JSON Schema of every AndCo authorization detail type, in both forms. */
2
2
  export const ANDCO_RAR_JSON_SCHEMAS = {
3
3
  "bank_account": {
4
4
  "grantRequest": {
@@ -1568,13 +1568,12 @@ export const ANDCO_RAR_JSON_SCHEMAS = {
1568
1568
  "type": {
1569
1569
  "const": "external"
1570
1570
  },
1571
- "bank_id": {
1571
+ "bank_code": {
1572
1572
  "anyOf": [
1573
1573
  {
1574
1574
  "type": "string",
1575
- "minLength": 1,
1576
- "maxLength": 128,
1577
- "pattern": "\\S"
1575
+ "pattern": "^\\d{4}$",
1576
+ "description": "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`."
1578
1577
  },
1579
1578
  {
1580
1579
  "type": "null"
@@ -1584,17 +1583,20 @@ export const ANDCO_RAR_JSON_SCHEMAS = {
1584
1583
  "account_type": {
1585
1584
  "anyOf": [
1586
1585
  {
1586
+ "enum": [
1587
+ "10",
1588
+ "20",
1589
+ "40"
1590
+ ],
1587
1591
  "type": "string",
1588
- "minLength": 1,
1589
- "maxLength": 128,
1590
- "pattern": "\\S"
1592
+ "description": "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista)."
1591
1593
  },
1592
1594
  {
1593
1595
  "type": "null"
1594
1596
  }
1595
1597
  ]
1596
1598
  },
1597
- "account_id": {
1599
+ "account_number": {
1598
1600
  "anyOf": [
1599
1601
  {
1600
1602
  "type": "string",
@@ -1607,7 +1609,7 @@ export const ANDCO_RAR_JSON_SCHEMAS = {
1607
1609
  }
1608
1610
  ]
1609
1611
  },
1610
- "holder_id": {
1612
+ "national_id": {
1611
1613
  "anyOf": [
1612
1614
  {
1613
1615
  "type": "string",
@@ -1620,7 +1622,7 @@ export const ANDCO_RAR_JSON_SCHEMAS = {
1620
1622
  }
1621
1623
  ]
1622
1624
  },
1623
- "holder_name": {
1625
+ "name": {
1624
1626
  "anyOf": [
1625
1627
  {
1626
1628
  "type": "string",
@@ -1756,6 +1758,239 @@ export const ANDCO_RAR_JSON_SCHEMAS = {
1756
1758
  ],
1757
1759
  "additionalProperties": false
1758
1760
  },
1761
+ {
1762
+ "type": "object",
1763
+ "properties": {
1764
+ "type": {
1765
+ "const": "bank_transfer"
1766
+ },
1767
+ "actions": {
1768
+ "type": "array",
1769
+ "items": {
1770
+ "enum": [
1771
+ "read"
1772
+ ],
1773
+ "type": "string"
1774
+ },
1775
+ "minItems": 1,
1776
+ "uniqueItems": true
1777
+ },
1778
+ "locations": {
1779
+ "type": "array",
1780
+ "items": [
1781
+ {
1782
+ "const": "https://api.andco.com"
1783
+ }
1784
+ ],
1785
+ "minItems": 1,
1786
+ "additionalItems": false
1787
+ },
1788
+ "subject": {
1789
+ "anyOf": [
1790
+ {
1791
+ "oneOf": [
1792
+ {
1793
+ "type": "object",
1794
+ "properties": {
1795
+ "type": {
1796
+ "const": "profile"
1797
+ },
1798
+ "identifier": {
1799
+ "anyOf": [
1800
+ {
1801
+ "type": "string",
1802
+ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
1803
+ },
1804
+ {
1805
+ "type": "null"
1806
+ }
1807
+ ]
1808
+ }
1809
+ },
1810
+ "required": [
1811
+ "type"
1812
+ ],
1813
+ "additionalProperties": false
1814
+ },
1815
+ {
1816
+ "type": "object",
1817
+ "properties": {
1818
+ "type": {
1819
+ "const": "organization"
1820
+ },
1821
+ "identifier": {
1822
+ "anyOf": [
1823
+ {
1824
+ "type": "string",
1825
+ "pattern": "^[1-9][0-9]{0,9}$"
1826
+ },
1827
+ {
1828
+ "type": "null"
1829
+ }
1830
+ ]
1831
+ },
1832
+ "editable": {
1833
+ "anyOf": [
1834
+ {
1835
+ "type": "boolean"
1836
+ },
1837
+ {
1838
+ "type": "null"
1839
+ }
1840
+ ]
1841
+ }
1842
+ },
1843
+ "required": [
1844
+ "type"
1845
+ ],
1846
+ "additionalProperties": false
1847
+ }
1848
+ ]
1849
+ },
1850
+ {
1851
+ "type": "null"
1852
+ }
1853
+ ]
1854
+ },
1855
+ "accounts": {
1856
+ "anyOf": [
1857
+ {
1858
+ "type": "array",
1859
+ "items": {
1860
+ "anyOf": [
1861
+ {
1862
+ "type": "object",
1863
+ "properties": {
1864
+ "type": {
1865
+ "anyOf": [
1866
+ {
1867
+ "const": "account_key"
1868
+ },
1869
+ {
1870
+ "type": "null"
1871
+ }
1872
+ ]
1873
+ },
1874
+ "pattern": {
1875
+ "type": "string",
1876
+ "pattern": "^(?:\\*|[a-z][a-z0-9_-]{0,63}\\*?)$"
1877
+ },
1878
+ "editable": {
1879
+ "anyOf": [
1880
+ {
1881
+ "type": "boolean"
1882
+ },
1883
+ {
1884
+ "type": "null"
1885
+ }
1886
+ ]
1887
+ },
1888
+ "selection": {
1889
+ "anyOf": [
1890
+ {
1891
+ "enum": [
1892
+ "single",
1893
+ "multiple"
1894
+ ],
1895
+ "type": "string"
1896
+ },
1897
+ {
1898
+ "type": "null"
1899
+ }
1900
+ ]
1901
+ }
1902
+ },
1903
+ "required": [
1904
+ "pattern"
1905
+ ],
1906
+ "additionalProperties": false
1907
+ },
1908
+ {
1909
+ "type": "object",
1910
+ "properties": {
1911
+ "type": {
1912
+ "const": "account"
1913
+ },
1914
+ "id": {
1915
+ "type": "string",
1916
+ "format": "uuid"
1917
+ },
1918
+ "editable": {
1919
+ "anyOf": [
1920
+ {
1921
+ "type": "boolean"
1922
+ },
1923
+ {
1924
+ "type": "null"
1925
+ }
1926
+ ]
1927
+ }
1928
+ },
1929
+ "required": [
1930
+ "type",
1931
+ "id"
1932
+ ],
1933
+ "additionalProperties": false
1934
+ },
1935
+ {
1936
+ "type": "object",
1937
+ "properties": {
1938
+ "type": {
1939
+ "const": "any"
1940
+ },
1941
+ "limit": {
1942
+ "const": "own"
1943
+ },
1944
+ "editable": {
1945
+ "anyOf": [
1946
+ {
1947
+ "type": "boolean"
1948
+ },
1949
+ {
1950
+ "type": "null"
1951
+ }
1952
+ ]
1953
+ },
1954
+ "selection": {
1955
+ "anyOf": [
1956
+ {
1957
+ "enum": [
1958
+ "single",
1959
+ "multiple"
1960
+ ],
1961
+ "type": "string"
1962
+ },
1963
+ {
1964
+ "type": "null"
1965
+ }
1966
+ ]
1967
+ }
1968
+ },
1969
+ "required": [
1970
+ "type",
1971
+ "limit"
1972
+ ],
1973
+ "additionalProperties": false
1974
+ }
1975
+ ]
1976
+ },
1977
+ "minItems": 1,
1978
+ "maxItems": 100,
1979
+ "uniqueItems": true
1980
+ },
1981
+ {
1982
+ "type": "null"
1983
+ }
1984
+ ]
1985
+ }
1986
+ },
1987
+ "required": [
1988
+ "type",
1989
+ "actions",
1990
+ "locations"
1991
+ ],
1992
+ "additionalProperties": false
1993
+ },
1759
1994
  {
1760
1995
  "type": "object",
1761
1996
  "properties": {
@@ -2117,31 +2352,33 @@ export const ANDCO_RAR_JSON_SCHEMAS = {
2117
2352
  "type": {
2118
2353
  "const": "external"
2119
2354
  },
2120
- "bank_id": {
2355
+ "bank_code": {
2121
2356
  "type": "string",
2122
- "minLength": 1,
2123
- "maxLength": 128,
2124
- "pattern": "\\S"
2357
+ "pattern": "^\\d{4}$",
2358
+ "description": "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`."
2125
2359
  },
2126
2360
  "account_type": {
2361
+ "enum": [
2362
+ "10",
2363
+ "20",
2364
+ "40"
2365
+ ],
2127
2366
  "type": "string",
2128
- "minLength": 1,
2129
- "maxLength": 128,
2130
- "pattern": "\\S"
2367
+ "description": "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista)."
2131
2368
  },
2132
- "account_id": {
2369
+ "account_number": {
2133
2370
  "type": "string",
2134
2371
  "minLength": 1,
2135
2372
  "maxLength": 128,
2136
2373
  "pattern": "\\S"
2137
2374
  },
2138
- "holder_id": {
2375
+ "national_id": {
2139
2376
  "type": "string",
2140
2377
  "minLength": 1,
2141
2378
  "maxLength": 128,
2142
2379
  "pattern": "\\S"
2143
2380
  },
2144
- "holder_name": {
2381
+ "name": {
2145
2382
  "type": "string",
2146
2383
  "minLength": 1,
2147
2384
  "maxLength": 128,
@@ -2218,6 +2455,141 @@ export const ANDCO_RAR_JSON_SCHEMAS = {
2218
2455
  ],
2219
2456
  "additionalProperties": false
2220
2457
  },
2458
+ {
2459
+ "type": "object",
2460
+ "properties": {
2461
+ "type": {
2462
+ "const": "bank_transfer"
2463
+ },
2464
+ "actions": {
2465
+ "type": "array",
2466
+ "items": {
2467
+ "enum": [
2468
+ "read"
2469
+ ],
2470
+ "type": "string"
2471
+ },
2472
+ "minItems": 1,
2473
+ "uniqueItems": true
2474
+ },
2475
+ "locations": {
2476
+ "type": "array",
2477
+ "items": [
2478
+ {
2479
+ "const": "https://api.andco.com"
2480
+ }
2481
+ ],
2482
+ "minItems": 1,
2483
+ "additionalItems": false
2484
+ },
2485
+ "subject": {
2486
+ "oneOf": [
2487
+ {
2488
+ "type": "object",
2489
+ "properties": {
2490
+ "type": {
2491
+ "const": "profile"
2492
+ },
2493
+ "identifier": {
2494
+ "type": "string",
2495
+ "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
2496
+ }
2497
+ },
2498
+ "required": [
2499
+ "type",
2500
+ "identifier"
2501
+ ],
2502
+ "additionalProperties": false
2503
+ },
2504
+ {
2505
+ "type": "object",
2506
+ "properties": {
2507
+ "type": {
2508
+ "const": "organization"
2509
+ },
2510
+ "identifier": {
2511
+ "type": "string",
2512
+ "pattern": "^[1-9][0-9]{0,9}$"
2513
+ }
2514
+ },
2515
+ "required": [
2516
+ "type",
2517
+ "identifier"
2518
+ ],
2519
+ "additionalProperties": false
2520
+ }
2521
+ ]
2522
+ },
2523
+ "accounts": {
2524
+ "type": "array",
2525
+ "items": {
2526
+ "anyOf": [
2527
+ {
2528
+ "type": "object",
2529
+ "properties": {
2530
+ "type": {
2531
+ "const": "account_key"
2532
+ },
2533
+ "pattern": {
2534
+ "type": "string",
2535
+ "pattern": "^(?:\\*|[a-z][a-z0-9_-]{0,63}\\*?)$"
2536
+ }
2537
+ },
2538
+ "required": [
2539
+ "type",
2540
+ "pattern"
2541
+ ],
2542
+ "additionalProperties": false
2543
+ },
2544
+ {
2545
+ "type": "object",
2546
+ "properties": {
2547
+ "type": {
2548
+ "const": "account"
2549
+ },
2550
+ "id": {
2551
+ "type": "string",
2552
+ "format": "uuid"
2553
+ }
2554
+ },
2555
+ "required": [
2556
+ "type",
2557
+ "id"
2558
+ ],
2559
+ "additionalProperties": false
2560
+ },
2561
+ {
2562
+ "type": "object",
2563
+ "properties": {
2564
+ "type": {
2565
+ "const": "any"
2566
+ },
2567
+ "limit": {
2568
+ "const": "own"
2569
+ }
2570
+ },
2571
+ "required": [
2572
+ "type",
2573
+ "limit"
2574
+ ],
2575
+ "additionalProperties": false
2576
+ }
2577
+ ]
2578
+ },
2579
+ "minItems": 1,
2580
+ "maxItems": 100,
2581
+ "uniqueItems": true
2582
+ }
2583
+ },
2584
+ "required": [
2585
+ "type",
2586
+ "actions",
2587
+ "locations",
2588
+ "subject",
2589
+ "accounts"
2590
+ ],
2591
+ "additionalProperties": false
2592
+ },
2221
2593
  {
2222
2594
  "type": "object",
2223
2595
  "properties": {
@@ -40,7 +40,7 @@ export declare const MINIMUM_TRANSACTION_AMOUNT = "1000";
40
40
  /**
41
41
  * {@link MONEY_PATTERN} restricted to amounts of at least {@link MINIMUM_TRANSACTION_AMOUNT}: four to
42
42
  * fifteen digits without a leading zero. It is a separate scalar, not a change to `MONEY_PATTERN`,
43
- * because only the limits of a permission carry the floor; a Transaction read back from the ledger
43
+ * because only the limits of a permission carry the floor; a Transaction read back from an account
44
44
  * may be smaller.
45
45
  *
46
46
  * The floor lives in the regex, rather than in a numeric comparison, because the generated JSON
package/dist/rar/money.js CHANGED
@@ -38,7 +38,7 @@ export const MINIMUM_TRANSACTION_AMOUNT = "1000";
38
38
  /**
39
39
  * {@link MONEY_PATTERN} restricted to amounts of at least {@link MINIMUM_TRANSACTION_AMOUNT}: four to
40
40
  * fifteen digits without a leading zero. It is a separate scalar, not a change to `MONEY_PATTERN`,
41
- * because only the limits of a permission carry the floor; a Transaction read back from the ledger
41
+ * because only the limits of a permission carry the floor; a Transaction read back from an account
42
42
  * may be smaller.
43
43
  *
44
44
  * The floor lives in the regex, rather than in a numeric comparison, because the generated JSON
@@ -8,7 +8,7 @@ export declare const ORGANIZATION_ACTIONS: readonly ["list"];
8
8
  /** Editing the signed-in person's Profile. Replaces the former `profile:write` scope. */
9
9
  export declare const PROFILE_ACTIONS: readonly ["update"];
10
10
  /**
11
- * The `validation` of an `identity` detail: the application asks that Andco Core has validated the
11
+ * The `validation` of an `identity` detail: the application asks that AndCo has validated the
12
12
  * person's identity (the ID card, a liveness check and the comparison of the face with the card's),
13
13
  * and reads that validation together with the identity.
14
14
  *
@@ -10,7 +10,7 @@ export const ORGANIZATION_ACTIONS = ["list"];
10
10
  /** Editing the signed-in person's Profile. Replaces the former `profile:write` scope. */
11
11
  export const PROFILE_ACTIONS = ["update"];
12
12
  /**
13
- * The `validation` of an `identity` detail: the application asks that Andco Core has validated the
13
+ * The `validation` of an `identity` detail: the application asks that AndCo has validated the
14
14
  * person's identity (the ID card, a liveness check and the comparison of the face with the card's),
15
15
  * and reads that validation together with the identity.
16
16
  *
@@ -37,7 +37,7 @@ export declare const OrganizationSubjectPickerSchema: v.StrictObjectSchema<{
37
37
  }, undefined>;
38
38
  /**
39
39
  * Whose resources a Grant Request asks for. `null` or absent takes the type's default (the
40
- * signed-in Profile for every Andco type that has a subject). `attr?`, `undefined` and `null` mean
40
+ * signed-in Profile for every AndCo type that has a subject). `attr?`, `undefined` and `null` mean
41
41
  * the same in a Grant Request.
42
42
  *
43
43
  * @example
@@ -39,7 +39,7 @@ export const OrganizationSubjectPickerSchema = /* @__PURE__ */ v.strictObject({
39
39
  });
40
40
  /**
41
41
  * Whose resources a Grant Request asks for. `null` or absent takes the type's default (the
42
- * signed-in Profile for every Andco type that has a subject). `attr?`, `undefined` and `null` mean
42
+ * signed-in Profile for every AndCo type that has a subject). `attr?`, `undefined` and `null` mean
43
43
  * the same in a Grant Request.
44
44
  *
45
45
  * @example