@andco/protocol 0.0.15 → 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 (61) 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 +284 -12
  18. package/dist/rar/bank.d.ts.map +1 -1
  19. package/dist/rar/bank.js +42 -4
  20. package/dist/rar/catalog.d.ts +130 -5
  21. package/dist/rar/catalog.d.ts.map +1 -1
  22. package/dist/rar/json-schemas.generated.d.ts.map +1 -1
  23. package/dist/rar/json-schemas.generated.js +372 -4
  24. package/dist/rar/money.d.ts +1 -1
  25. package/dist/rar/money.js +1 -1
  26. package/dist/rar/subject-data.d.ts +1 -1
  27. package/dist/rar/subject-data.js +1 -1
  28. package/dist/rest/accounts.d.ts +3 -3
  29. package/dist/rest/accounts.js +1 -1
  30. package/dist/rest/catalog.d.ts +3 -3
  31. package/dist/rest/catalog.js +2 -2
  32. package/dist/rest/contract.d.ts +561 -302
  33. package/dist/rest/contract.d.ts.map +1 -1
  34. package/dist/rest/contract.js +6 -2
  35. package/dist/rest/identity.d.ts +22 -22
  36. package/dist/rest/identity.d.ts.map +1 -1
  37. package/dist/rest/identity.js +4 -4
  38. package/dist/rest/intents.d.ts +301 -142
  39. package/dist/rest/intents.d.ts.map +1 -1
  40. package/dist/rest/intents.js +66 -52
  41. package/dist/rest/signatures.d.ts +19 -5
  42. package/dist/rest/signatures.d.ts.map +1 -1
  43. package/dist/rest/signatures.js +47 -5
  44. package/dist/rest/transfers.d.ts +738 -362
  45. package/dist/rest/transfers.d.ts.map +1 -1
  46. package/dist/rest/transfers.js +71 -44
  47. package/dist/signing.d.ts +6 -2
  48. package/dist/signing.d.ts.map +1 -1
  49. package/dist/signing.js +2 -1
  50. package/dist/transfer.d.ts +101 -65
  51. package/dist/transfer.d.ts.map +1 -1
  52. package/dist/transfer.js +69 -43
  53. package/dist/transport/financial-events.d.ts +64 -13
  54. package/dist/transport/financial-events.d.ts.map +1 -1
  55. package/dist/transport/financial-events.js +34 -0
  56. package/dist/transport/generated/oauth-api.d.ts +352 -88
  57. package/dist/transport/generated/oauth-api.d.ts.map +1 -1
  58. package/dist/transport/intents.d.ts +6 -6
  59. package/dist/transport/intents.d.ts.map +1 -1
  60. package/dist/transport/rest.d.ts +4 -4
  61. package/package.json +1 -1
@@ -8,14 +8,16 @@ export declare const BANK_ACCOUNT_MANAGE_ACTIONS: readonly ["create", "close"];
8
8
  export declare const BANK_ACCOUNT_APPROVAL_ACTIONS: readonly ["approve", "reject"];
9
9
  /** Every `bank_account` action, across its three forms. */
10
10
  export declare const BANK_ACCOUNT_ACTIONS: readonly ["read", "read_balance", "create", "close", "approve", "reject"];
11
- /** Reading the Transactions (ledger entries) of accounts. */
11
+ /** Reading the Transactions (movements) of accounts. */
12
12
  export declare const BANK_TRANSACTION_ACTIONS: readonly ["read"];
13
13
  /** Proposing Transfers within the detail's bounds. */
14
14
  export declare const BANK_TRANSFER_CREATE_ACTIONS: readonly ["create"];
15
+ /** Reading every Transfer that leaves the accounts of `accounts`, whoever made it and in any status. */
16
+ export declare const BANK_TRANSFER_READ_ACTIONS: readonly ["read"];
15
17
  /** Approving or rejecting Transfers someone else created: the other half of dual control. */
16
18
  export declare const BANK_TRANSFER_APPROVAL_ACTIONS: readonly ["approve", "reject"];
17
- /** Every `bank_transfer` action, across its two forms. */
18
- export declare const BANK_TRANSFER_ACTIONS: readonly ["create", "approve", "reject"];
19
+ /** Every `bank_transfer` action, across its three forms. */
20
+ export declare const BANK_TRANSFER_ACTIONS: readonly ["create", "read", "approve", "reject"];
19
21
  /** Creating, reading and closing Deposits. A Deposit needs no Approval: money arriving is not money leaving. */
20
22
  export declare const BANK_DEPOSIT_ACTIONS: readonly ["create", "read", "close"];
21
23
  /** The only currency a bank detail names today. It is still required: a permission never assumes CLP. */
@@ -574,8 +576,8 @@ export declare const BankTransferCreateGrantRequestSchema: v.StrictObjectSchema<
574
576
  readonly limit: v.LiteralSchema<"all", undefined>;
575
577
  }, undefined>, v.StrictObjectSchema<{
576
578
  readonly type: v.LiteralSchema<"external", undefined>;
577
- readonly bank_code: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code in Core's catalog. Andco is `0739`.">]>, undefined>;
578
- readonly account_type: v.NullishSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "Core's account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>, undefined>;
579
+ readonly bank_code: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>, undefined>;
580
+ readonly account_type: v.NullishSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>, undefined>;
579
581
  readonly account_number: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
580
582
  readonly national_id: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
581
583
  readonly name: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
@@ -718,7 +720,97 @@ export declare const BankTransferApprovalGrantRequestSchema: v.StrictObjectSchem
718
720
  }, undefined>, undefined>;
719
721
  }, undefined>;
720
722
  export type BankTransferApprovalGrantRequest = v.InferInput<typeof BankTransferApprovalGrantRequestSchema>;
721
- /** `bank_transfer` Grant Request: the create form or the approval form, never both in one detail. */
723
+ /**
724
+ * `bank_transfer` Grant Request, read form: read every Transfer that leaves `accounts` (own matchers;
725
+ * absent means every own account), in any status and of any origin. It is a bound on accounts only:
726
+ * no `sources`, `destinations`, `currency` or `transactions`. Without it, a client reads only the
727
+ * Transfers it created itself.
728
+ *
729
+ * @example
730
+ * const observe: BankTransferReadGrantRequest = {
731
+ * type: "bank_transfer",
732
+ * actions: ["read"],
733
+ * locations: ["https://api.andco.com"],
734
+ * subject: { type: "organization" },
735
+ * accounts: [{ type: "account_key", pattern: "caja-*", editable: true }],
736
+ * };
737
+ */
738
+ export declare const BankTransferReadGrantRequestSchema: v.StrictObjectSchema<{
739
+ readonly type: v.LiteralSchema<"bank_transfer", undefined>;
740
+ readonly actions: v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["read"], undefined>, undefined>, v.MinLengthAction<"read"[], 1, undefined>, v.MetadataAction<"read"[], {
741
+ readonly uniqueItems: true;
742
+ }>]>;
743
+ readonly locations: v.StrictTupleSchema<[v.LiteralSchema<"https://api.andco.com", undefined>], undefined>;
744
+ readonly subject: v.NullishSchema<v.VariantSchema<"type", [v.StrictObjectSchema<{
745
+ readonly type: v.LiteralSchema<"profile", undefined>;
746
+ readonly identifier: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
747
+ }, undefined>, v.StrictObjectSchema<{
748
+ readonly type: v.LiteralSchema<"organization", undefined>;
749
+ readonly identifier: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
750
+ readonly editable: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
751
+ }, undefined>], undefined>, undefined>;
752
+ readonly accounts: v.NullishSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.StrictObjectSchema<{
753
+ readonly type: v.NullishSchema<v.LiteralSchema<"account_key", undefined>, undefined>;
754
+ readonly pattern: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
755
+ readonly editable: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
756
+ readonly selection: v.NullishSchema<v.PicklistSchema<readonly ["single", "multiple"], undefined>, undefined>;
757
+ }, undefined>, v.StrictObjectSchema<{
758
+ readonly type: v.LiteralSchema<"account", undefined>;
759
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
760
+ readonly editable: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
761
+ }, undefined>, v.StrictObjectSchema<{
762
+ readonly type: v.LiteralSchema<"any", undefined>;
763
+ readonly limit: v.LiteralSchema<"own", undefined>;
764
+ readonly editable: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
765
+ readonly selection: v.NullishSchema<v.PicklistSchema<readonly ["single", "multiple"], undefined>, undefined>;
766
+ }, undefined>], undefined>, undefined>, v.MinLengthAction<({
767
+ type?: "account_key" | null | undefined;
768
+ pattern: string;
769
+ editable?: boolean | null | undefined;
770
+ selection?: "single" | "multiple" | null | undefined;
771
+ } | {
772
+ type: "account";
773
+ id: string;
774
+ editable?: boolean | null | undefined;
775
+ } | {
776
+ type: "any";
777
+ limit: "own";
778
+ editable?: boolean | null | undefined;
779
+ selection?: "single" | "multiple" | null | undefined;
780
+ })[], 1, undefined>, v.MaxLengthAction<({
781
+ type?: "account_key" | null | undefined;
782
+ pattern: string;
783
+ editable?: boolean | null | undefined;
784
+ selection?: "single" | "multiple" | null | undefined;
785
+ } | {
786
+ type: "account";
787
+ id: string;
788
+ editable?: boolean | null | undefined;
789
+ } | {
790
+ type: "any";
791
+ limit: "own";
792
+ editable?: boolean | null | undefined;
793
+ selection?: "single" | "multiple" | null | undefined;
794
+ })[], 100, undefined>, v.MetadataAction<({
795
+ type?: "account_key" | null | undefined;
796
+ pattern: string;
797
+ editable?: boolean | null | undefined;
798
+ selection?: "single" | "multiple" | null | undefined;
799
+ } | {
800
+ type: "account";
801
+ id: string;
802
+ editable?: boolean | null | undefined;
803
+ } | {
804
+ type: "any";
805
+ limit: "own";
806
+ editable?: boolean | null | undefined;
807
+ selection?: "single" | "multiple" | null | undefined;
808
+ })[], {
809
+ readonly uniqueItems: true;
810
+ }>]>, undefined>;
811
+ }, undefined>;
812
+ export type BankTransferReadGrantRequest = v.InferInput<typeof BankTransferReadGrantRequestSchema>;
813
+ /** `bank_transfer` Grant Request: the create, read or approval form, never mixed in one detail. */
722
814
  export declare const BankTransferGrantRequestSchema: v.UnionSchema<[v.StrictObjectSchema<{
723
815
  readonly type: v.LiteralSchema<"bank_transfer", undefined>;
724
816
  readonly actions: v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["create"], undefined>, undefined>, v.MinLengthAction<"create"[], 1, undefined>, v.MetadataAction<"create"[], {
@@ -815,8 +907,8 @@ export declare const BankTransferGrantRequestSchema: v.UnionSchema<[v.StrictObje
815
907
  readonly limit: v.LiteralSchema<"all", undefined>;
816
908
  }, undefined>, v.StrictObjectSchema<{
817
909
  readonly type: v.LiteralSchema<"external", undefined>;
818
- readonly bank_code: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code in Core's catalog. Andco is `0739`.">]>, undefined>;
819
- readonly account_type: v.NullishSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "Core's account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>, undefined>;
910
+ readonly bank_code: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>, undefined>;
911
+ readonly account_type: v.NullishSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>, undefined>;
820
912
  readonly account_number: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
821
913
  readonly national_id: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
822
914
  readonly name: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
@@ -924,6 +1016,79 @@ export declare const BankTransferGrantRequestSchema: v.UnionSchema<[v.StrictObje
924
1016
  readonly editable: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
925
1017
  }, undefined>], undefined>, undefined>;
926
1018
  readonly budgets: v.OptionalSchema<v.NullSchema<undefined>, undefined>;
1019
+ }, undefined>, v.StrictObjectSchema<{
1020
+ readonly type: v.LiteralSchema<"bank_transfer", undefined>;
1021
+ readonly actions: v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["read"], undefined>, undefined>, v.MinLengthAction<"read"[], 1, undefined>, v.MetadataAction<"read"[], {
1022
+ readonly uniqueItems: true;
1023
+ }>]>;
1024
+ readonly locations: v.StrictTupleSchema<[v.LiteralSchema<"https://api.andco.com", undefined>], undefined>;
1025
+ readonly subject: v.NullishSchema<v.VariantSchema<"type", [v.StrictObjectSchema<{
1026
+ readonly type: v.LiteralSchema<"profile", undefined>;
1027
+ readonly identifier: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
1028
+ }, undefined>, v.StrictObjectSchema<{
1029
+ readonly type: v.LiteralSchema<"organization", undefined>;
1030
+ readonly identifier: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
1031
+ readonly editable: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
1032
+ }, undefined>], undefined>, undefined>;
1033
+ readonly accounts: v.NullishSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.StrictObjectSchema<{
1034
+ readonly type: v.NullishSchema<v.LiteralSchema<"account_key", undefined>, undefined>;
1035
+ readonly pattern: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1036
+ readonly editable: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
1037
+ readonly selection: v.NullishSchema<v.PicklistSchema<readonly ["single", "multiple"], undefined>, undefined>;
1038
+ }, undefined>, v.StrictObjectSchema<{
1039
+ readonly type: v.LiteralSchema<"account", undefined>;
1040
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1041
+ readonly editable: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
1042
+ }, undefined>, v.StrictObjectSchema<{
1043
+ readonly type: v.LiteralSchema<"any", undefined>;
1044
+ readonly limit: v.LiteralSchema<"own", undefined>;
1045
+ readonly editable: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
1046
+ readonly selection: v.NullishSchema<v.PicklistSchema<readonly ["single", "multiple"], undefined>, undefined>;
1047
+ }, undefined>], undefined>, undefined>, v.MinLengthAction<({
1048
+ type?: "account_key" | null | undefined;
1049
+ pattern: string;
1050
+ editable?: boolean | null | undefined;
1051
+ selection?: "single" | "multiple" | null | undefined;
1052
+ } | {
1053
+ type: "account";
1054
+ id: string;
1055
+ editable?: boolean | null | undefined;
1056
+ } | {
1057
+ type: "any";
1058
+ limit: "own";
1059
+ editable?: boolean | null | undefined;
1060
+ selection?: "single" | "multiple" | null | undefined;
1061
+ })[], 1, undefined>, v.MaxLengthAction<({
1062
+ type?: "account_key" | null | undefined;
1063
+ pattern: string;
1064
+ editable?: boolean | null | undefined;
1065
+ selection?: "single" | "multiple" | null | undefined;
1066
+ } | {
1067
+ type: "account";
1068
+ id: string;
1069
+ editable?: boolean | null | undefined;
1070
+ } | {
1071
+ type: "any";
1072
+ limit: "own";
1073
+ editable?: boolean | null | undefined;
1074
+ selection?: "single" | "multiple" | null | undefined;
1075
+ })[], 100, undefined>, v.MetadataAction<({
1076
+ type?: "account_key" | null | undefined;
1077
+ pattern: string;
1078
+ editable?: boolean | null | undefined;
1079
+ selection?: "single" | "multiple" | null | undefined;
1080
+ } | {
1081
+ type: "account";
1082
+ id: string;
1083
+ editable?: boolean | null | undefined;
1084
+ } | {
1085
+ type: "any";
1086
+ limit: "own";
1087
+ editable?: boolean | null | undefined;
1088
+ selection?: "single" | "multiple" | null | undefined;
1089
+ })[], {
1090
+ readonly uniqueItems: true;
1091
+ }>]>, undefined>;
927
1092
  }, undefined>, v.StrictObjectSchema<{
928
1093
  readonly type: v.LiteralSchema<"bank_transfer", undefined>;
929
1094
  readonly actions: v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["approve", "reject"], undefined>, undefined>, v.MinLengthAction<("approve" | "reject")[], 1, undefined>, v.MetadataAction<("approve" | "reject")[], {
@@ -1014,8 +1179,8 @@ export declare const BankTransferCreateGrantSchema: v.StrictObjectSchema<{
1014
1179
  readonly limit: v.LiteralSchema<"all", undefined>;
1015
1180
  }, undefined>, v.StrictObjectSchema<{
1016
1181
  readonly type: v.LiteralSchema<"external", undefined>;
1017
- readonly bank_code: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code in Core's catalog. Andco is `0739`.">]>, undefined>;
1018
- readonly account_type: v.OptionalSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "Core's account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>, undefined>;
1182
+ readonly bank_code: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>, undefined>;
1183
+ readonly account_type: v.OptionalSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>, undefined>;
1019
1184
  readonly account_number: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
1020
1185
  readonly national_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
1021
1186
  readonly name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
@@ -1120,6 +1285,61 @@ export declare const BankTransferApprovalGrantSchema: v.StrictObjectSchema<{
1120
1285
  }, undefined>, undefined>;
1121
1286
  }, undefined>;
1122
1287
  export type BankTransferApprovalGrant = v.InferOutput<typeof BankTransferApprovalGrantSchema>;
1288
+ /** `bank_transfer` Grant, read form: the subject resolved and `accounts` materialized. */
1289
+ export declare const BankTransferReadGrantSchema: v.StrictObjectSchema<{
1290
+ readonly type: v.LiteralSchema<"bank_transfer", undefined>;
1291
+ readonly actions: v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["read"], undefined>, undefined>, v.MinLengthAction<"read"[], 1, undefined>, v.MetadataAction<"read"[], {
1292
+ readonly uniqueItems: true;
1293
+ }>]>;
1294
+ readonly locations: v.StrictTupleSchema<[v.LiteralSchema<"https://api.andco.com", undefined>], undefined>;
1295
+ readonly subject: v.VariantSchema<"type", [v.StrictObjectSchema<{
1296
+ readonly type: v.LiteralSchema<"profile", undefined>;
1297
+ readonly identifier: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1298
+ }, undefined>, v.StrictObjectSchema<{
1299
+ readonly type: v.LiteralSchema<"organization", undefined>;
1300
+ readonly identifier: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1301
+ }, undefined>], undefined>;
1302
+ readonly accounts: v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.StrictObjectSchema<{
1303
+ readonly type: v.LiteralSchema<"account_key", undefined>;
1304
+ readonly pattern: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1305
+ }, undefined>, v.StrictObjectSchema<{
1306
+ readonly type: v.LiteralSchema<"account", undefined>;
1307
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1308
+ }, undefined>, v.StrictObjectSchema<{
1309
+ readonly type: v.LiteralSchema<"any", undefined>;
1310
+ readonly limit: v.LiteralSchema<"own", undefined>;
1311
+ }, undefined>], undefined>, undefined>, v.MinLengthAction<({
1312
+ type: "account_key";
1313
+ pattern: string;
1314
+ } | {
1315
+ type: "account";
1316
+ id: string;
1317
+ } | {
1318
+ type: "any";
1319
+ limit: "own";
1320
+ })[], 1, undefined>, v.MaxLengthAction<({
1321
+ type: "account_key";
1322
+ pattern: string;
1323
+ } | {
1324
+ type: "account";
1325
+ id: string;
1326
+ } | {
1327
+ type: "any";
1328
+ limit: "own";
1329
+ })[], 100, undefined>, v.MetadataAction<({
1330
+ type: "account_key";
1331
+ pattern: string;
1332
+ } | {
1333
+ type: "account";
1334
+ id: string;
1335
+ } | {
1336
+ type: "any";
1337
+ limit: "own";
1338
+ })[], {
1339
+ readonly uniqueItems: true;
1340
+ }>]>;
1341
+ }, undefined>;
1342
+ export type BankTransferReadGrant = v.InferOutput<typeof BankTransferReadGrantSchema>;
1123
1343
  /** `bank_transfer` Grant. */
1124
1344
  export declare const BankTransferGrantSchema: v.UnionSchema<[v.StrictObjectSchema<{
1125
1345
  readonly type: v.LiteralSchema<"bank_transfer", undefined>;
@@ -1190,8 +1410,8 @@ export declare const BankTransferGrantSchema: v.UnionSchema<[v.StrictObjectSchem
1190
1410
  readonly limit: v.LiteralSchema<"all", undefined>;
1191
1411
  }, undefined>, v.StrictObjectSchema<{
1192
1412
  readonly type: v.LiteralSchema<"external", undefined>;
1193
- readonly bank_code: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code in Core's catalog. Andco is `0739`.">]>, undefined>;
1194
- readonly account_type: v.OptionalSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "Core's account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>, undefined>;
1413
+ readonly bank_code: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>, undefined>;
1414
+ readonly account_type: v.OptionalSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>, undefined>;
1195
1415
  readonly account_number: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
1196
1416
  readonly national_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
1197
1417
  readonly name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
@@ -1274,6 +1494,58 @@ export declare const BankTransferGrantSchema: v.UnionSchema<[v.StrictObjectSchem
1274
1494
  readonly minimum: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
1275
1495
  readonly maximum: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
1276
1496
  }, undefined>], undefined>, undefined>;
1497
+ }, undefined>, v.StrictObjectSchema<{
1498
+ readonly type: v.LiteralSchema<"bank_transfer", undefined>;
1499
+ readonly actions: v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["read"], undefined>, undefined>, v.MinLengthAction<"read"[], 1, undefined>, v.MetadataAction<"read"[], {
1500
+ readonly uniqueItems: true;
1501
+ }>]>;
1502
+ readonly locations: v.StrictTupleSchema<[v.LiteralSchema<"https://api.andco.com", undefined>], undefined>;
1503
+ readonly subject: v.VariantSchema<"type", [v.StrictObjectSchema<{
1504
+ readonly type: v.LiteralSchema<"profile", undefined>;
1505
+ readonly identifier: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1506
+ }, undefined>, v.StrictObjectSchema<{
1507
+ readonly type: v.LiteralSchema<"organization", undefined>;
1508
+ readonly identifier: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1509
+ }, undefined>], undefined>;
1510
+ readonly accounts: v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.StrictObjectSchema<{
1511
+ readonly type: v.LiteralSchema<"account_key", undefined>;
1512
+ readonly pattern: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1513
+ }, undefined>, v.StrictObjectSchema<{
1514
+ readonly type: v.LiteralSchema<"account", undefined>;
1515
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1516
+ }, undefined>, v.StrictObjectSchema<{
1517
+ readonly type: v.LiteralSchema<"any", undefined>;
1518
+ readonly limit: v.LiteralSchema<"own", undefined>;
1519
+ }, undefined>], undefined>, undefined>, v.MinLengthAction<({
1520
+ type: "account_key";
1521
+ pattern: string;
1522
+ } | {
1523
+ type: "account";
1524
+ id: string;
1525
+ } | {
1526
+ type: "any";
1527
+ limit: "own";
1528
+ })[], 1, undefined>, v.MaxLengthAction<({
1529
+ type: "account_key";
1530
+ pattern: string;
1531
+ } | {
1532
+ type: "account";
1533
+ id: string;
1534
+ } | {
1535
+ type: "any";
1536
+ limit: "own";
1537
+ })[], 100, undefined>, v.MetadataAction<({
1538
+ type: "account_key";
1539
+ pattern: string;
1540
+ } | {
1541
+ type: "account";
1542
+ id: string;
1543
+ } | {
1544
+ type: "any";
1545
+ limit: "own";
1546
+ })[], {
1547
+ readonly uniqueItems: true;
1548
+ }>]>;
1277
1549
  }, undefined>, v.StrictObjectSchema<{
1278
1550
  readonly type: v.LiteralSchema<"bank_transfer", undefined>;
1279
1551
  readonly actions: v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["approve", "reject"], undefined>, undefined>, v.MinLengthAction<("approve" | "reject")[], 1, undefined>, v.MetadataAction<("approve" | "reject")[], {
@@ -1 +1 @@
1
- {"version":3,"file":"bank.d.ts","sourceRoot":"","sources":["../../src/rar/bank.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAC7B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAgB1C,0EAA0E;AAC1E,eAAO,MAAM,yBAAyB,mCAAoC,CAAC;AAC3E,qGAAqG;AACrG,eAAO,MAAM,2BAA2B,8BAA+B,CAAC;AACxE,+FAA+F;AAC/F,eAAO,MAAM,6BAA6B,gCAAiC,CAAC;AAC5E,2DAA2D;AAC3D,eAAO,MAAM,oBAAoB,2EAIvB,CAAC;AACX,6DAA6D;AAC7D,eAAO,MAAM,wBAAwB,mBAAoB,CAAC;AAC1D,sDAAsD;AACtD,eAAO,MAAM,4BAA4B,qBAAsB,CAAC;AAChE,6FAA6F;AAC7F,eAAO,MAAM,8BAA8B,gCAAiC,CAAC;AAC7E,0DAA0D;AAC1D,eAAO,MAAM,qBAAqB,0CAAgF,CAAC;AACnH,gHAAgH;AAChH,eAAO,MAAM,oBAAoB,sCAAuC,CAAC;AAEzE,yGAAyG;AACzG,eAAO,MAAM,eAAe,kBAAmB,CAAC;AAYhD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;0BAatC,CAAC;AAEH,gFAAgF;AAChF,eAAO,MAAM,yBAAyB;;;;;;;;0BAWpC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,2BAA2B;;;aAGtC,CAAC;AACH,sDAAsD;AACtD,eAAO,MAAM,yBAAyB;;;aAGpC,CAAC;AAEH;;;;;;;G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_ACCOUNT_APPROVAL_ACTIONS,
18
18
  ];
19
- /** Reading the Transactions (ledger entries) of accounts. */
19
+ /** Reading the Transactions (movements) of accounts. */
20
20
  export const BANK_TRANSACTION_ACTIONS = ["read"];
21
21
  /** Proposing Transfers within the detail's bounds. */
22
22
  export const BANK_TRANSFER_CREATE_ACTIONS = ["create"];
23
+ /** Reading every Transfer that leaves the accounts of `accounts`, whoever made it and in any status. */
24
+ export const BANK_TRANSFER_READ_ACTIONS = ["read"];
23
25
  /** Approving or rejecting Transfers someone else created: the other half of dual control. */
24
26
  export const BANK_TRANSFER_APPROVAL_ACTIONS = ["approve", "reject"];
25
- /** Every `bank_transfer` action, across its two forms. */
26
- export const BANK_TRANSFER_ACTIONS = [...BANK_TRANSFER_CREATE_ACTIONS, ...BANK_TRANSFER_APPROVAL_ACTIONS];
27
+ /** Every `bank_transfer` action, across its three forms. */
28
+ export const BANK_TRANSFER_ACTIONS = [
29
+ ...BANK_TRANSFER_CREATE_ACTIONS,
30
+ ...BANK_TRANSFER_READ_ACTIONS,
31
+ ...BANK_TRANSFER_APPROVAL_ACTIONS,
32
+ ];
27
33
  /** Creating, reading and closing Deposits. A Deposit needs no Approval: money arriving is not money leaving. */
28
34
  export const BANK_DEPOSIT_ACTIONS = ["create", "read", "close"];
29
35
  /** The only currency a bank detail names today. It is still required: a permission never assumes CLP. */
@@ -252,9 +258,32 @@ export const BankTransferApprovalGrantRequestSchema = /* @__PURE__ */ v.strictOb
252
258
  subject: SubjectPickerSchema,
253
259
  transactions: v.nullish(ApprovalLimitsRequestSchema),
254
260
  });
255
- /** `bank_transfer` Grant Request: the create form or the approval form, never both in one detail. */
261
+ /**
262
+ * `bank_transfer` Grant Request, read form: read every Transfer that leaves `accounts` (own matchers;
263
+ * absent means every own account), in any status and of any origin. It is a bound on accounts only:
264
+ * no `sources`, `destinations`, `currency` or `transactions`. Without it, a client reads only the
265
+ * Transfers it created itself.
266
+ *
267
+ * @example
268
+ * const observe: BankTransferReadGrantRequest = {
269
+ * type: "bank_transfer",
270
+ * actions: ["read"],
271
+ * locations: ["https://api.andco.com"],
272
+ * subject: { type: "organization" },
273
+ * accounts: [{ type: "account_key", pattern: "caja-*", editable: true }],
274
+ * };
275
+ */
276
+ export const BankTransferReadGrantRequestSchema = /* @__PURE__ */ v.strictObject({
277
+ type: v.literal("bank_transfer"),
278
+ actions: actionSet(BANK_TRANSFER_READ_ACTIONS),
279
+ locations: AndcoRarLocationsSchema,
280
+ subject: SubjectPickerSchema,
281
+ accounts: v.nullish(ownList),
282
+ });
283
+ /** `bank_transfer` Grant Request: the create, read or approval form, never mixed in one detail. */
256
284
  export const BankTransferGrantRequestSchema = /* @__PURE__ */ v.union([
257
285
  BankTransferCreateGrantRequestSchema,
286
+ BankTransferReadGrantRequestSchema,
258
287
  BankTransferApprovalGrantRequestSchema,
259
288
  ]);
260
289
  /** `bank_transfer` Grant, create form: sources and destinations materialized, no `budgets`. */
@@ -276,9 +305,18 @@ export const BankTransferApprovalGrantSchema = /* @__PURE__ */ v.strictObject({
276
305
  subject: GrantedSubjectSchema,
277
306
  transactions: v.optional(ApprovalLimitsGrantSchema),
278
307
  });
308
+ /** `bank_transfer` Grant, read form: the subject resolved and `accounts` materialized. */
309
+ export const BankTransferReadGrantSchema = /* @__PURE__ */ v.strictObject({
310
+ type: v.literal("bank_transfer"),
311
+ actions: actionSet(BANK_TRANSFER_READ_ACTIONS),
312
+ locations: AndcoRarLocationsSchema,
313
+ subject: GrantedSubjectSchema,
314
+ accounts: grantedOwnList,
315
+ });
279
316
  /** `bank_transfer` Grant. */
280
317
  export const BankTransferGrantSchema = /* @__PURE__ */ v.union([
281
318
  BankTransferCreateGrantSchema,
319
+ BankTransferReadGrantSchema,
282
320
  BankTransferApprovalGrantSchema,
283
321
  ]);
284
322
  // -- bank_deposit -------------------------------------------------------------------------------