@andco/protocol 0.0.15 → 0.1.0-ti.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.
Files changed (66) hide show
  1. package/dist/authorization-preparation.d.ts +1 -1
  2. package/dist/errors.d.ts +1 -1
  3. package/dist/errors.js +1 -1
  4. package/dist/intent-input.d.ts +67 -54
  5. package/dist/intent-input.d.ts.map +1 -1
  6. package/dist/intent-input.js +39 -23
  7. package/dist/intent-status.d.ts +5 -6
  8. package/dist/intent-status.d.ts.map +1 -1
  9. package/dist/intent-status.js +12 -7
  10. package/dist/miniapp-manifest.d.ts +2 -2
  11. package/dist/miniapp-manifest.js +1 -1
  12. package/dist/native-intent.d.ts +12 -12
  13. package/dist/native-intent.d.ts.map +1 -1
  14. package/dist/native-intent.js +7 -4
  15. package/dist/rar/account-matchers.d.ts +10 -10
  16. package/dist/rar/account-matchers.js +2 -2
  17. package/dist/rar/bank.d.ts +295 -23
  18. package/dist/rar/bank.d.ts.map +1 -1
  19. package/dist/rar/bank.js +54 -16
  20. package/dist/rar/catalog.d.ts +134 -9
  21. package/dist/rar/catalog.d.ts.map +1 -1
  22. package/dist/rar/catalog.js +6 -6
  23. package/dist/rar/json-schemas.generated.d.ts.map +1 -1
  24. package/dist/rar/json-schemas.generated.js +375 -7
  25. package/dist/rar/money.d.ts +1 -1
  26. package/dist/rar/money.js +1 -1
  27. package/dist/rar/subject-data.d.ts +1 -1
  28. package/dist/rar/subject-data.js +1 -1
  29. package/dist/rest/accounts.d.ts +69 -47
  30. package/dist/rest/accounts.d.ts.map +1 -1
  31. package/dist/rest/accounts.js +32 -22
  32. package/dist/rest/catalog.d.ts +3 -3
  33. package/dist/rest/catalog.js +2 -2
  34. package/dist/rest/contract.d.ts +581 -316
  35. package/dist/rest/contract.d.ts.map +1 -1
  36. package/dist/rest/contract.js +10 -6
  37. package/dist/rest/events.js +1 -1
  38. package/dist/rest/identity.d.ts +22 -22
  39. package/dist/rest/identity.d.ts.map +1 -1
  40. package/dist/rest/identity.js +4 -4
  41. package/dist/rest/intents.d.ts +301 -142
  42. package/dist/rest/intents.d.ts.map +1 -1
  43. package/dist/rest/intents.js +67 -53
  44. package/dist/rest/signatures.d.ts +19 -5
  45. package/dist/rest/signatures.d.ts.map +1 -1
  46. package/dist/rest/signatures.js +47 -5
  47. package/dist/rest/transfers.d.ts +738 -362
  48. package/dist/rest/transfers.d.ts.map +1 -1
  49. package/dist/rest/transfers.js +71 -44
  50. package/dist/signing.d.ts +6 -2
  51. package/dist/signing.d.ts.map +1 -1
  52. package/dist/signing.js +2 -1
  53. package/dist/transfer.d.ts +101 -65
  54. package/dist/transfer.d.ts.map +1 -1
  55. package/dist/transfer.js +69 -43
  56. package/dist/transport/financial-events.d.ts +65 -14
  57. package/dist/transport/financial-events.d.ts.map +1 -1
  58. package/dist/transport/financial-events.js +34 -0
  59. package/dist/transport/generated/oauth-api.d.ts +384 -110
  60. package/dist/transport/generated/oauth-api.d.ts.map +1 -1
  61. package/dist/transport/intents.d.ts +6 -6
  62. package/dist/transport/intents.d.ts.map +1 -1
  63. package/dist/transport/rest.d.ts +9 -8
  64. package/dist/transport/rest.d.ts.map +1 -1
  65. package/dist/transport/rest.js +1 -1
  66. package/package.json +1 -1
@@ -802,12 +802,12 @@ export const ANDCO_RAR_JSON_SCHEMAS = {
802
802
  "$schema": "http://json-schema.org/draft-07/schema#"
803
803
  }
804
804
  },
805
- "bank_transaction": {
805
+ "bank_movement": {
806
806
  "grantRequest": {
807
807
  "type": "object",
808
808
  "properties": {
809
809
  "type": {
810
- "const": "bank_transaction"
810
+ "const": "bank_movement"
811
811
  },
812
812
  "actions": {
813
813
  "type": "array",
@@ -1041,7 +1041,7 @@ export const ANDCO_RAR_JSON_SCHEMAS = {
1041
1041
  "type": "object",
1042
1042
  "properties": {
1043
1043
  "type": {
1044
- "const": "bank_transaction"
1044
+ "const": "bank_movement"
1045
1045
  },
1046
1046
  "actions": {
1047
1047
  "type": "array",
@@ -1573,7 +1573,7 @@ export const ANDCO_RAR_JSON_SCHEMAS = {
1573
1573
  {
1574
1574
  "type": "string",
1575
1575
  "pattern": "^\\d{4}$",
1576
- "description": "The bank's four-digit code in Core's catalog. Andco is `0739`."
1576
+ "description": "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`."
1577
1577
  },
1578
1578
  {
1579
1579
  "type": "null"
@@ -1589,7 +1589,7 @@ export const ANDCO_RAR_JSON_SCHEMAS = {
1589
1589
  "40"
1590
1590
  ],
1591
1591
  "type": "string",
1592
- "description": "Core's account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista)."
1592
+ "description": "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista)."
1593
1593
  },
1594
1594
  {
1595
1595
  "type": "null"
@@ -1758,6 +1758,239 @@ export const ANDCO_RAR_JSON_SCHEMAS = {
1758
1758
  ],
1759
1759
  "additionalProperties": false
1760
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
+ },
1761
1994
  {
1762
1995
  "type": "object",
1763
1996
  "properties": {
@@ -2122,7 +2355,7 @@ export const ANDCO_RAR_JSON_SCHEMAS = {
2122
2355
  "bank_code": {
2123
2356
  "type": "string",
2124
2357
  "pattern": "^\\d{4}$",
2125
- "description": "The bank's four-digit code in Core's catalog. Andco is `0739`."
2358
+ "description": "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`."
2126
2359
  },
2127
2360
  "account_type": {
2128
2361
  "enum": [
@@ -2131,7 +2364,7 @@ export const ANDCO_RAR_JSON_SCHEMAS = {
2131
2364
  "40"
2132
2365
  ],
2133
2366
  "type": "string",
2134
- "description": "Core's account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista)."
2367
+ "description": "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista)."
2135
2368
  },
2136
2369
  "account_number": {
2137
2370
  "type": "string",
@@ -2222,6 +2455,141 @@ export const ANDCO_RAR_JSON_SCHEMAS = {
2222
2455
  ],
2223
2456
  "additionalProperties": false
2224
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
+ },
2225
2593
  {
2226
2594
  "type": "object",
2227
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 Movement 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 Movement 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
  *