@andco/protocol 0.0.13 → 0.0.15

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 (102) 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.js +2 -2
  5. package/dist/authorization.d.ts +1 -1
  6. package/dist/authorization.js +1 -1
  7. package/dist/consent.d.ts +2 -2
  8. package/dist/consent.js +2 -2
  9. package/dist/constants.d.ts +15 -2
  10. package/dist/constants.d.ts.map +1 -1
  11. package/dist/constants.js +17 -3
  12. package/dist/errors.d.ts +36 -9
  13. package/dist/errors.d.ts.map +1 -1
  14. package/dist/errors.js +49 -11
  15. package/dist/index.d.ts +1 -0
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +1 -0
  18. package/dist/intent-input.d.ts +431 -872
  19. package/dist/intent-input.d.ts.map +1 -1
  20. package/dist/intent-input.js +142 -121
  21. package/dist/miniapp-icon.js +1 -1
  22. package/dist/miniapp-manifest.d.ts +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 +134 -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 +81 -81
  31. package/dist/rar/bank.js +1 -1
  32. package/dist/rar/catalog.d.ts +48 -48
  33. package/dist/rar/catalog.js +6 -6
  34. package/dist/rar/detail.d.ts +1 -1
  35. package/dist/rar/detail.js +1 -1
  36. package/dist/rar/json-schemas.generated.d.ts +1 -1
  37. package/dist/rar/json-schemas.generated.d.ts.map +1 -1
  38. package/dist/rar/json-schemas.generated.js +25 -21
  39. package/dist/rar/subject-data.d.ts +1 -1
  40. package/dist/rar/subject-data.js +1 -1
  41. package/dist/rar/subject.d.ts +1 -1
  42. package/dist/rar/subject.js +1 -1
  43. package/dist/rest/accounts.d.ts +28 -28
  44. package/dist/rest/accounts.d.ts.map +1 -1
  45. package/dist/rest/accounts.js +22 -22
  46. package/dist/rest/api-error.d.ts +1 -1
  47. package/dist/rest/api-error.js +1 -1
  48. package/dist/rest/catalog.d.ts +3 -3
  49. package/dist/rest/catalog.js +2 -2
  50. package/dist/rest/common.d.ts +3 -3
  51. package/dist/rest/common.js +3 -3
  52. package/dist/rest/contract.d.ts +905 -528
  53. package/dist/rest/contract.d.ts.map +1 -1
  54. package/dist/rest/contract.js +17 -5
  55. package/dist/rest/events.d.ts +1 -1
  56. package/dist/rest/events.d.ts.map +1 -1
  57. package/dist/rest/events.js +2 -2
  58. package/dist/rest/identity.d.ts +22 -22
  59. package/dist/rest/identity.js +5 -5
  60. package/dist/rest/index.d.ts +1 -0
  61. package/dist/rest/index.d.ts.map +1 -1
  62. package/dist/rest/index.js +1 -0
  63. package/dist/rest/intents.d.ts +787 -716
  64. package/dist/rest/intents.d.ts.map +1 -1
  65. package/dist/rest/intents.js +62 -53
  66. package/dist/rest/signatures.d.ts +11 -5
  67. package/dist/rest/signatures.d.ts.map +1 -1
  68. package/dist/rest/signatures.js +10 -0
  69. package/dist/rest/subjects.d.ts +1 -1
  70. package/dist/rest/subjects.d.ts.map +1 -1
  71. package/dist/rest/subjects.js +3 -2
  72. package/dist/rest/transfers.d.ts +612 -0
  73. package/dist/rest/transfers.d.ts.map +1 -0
  74. package/dist/rest/transfers.js +115 -0
  75. package/dist/scopes.d.ts +1 -1
  76. package/dist/signing.d.ts +13 -2
  77. package/dist/signing.d.ts.map +1 -1
  78. package/dist/signing.js +13 -0
  79. package/dist/transfer.d.ts +363 -0
  80. package/dist/transfer.d.ts.map +1 -0
  81. package/dist/transfer.js +287 -0
  82. package/dist/transport/financial-events.d.ts +21 -17
  83. package/dist/transport/financial-events.d.ts.map +1 -1
  84. package/dist/transport/generated/oauth-api.d.ts +1017 -194
  85. package/dist/transport/generated/oauth-api.d.ts.map +1 -1
  86. package/dist/transport/intents.d.ts +28 -12
  87. package/dist/transport/intents.d.ts.map +1 -1
  88. package/dist/transport/intents.js +1 -1
  89. package/dist/transport/rest.d.ts +4 -4
  90. package/dist/transport/rest.d.ts.map +1 -1
  91. package/dist/transport/rest.js +33 -4
  92. package/dist/urls.d.ts +25 -2
  93. package/dist/urls.d.ts.map +1 -1
  94. package/dist/urls.js +47 -4
  95. package/dist/userinfo.d.ts +2 -2
  96. package/dist/userinfo.js +2 -2
  97. package/dist/webhooks.d.ts +19 -15
  98. package/dist/webhooks.d.ts.map +1 -1
  99. package/dist/webhooks.js +17 -15
  100. package/dist/window-features.d.ts +2 -2
  101. package/dist/window-features.js +2 -2
  102. package/package.json +2 -2
@@ -35,7 +35,7 @@ export declare class IdempotencyKeyNotAllowed extends /* @__PURE__ */ Idempotenc
35
35
  constructor(message?: string);
36
36
  }
37
37
  declare const InvalidSignedInstruction_base: (abstract new (data: {
38
- reason: "malformed_assertion" | "missing_key_id" | "disallowed_algorithm" | "unknown_key" | "revoked_key" | "unusable_key" | "invalid_signature" | "premature_assertion" | "missing_expiration" | "missing_instruction_id" | "missing_claim" | "wrong_audience" | "wrong_issuer" | "verification_failed" | "invalid_claims";
38
+ reason: "malformed_assertion" | "missing_signature" | "missing_key_id" | "disallowed_algorithm" | "unknown_key" | "revoked_key" | "expired_key" | "unusable_key" | "unsynced_key" | "invalid_signature" | "premature_assertion" | "missing_expiration" | "expiration_too_soon" | "missing_instruction_id" | "missing_claim" | "wrong_audience" | "wrong_issuer" | "verification_failed" | "invalid_claims";
39
39
  issues?: {
40
40
  type: string;
41
41
  path: string[];
@@ -45,7 +45,7 @@ declare const InvalidSignedInstruction_base: (abstract new (data: {
45
45
  readonly error: "invalid_signed_instruction";
46
46
  readonly hint?: string;
47
47
  readonly data: {
48
- reason: "malformed_assertion" | "missing_key_id" | "disallowed_algorithm" | "unknown_key" | "revoked_key" | "unusable_key" | "invalid_signature" | "premature_assertion" | "missing_expiration" | "missing_instruction_id" | "missing_claim" | "wrong_audience" | "wrong_issuer" | "verification_failed" | "invalid_claims";
48
+ reason: "malformed_assertion" | "missing_signature" | "missing_key_id" | "disallowed_algorithm" | "unknown_key" | "revoked_key" | "expired_key" | "unusable_key" | "unsynced_key" | "invalid_signature" | "premature_assertion" | "missing_expiration" | "expiration_too_soon" | "missing_instruction_id" | "missing_claim" | "wrong_audience" | "wrong_issuer" | "verification_failed" | "invalid_claims";
49
49
  issues?: {
50
50
  type: string;
51
51
  path: string[];
@@ -60,7 +60,7 @@ declare const InvalidSignedInstruction_base: (abstract new (data: {
60
60
  readonly error: "invalid_signed_instruction";
61
61
  readonly status: 400;
62
62
  readonly data: v.SchemaWithPipe<readonly [v.ObjectSchema<{
63
- readonly reason: v.SchemaWithPipe<readonly [v.PicklistSchema<[...("malformed_assertion" | "missing_key_id" | "disallowed_algorithm" | "unknown_key" | "revoked_key" | "unusable_key" | "invalid_signature" | "premature_assertion" | "missing_expiration" | "missing_instruction_id" | "missing_claim" | "wrong_audience" | "wrong_issuer" | "verification_failed")[], "invalid_claims"], undefined>, v.DescriptionAction<"malformed_assertion" | "missing_key_id" | "disallowed_algorithm" | "unknown_key" | "revoked_key" | "unusable_key" | "invalid_signature" | "premature_assertion" | "missing_expiration" | "missing_instruction_id" | "missing_claim" | "wrong_audience" | "wrong_issuer" | "verification_failed" | "invalid_claims", "The one cause: what did not verify, or `invalid_claims` when the verified claims are not an Intent.">]>;
63
+ readonly reason: v.SchemaWithPipe<readonly [v.PicklistSchema<[...("malformed_assertion" | "missing_signature" | "missing_key_id" | "disallowed_algorithm" | "unknown_key" | "revoked_key" | "expired_key" | "unusable_key" | "unsynced_key" | "invalid_signature" | "premature_assertion" | "missing_expiration" | "expiration_too_soon" | "missing_instruction_id" | "missing_claim" | "wrong_audience" | "wrong_issuer" | "verification_failed")[], "invalid_claims"], undefined>, v.DescriptionAction<"malformed_assertion" | "missing_signature" | "missing_key_id" | "disallowed_algorithm" | "unknown_key" | "revoked_key" | "expired_key" | "unusable_key" | "unsynced_key" | "invalid_signature" | "premature_assertion" | "missing_expiration" | "expiration_too_soon" | "missing_instruction_id" | "missing_claim" | "wrong_audience" | "wrong_issuer" | "verification_failed" | "invalid_claims", "The one cause: what did not verify, or `invalid_claims` when the verified claims are not what the operation takes (an Intent on `POST /intents`, a transfer on `POST /transfers`).">]>;
64
64
  readonly issues: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
65
65
  readonly type: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "What failed, as a stable code: a schema check such as `max_length`, `regex` or `uuid`, or the code of a rule such as `note_too_long`. Map it to your own words.">]>;
66
66
  readonly path: v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string[], "Where it failed, as the keys from the root of the part of the request it belongs to; empty for the part as a whole.">]>;
@@ -69,9 +69,9 @@ declare const InvalidSignedInstruction_base: (abstract new (data: {
69
69
  type: string;
70
70
  path: string[];
71
71
  requirement?: unknown;
72
- }[] | undefined, "On `invalid_claims`, what failed in the claims, as `invalid_request` names it.">]>;
72
+ }[] | undefined, "On `invalid_claims`, what failed in the claims; on `malformed_assertion` of a signed transfer, what failed in its envelope. As `invalid_request` names it.">]>;
73
73
  }, undefined>, v.DescriptionAction<{
74
- reason: "malformed_assertion" | "missing_key_id" | "disallowed_algorithm" | "unknown_key" | "revoked_key" | "unusable_key" | "invalid_signature" | "premature_assertion" | "missing_expiration" | "missing_instruction_id" | "missing_claim" | "wrong_audience" | "wrong_issuer" | "verification_failed" | "invalid_claims";
74
+ reason: "malformed_assertion" | "missing_signature" | "missing_key_id" | "disallowed_algorithm" | "unknown_key" | "revoked_key" | "expired_key" | "unusable_key" | "unsynced_key" | "invalid_signature" | "premature_assertion" | "missing_expiration" | "expiration_too_soon" | "missing_instruction_id" | "missing_claim" | "wrong_audience" | "wrong_issuer" | "verification_failed" | "invalid_claims";
75
75
  issues?: {
76
76
  type: string;
77
77
  path: string[];
@@ -226,7 +226,7 @@ declare const IntentInteractionRequired_base: (abstract new (data: {
226
226
  readonly intent_id: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "The Intent the refusal is about, when it was refused at its release rather than at its creation.">]>;
227
227
  readonly reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required", "bank_connection_pin_required", "bank_connection_reconnect_required", "bank_representative_replacement_required"], undefined>, undefined>, v.DescriptionAction<"bank_connection_pin_required" | "bank_connection_reconnect_required" | "bank_representative_replacement_required" | "bank_verification_required" | "source_account_required" | undefined, "Why only a person can go on.">]>;
228
228
  readonly authorization_url: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "Where the person completes the Intent, for `bank_verification_required` and `source_account_required`.">]>;
229
- readonly interaction_url: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "Where in Platform the person brings their bank connection back, for the `bank_*` reasons.">]>;
229
+ readonly interaction_url: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "Where in Platform the person brings their AndCo account connection back, for the `bank_*` reasons.">]>;
230
230
  }, undefined>, v.DescriptionAction<{
231
231
  intent_id?: string | undefined;
232
232
  reason?: "bank_connection_pin_required" | "bank_connection_reconnect_required" | "bank_representative_replacement_required" | "bank_verification_required" | "source_account_required" | undefined;
@@ -249,15 +249,14 @@ declare const IntentInteractionRequired_base: (abstract new (data: {
249
249
  };
250
250
  };
251
251
  /**
252
- * Only a person can let this Intent go on. `reason` says why: `bank_verification_required` (the bank
253
- * asks them to confirm the transfer with their web PIN and an SMS code) and `source_account_required`
252
+ * Only a person can let this Intent go on. `reason` says why: `bank_verification_required` (AndCo * asks them to confirm the transfer with their web AndPass and an SMS code) and `source_account_required`
254
253
  * (they still pick the source account) come with `authorization_url`, where they do it; on the release
255
254
  * of an Intent that moves with nobody present, `bank_connection_pin_required`,
256
255
  * `bank_connection_reconnect_required` and `bank_representative_replacement_required` come with
257
256
  * `interaction_url`. Nothing was approved, frozen or moved, and the same request succeeds once the
258
257
  * person has acted.
259
258
  *
260
- * The same code on a read of the bank is {@link BankConnectionInteractionRequired}, with `code`.
259
+ * The same code on a read of AndCo is {@link BankConnectionInteractionRequired}, with `code`.
261
260
  */
262
261
  export declare class IntentInteractionRequired extends /* @__PURE__ */ IntentInteractionRequired_base {
263
262
  constructor(data: IntentInteractionRequired["data"], message?: string);
@@ -407,13 +406,13 @@ declare const BankAccountQuotaExceeded_base: (abstract new (data: {
407
406
  readonly status: 409;
408
407
  readonly data: v.SchemaWithPipe<readonly [v.ObjectSchema<{
409
408
  readonly intent_id: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "The Intent the refusal is about, when it was refused at its release rather than at its creation.">]>;
410
- readonly used: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | undefined, "How many bank accounts the Organization holds, closed ones included. Absent when they could not be read after the refusal.">]>;
411
- readonly quota: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | undefined, "How many bank accounts the Organization may hold. Absent when it could not be read after the refusal.">]>;
409
+ readonly used: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | undefined, "How many digital accounts the Organization holds, closed ones included. Absent when they could not be read after the refusal.">]>;
410
+ readonly quota: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | undefined, "How many digital accounts the Organization may hold. Absent when it could not be read after the refusal.">]>;
412
411
  }, undefined>, v.DescriptionAction<{
413
412
  intent_id?: string | undefined;
414
413
  used?: number | undefined;
415
414
  quota?: number | undefined;
416
- }, "The Organization holds every bank account its quota allows; nothing was opened.">]>;
415
+ }, "The Organization holds every digital account its quota allows; nothing was opened.">]>;
417
416
  define<const Code extends string, const Status extends number, Data extends import("./api-error.js").AndcoAPIErrorDataSchema>(error: Code, status: Status, data: Data): (abstract new (data: v.InferOutput<Data>, message?: string, hint?: string) => {
418
417
  readonly error: Code;
419
418
  readonly hint?: string;
@@ -429,7 +428,7 @@ declare const BankAccountQuotaExceeded_base: (abstract new (data: {
429
428
  define<const Code extends string, const Status extends number, Data extends import("./api-error.js").AndcoAPIErrorDataSchema>(error: Code, status: Status, data: Data): /*elided*/ any;
430
429
  };
431
430
  };
432
- /** The Organization already holds as many bank accounts as its contract allows. */
431
+ /** The Organization already holds as many digital accounts as its contract allows. */
433
432
  export declare class BankAccountQuotaExceeded extends /* @__PURE__ */ BankAccountQuotaExceeded_base {
434
433
  constructor(data: BankAccountQuotaExceeded["data"], message?: string, hint?: string);
435
434
  }
@@ -761,7 +760,7 @@ declare const UnsupportedBank_base: (abstract new (intentId?: string, message?:
761
760
  define<const Code extends string, const Status extends number, Data extends import("./api-error.js").AndcoAPIErrorDataSchema>(error: Code, status: Status, data: Data): /*elided*/ any;
762
761
  };
763
762
  };
764
- /** The destination's bank is not one Andco transfers to. */
763
+ /** The destination's bank is not one AndCo transfers to. */
765
764
  export declare class UnsupportedBank extends /* @__PURE__ */ UnsupportedBank_base {
766
765
  }
767
766
  declare const BankConnectionUnavailable_base: (abstract new (intentId?: string, message?: string) => {
@@ -797,7 +796,7 @@ declare const BankConnectionUnavailable_base: (abstract new (intentId?: string,
797
796
  define<const Code extends string, const Status extends number, Data extends import("./api-error.js").AndcoAPIErrorDataSchema>(error: Code, status: Status, data: Data): /*elided*/ any;
798
797
  };
799
798
  };
800
- /** The subject has no bank connection to a company; nothing was asked of the bank. */
799
+ /** The subject has no AndCo account connection to a company; nothing was asked of the bank. */
801
800
  export declare class BankConnectionUnavailable extends /* @__PURE__ */ BankConnectionUnavailable_base {
802
801
  }
803
802
  declare const BankAccountNumberMissing_base: (abstract new (intentId?: string, message?: string) => {
@@ -833,7 +832,7 @@ declare const BankAccountNumberMissing_base: (abstract new (intentId?: string, m
833
832
  define<const Code extends string, const Status extends number, Data extends import("./api-error.js").AndcoAPIErrorDataSchema>(error: Code, status: Status, data: Data): /*elided*/ any;
834
833
  };
835
834
  };
836
- /** The bank opened no account number for the opening. */
835
+ /** AndCo opened no account number for the opening. */
837
836
  export declare class BankAccountNumberMissing extends /* @__PURE__ */ BankAccountNumberMissing_base {
838
837
  }
839
838
  declare const BankAuthorizationDenied_base: (abstract new (intentId?: string, message?: string) => {
@@ -869,7 +868,7 @@ declare const BankAuthorizationDenied_base: (abstract new (intentId?: string, me
869
868
  define<const Code extends string, const Status extends number, Data extends import("./api-error.js").AndcoAPIErrorDataSchema>(error: Code, status: Status, data: Data): /*elided*/ any;
870
869
  };
871
870
  };
872
- /** The bank does not let that person open accounts for that company. */
871
+ /** AndCo does not let that person open accounts for that company. */
873
872
  export declare class BankAuthorizationDenied extends /* @__PURE__ */ BankAuthorizationDenied_base {
874
873
  }
875
874
  declare const BankHolderWithoutAccount_base: (abstract new (intentId?: string, message?: string) => {
@@ -905,7 +904,7 @@ declare const BankHolderWithoutAccount_base: (abstract new (intentId?: string, m
905
904
  define<const Code extends string, const Status extends number, Data extends import("./api-error.js").AndcoAPIErrorDataSchema>(error: Code, status: Status, data: Data): /*elided*/ any;
906
905
  };
907
906
  };
908
- /** The bank knows the holder without an account to open another one from. */
907
+ /** AndCo knows the holder without an account to open another one from. */
909
908
  export declare class BankHolderWithoutAccount extends /* @__PURE__ */ BankHolderWithoutAccount_base {
910
909
  }
911
910
  declare const BankAccountLimitReached_base: (abstract new (intentId?: string, message?: string) => {
@@ -941,7 +940,7 @@ declare const BankAccountLimitReached_base: (abstract new (intentId?: string, me
941
940
  define<const Code extends string, const Status extends number, Data extends import("./api-error.js").AndcoAPIErrorDataSchema>(error: Code, status: Status, data: Data): /*elided*/ any;
942
941
  };
943
942
  };
944
- /** The bank's own ceiling of accounts for the holder is reached. */
943
+ /** AndCo's own ceiling of accounts for the holder is reached. */
945
944
  export declare class BankAccountLimitReached extends /* @__PURE__ */ BankAccountLimitReached_base {
946
945
  }
947
946
  declare const BankRefused_base: (abstract new (intentId?: string, message?: string) => {
@@ -977,7 +976,7 @@ declare const BankRefused_base: (abstract new (intentId?: string, message?: stri
977
976
  define<const Code extends string, const Status extends number, Data extends import("./api-error.js").AndcoAPIErrorDataSchema>(error: Code, status: Status, data: Data): /*elided*/ any;
978
977
  };
979
978
  };
980
- /** The bank or its ledger refused the request before accepting it; no money moved. */
979
+ /** AndCo or its ledger refused the request before accepting it; no money moved. */
981
980
  export declare class BankRefused extends /* @__PURE__ */ BankRefused_base {
982
981
  }
983
982
  declare const InsufficientFunds_base: (abstract new (intentId?: string, message?: string) => {
@@ -1086,19 +1085,19 @@ declare const BankReviewRequired_base: (abstract new (intentId?: string, message
1086
1085
  };
1087
1086
  };
1088
1087
  /**
1089
- * The bank stopped half way or gave no usable answer for a day: money may have left the source account
1090
- * without reaching the destination, and the bank must review it. Never retry it under a new Intent.
1088
+ * AndCo stopped half way or gave no usable answer for a day: money may have left the source account
1089
+ * without reaching the destination, and AndCo must review it. Never retry it under a new Intent.
1091
1090
  */
1092
1091
  export declare class BankReviewRequired extends /* @__PURE__ */ BankReviewRequired_base {
1093
1092
  }
1094
1093
  declare const NotImplemented_base: (abstract new (data: {
1095
- code?: "account_closure_not_implemented" | "account_opening_not_implemented" | "own_account_transfer_not_implemented" | "multiple_destinations_not_implemented" | "split_payments_not_implemented" | "multiple_instructions_not_implemented" | "external_transfer_execution_not_implemented" | "intent_type_not_decidable" | undefined;
1094
+ code?: "account_closure_not_implemented" | "account_opening_not_implemented" | "own_account_transfer_not_implemented" | "signed_outgoing_transfer_not_implemented" | "multiple_destinations_not_implemented" | "split_payments_not_implemented" | "multiple_instructions_not_implemented" | "external_transfer_execution_not_implemented" | "intent_type_not_decidable" | undefined;
1096
1095
  intent_id?: string | undefined;
1097
1096
  }, message?: string, hint?: string) => {
1098
1097
  readonly error: "not_implemented";
1099
1098
  readonly hint?: string;
1100
1099
  readonly data: {
1101
- code?: "account_closure_not_implemented" | "account_opening_not_implemented" | "own_account_transfer_not_implemented" | "multiple_destinations_not_implemented" | "split_payments_not_implemented" | "multiple_instructions_not_implemented" | "external_transfer_execution_not_implemented" | "intent_type_not_decidable" | undefined;
1100
+ code?: "account_closure_not_implemented" | "account_opening_not_implemented" | "own_account_transfer_not_implemented" | "signed_outgoing_transfer_not_implemented" | "multiple_destinations_not_implemented" | "split_payments_not_implemented" | "multiple_instructions_not_implemented" | "external_transfer_execution_not_implemented" | "intent_type_not_decidable" | undefined;
1102
1101
  intent_id?: string | undefined;
1103
1102
  };
1104
1103
  name: string;
@@ -1109,10 +1108,10 @@ declare const NotImplemented_base: (abstract new (data: {
1109
1108
  readonly error: "not_implemented";
1110
1109
  readonly status: 501;
1111
1110
  readonly data: v.SchemaWithPipe<readonly [v.ObjectSchema<{
1112
- readonly code: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["account_closure_not_implemented", "account_opening_not_implemented", "own_account_transfer_not_implemented", "external_transfer_execution_not_implemented", "multiple_destinations_not_implemented", "split_payments_not_implemented", "multiple_instructions_not_implemented", "intent_type_not_decidable"], undefined>, undefined>, v.DescriptionAction<"account_closure_not_implemented" | "account_opening_not_implemented" | "own_account_transfer_not_implemented" | "multiple_destinations_not_implemented" | "split_payments_not_implemented" | "multiple_instructions_not_implemented" | "external_transfer_execution_not_implemented" | "intent_type_not_decidable" | undefined, "Which case is unavailable: closing an account (postponed with no date), opening an additional account or a transfer between two accounts of the same holder where the bank does not serve them, and the payment shapes not built yet. Absent for a case this version of the contract does not name yet.">]>;
1111
+ readonly code: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["account_closure_not_implemented", "account_opening_not_implemented", "own_account_transfer_not_implemented", "signed_outgoing_transfer_not_implemented", "external_transfer_execution_not_implemented", "multiple_destinations_not_implemented", "split_payments_not_implemented", "multiple_instructions_not_implemented", "intent_type_not_decidable"], undefined>, undefined>, v.DescriptionAction<"account_closure_not_implemented" | "account_opening_not_implemented" | "own_account_transfer_not_implemented" | "signed_outgoing_transfer_not_implemented" | "multiple_destinations_not_implemented" | "split_payments_not_implemented" | "multiple_instructions_not_implemented" | "external_transfer_execution_not_implemented" | "intent_type_not_decidable" | undefined, "Which case is unavailable: closing an account (postponed with no date), opening an additional account or a transfer between two accounts of the same holder where AndCo does not serve them, a signed transfer that leaves its holder where AndCo does not verify signatures yet, and the payment shapes not built yet. Absent for a case this version of the contract does not name yet.">]>;
1113
1112
  readonly intent_id: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "The Intent the refusal is about, when it was refused at its release rather than at its creation.">]>;
1114
1113
  }, undefined>, v.DescriptionAction<{
1115
- code?: "account_closure_not_implemented" | "account_opening_not_implemented" | "own_account_transfer_not_implemented" | "multiple_destinations_not_implemented" | "split_payments_not_implemented" | "multiple_instructions_not_implemented" | "external_transfer_execution_not_implemented" | "intent_type_not_decidable" | undefined;
1114
+ code?: "account_closure_not_implemented" | "account_opening_not_implemented" | "own_account_transfer_not_implemented" | "signed_outgoing_transfer_not_implemented" | "multiple_destinations_not_implemented" | "split_payments_not_implemented" | "multiple_instructions_not_implemented" | "external_transfer_execution_not_implemented" | "intent_type_not_decidable" | undefined;
1116
1115
  intent_id?: string | undefined;
1117
1116
  }, "The requested case is unavailable, and `code` says which when the contract names it.">]>;
1118
1117
  define<const Code extends string, const Status extends number, Data extends import("./api-error.js").AndcoAPIErrorDataSchema>(error: Code, status: Status, data: Data): (abstract new (data: v.InferOutput<Data>, message?: string, hint?: string) => {
@@ -1142,10 +1141,10 @@ export declare class NotImplemented extends /* @__PURE__ */ NotImplemented_base
1142
1141
  * `<base>[.<detail>]`: where an Intent stands. Decide on the base with `INTENT_STATUS_BASE` and
1143
1142
  * `IS_INTENT_TERMINAL_STATUS`, never on the whole value.
1144
1143
  */
1145
- export declare const IntentStatus: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
1144
+ export declare const IntentStatus: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
1146
1145
  /** Where an Intent stands, as `<base>[.<detail>]`. */
1147
1146
  export type IntentStatus = v.InferOutput<typeof IntentStatus>;
1148
- /** The Andco account a deposit lands on, with what a payer at another bank types to pay into it. */
1147
+ /** The AndCo account a deposit lands on, with what a payer at another bank types to pay into it. */
1149
1148
  export declare const DepositDestination: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1150
1149
  readonly type: v.LiteralSchema<"account", undefined>;
1151
1150
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
@@ -1160,7 +1159,7 @@ export declare const DepositDestination: v.SchemaWithPipe<readonly [v.StrictObje
1160
1159
  account_type: "checking" | "debit" | "savings";
1161
1160
  holder_id: string | null;
1162
1161
  holder_name: string;
1163
- }, "The Andco account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
1162
+ }, "The AndCo account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
1164
1163
  /** What a deposit has collected so far, and what it still waits for. */
1165
1164
  export declare const DepositProgress: v.StrictObjectSchema<{
1166
1165
  readonly credited: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -1187,8 +1186,8 @@ export declare const DepositTransaction: v.StrictObjectSchema<{
1187
1186
  readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1188
1187
  readonly outcome: v.PicklistSchema<["credited", "reversed"], undefined>;
1189
1188
  readonly receipt_time_source: v.PicklistSchema<["bank_timestamp", "unknown"], undefined>;
1190
- readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as the bank reported it.">]>;
1191
- readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as the bank reported it.">]>;
1189
+ readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as AndCo reported it.">]>;
1190
+ readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as AndCo reported it.">]>;
1192
1191
  readonly sender_bank_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Display name of the sender's bank.">]>;
1193
1192
  readonly sender_account_type: v.NullableSchema<v.PicklistSchema<["checking", "debit", "savings"], undefined>, undefined>;
1194
1193
  readonly sender_account_number: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
@@ -1232,7 +1231,7 @@ export declare const DepositIntent: v.ObjectSchema<{
1232
1231
  account_type: "checking" | "debit" | "savings";
1233
1232
  holder_id: string | null;
1234
1233
  holder_name: string;
1235
- }, "The Andco account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
1234
+ }, "The AndCo account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
1236
1235
  readonly amount: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1237
1236
  readonly currency: v.LiteralSchema<"CLP", undefined>;
1238
1237
  readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
@@ -1256,8 +1255,8 @@ export declare const DepositIntent: v.ObjectSchema<{
1256
1255
  readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1257
1256
  readonly outcome: v.PicklistSchema<["credited", "reversed"], undefined>;
1258
1257
  readonly receipt_time_source: v.PicklistSchema<["bank_timestamp", "unknown"], undefined>;
1259
- readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as the bank reported it.">]>;
1260
- readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as the bank reported it.">]>;
1258
+ readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as AndCo reported it.">]>;
1259
+ readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as AndCo reported it.">]>;
1261
1260
  readonly sender_bank_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Display name of the sender's bank.">]>;
1262
1261
  readonly sender_account_type: v.NullableSchema<v.PicklistSchema<["checking", "debit", "savings"], undefined>, undefined>;
1263
1262
  readonly sender_account_number: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
@@ -1271,15 +1270,15 @@ export declare const DepositIntent: v.ObjectSchema<{
1271
1270
  }, undefined>;
1272
1271
  readonly expires_at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
1273
1272
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
1274
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1275
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1276
1273
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1277
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
1274
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
1278
1275
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1279
1276
  }, undefined>, v.DescriptionAction<{
1280
1277
  value: string;
1281
1278
  editable: boolean;
1282
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
1279
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
1280
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1281
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1283
1282
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
1284
1283
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1285
1284
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
@@ -1290,56 +1289,56 @@ export type DepositIntent = v.InferOutput<typeof DepositIntent>;
1290
1289
  /** The amount a transfer orders, as it is answered. */
1291
1290
  export declare const TransferAmount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1292
1291
  readonly currency: v.LiteralSchema<"CLP", undefined>;
1293
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
1292
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "Immutable amount from the creation request, in the minor unit of the currency.">]>;
1294
1293
  readonly editable: v.BooleanSchema<undefined>;
1295
- readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
1294
+ readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>, undefined>, v.DescriptionAction<number | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
1296
1295
  }, undefined>, v.DescriptionAction<{
1297
1296
  currency: "CLP";
1298
- value: string;
1297
+ value: number;
1299
1298
  editable: boolean;
1300
- confirmed: string | null;
1301
- }, "The amount a transfer orders, as it is answered. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
1299
+ confirmed: number | null;
1300
+ }, "The amount a transfer orders, as it is answered: integers in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
1302
1301
  /** The money a transfer actually moved and when it settled. */
1303
1302
  export declare const TransferSettlement: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1304
1303
  readonly currency: v.LiteralSchema<"CLP", undefined>;
1305
- readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1304
+ readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>;
1306
1305
  readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1307
1306
  }, undefined>, v.DescriptionAction<{
1308
1307
  currency: "CLP";
1309
- value: string;
1308
+ value: number;
1310
1309
  at: string;
1311
1310
  }, "The money a transfer actually moved and when it settled. Present only once the transfer `succeeded`; null before, and null for ever when it fails, is rejected, cancelled or expires.">]>;
1312
1311
  /** Authoritative Project-facing state of a transfer. */
1313
1312
  export declare const TransferIntent: v.SchemaWithPipe<readonly [v.ObjectSchema<{
1314
1313
  readonly type: v.LiteralSchema<"transfer", undefined>;
1315
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
1314
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
1316
1315
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
1317
- readonly source: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1316
+ readonly sender: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1318
1317
  type: v.LiteralSchema<"account_key", undefined>;
1319
1318
  accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1320
1319
  }, undefined>, v.DescriptionAction<{
1321
1320
  type: "account_key";
1322
1321
  accountKey: string;
1323
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1322
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1324
1323
  type: v.LiteralSchema<"account", undefined>;
1325
1324
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1326
1325
  }, undefined>, v.DescriptionAction<{
1327
1326
  type: "account";
1328
1327
  id: string;
1329
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1328
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1330
1329
  type: "account_key";
1331
1330
  accountKey: string;
1332
1331
  } | {
1333
1332
  type: "account";
1334
1333
  id: string;
1335
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
1334
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
1336
1335
  type: "account_key";
1337
1336
  accountKey: string;
1338
1337
  } | {
1339
1338
  type: "account";
1340
1339
  id: string;
1341
- } | null, "Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
1342
- readonly destination: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
1340
+ } | null, "The Remitente. Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
1341
+ readonly receiver: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
1343
1342
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
1344
1343
  readonly type: v.LiteralSchema<"account_key", undefined>;
1345
1344
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -1350,11 +1349,13 @@ export declare const TransferIntent: v.SchemaWithPipe<readonly [v.ObjectSchema<{
1350
1349
  }, undefined>, v.StrictObjectSchema<{
1351
1350
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
1352
1351
  readonly type: v.LiteralSchema<"external", undefined>;
1353
- readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1354
- readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
1355
- readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1356
- readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1357
- readonly holder_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
1352
+ readonly country: v.LiteralSchema<"CL", undefined>;
1353
+ readonly bank_code: 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`.">]>;
1354
+ readonly account_type: 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).">]>;
1355
+ readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1356
+ readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
1357
+ readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
1358
+ readonly national_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, v.DescriptionAction<string, "The holder's RUT.">]>;
1358
1359
  }, undefined>], undefined>, v.DescriptionAction<{
1359
1360
  editable: false;
1360
1361
  type: "account_key";
@@ -1366,12 +1367,14 @@ export declare const TransferIntent: v.SchemaWithPipe<readonly [v.ObjectSchema<{
1366
1367
  } | {
1367
1368
  editable: false;
1368
1369
  type: "external";
1369
- bank_id: string;
1370
- account_type: "checking" | "debit" | "savings";
1371
- account_id: string;
1372
- holder_id: string;
1373
- holder_name: string;
1374
- }, "Where a transfer's money lands when it is named, in the request and in the answered Intent alike. A named destination is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `destination: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a destination the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
1370
+ country: "CL";
1371
+ bank_code: string;
1372
+ account_type: "10" | "20" | "40";
1373
+ account_number: string;
1374
+ name: string;
1375
+ national_kind_id: "RUT";
1376
+ national_id: string;
1377
+ }, "The Receptor of a transfer when it is named, in the request and in the answered Intent alike. A named Receptor is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `receiver: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a Receptor the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
1375
1378
  editable: false;
1376
1379
  type: "account_key";
1377
1380
  accountKey: string;
@@ -1382,64 +1385,66 @@ export declare const TransferIntent: v.SchemaWithPipe<readonly [v.ObjectSchema<{
1382
1385
  } | {
1383
1386
  editable: false;
1384
1387
  type: "external";
1385
- bank_id: string;
1386
- account_type: "checking" | "debit" | "savings";
1387
- account_id: string;
1388
- holder_id: string;
1389
- holder_name: string;
1390
- } | null, "Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
1388
+ country: "CL";
1389
+ bank_code: string;
1390
+ account_type: "10" | "20" | "40";
1391
+ account_number: string;
1392
+ name: string;
1393
+ national_kind_id: "RUT";
1394
+ national_id: string;
1395
+ } | null, "The Receptor. Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
1396
+ readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1397
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty one is allowed.">]>;
1398
+ readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1399
+ }, undefined>, v.DescriptionAction<{
1400
+ value: string;
1401
+ editable: boolean;
1402
+ }, "The comment a transfer asks for, as Core's `comment`: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
1391
1403
  readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1392
1404
  readonly currency: v.LiteralSchema<"CLP", undefined>;
1393
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
1405
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "Immutable amount from the creation request, in the minor unit of the currency.">]>;
1394
1406
  readonly editable: v.BooleanSchema<undefined>;
1395
- readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
1407
+ readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>, undefined>, v.DescriptionAction<number | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
1396
1408
  }, undefined>, v.DescriptionAction<{
1397
1409
  currency: "CLP";
1398
- value: string;
1410
+ value: number;
1399
1411
  editable: boolean;
1400
- confirmed: string | null;
1401
- }, "The amount a transfer orders, as it is answered. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
1412
+ confirmed: number | null;
1413
+ }, "The amount a transfer orders, as it is answered: integers in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
1402
1414
  readonly settled: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1403
1415
  readonly currency: v.LiteralSchema<"CLP", undefined>;
1404
- readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1416
+ readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>;
1405
1417
  readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1406
1418
  }, undefined>, v.DescriptionAction<{
1407
1419
  currency: "CLP";
1408
- value: string;
1420
+ value: number;
1409
1421
  at: string;
1410
1422
  }, "The money a transfer actually moved and when it settled. Present only once the transfer `succeeded`; null before, and null for ever when it fails, is rejected, cancelled or expires.">]>, undefined>;
1411
1423
  readonly fee: v.StrictObjectSchema<{
1412
1424
  readonly currency: v.LiteralSchema<"CLP", undefined>;
1413
1425
  readonly amount: v.LiteralSchema<"0", undefined>;
1414
1426
  }, undefined>;
1415
- readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and the bank asks the person to confirm it at `authorization_url` with their web PIN and an SMS code; the Intent becomes `processing.confirmed` only when the bank accepts it. A transfer created with `destination: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
1427
+ readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and AndCo asks the person to authorize it at `authorization_url` with their web AndPass and an SMS code; the Intent becomes `processing.confirmed` only when AndCo accepts it. A transfer created with `receiver: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
1416
1428
  readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
1417
1429
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
1418
1430
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1419
1431
  readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1420
- readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1421
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
1422
- readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1423
- }, undefined>, v.DescriptionAction<{
1424
- value: string;
1425
- editable: boolean;
1426
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
1427
1432
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
1428
1433
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1429
1434
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1430
1435
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1431
1436
  }, undefined>, v.DescriptionAction<{
1432
1437
  type: "transfer";
1433
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
1438
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
1434
1439
  signed: boolean;
1435
- source: {
1440
+ sender: {
1436
1441
  type: "account_key";
1437
1442
  accountKey: string;
1438
1443
  } | {
1439
1444
  type: "account";
1440
1445
  id: string;
1441
1446
  } | null;
1442
- destination: {
1447
+ receiver: {
1443
1448
  editable: false;
1444
1449
  type: "account_key";
1445
1450
  accountKey: string;
@@ -1450,21 +1455,27 @@ export declare const TransferIntent: v.SchemaWithPipe<readonly [v.ObjectSchema<{
1450
1455
  } | {
1451
1456
  editable: false;
1452
1457
  type: "external";
1453
- bank_id: string;
1454
- account_type: "checking" | "debit" | "savings";
1455
- account_id: string;
1456
- holder_id: string;
1457
- holder_name: string;
1458
+ country: "CL";
1459
+ bank_code: string;
1460
+ account_type: "10" | "20" | "40";
1461
+ account_number: string;
1462
+ name: string;
1463
+ national_kind_id: "RUT";
1464
+ national_id: string;
1458
1465
  } | null;
1466
+ comment?: {
1467
+ value: string;
1468
+ editable: boolean;
1469
+ } | undefined;
1459
1470
  amount: {
1460
1471
  currency: "CLP";
1461
- value: string;
1472
+ value: number;
1462
1473
  editable: boolean;
1463
- confirmed: string | null;
1474
+ confirmed: number | null;
1464
1475
  };
1465
1476
  settled: {
1466
1477
  currency: "CLP";
1467
- value: string;
1478
+ value: number;
1468
1479
  at: string;
1469
1480
  } | null;
1470
1481
  fee: {
@@ -1476,23 +1487,19 @@ export declare const TransferIntent: v.SchemaWithPipe<readonly [v.ObjectSchema<{
1476
1487
  expires_in_seconds: number | null;
1477
1488
  id: string;
1478
1489
  resource_server: string;
1479
- note?: {
1480
- value: string;
1481
- editable: boolean;
1482
- } | undefined;
1483
1490
  metadata: {
1484
1491
  [x: string]: unknown;
1485
1492
  };
1486
1493
  server_time: string;
1487
1494
  created_at: string;
1488
1495
  authorization_url: string;
1489
- }, "Authoritative Project-facing state of a transfer. `source` and `destination` answer in the same matcher vocabulary as the request. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>;
1496
+ }, "Authoritative Project-facing state of a transfer, in Core's vocabulary (ADR 0093). `sender` and `receiver` answer in the same matcher vocabulary as the request, and `comment` is the request's comment. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>;
1490
1497
  /** Authoritative Project-facing state of a transfer. */
1491
1498
  export type TransferIntent = v.InferOutput<typeof TransferIntent>;
1492
1499
  /** Authoritative Project-facing state of an account opening. */
1493
1500
  export declare const AccountOpeningIntent: v.SchemaWithPipe<readonly [v.ObjectSchema<{
1494
1501
  readonly type: v.LiteralSchema<"account_opening", undefined>;
1495
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
1502
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
1496
1503
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
1497
1504
  readonly account: v.StrictObjectSchema<{
1498
1505
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -1502,22 +1509,22 @@ export declare const AccountOpeningIntent: v.SchemaWithPipe<readonly [v.ObjectSc
1502
1509
  }, undefined>;
1503
1510
  readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
1504
1511
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
1505
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1506
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1507
1512
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1508
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
1513
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
1509
1514
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1510
1515
  }, undefined>, v.DescriptionAction<{
1511
1516
  value: string;
1512
1517
  editable: boolean;
1513
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
1518
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
1519
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1520
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1514
1521
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
1515
1522
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1516
1523
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1517
1524
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1518
1525
  }, undefined>, v.DescriptionAction<{
1519
1526
  type: "account_opening";
1520
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
1527
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
1521
1528
  signed: boolean;
1522
1529
  account: {
1523
1530
  accountKey: string;
@@ -1527,12 +1534,12 @@ export declare const AccountOpeningIntent: v.SchemaWithPipe<readonly [v.ObjectSc
1527
1534
  };
1528
1535
  expires_at: string | null;
1529
1536
  expires_in_seconds: number | null;
1530
- id: string;
1531
- resource_server: string;
1532
1537
  note?: {
1533
1538
  value: string;
1534
1539
  editable: boolean;
1535
1540
  } | undefined;
1541
+ id: string;
1542
+ resource_server: string;
1536
1543
  metadata: {
1537
1544
  [x: string]: unknown;
1538
1545
  };
@@ -1545,7 +1552,7 @@ export type AccountOpeningIntent = v.InferOutput<typeof AccountOpeningIntent>;
1545
1552
  /** Authoritative Project-facing state of an account closure. */
1546
1553
  export declare const AccountClosureIntent: v.SchemaWithPipe<readonly [v.ObjectSchema<{
1547
1554
  readonly type: v.LiteralSchema<"account_closure", undefined>;
1548
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
1555
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
1549
1556
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
1550
1557
  readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1551
1558
  type: v.LiteralSchema<"account_key", undefined>;
@@ -1553,38 +1560,38 @@ export declare const AccountClosureIntent: v.SchemaWithPipe<readonly [v.ObjectSc
1553
1560
  }, undefined>, v.DescriptionAction<{
1554
1561
  type: "account_key";
1555
1562
  accountKey: string;
1556
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1563
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1557
1564
  type: v.LiteralSchema<"account", undefined>;
1558
1565
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1559
1566
  }, undefined>, v.DescriptionAction<{
1560
1567
  type: "account";
1561
1568
  id: string;
1562
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1569
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1563
1570
  type: "account_key";
1564
1571
  accountKey: string;
1565
1572
  } | {
1566
1573
  type: "account";
1567
1574
  id: string;
1568
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
1575
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
1569
1576
  readonly resolved_account_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The account the reference resolved to, once resolution has happened, whether or not the closure itself has settled yet.">]>;
1570
1577
  readonly expires_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1571
1578
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.DescriptionAction<number, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
1572
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1573
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1574
1579
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1575
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
1580
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
1576
1581
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1577
1582
  }, undefined>, v.DescriptionAction<{
1578
1583
  value: string;
1579
1584
  editable: boolean;
1580
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
1585
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
1586
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1587
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1581
1588
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
1582
1589
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1583
1590
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1584
1591
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1585
1592
  }, undefined>, v.DescriptionAction<{
1586
1593
  type: "account_closure";
1587
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
1594
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
1588
1595
  signed: boolean;
1589
1596
  account: {
1590
1597
  type: "account_key";
@@ -1596,12 +1603,12 @@ export declare const AccountClosureIntent: v.SchemaWithPipe<readonly [v.ObjectSc
1596
1603
  resolved_account_id: string | null;
1597
1604
  expires_at: string;
1598
1605
  expires_in_seconds: number;
1599
- id: string;
1600
- resource_server: string;
1601
1606
  note?: {
1602
1607
  value: string;
1603
1608
  editable: boolean;
1604
1609
  } | undefined;
1610
+ id: string;
1611
+ resource_server: string;
1605
1612
  metadata: {
1606
1613
  [x: string]: unknown;
1607
1614
  };
@@ -1647,7 +1654,7 @@ export declare const Intent: v.VariantSchema<"type", [v.ObjectSchema<{
1647
1654
  account_type: "checking" | "debit" | "savings";
1648
1655
  holder_id: string | null;
1649
1656
  holder_name: string;
1650
- }, "The Andco account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
1657
+ }, "The AndCo account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
1651
1658
  readonly amount: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1652
1659
  readonly currency: v.LiteralSchema<"CLP", undefined>;
1653
1660
  readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
@@ -1671,8 +1678,8 @@ export declare const Intent: v.VariantSchema<"type", [v.ObjectSchema<{
1671
1678
  readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1672
1679
  readonly outcome: v.PicklistSchema<["credited", "reversed"], undefined>;
1673
1680
  readonly receipt_time_source: v.PicklistSchema<["bank_timestamp", "unknown"], undefined>;
1674
- readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as the bank reported it.">]>;
1675
- readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as the bank reported it.">]>;
1681
+ readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as AndCo reported it.">]>;
1682
+ readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as AndCo reported it.">]>;
1676
1683
  readonly sender_bank_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Display name of the sender's bank.">]>;
1677
1684
  readonly sender_account_type: v.NullableSchema<v.PicklistSchema<["checking", "debit", "savings"], undefined>, undefined>;
1678
1685
  readonly sender_account_number: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
@@ -1686,49 +1693,49 @@ export declare const Intent: v.VariantSchema<"type", [v.ObjectSchema<{
1686
1693
  }, undefined>;
1687
1694
  readonly expires_at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
1688
1695
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
1689
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1690
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1691
1696
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1692
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
1697
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
1693
1698
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1694
1699
  }, undefined>, v.DescriptionAction<{
1695
1700
  value: string;
1696
1701
  editable: boolean;
1697
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
1702
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
1703
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1704
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1698
1705
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
1699
1706
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1700
1707
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1701
1708
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1702
1709
  }, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
1703
1710
  readonly type: v.LiteralSchema<"transfer", undefined>;
1704
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
1711
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
1705
1712
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
1706
- readonly source: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1713
+ readonly sender: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1707
1714
  type: v.LiteralSchema<"account_key", undefined>;
1708
1715
  accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1709
1716
  }, undefined>, v.DescriptionAction<{
1710
1717
  type: "account_key";
1711
1718
  accountKey: string;
1712
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1719
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1713
1720
  type: v.LiteralSchema<"account", undefined>;
1714
1721
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1715
1722
  }, undefined>, v.DescriptionAction<{
1716
1723
  type: "account";
1717
1724
  id: string;
1718
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1725
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1719
1726
  type: "account_key";
1720
1727
  accountKey: string;
1721
1728
  } | {
1722
1729
  type: "account";
1723
1730
  id: string;
1724
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
1731
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
1725
1732
  type: "account_key";
1726
1733
  accountKey: string;
1727
1734
  } | {
1728
1735
  type: "account";
1729
1736
  id: string;
1730
- } | null, "Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
1731
- readonly destination: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
1737
+ } | null, "The Remitente. Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
1738
+ readonly receiver: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
1732
1739
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
1733
1740
  readonly type: v.LiteralSchema<"account_key", undefined>;
1734
1741
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -1739,11 +1746,13 @@ export declare const Intent: v.VariantSchema<"type", [v.ObjectSchema<{
1739
1746
  }, undefined>, v.StrictObjectSchema<{
1740
1747
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
1741
1748
  readonly type: v.LiteralSchema<"external", undefined>;
1742
- readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1743
- readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
1744
- readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1745
- readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1746
- readonly holder_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
1749
+ readonly country: v.LiteralSchema<"CL", undefined>;
1750
+ readonly bank_code: 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`.">]>;
1751
+ readonly account_type: 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).">]>;
1752
+ readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1753
+ readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
1754
+ readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
1755
+ readonly national_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, v.DescriptionAction<string, "The holder's RUT.">]>;
1747
1756
  }, undefined>], undefined>, v.DescriptionAction<{
1748
1757
  editable: false;
1749
1758
  type: "account_key";
@@ -1755,12 +1764,14 @@ export declare const Intent: v.VariantSchema<"type", [v.ObjectSchema<{
1755
1764
  } | {
1756
1765
  editable: false;
1757
1766
  type: "external";
1758
- bank_id: string;
1759
- account_type: "checking" | "debit" | "savings";
1760
- account_id: string;
1761
- holder_id: string;
1762
- holder_name: string;
1763
- }, "Where a transfer's money lands when it is named, in the request and in the answered Intent alike. A named destination is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `destination: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a destination the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
1767
+ country: "CL";
1768
+ bank_code: string;
1769
+ account_type: "10" | "20" | "40";
1770
+ account_number: string;
1771
+ name: string;
1772
+ national_kind_id: "RUT";
1773
+ national_id: string;
1774
+ }, "The Receptor of a transfer when it is named, in the request and in the answered Intent alike. A named Receptor is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `receiver: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a Receptor the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
1764
1775
  editable: false;
1765
1776
  type: "account_key";
1766
1777
  accountKey: string;
@@ -1771,64 +1782,66 @@ export declare const Intent: v.VariantSchema<"type", [v.ObjectSchema<{
1771
1782
  } | {
1772
1783
  editable: false;
1773
1784
  type: "external";
1774
- bank_id: string;
1775
- account_type: "checking" | "debit" | "savings";
1776
- account_id: string;
1777
- holder_id: string;
1778
- holder_name: string;
1779
- } | null, "Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
1785
+ country: "CL";
1786
+ bank_code: string;
1787
+ account_type: "10" | "20" | "40";
1788
+ account_number: string;
1789
+ name: string;
1790
+ national_kind_id: "RUT";
1791
+ national_id: string;
1792
+ } | null, "The Receptor. Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
1793
+ readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1794
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty one is allowed.">]>;
1795
+ readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1796
+ }, undefined>, v.DescriptionAction<{
1797
+ value: string;
1798
+ editable: boolean;
1799
+ }, "The comment a transfer asks for, as Core's `comment`: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
1780
1800
  readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1781
1801
  readonly currency: v.LiteralSchema<"CLP", undefined>;
1782
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
1802
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "Immutable amount from the creation request, in the minor unit of the currency.">]>;
1783
1803
  readonly editable: v.BooleanSchema<undefined>;
1784
- readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
1804
+ readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>, undefined>, v.DescriptionAction<number | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
1785
1805
  }, undefined>, v.DescriptionAction<{
1786
1806
  currency: "CLP";
1787
- value: string;
1807
+ value: number;
1788
1808
  editable: boolean;
1789
- confirmed: string | null;
1790
- }, "The amount a transfer orders, as it is answered. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
1809
+ confirmed: number | null;
1810
+ }, "The amount a transfer orders, as it is answered: integers in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
1791
1811
  readonly settled: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1792
1812
  readonly currency: v.LiteralSchema<"CLP", undefined>;
1793
- readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1813
+ readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>;
1794
1814
  readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1795
1815
  }, undefined>, v.DescriptionAction<{
1796
1816
  currency: "CLP";
1797
- value: string;
1817
+ value: number;
1798
1818
  at: string;
1799
1819
  }, "The money a transfer actually moved and when it settled. Present only once the transfer `succeeded`; null before, and null for ever when it fails, is rejected, cancelled or expires.">]>, undefined>;
1800
1820
  readonly fee: v.StrictObjectSchema<{
1801
1821
  readonly currency: v.LiteralSchema<"CLP", undefined>;
1802
1822
  readonly amount: v.LiteralSchema<"0", undefined>;
1803
1823
  }, undefined>;
1804
- readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and the bank asks the person to confirm it at `authorization_url` with their web PIN and an SMS code; the Intent becomes `processing.confirmed` only when the bank accepts it. A transfer created with `destination: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
1824
+ readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and AndCo asks the person to authorize it at `authorization_url` with their web AndPass and an SMS code; the Intent becomes `processing.confirmed` only when AndCo accepts it. A transfer created with `receiver: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
1805
1825
  readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
1806
1826
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
1807
1827
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1808
1828
  readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1809
- readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1810
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
1811
- readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1812
- }, undefined>, v.DescriptionAction<{
1813
- value: string;
1814
- editable: boolean;
1815
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
1816
1829
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
1817
1830
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1818
1831
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1819
1832
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1820
1833
  }, undefined>, v.DescriptionAction<{
1821
1834
  type: "transfer";
1822
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
1835
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
1823
1836
  signed: boolean;
1824
- source: {
1837
+ sender: {
1825
1838
  type: "account_key";
1826
1839
  accountKey: string;
1827
1840
  } | {
1828
1841
  type: "account";
1829
1842
  id: string;
1830
1843
  } | null;
1831
- destination: {
1844
+ receiver: {
1832
1845
  editable: false;
1833
1846
  type: "account_key";
1834
1847
  accountKey: string;
@@ -1839,21 +1852,27 @@ export declare const Intent: v.VariantSchema<"type", [v.ObjectSchema<{
1839
1852
  } | {
1840
1853
  editable: false;
1841
1854
  type: "external";
1842
- bank_id: string;
1843
- account_type: "checking" | "debit" | "savings";
1844
- account_id: string;
1845
- holder_id: string;
1846
- holder_name: string;
1855
+ country: "CL";
1856
+ bank_code: string;
1857
+ account_type: "10" | "20" | "40";
1858
+ account_number: string;
1859
+ name: string;
1860
+ national_kind_id: "RUT";
1861
+ national_id: string;
1847
1862
  } | null;
1863
+ comment?: {
1864
+ value: string;
1865
+ editable: boolean;
1866
+ } | undefined;
1848
1867
  amount: {
1849
1868
  currency: "CLP";
1850
- value: string;
1869
+ value: number;
1851
1870
  editable: boolean;
1852
- confirmed: string | null;
1871
+ confirmed: number | null;
1853
1872
  };
1854
1873
  settled: {
1855
1874
  currency: "CLP";
1856
- value: string;
1875
+ value: number;
1857
1876
  at: string;
1858
1877
  } | null;
1859
1878
  fee: {
@@ -1865,19 +1884,15 @@ export declare const Intent: v.VariantSchema<"type", [v.ObjectSchema<{
1865
1884
  expires_in_seconds: number | null;
1866
1885
  id: string;
1867
1886
  resource_server: string;
1868
- note?: {
1869
- value: string;
1870
- editable: boolean;
1871
- } | undefined;
1872
1887
  metadata: {
1873
1888
  [x: string]: unknown;
1874
1889
  };
1875
1890
  server_time: string;
1876
1891
  created_at: string;
1877
1892
  authorization_url: string;
1878
- }, "Authoritative Project-facing state of a transfer. `source` and `destination` answer in the same matcher vocabulary as the request. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
1893
+ }, "Authoritative Project-facing state of a transfer, in Core's vocabulary (ADR 0093). `sender` and `receiver` answer in the same matcher vocabulary as the request, and `comment` is the request's comment. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
1879
1894
  readonly type: v.LiteralSchema<"account_opening", undefined>;
1880
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
1895
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
1881
1896
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
1882
1897
  readonly account: v.StrictObjectSchema<{
1883
1898
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -1887,22 +1902,22 @@ export declare const Intent: v.VariantSchema<"type", [v.ObjectSchema<{
1887
1902
  }, undefined>;
1888
1903
  readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
1889
1904
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
1890
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1891
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1892
1905
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1893
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
1906
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
1894
1907
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1895
1908
  }, undefined>, v.DescriptionAction<{
1896
1909
  value: string;
1897
1910
  editable: boolean;
1898
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
1911
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
1912
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1913
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1899
1914
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
1900
1915
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1901
1916
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1902
1917
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1903
1918
  }, undefined>, v.DescriptionAction<{
1904
1919
  type: "account_opening";
1905
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
1920
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
1906
1921
  signed: boolean;
1907
1922
  account: {
1908
1923
  accountKey: string;
@@ -1912,12 +1927,12 @@ export declare const Intent: v.VariantSchema<"type", [v.ObjectSchema<{
1912
1927
  };
1913
1928
  expires_at: string | null;
1914
1929
  expires_in_seconds: number | null;
1915
- id: string;
1916
- resource_server: string;
1917
1930
  note?: {
1918
1931
  value: string;
1919
1932
  editable: boolean;
1920
1933
  } | undefined;
1934
+ id: string;
1935
+ resource_server: string;
1921
1936
  metadata: {
1922
1937
  [x: string]: unknown;
1923
1938
  };
@@ -1926,7 +1941,7 @@ export declare const Intent: v.VariantSchema<"type", [v.ObjectSchema<{
1926
1941
  authorization_url: string;
1927
1942
  }, "Authoritative Project-facing state of an account opening. It carries no amount and no fee: an opening moves no money. Opening is asynchronous, so `account.bank_account_id` is absent until the core assigns the Número de Cuenta, which arrives on the account's own event stream rather than in this response.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
1928
1943
  readonly type: v.LiteralSchema<"account_closure", undefined>;
1929
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
1944
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
1930
1945
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
1931
1946
  readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1932
1947
  type: v.LiteralSchema<"account_key", undefined>;
@@ -1934,38 +1949,38 @@ export declare const Intent: v.VariantSchema<"type", [v.ObjectSchema<{
1934
1949
  }, undefined>, v.DescriptionAction<{
1935
1950
  type: "account_key";
1936
1951
  accountKey: string;
1937
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1952
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1938
1953
  type: v.LiteralSchema<"account", undefined>;
1939
1954
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1940
1955
  }, undefined>, v.DescriptionAction<{
1941
1956
  type: "account";
1942
1957
  id: string;
1943
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1958
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
1944
1959
  type: "account_key";
1945
1960
  accountKey: string;
1946
1961
  } | {
1947
1962
  type: "account";
1948
1963
  id: string;
1949
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
1964
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
1950
1965
  readonly resolved_account_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The account the reference resolved to, once resolution has happened, whether or not the closure itself has settled yet.">]>;
1951
1966
  readonly expires_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1952
1967
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.DescriptionAction<number, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
1953
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1954
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1955
1968
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
1956
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
1969
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
1957
1970
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
1958
1971
  }, undefined>, v.DescriptionAction<{
1959
1972
  value: string;
1960
1973
  editable: boolean;
1961
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
1974
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
1975
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1976
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1962
1977
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
1963
1978
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1964
1979
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
1965
1980
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
1966
1981
  }, undefined>, v.DescriptionAction<{
1967
1982
  type: "account_closure";
1968
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
1983
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
1969
1984
  signed: boolean;
1970
1985
  account: {
1971
1986
  type: "account_key";
@@ -1977,12 +1992,12 @@ export declare const Intent: v.VariantSchema<"type", [v.ObjectSchema<{
1977
1992
  resolved_account_id: string | null;
1978
1993
  expires_at: string;
1979
1994
  expires_in_seconds: number;
1980
- id: string;
1981
- resource_server: string;
1982
1995
  note?: {
1983
1996
  value: string;
1984
1997
  editable: boolean;
1985
1998
  } | undefined;
1999
+ id: string;
2000
+ resource_server: string;
1986
2001
  metadata: {
1987
2002
  [x: string]: unknown;
1988
2003
  };
@@ -2017,19 +2032,19 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2017
2032
  }, undefined>, v.DescriptionAction<{
2018
2033
  type: "account_key";
2019
2034
  accountKey: string;
2020
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2035
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2021
2036
  type: v.LiteralSchema<"account", undefined>;
2022
2037
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2023
2038
  }, undefined>, v.DescriptionAction<{
2024
2039
  type: "account";
2025
2040
  id: string;
2026
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
2041
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
2027
2042
  type: "account_key";
2028
2043
  accountKey: string;
2029
2044
  } | {
2030
2045
  type: "account";
2031
2046
  id: string;
2032
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
2047
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
2033
2048
  type: "account_key";
2034
2049
  accountKey: string;
2035
2050
  } | {
@@ -2046,12 +2061,12 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2046
2061
  editable: boolean;
2047
2062
  }, "The amount a deposit asks for. `editable: true` lets the payer change it on the screen. It is never what moved: a deposit answers that in `progress.credited`.">]>, undefined>;
2048
2063
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2049
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
2064
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
2050
2065
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
2051
2066
  }, undefined>, v.DescriptionAction<{
2052
2067
  value: string;
2053
2068
  editable: boolean;
2054
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
2069
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
2055
2070
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
2056
2071
  } & {
2057
2072
  readonly expires_in: v.StringSchema<undefined>;
@@ -2064,19 +2079,19 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2064
2079
  }, undefined>, v.DescriptionAction<{
2065
2080
  type: "account_key";
2066
2081
  accountKey: string;
2067
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2082
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2068
2083
  type: v.LiteralSchema<"account", undefined>;
2069
2084
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2070
2085
  }, undefined>, v.DescriptionAction<{
2071
2086
  type: "account";
2072
2087
  id: string;
2073
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
2088
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
2074
2089
  type: "account_key";
2075
2090
  accountKey: string;
2076
2091
  } | {
2077
2092
  type: "account";
2078
2093
  id: string;
2079
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
2094
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
2080
2095
  type: "account_key";
2081
2096
  accountKey: string;
2082
2097
  } | {
@@ -2093,12 +2108,12 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2093
2108
  editable: boolean;
2094
2109
  }, "The amount a deposit asks for. `editable: true` lets the payer change it on the screen. It is never what moved: a deposit answers that in `progress.credited`.">]>, undefined>;
2095
2110
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2096
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
2111
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
2097
2112
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
2098
2113
  }, undefined>, v.DescriptionAction<{
2099
2114
  value: string;
2100
2115
  editable: boolean;
2101
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
2116
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
2102
2117
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
2103
2118
  } & {
2104
2119
  readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
@@ -2150,42 +2165,43 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2150
2165
  expires_in?: undefined;
2151
2166
  expires_at: string | null;
2152
2167
  }, "The `application/json` half of collecting money into an account of the Grant's subject: an Intent born waiting for a payer. Exactly one of `expires_in` and `expires_at`; `expires_at: null` (never expires) only when `amount` is omitted.">]>, v.SchemaWithPipe<readonly [v.VariantSchema<"expires_in", [v.StrictObjectSchema<{
2168
+ readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
2153
2169
  readonly type: v.LiteralSchema<"transfer", undefined>;
2154
2170
  readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2155
2171
  readonly currency: v.LiteralSchema<"CLP", undefined>;
2156
- readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
2172
+ readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>;
2157
2173
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
2158
2174
  }, undefined>, v.DescriptionAction<{
2159
2175
  currency: "CLP";
2160
- value: string;
2176
+ value: number;
2161
2177
  editable: boolean;
2162
- }, "The amount a transfer proposes. `editable: true` lets the person who confirms set the amount on Andco's confirmation screen, and `value` is the initial proposal shown there; the amount must fall within the Grant's `transactions.minimum` and `transactions.maximum` and not exceed the available balance. Without `editable` (or with `false`) the amount is locked. What moved is `settled`.">]>;
2163
- readonly source: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2178
+ }, "The amount a transfer proposes: `value` is an integer in the minor unit of the currency (CLP: whole pesos), at most 2147483647 (int4, as Core stores it). `editable: true` lets the person who confirms set the amount on AndCo's confirmation screen, and `value` is the initial proposal shown there; the amount must fall within the Grant's `transactions.minimum` and `transactions.maximum` and not exceed the balance. Without `editable` (or with `false`) the amount is locked. What moved is `settled`.">]>;
2179
+ readonly sender: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2164
2180
  type: v.LiteralSchema<"account_key", undefined>;
2165
2181
  accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
2166
2182
  }, undefined>, v.DescriptionAction<{
2167
2183
  type: "account_key";
2168
2184
  accountKey: string;
2169
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2185
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2170
2186
  type: v.LiteralSchema<"account", undefined>;
2171
2187
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2172
2188
  }, undefined>, v.DescriptionAction<{
2173
2189
  type: "account";
2174
2190
  id: string;
2175
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
2191
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
2176
2192
  type: "account_key";
2177
2193
  accountKey: string;
2178
2194
  } | {
2179
2195
  type: "account";
2180
2196
  id: string;
2181
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, null>, v.DescriptionAction<{
2197
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, null>, v.DescriptionAction<{
2182
2198
  type: "account_key";
2183
2199
  accountKey: string;
2184
2200
  } | {
2185
2201
  type: "account";
2186
2202
  id: string;
2187
- } | null, "The Andco account the money leaves. Null leaves that choice to a person on a screen.">]>;
2188
- readonly destination: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
2203
+ } | null, "The Remitente: the AndCo account the money leaves. Null leaves that choice to a person on a screen.">]>;
2204
+ readonly receiver: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
2189
2205
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
2190
2206
  readonly type: v.LiteralSchema<"account_key", undefined>;
2191
2207
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -2196,11 +2212,13 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2196
2212
  }, undefined>, v.StrictObjectSchema<{
2197
2213
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
2198
2214
  readonly type: v.LiteralSchema<"external", undefined>;
2199
- readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
2200
- readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
2201
- readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
2202
- readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
2203
- readonly holder_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
2215
+ readonly country: v.LiteralSchema<"CL", undefined>;
2216
+ readonly bank_code: 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`.">]>;
2217
+ readonly account_type: 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).">]>;
2218
+ readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
2219
+ readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
2220
+ readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
2221
+ readonly national_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, v.DescriptionAction<string, "The holder's RUT.">]>;
2204
2222
  }, undefined>], undefined>, v.DescriptionAction<{
2205
2223
  editable: false;
2206
2224
  type: "account_key";
@@ -2212,12 +2230,14 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2212
2230
  } | {
2213
2231
  editable: false;
2214
2232
  type: "external";
2215
- bank_id: string;
2216
- account_type: "checking" | "debit" | "savings";
2217
- account_id: string;
2218
- holder_id: string;
2219
- holder_name: string;
2220
- }, "Where a transfer's money lands when it is named, in the request and in the answered Intent alike. A named destination is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `destination: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a destination the person completed on the screen, which is locked once she confirms.">]>, undefined>, null>, v.DescriptionAction<{
2233
+ country: "CL";
2234
+ bank_code: string;
2235
+ account_type: "10" | "20" | "40";
2236
+ account_number: string;
2237
+ name: string;
2238
+ national_kind_id: "RUT";
2239
+ national_id: string;
2240
+ }, "The Receptor of a transfer when it is named, in the request and in the answered Intent alike. A named Receptor is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `receiver: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a Receptor the person completed on the screen, which is locked once she confirms.">]>, undefined>, null>, v.DescriptionAction<{
2221
2241
  editable: false;
2222
2242
  type: "account_key";
2223
2243
  accountKey: string;
@@ -2228,60 +2248,62 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2228
2248
  } | {
2229
2249
  editable: false;
2230
2250
  type: "external";
2231
- bank_id: string;
2232
- account_type: "checking" | "debit" | "savings";
2233
- account_id: string;
2234
- holder_id: string;
2235
- holder_name: string;
2236
- } | null, "Where the money lands. Null leaves it to a person on the screen, within the Grant's destinations.">]>;
2237
- readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2238
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
2251
+ country: "CL";
2252
+ bank_code: string;
2253
+ account_type: "10" | "20" | "40";
2254
+ account_number: string;
2255
+ name: string;
2256
+ national_kind_id: "RUT";
2257
+ national_id: string;
2258
+ } | null, "The Receptor: where the money lands. Null leaves it to a person on the screen, within the Grant's destinations.">]>;
2259
+ readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2260
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty one is allowed.">]>;
2239
2261
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
2240
2262
  }, undefined>, v.DescriptionAction<{
2241
2263
  value: string;
2242
2264
  editable: boolean;
2243
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
2244
- readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
2265
+ }, "The comment a transfer asks for, as Core's `comment`: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
2245
2266
  } & {
2246
2267
  readonly expires_in: v.StringSchema<undefined>;
2247
2268
  readonly expires_at: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
2248
2269
  }, undefined>, v.StrictObjectSchema<{
2270
+ readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
2249
2271
  readonly type: v.LiteralSchema<"transfer", undefined>;
2250
2272
  readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2251
2273
  readonly currency: v.LiteralSchema<"CLP", undefined>;
2252
- readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
2274
+ readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>;
2253
2275
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
2254
2276
  }, undefined>, v.DescriptionAction<{
2255
2277
  currency: "CLP";
2256
- value: string;
2278
+ value: number;
2257
2279
  editable: boolean;
2258
- }, "The amount a transfer proposes. `editable: true` lets the person who confirms set the amount on Andco's confirmation screen, and `value` is the initial proposal shown there; the amount must fall within the Grant's `transactions.minimum` and `transactions.maximum` and not exceed the available balance. Without `editable` (or with `false`) the amount is locked. What moved is `settled`.">]>;
2259
- readonly source: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2280
+ }, "The amount a transfer proposes: `value` is an integer in the minor unit of the currency (CLP: whole pesos), at most 2147483647 (int4, as Core stores it). `editable: true` lets the person who confirms set the amount on AndCo's confirmation screen, and `value` is the initial proposal shown there; the amount must fall within the Grant's `transactions.minimum` and `transactions.maximum` and not exceed the balance. Without `editable` (or with `false`) the amount is locked. What moved is `settled`.">]>;
2281
+ readonly sender: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2260
2282
  type: v.LiteralSchema<"account_key", undefined>;
2261
2283
  accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
2262
2284
  }, undefined>, v.DescriptionAction<{
2263
2285
  type: "account_key";
2264
2286
  accountKey: string;
2265
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2287
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2266
2288
  type: v.LiteralSchema<"account", undefined>;
2267
2289
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2268
2290
  }, undefined>, v.DescriptionAction<{
2269
2291
  type: "account";
2270
2292
  id: string;
2271
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
2293
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
2272
2294
  type: "account_key";
2273
2295
  accountKey: string;
2274
2296
  } | {
2275
2297
  type: "account";
2276
2298
  id: string;
2277
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, null>, v.DescriptionAction<{
2299
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, null>, v.DescriptionAction<{
2278
2300
  type: "account_key";
2279
2301
  accountKey: string;
2280
2302
  } | {
2281
2303
  type: "account";
2282
2304
  id: string;
2283
- } | null, "The Andco account the money leaves. Null leaves that choice to a person on a screen.">]>;
2284
- readonly destination: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
2305
+ } | null, "The Remitente: the AndCo account the money leaves. Null leaves that choice to a person on a screen.">]>;
2306
+ readonly receiver: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
2285
2307
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
2286
2308
  readonly type: v.LiteralSchema<"account_key", undefined>;
2287
2309
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -2292,11 +2314,13 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2292
2314
  }, undefined>, v.StrictObjectSchema<{
2293
2315
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
2294
2316
  readonly type: v.LiteralSchema<"external", undefined>;
2295
- readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
2296
- readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
2297
- readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
2298
- readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
2299
- readonly holder_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
2317
+ readonly country: v.LiteralSchema<"CL", undefined>;
2318
+ readonly bank_code: 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`.">]>;
2319
+ readonly account_type: 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).">]>;
2320
+ readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
2321
+ readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
2322
+ readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
2323
+ readonly national_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, v.DescriptionAction<string, "The holder's RUT.">]>;
2300
2324
  }, undefined>], undefined>, v.DescriptionAction<{
2301
2325
  editable: false;
2302
2326
  type: "account_key";
@@ -2308,12 +2332,14 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2308
2332
  } | {
2309
2333
  editable: false;
2310
2334
  type: "external";
2311
- bank_id: string;
2312
- account_type: "checking" | "debit" | "savings";
2313
- account_id: string;
2314
- holder_id: string;
2315
- holder_name: string;
2316
- }, "Where a transfer's money lands when it is named, in the request and in the answered Intent alike. A named destination is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `destination: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a destination the person completed on the screen, which is locked once she confirms.">]>, undefined>, null>, v.DescriptionAction<{
2335
+ country: "CL";
2336
+ bank_code: string;
2337
+ account_type: "10" | "20" | "40";
2338
+ account_number: string;
2339
+ name: string;
2340
+ national_kind_id: "RUT";
2341
+ national_id: string;
2342
+ }, "The Receptor of a transfer when it is named, in the request and in the answered Intent alike. A named Receptor is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `receiver: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a Receptor the person completed on the screen, which is locked once she confirms.">]>, undefined>, null>, v.DescriptionAction<{
2317
2343
  editable: false;
2318
2344
  type: "account_key";
2319
2345
  accountKey: string;
@@ -2324,38 +2350,42 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2324
2350
  } | {
2325
2351
  editable: false;
2326
2352
  type: "external";
2327
- bank_id: string;
2328
- account_type: "checking" | "debit" | "savings";
2329
- account_id: string;
2330
- holder_id: string;
2331
- holder_name: string;
2332
- } | null, "Where the money lands. Null leaves it to a person on the screen, within the Grant's destinations.">]>;
2333
- readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2334
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
2353
+ country: "CL";
2354
+ bank_code: string;
2355
+ account_type: "10" | "20" | "40";
2356
+ account_number: string;
2357
+ name: string;
2358
+ national_kind_id: "RUT";
2359
+ national_id: string;
2360
+ } | null, "The Receptor: where the money lands. Null leaves it to a person on the screen, within the Grant's destinations.">]>;
2361
+ readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2362
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty one is allowed.">]>;
2335
2363
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
2336
2364
  }, undefined>, v.DescriptionAction<{
2337
2365
  value: string;
2338
2366
  editable: boolean;
2339
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
2340
- readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
2367
+ }, "The comment a transfer asks for, as Core's `comment`: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
2341
2368
  } & {
2342
2369
  readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
2343
2370
  readonly expires_at: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2344
2371
  }, undefined>], undefined>, v.DescriptionAction<{
2372
+ metadata: {
2373
+ [x: string]: unknown;
2374
+ };
2345
2375
  type: "transfer";
2346
2376
  amount: {
2347
2377
  currency: "CLP";
2348
- value: string;
2378
+ value: number;
2349
2379
  editable: boolean;
2350
2380
  };
2351
- source: {
2381
+ sender: {
2352
2382
  type: "account_key";
2353
2383
  accountKey: string;
2354
2384
  } | {
2355
2385
  type: "account";
2356
2386
  id: string;
2357
2387
  } | null;
2358
- destination: {
2388
+ receiver: {
2359
2389
  editable: false;
2360
2390
  type: "account_key";
2361
2391
  accountKey: string;
@@ -2366,36 +2396,38 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2366
2396
  } | {
2367
2397
  editable: false;
2368
2398
  type: "external";
2369
- bank_id: string;
2370
- account_type: "checking" | "debit" | "savings";
2371
- account_id: string;
2372
- holder_id: string;
2373
- holder_name: string;
2399
+ country: "CL";
2400
+ bank_code: string;
2401
+ account_type: "10" | "20" | "40";
2402
+ account_number: string;
2403
+ name: string;
2404
+ national_kind_id: "RUT";
2405
+ national_id: string;
2374
2406
  } | null;
2375
- note?: {
2407
+ comment?: {
2376
2408
  value: string;
2377
2409
  editable: boolean;
2378
2410
  } | undefined;
2379
- metadata: {
2380
- [x: string]: unknown;
2381
- };
2382
2411
  expires_in: string;
2383
2412
  expires_at?: undefined;
2384
2413
  } | {
2414
+ metadata: {
2415
+ [x: string]: unknown;
2416
+ };
2385
2417
  type: "transfer";
2386
2418
  amount: {
2387
2419
  currency: "CLP";
2388
- value: string;
2420
+ value: number;
2389
2421
  editable: boolean;
2390
2422
  };
2391
- source: {
2423
+ sender: {
2392
2424
  type: "account_key";
2393
2425
  accountKey: string;
2394
2426
  } | {
2395
2427
  type: "account";
2396
2428
  id: string;
2397
2429
  } | null;
2398
- destination: {
2430
+ receiver: {
2399
2431
  editable: false;
2400
2432
  type: "account_key";
2401
2433
  accountKey: string;
@@ -2406,33 +2438,32 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2406
2438
  } | {
2407
2439
  editable: false;
2408
2440
  type: "external";
2409
- bank_id: string;
2410
- account_type: "checking" | "debit" | "savings";
2411
- account_id: string;
2412
- holder_id: string;
2413
- holder_name: string;
2441
+ country: "CL";
2442
+ bank_code: string;
2443
+ account_type: "10" | "20" | "40";
2444
+ account_number: string;
2445
+ name: string;
2446
+ national_kind_id: "RUT";
2447
+ national_id: string;
2414
2448
  } | null;
2415
- note?: {
2449
+ comment?: {
2416
2450
  value: string;
2417
2451
  editable: boolean;
2418
2452
  } | undefined;
2419
- metadata: {
2420
- [x: string]: unknown;
2421
- };
2422
2453
  expires_in?: undefined;
2423
2454
  expires_at: string | null;
2424
- }, "The `application/json` half of creating a transfer: an Intent born waiting for an Approval. A null `source` is the confirmation screen, where a person picks the account the money leaves from among the Grant's sources, and a null `destination` is the screen too: the person completes where the money goes (the bank, the type and number of the account, and its holder's RUT and name), and the server checks what she wrote against the Grant's `destinations` when she confirms, refusing one outside them with `invalid_destination`. Both default to null when omitted. A destination the request names is locked on the screen (`editable: true` is an `invalid_request`), and the amount is too unless `amount.editable` is true, in which case the person sets it. The `application/jwt` half is `SignedTransferIntentClaims`, and the two are separate schemas rather than one with optional fields on purpose: when signed and unsigned members share an object, something eventually reads the wrong ones.">]>, v.SchemaWithPipe<readonly [v.VariantSchema<"expires_in", [v.StrictObjectSchema<{
2455
+ }, "The `application/json` half of creating a transfer: an Intent born waiting for an Approval, in Core's vocabulary (ADR 0093): `sender`, `receiver`, an integer `amount.value` and a `comment` of at most 60 bytes. A null `sender` is the confirmation screen, where a person picks the account the money leaves from among the Grant's sources, and a null `receiver` is the screen too: the person completes where the money goes (the bank, the type and number of the account, and its holder's RUT and name), and the server checks what she wrote against the Grant's `destinations` when she confirms, refusing one outside them with `invalid_destination`. Both default to null when omitted. A Receptor the request names is locked on the screen (`editable: true` is an `invalid_request`), and the amount is too unless `amount.editable` is true, in which case the person sets it. A Receptor at a bank is named in Core's vocabulary (`IntentAccountExternal`). A signed transfer is not an Intent: it is uploaded to `POST /transfers` as a `SignedTransferEnvelope`.">]>, v.SchemaWithPipe<readonly [v.VariantSchema<"expires_in", [v.StrictObjectSchema<{
2425
2456
  readonly type: v.LiteralSchema<"account_opening", undefined>;
2426
2457
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
2427
2458
  readonly name: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "The display label the account opens with. Mutable afterwards, and read by no permission.">]>;
2428
2459
  readonly upsert: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Whether naming an AccountKey that already exists answers with that account instead of failing. It defaults to false, so one name never quietly becomes two accounts.">]>;
2429
2460
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2430
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
2461
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
2431
2462
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
2432
2463
  }, undefined>, v.DescriptionAction<{
2433
2464
  value: string;
2434
2465
  editable: boolean;
2435
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
2466
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
2436
2467
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
2437
2468
  } & {
2438
2469
  readonly expires_in: v.StringSchema<undefined>;
@@ -2443,12 +2474,12 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2443
2474
  readonly name: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "The display label the account opens with. Mutable afterwards, and read by no permission.">]>;
2444
2475
  readonly upsert: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Whether naming an AccountKey that already exists answers with that account instead of failing. It defaults to false, so one name never quietly becomes two accounts.">]>;
2445
2476
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2446
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
2477
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
2447
2478
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
2448
2479
  }, undefined>, v.DescriptionAction<{
2449
2480
  value: string;
2450
2481
  editable: boolean;
2451
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
2482
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
2452
2483
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
2453
2484
  } & {
2454
2485
  readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
@@ -2481,7 +2512,7 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2481
2512
  };
2482
2513
  expires_in?: undefined;
2483
2514
  expires_at: string | null;
2484
- }, "The `application/json` half of opening a Cuenta Vista: an Intent born waiting for an Approval. `/accounts` has no `POST` because everything with banking consequence happens through an Intent, and an opening carries no amount, no source and no destination -- only the name the account will answer to. Opening is asynchronous: the answer is the Intent and its status, and the Número de Cuenta arrives on the account's event stream.">]>, v.SchemaWithPipe<readonly [v.VariantSchema<"expires_in", [v.StrictObjectSchema<{
2515
+ }, "The `application/json` half of opening a cuenta digital: an Intent born waiting for an Approval. `/accounts` has no `POST` because everything that changes an account happens through an Intent, and an opening carries no amount, no source and no destination -- only the name the account will answer to. Opening is asynchronous: the answer is the Intent and its status, and the Número de Cuenta arrives on the account's event stream.">]>, v.SchemaWithPipe<readonly [v.VariantSchema<"expires_in", [v.StrictObjectSchema<{
2485
2516
  readonly type: v.LiteralSchema<"account_closure", undefined>;
2486
2517
  readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2487
2518
  type: v.LiteralSchema<"account_key", undefined>;
@@ -2489,26 +2520,26 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2489
2520
  }, undefined>, v.DescriptionAction<{
2490
2521
  type: "account_key";
2491
2522
  accountKey: string;
2492
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2523
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2493
2524
  type: v.LiteralSchema<"account", undefined>;
2494
2525
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2495
2526
  }, undefined>, v.DescriptionAction<{
2496
2527
  type: "account";
2497
2528
  id: string;
2498
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
2529
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
2499
2530
  type: "account_key";
2500
2531
  accountKey: string;
2501
2532
  } | {
2502
2533
  type: "account";
2503
2534
  id: string;
2504
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
2535
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
2505
2536
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2506
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
2537
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
2507
2538
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
2508
2539
  }, undefined>, v.DescriptionAction<{
2509
2540
  value: string;
2510
2541
  editable: boolean;
2511
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
2542
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
2512
2543
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
2513
2544
  } & {
2514
2545
  readonly expires_in: v.StringSchema<undefined>;
@@ -2521,26 +2552,26 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2521
2552
  }, undefined>, v.DescriptionAction<{
2522
2553
  type: "account_key";
2523
2554
  accountKey: string;
2524
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2555
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2525
2556
  type: v.LiteralSchema<"account", undefined>;
2526
2557
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2527
2558
  }, undefined>, v.DescriptionAction<{
2528
2559
  type: "account";
2529
2560
  id: string;
2530
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
2561
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
2531
2562
  type: "account_key";
2532
2563
  accountKey: string;
2533
2564
  } | {
2534
2565
  type: "account";
2535
2566
  id: string;
2536
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
2567
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
2537
2568
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2538
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
2569
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
2539
2570
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
2540
2571
  }, undefined>, v.DescriptionAction<{
2541
2572
  value: string;
2542
2573
  editable: boolean;
2543
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
2574
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
2544
2575
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
2545
2576
  } & {
2546
2577
  readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
@@ -2581,7 +2612,7 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2581
2612
  };
2582
2613
  expires_in?: undefined;
2583
2614
  expires_at: string;
2584
- }, "The `application/json` half of closing a Cuenta Vista: an Intent born waiting for an Approval. `/accounts` has no `DELETE` because everything with banking consequence happens through an Intent. It carries no amount, no source and no destination -- only a reference to the account it closes.">]>], undefined>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, string>, v.MetadataAction<string, Record<string, unknown>>]>], undefined>;
2615
+ }, "The `application/json` half of closing a cuenta digital: an Intent born waiting for an Approval. `/accounts` has no `DELETE` because everything that changes an account happens through an Intent. It carries no amount, no source and no destination -- only a reference to the account it closes.">]>], undefined>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, string>, v.MetadataAction<string, Record<string, unknown>>]>], undefined>;
2585
2616
  }, undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
2586
2617
  readonly type: v.LiteralSchema<"deposit", undefined>;
2587
2618
  readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "completed", "closed", "expired", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "failed"], undefined>, v.DescriptionAction<"completed" | "closed" | "failed" | "cancelled" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. Read the base, what precedes the first dot, to know whether the Deposit can still change: `requires_action` can, every other base is final. A Grant that ends cancels its waiting Deposits with a detail.">]>;
@@ -2617,7 +2648,7 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2617
2648
  account_type: "checking" | "debit" | "savings";
2618
2649
  holder_id: string | null;
2619
2650
  holder_name: string;
2620
- }, "The Andco account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
2651
+ }, "The AndCo account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
2621
2652
  readonly amount: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2622
2653
  readonly currency: v.LiteralSchema<"CLP", undefined>;
2623
2654
  readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
@@ -2641,8 +2672,8 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2641
2672
  readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2642
2673
  readonly outcome: v.PicklistSchema<["credited", "reversed"], undefined>;
2643
2674
  readonly receipt_time_source: v.PicklistSchema<["bank_timestamp", "unknown"], undefined>;
2644
- readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as the bank reported it.">]>;
2645
- readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as the bank reported it.">]>;
2675
+ readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as AndCo reported it.">]>;
2676
+ readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as AndCo reported it.">]>;
2646
2677
  readonly sender_bank_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Display name of the sender's bank.">]>;
2647
2678
  readonly sender_account_type: v.NullableSchema<v.PicklistSchema<["checking", "debit", "savings"], undefined>, undefined>;
2648
2679
  readonly sender_account_number: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
@@ -2656,49 +2687,49 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2656
2687
  }, undefined>;
2657
2688
  readonly expires_at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
2658
2689
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
2659
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2660
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
2661
2690
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2662
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
2691
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
2663
2692
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
2664
2693
  }, undefined>, v.DescriptionAction<{
2665
2694
  value: string;
2666
2695
  editable: boolean;
2667
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
2696
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
2697
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2698
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
2668
2699
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
2669
2700
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
2670
2701
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
2671
2702
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
2672
2703
  }, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
2673
2704
  readonly type: v.LiteralSchema<"transfer", undefined>;
2674
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
2705
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
2675
2706
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
2676
- readonly source: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2707
+ readonly sender: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2677
2708
  type: v.LiteralSchema<"account_key", undefined>;
2678
2709
  accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
2679
2710
  }, undefined>, v.DescriptionAction<{
2680
2711
  type: "account_key";
2681
2712
  accountKey: string;
2682
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2713
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2683
2714
  type: v.LiteralSchema<"account", undefined>;
2684
2715
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2685
2716
  }, undefined>, v.DescriptionAction<{
2686
2717
  type: "account";
2687
2718
  id: string;
2688
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
2719
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
2689
2720
  type: "account_key";
2690
2721
  accountKey: string;
2691
2722
  } | {
2692
2723
  type: "account";
2693
2724
  id: string;
2694
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
2725
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
2695
2726
  type: "account_key";
2696
2727
  accountKey: string;
2697
2728
  } | {
2698
2729
  type: "account";
2699
2730
  id: string;
2700
- } | null, "Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
2701
- readonly destination: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
2731
+ } | null, "The Remitente. Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
2732
+ readonly receiver: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
2702
2733
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
2703
2734
  readonly type: v.LiteralSchema<"account_key", undefined>;
2704
2735
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -2709,11 +2740,13 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2709
2740
  }, undefined>, v.StrictObjectSchema<{
2710
2741
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
2711
2742
  readonly type: v.LiteralSchema<"external", undefined>;
2712
- readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
2713
- readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
2714
- readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
2715
- readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
2716
- readonly holder_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
2743
+ readonly country: v.LiteralSchema<"CL", undefined>;
2744
+ readonly bank_code: 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`.">]>;
2745
+ readonly account_type: 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).">]>;
2746
+ readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
2747
+ readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
2748
+ readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
2749
+ readonly national_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, v.DescriptionAction<string, "The holder's RUT.">]>;
2717
2750
  }, undefined>], undefined>, v.DescriptionAction<{
2718
2751
  editable: false;
2719
2752
  type: "account_key";
@@ -2725,12 +2758,14 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2725
2758
  } | {
2726
2759
  editable: false;
2727
2760
  type: "external";
2728
- bank_id: string;
2729
- account_type: "checking" | "debit" | "savings";
2730
- account_id: string;
2731
- holder_id: string;
2732
- holder_name: string;
2733
- }, "Where a transfer's money lands when it is named, in the request and in the answered Intent alike. A named destination is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `destination: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a destination the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
2761
+ country: "CL";
2762
+ bank_code: string;
2763
+ account_type: "10" | "20" | "40";
2764
+ account_number: string;
2765
+ name: string;
2766
+ national_kind_id: "RUT";
2767
+ national_id: string;
2768
+ }, "The Receptor of a transfer when it is named, in the request and in the answered Intent alike. A named Receptor is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `receiver: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a Receptor the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
2734
2769
  editable: false;
2735
2770
  type: "account_key";
2736
2771
  accountKey: string;
@@ -2741,64 +2776,66 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2741
2776
  } | {
2742
2777
  editable: false;
2743
2778
  type: "external";
2744
- bank_id: string;
2745
- account_type: "checking" | "debit" | "savings";
2746
- account_id: string;
2747
- holder_id: string;
2748
- holder_name: string;
2749
- } | null, "Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
2779
+ country: "CL";
2780
+ bank_code: string;
2781
+ account_type: "10" | "20" | "40";
2782
+ account_number: string;
2783
+ name: string;
2784
+ national_kind_id: "RUT";
2785
+ national_id: string;
2786
+ } | null, "The Receptor. Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
2787
+ readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2788
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty one is allowed.">]>;
2789
+ readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
2790
+ }, undefined>, v.DescriptionAction<{
2791
+ value: string;
2792
+ editable: boolean;
2793
+ }, "The comment a transfer asks for, as Core's `comment`: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
2750
2794
  readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2751
2795
  readonly currency: v.LiteralSchema<"CLP", undefined>;
2752
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
2796
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "Immutable amount from the creation request, in the minor unit of the currency.">]>;
2753
2797
  readonly editable: v.BooleanSchema<undefined>;
2754
- readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
2798
+ readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>, undefined>, v.DescriptionAction<number | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
2755
2799
  }, undefined>, v.DescriptionAction<{
2756
2800
  currency: "CLP";
2757
- value: string;
2801
+ value: number;
2758
2802
  editable: boolean;
2759
- confirmed: string | null;
2760
- }, "The amount a transfer orders, as it is answered. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
2803
+ confirmed: number | null;
2804
+ }, "The amount a transfer orders, as it is answered: integers in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
2761
2805
  readonly settled: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2762
2806
  readonly currency: v.LiteralSchema<"CLP", undefined>;
2763
- readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
2807
+ readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>;
2764
2808
  readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
2765
2809
  }, undefined>, v.DescriptionAction<{
2766
2810
  currency: "CLP";
2767
- value: string;
2811
+ value: number;
2768
2812
  at: string;
2769
2813
  }, "The money a transfer actually moved and when it settled. Present only once the transfer `succeeded`; null before, and null for ever when it fails, is rejected, cancelled or expires.">]>, undefined>;
2770
2814
  readonly fee: v.StrictObjectSchema<{
2771
2815
  readonly currency: v.LiteralSchema<"CLP", undefined>;
2772
2816
  readonly amount: v.LiteralSchema<"0", undefined>;
2773
2817
  }, undefined>;
2774
- readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and the bank asks the person to confirm it at `authorization_url` with their web PIN and an SMS code; the Intent becomes `processing.confirmed` only when the bank accepts it. A transfer created with `destination: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
2818
+ readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and AndCo asks the person to authorize it at `authorization_url` with their web AndPass and an SMS code; the Intent becomes `processing.confirmed` only when AndCo accepts it. A transfer created with `receiver: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
2775
2819
  readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
2776
2820
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
2777
2821
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2778
2822
  readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
2779
- readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2780
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
2781
- readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
2782
- }, undefined>, v.DescriptionAction<{
2783
- value: string;
2784
- editable: boolean;
2785
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
2786
2823
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
2787
2824
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
2788
2825
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
2789
2826
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
2790
2827
  }, undefined>, v.DescriptionAction<{
2791
2828
  type: "transfer";
2792
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
2829
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
2793
2830
  signed: boolean;
2794
- source: {
2831
+ sender: {
2795
2832
  type: "account_key";
2796
2833
  accountKey: string;
2797
2834
  } | {
2798
2835
  type: "account";
2799
2836
  id: string;
2800
2837
  } | null;
2801
- destination: {
2838
+ receiver: {
2802
2839
  editable: false;
2803
2840
  type: "account_key";
2804
2841
  accountKey: string;
@@ -2809,21 +2846,27 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2809
2846
  } | {
2810
2847
  editable: false;
2811
2848
  type: "external";
2812
- bank_id: string;
2813
- account_type: "checking" | "debit" | "savings";
2814
- account_id: string;
2815
- holder_id: string;
2816
- holder_name: string;
2849
+ country: "CL";
2850
+ bank_code: string;
2851
+ account_type: "10" | "20" | "40";
2852
+ account_number: string;
2853
+ name: string;
2854
+ national_kind_id: "RUT";
2855
+ national_id: string;
2817
2856
  } | null;
2857
+ comment?: {
2858
+ value: string;
2859
+ editable: boolean;
2860
+ } | undefined;
2818
2861
  amount: {
2819
2862
  currency: "CLP";
2820
- value: string;
2863
+ value: number;
2821
2864
  editable: boolean;
2822
- confirmed: string | null;
2865
+ confirmed: number | null;
2823
2866
  };
2824
2867
  settled: {
2825
2868
  currency: "CLP";
2826
- value: string;
2869
+ value: number;
2827
2870
  at: string;
2828
2871
  } | null;
2829
2872
  fee: {
@@ -2835,19 +2878,15 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2835
2878
  expires_in_seconds: number | null;
2836
2879
  id: string;
2837
2880
  resource_server: string;
2838
- note?: {
2839
- value: string;
2840
- editable: boolean;
2841
- } | undefined;
2842
2881
  metadata: {
2843
2882
  [x: string]: unknown;
2844
2883
  };
2845
2884
  server_time: string;
2846
2885
  created_at: string;
2847
2886
  authorization_url: string;
2848
- }, "Authoritative Project-facing state of a transfer. `source` and `destination` answer in the same matcher vocabulary as the request. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
2887
+ }, "Authoritative Project-facing state of a transfer, in Core's vocabulary (ADR 0093). `sender` and `receiver` answer in the same matcher vocabulary as the request, and `comment` is the request's comment. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
2849
2888
  readonly type: v.LiteralSchema<"account_opening", undefined>;
2850
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
2889
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
2851
2890
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
2852
2891
  readonly account: v.StrictObjectSchema<{
2853
2892
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -2857,22 +2896,22 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2857
2896
  }, undefined>;
2858
2897
  readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
2859
2898
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
2860
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2861
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
2862
2899
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2863
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
2900
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
2864
2901
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
2865
2902
  }, undefined>, v.DescriptionAction<{
2866
2903
  value: string;
2867
2904
  editable: boolean;
2868
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
2905
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
2906
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2907
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
2869
2908
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
2870
2909
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
2871
2910
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
2872
2911
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
2873
2912
  }, undefined>, v.DescriptionAction<{
2874
2913
  type: "account_opening";
2875
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
2914
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
2876
2915
  signed: boolean;
2877
2916
  account: {
2878
2917
  accountKey: string;
@@ -2882,12 +2921,12 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2882
2921
  };
2883
2922
  expires_at: string | null;
2884
2923
  expires_in_seconds: number | null;
2885
- id: string;
2886
- resource_server: string;
2887
2924
  note?: {
2888
2925
  value: string;
2889
2926
  editable: boolean;
2890
2927
  } | undefined;
2928
+ id: string;
2929
+ resource_server: string;
2891
2930
  metadata: {
2892
2931
  [x: string]: unknown;
2893
2932
  };
@@ -2896,7 +2935,7 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2896
2935
  authorization_url: string;
2897
2936
  }, "Authoritative Project-facing state of an account opening. It carries no amount and no fee: an opening moves no money. Opening is asynchronous, so `account.bank_account_id` is absent until the core assigns the Número de Cuenta, which arrives on the account's own event stream rather than in this response.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
2898
2937
  readonly type: v.LiteralSchema<"account_closure", undefined>;
2899
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
2938
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
2900
2939
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
2901
2940
  readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2902
2941
  type: v.LiteralSchema<"account_key", undefined>;
@@ -2904,38 +2943,38 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2904
2943
  }, undefined>, v.DescriptionAction<{
2905
2944
  type: "account_key";
2906
2945
  accountKey: string;
2907
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2946
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2908
2947
  type: v.LiteralSchema<"account", undefined>;
2909
2948
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2910
2949
  }, undefined>, v.DescriptionAction<{
2911
2950
  type: "account";
2912
2951
  id: string;
2913
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
2952
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
2914
2953
  type: "account_key";
2915
2954
  accountKey: string;
2916
2955
  } | {
2917
2956
  type: "account";
2918
2957
  id: string;
2919
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
2958
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
2920
2959
  readonly resolved_account_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The account the reference resolved to, once resolution has happened, whether or not the closure itself has settled yet.">]>;
2921
2960
  readonly expires_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
2922
2961
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.DescriptionAction<number, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
2923
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2924
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
2925
2962
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
2926
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
2963
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
2927
2964
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
2928
2965
  }, undefined>, v.DescriptionAction<{
2929
2966
  value: string;
2930
2967
  editable: boolean;
2931
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
2968
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
2969
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
2970
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
2932
2971
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
2933
2972
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
2934
2973
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
2935
2974
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
2936
2975
  }, undefined>, v.DescriptionAction<{
2937
2976
  type: "account_closure";
2938
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
2977
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
2939
2978
  signed: boolean;
2940
2979
  account: {
2941
2980
  type: "account_key";
@@ -2947,12 +2986,12 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
2947
2986
  resolved_account_id: string | null;
2948
2987
  expires_at: string;
2949
2988
  expires_in_seconds: number;
2950
- id: string;
2951
- resource_server: string;
2952
2989
  note?: {
2953
2990
  value: string;
2954
2991
  editable: boolean;
2955
2992
  } | undefined;
2993
+ id: string;
2994
+ resource_server: string;
2956
2995
  metadata: {
2957
2996
  [x: string]: unknown;
2958
2997
  };
@@ -2998,7 +3037,7 @@ export declare const getIntent: import("@orpc/contract").ProcedureContractBuilde
2998
3037
  account_type: "checking" | "debit" | "savings";
2999
3038
  holder_id: string | null;
3000
3039
  holder_name: string;
3001
- }, "The Andco account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
3040
+ }, "The AndCo account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
3002
3041
  readonly amount: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3003
3042
  readonly currency: v.LiteralSchema<"CLP", undefined>;
3004
3043
  readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
@@ -3022,8 +3061,8 @@ export declare const getIntent: import("@orpc/contract").ProcedureContractBuilde
3022
3061
  readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
3023
3062
  readonly outcome: v.PicklistSchema<["credited", "reversed"], undefined>;
3024
3063
  readonly receipt_time_source: v.PicklistSchema<["bank_timestamp", "unknown"], undefined>;
3025
- readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as the bank reported it.">]>;
3026
- readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as the bank reported it.">]>;
3064
+ readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as AndCo reported it.">]>;
3065
+ readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as AndCo reported it.">]>;
3027
3066
  readonly sender_bank_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Display name of the sender's bank.">]>;
3028
3067
  readonly sender_account_type: v.NullableSchema<v.PicklistSchema<["checking", "debit", "savings"], undefined>, undefined>;
3029
3068
  readonly sender_account_number: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
@@ -3037,49 +3076,49 @@ export declare const getIntent: import("@orpc/contract").ProcedureContractBuilde
3037
3076
  }, undefined>;
3038
3077
  readonly expires_at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
3039
3078
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
3040
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3041
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3042
3079
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3043
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
3080
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
3044
3081
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
3045
3082
  }, undefined>, v.DescriptionAction<{
3046
3083
  value: string;
3047
3084
  editable: boolean;
3048
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
3085
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
3086
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3087
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3049
3088
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
3050
3089
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3051
3090
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3052
3091
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3053
3092
  }, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
3054
3093
  readonly type: v.LiteralSchema<"transfer", undefined>;
3055
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
3094
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
3056
3095
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
3057
- readonly source: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3096
+ readonly sender: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3058
3097
  type: v.LiteralSchema<"account_key", undefined>;
3059
3098
  accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
3060
3099
  }, undefined>, v.DescriptionAction<{
3061
3100
  type: "account_key";
3062
3101
  accountKey: string;
3063
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3102
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3064
3103
  type: v.LiteralSchema<"account", undefined>;
3065
3104
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3066
3105
  }, undefined>, v.DescriptionAction<{
3067
3106
  type: "account";
3068
3107
  id: string;
3069
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
3108
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
3070
3109
  type: "account_key";
3071
3110
  accountKey: string;
3072
3111
  } | {
3073
3112
  type: "account";
3074
3113
  id: string;
3075
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
3114
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
3076
3115
  type: "account_key";
3077
3116
  accountKey: string;
3078
3117
  } | {
3079
3118
  type: "account";
3080
3119
  id: string;
3081
- } | null, "Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
3082
- readonly destination: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
3120
+ } | null, "The Remitente. Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
3121
+ readonly receiver: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
3083
3122
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
3084
3123
  readonly type: v.LiteralSchema<"account_key", undefined>;
3085
3124
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -3090,11 +3129,13 @@ export declare const getIntent: import("@orpc/contract").ProcedureContractBuilde
3090
3129
  }, undefined>, v.StrictObjectSchema<{
3091
3130
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
3092
3131
  readonly type: v.LiteralSchema<"external", undefined>;
3093
- readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
3094
- readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
3095
- readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
3096
- readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
3097
- readonly holder_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
3132
+ readonly country: v.LiteralSchema<"CL", undefined>;
3133
+ readonly bank_code: 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`.">]>;
3134
+ readonly account_type: 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).">]>;
3135
+ readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
3136
+ readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
3137
+ readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
3138
+ readonly national_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, v.DescriptionAction<string, "The holder's RUT.">]>;
3098
3139
  }, undefined>], undefined>, v.DescriptionAction<{
3099
3140
  editable: false;
3100
3141
  type: "account_key";
@@ -3106,12 +3147,14 @@ export declare const getIntent: import("@orpc/contract").ProcedureContractBuilde
3106
3147
  } | {
3107
3148
  editable: false;
3108
3149
  type: "external";
3109
- bank_id: string;
3110
- account_type: "checking" | "debit" | "savings";
3111
- account_id: string;
3112
- holder_id: string;
3113
- holder_name: string;
3114
- }, "Where a transfer's money lands when it is named, in the request and in the answered Intent alike. A named destination is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `destination: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a destination the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
3150
+ country: "CL";
3151
+ bank_code: string;
3152
+ account_type: "10" | "20" | "40";
3153
+ account_number: string;
3154
+ name: string;
3155
+ national_kind_id: "RUT";
3156
+ national_id: string;
3157
+ }, "The Receptor of a transfer when it is named, in the request and in the answered Intent alike. A named Receptor is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `receiver: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a Receptor the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
3115
3158
  editable: false;
3116
3159
  type: "account_key";
3117
3160
  accountKey: string;
@@ -3122,64 +3165,66 @@ export declare const getIntent: import("@orpc/contract").ProcedureContractBuilde
3122
3165
  } | {
3123
3166
  editable: false;
3124
3167
  type: "external";
3125
- bank_id: string;
3126
- account_type: "checking" | "debit" | "savings";
3127
- account_id: string;
3128
- holder_id: string;
3129
- holder_name: string;
3130
- } | null, "Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
3168
+ country: "CL";
3169
+ bank_code: string;
3170
+ account_type: "10" | "20" | "40";
3171
+ account_number: string;
3172
+ name: string;
3173
+ national_kind_id: "RUT";
3174
+ national_id: string;
3175
+ } | null, "The Receptor. Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
3176
+ readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3177
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty one is allowed.">]>;
3178
+ readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
3179
+ }, undefined>, v.DescriptionAction<{
3180
+ value: string;
3181
+ editable: boolean;
3182
+ }, "The comment a transfer asks for, as Core's `comment`: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
3131
3183
  readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3132
3184
  readonly currency: v.LiteralSchema<"CLP", undefined>;
3133
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
3185
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "Immutable amount from the creation request, in the minor unit of the currency.">]>;
3134
3186
  readonly editable: v.BooleanSchema<undefined>;
3135
- readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
3187
+ readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>, undefined>, v.DescriptionAction<number | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
3136
3188
  }, undefined>, v.DescriptionAction<{
3137
3189
  currency: "CLP";
3138
- value: string;
3190
+ value: number;
3139
3191
  editable: boolean;
3140
- confirmed: string | null;
3141
- }, "The amount a transfer orders, as it is answered. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
3192
+ confirmed: number | null;
3193
+ }, "The amount a transfer orders, as it is answered: integers in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
3142
3194
  readonly settled: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3143
3195
  readonly currency: v.LiteralSchema<"CLP", undefined>;
3144
- readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
3196
+ readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>;
3145
3197
  readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3146
3198
  }, undefined>, v.DescriptionAction<{
3147
3199
  currency: "CLP";
3148
- value: string;
3200
+ value: number;
3149
3201
  at: string;
3150
3202
  }, "The money a transfer actually moved and when it settled. Present only once the transfer `succeeded`; null before, and null for ever when it fails, is rejected, cancelled or expires.">]>, undefined>;
3151
3203
  readonly fee: v.StrictObjectSchema<{
3152
3204
  readonly currency: v.LiteralSchema<"CLP", undefined>;
3153
3205
  readonly amount: v.LiteralSchema<"0", undefined>;
3154
3206
  }, undefined>;
3155
- readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and the bank asks the person to confirm it at `authorization_url` with their web PIN and an SMS code; the Intent becomes `processing.confirmed` only when the bank accepts it. A transfer created with `destination: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
3207
+ readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and AndCo asks the person to authorize it at `authorization_url` with their web AndPass and an SMS code; the Intent becomes `processing.confirmed` only when AndCo accepts it. A transfer created with `receiver: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
3156
3208
  readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
3157
3209
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
3158
3210
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3159
3211
  readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3160
- readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3161
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
3162
- readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
3163
- }, undefined>, v.DescriptionAction<{
3164
- value: string;
3165
- editable: boolean;
3166
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
3167
3212
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
3168
3213
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3169
3214
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3170
3215
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3171
3216
  }, undefined>, v.DescriptionAction<{
3172
3217
  type: "transfer";
3173
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
3218
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
3174
3219
  signed: boolean;
3175
- source: {
3220
+ sender: {
3176
3221
  type: "account_key";
3177
3222
  accountKey: string;
3178
3223
  } | {
3179
3224
  type: "account";
3180
3225
  id: string;
3181
3226
  } | null;
3182
- destination: {
3227
+ receiver: {
3183
3228
  editable: false;
3184
3229
  type: "account_key";
3185
3230
  accountKey: string;
@@ -3190,21 +3235,27 @@ export declare const getIntent: import("@orpc/contract").ProcedureContractBuilde
3190
3235
  } | {
3191
3236
  editable: false;
3192
3237
  type: "external";
3193
- bank_id: string;
3194
- account_type: "checking" | "debit" | "savings";
3195
- account_id: string;
3196
- holder_id: string;
3197
- holder_name: string;
3238
+ country: "CL";
3239
+ bank_code: string;
3240
+ account_type: "10" | "20" | "40";
3241
+ account_number: string;
3242
+ name: string;
3243
+ national_kind_id: "RUT";
3244
+ national_id: string;
3198
3245
  } | null;
3246
+ comment?: {
3247
+ value: string;
3248
+ editable: boolean;
3249
+ } | undefined;
3199
3250
  amount: {
3200
3251
  currency: "CLP";
3201
- value: string;
3252
+ value: number;
3202
3253
  editable: boolean;
3203
- confirmed: string | null;
3254
+ confirmed: number | null;
3204
3255
  };
3205
3256
  settled: {
3206
3257
  currency: "CLP";
3207
- value: string;
3258
+ value: number;
3208
3259
  at: string;
3209
3260
  } | null;
3210
3261
  fee: {
@@ -3216,19 +3267,15 @@ export declare const getIntent: import("@orpc/contract").ProcedureContractBuilde
3216
3267
  expires_in_seconds: number | null;
3217
3268
  id: string;
3218
3269
  resource_server: string;
3219
- note?: {
3220
- value: string;
3221
- editable: boolean;
3222
- } | undefined;
3223
3270
  metadata: {
3224
3271
  [x: string]: unknown;
3225
3272
  };
3226
3273
  server_time: string;
3227
3274
  created_at: string;
3228
3275
  authorization_url: string;
3229
- }, "Authoritative Project-facing state of a transfer. `source` and `destination` answer in the same matcher vocabulary as the request. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
3276
+ }, "Authoritative Project-facing state of a transfer, in Core's vocabulary (ADR 0093). `sender` and `receiver` answer in the same matcher vocabulary as the request, and `comment` is the request's comment. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
3230
3277
  readonly type: v.LiteralSchema<"account_opening", undefined>;
3231
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
3278
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
3232
3279
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
3233
3280
  readonly account: v.StrictObjectSchema<{
3234
3281
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -3238,22 +3285,22 @@ export declare const getIntent: import("@orpc/contract").ProcedureContractBuilde
3238
3285
  }, undefined>;
3239
3286
  readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
3240
3287
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
3241
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3242
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3243
3288
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3244
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
3289
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
3245
3290
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
3246
3291
  }, undefined>, v.DescriptionAction<{
3247
3292
  value: string;
3248
3293
  editable: boolean;
3249
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
3294
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
3295
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3296
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3250
3297
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
3251
3298
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3252
3299
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3253
3300
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3254
3301
  }, undefined>, v.DescriptionAction<{
3255
3302
  type: "account_opening";
3256
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
3303
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
3257
3304
  signed: boolean;
3258
3305
  account: {
3259
3306
  accountKey: string;
@@ -3263,12 +3310,12 @@ export declare const getIntent: import("@orpc/contract").ProcedureContractBuilde
3263
3310
  };
3264
3311
  expires_at: string | null;
3265
3312
  expires_in_seconds: number | null;
3266
- id: string;
3267
- resource_server: string;
3268
3313
  note?: {
3269
3314
  value: string;
3270
3315
  editable: boolean;
3271
3316
  } | undefined;
3317
+ id: string;
3318
+ resource_server: string;
3272
3319
  metadata: {
3273
3320
  [x: string]: unknown;
3274
3321
  };
@@ -3277,7 +3324,7 @@ export declare const getIntent: import("@orpc/contract").ProcedureContractBuilde
3277
3324
  authorization_url: string;
3278
3325
  }, "Authoritative Project-facing state of an account opening. It carries no amount and no fee: an opening moves no money. Opening is asynchronous, so `account.bank_account_id` is absent until the core assigns the Número de Cuenta, which arrives on the account's own event stream rather than in this response.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
3279
3326
  readonly type: v.LiteralSchema<"account_closure", undefined>;
3280
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
3327
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
3281
3328
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
3282
3329
  readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3283
3330
  type: v.LiteralSchema<"account_key", undefined>;
@@ -3285,38 +3332,38 @@ export declare const getIntent: import("@orpc/contract").ProcedureContractBuilde
3285
3332
  }, undefined>, v.DescriptionAction<{
3286
3333
  type: "account_key";
3287
3334
  accountKey: string;
3288
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3335
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3289
3336
  type: v.LiteralSchema<"account", undefined>;
3290
3337
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3291
3338
  }, undefined>, v.DescriptionAction<{
3292
3339
  type: "account";
3293
3340
  id: string;
3294
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
3341
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
3295
3342
  type: "account_key";
3296
3343
  accountKey: string;
3297
3344
  } | {
3298
3345
  type: "account";
3299
3346
  id: string;
3300
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
3347
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
3301
3348
  readonly resolved_account_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The account the reference resolved to, once resolution has happened, whether or not the closure itself has settled yet.">]>;
3302
3349
  readonly expires_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3303
3350
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.DescriptionAction<number, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
3304
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3305
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3306
3351
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3307
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
3352
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
3308
3353
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
3309
3354
  }, undefined>, v.DescriptionAction<{
3310
3355
  value: string;
3311
3356
  editable: boolean;
3312
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
3357
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
3358
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3359
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3313
3360
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
3314
3361
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3315
3362
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3316
3363
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3317
3364
  }, undefined>, v.DescriptionAction<{
3318
3365
  type: "account_closure";
3319
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
3366
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
3320
3367
  signed: boolean;
3321
3368
  account: {
3322
3369
  type: "account_key";
@@ -3328,12 +3375,12 @@ export declare const getIntent: import("@orpc/contract").ProcedureContractBuilde
3328
3375
  resolved_account_id: string | null;
3329
3376
  expires_at: string;
3330
3377
  expires_in_seconds: number;
3331
- id: string;
3332
- resource_server: string;
3333
3378
  note?: {
3334
3379
  value: string;
3335
3380
  editable: boolean;
3336
3381
  } | undefined;
3382
+ id: string;
3383
+ resource_server: string;
3337
3384
  metadata: {
3338
3385
  [x: string]: unknown;
3339
3386
  };
@@ -3391,7 +3438,7 @@ export declare const approveIntent: import("@orpc/contract").ProcedureContractBu
3391
3438
  account_type: "checking" | "debit" | "savings";
3392
3439
  holder_id: string | null;
3393
3440
  holder_name: string;
3394
- }, "The Andco account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
3441
+ }, "The AndCo account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
3395
3442
  readonly amount: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3396
3443
  readonly currency: v.LiteralSchema<"CLP", undefined>;
3397
3444
  readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
@@ -3415,8 +3462,8 @@ export declare const approveIntent: import("@orpc/contract").ProcedureContractBu
3415
3462
  readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
3416
3463
  readonly outcome: v.PicklistSchema<["credited", "reversed"], undefined>;
3417
3464
  readonly receipt_time_source: v.PicklistSchema<["bank_timestamp", "unknown"], undefined>;
3418
- readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as the bank reported it.">]>;
3419
- readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as the bank reported it.">]>;
3465
+ readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as AndCo reported it.">]>;
3466
+ readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as AndCo reported it.">]>;
3420
3467
  readonly sender_bank_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Display name of the sender's bank.">]>;
3421
3468
  readonly sender_account_type: v.NullableSchema<v.PicklistSchema<["checking", "debit", "savings"], undefined>, undefined>;
3422
3469
  readonly sender_account_number: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
@@ -3430,49 +3477,49 @@ export declare const approveIntent: import("@orpc/contract").ProcedureContractBu
3430
3477
  }, undefined>;
3431
3478
  readonly expires_at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
3432
3479
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
3433
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3434
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3435
3480
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3436
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
3481
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
3437
3482
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
3438
3483
  }, undefined>, v.DescriptionAction<{
3439
3484
  value: string;
3440
3485
  editable: boolean;
3441
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
3486
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
3487
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3488
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3442
3489
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
3443
3490
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3444
3491
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3445
3492
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3446
3493
  }, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
3447
3494
  readonly type: v.LiteralSchema<"transfer", undefined>;
3448
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
3495
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
3449
3496
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
3450
- readonly source: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3497
+ readonly sender: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3451
3498
  type: v.LiteralSchema<"account_key", undefined>;
3452
3499
  accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
3453
3500
  }, undefined>, v.DescriptionAction<{
3454
3501
  type: "account_key";
3455
3502
  accountKey: string;
3456
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3503
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3457
3504
  type: v.LiteralSchema<"account", undefined>;
3458
3505
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3459
3506
  }, undefined>, v.DescriptionAction<{
3460
3507
  type: "account";
3461
3508
  id: string;
3462
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
3509
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
3463
3510
  type: "account_key";
3464
3511
  accountKey: string;
3465
3512
  } | {
3466
3513
  type: "account";
3467
3514
  id: string;
3468
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
3515
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
3469
3516
  type: "account_key";
3470
3517
  accountKey: string;
3471
3518
  } | {
3472
3519
  type: "account";
3473
3520
  id: string;
3474
- } | null, "Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
3475
- readonly destination: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
3521
+ } | null, "The Remitente. Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
3522
+ readonly receiver: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
3476
3523
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
3477
3524
  readonly type: v.LiteralSchema<"account_key", undefined>;
3478
3525
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -3483,11 +3530,13 @@ export declare const approveIntent: import("@orpc/contract").ProcedureContractBu
3483
3530
  }, undefined>, v.StrictObjectSchema<{
3484
3531
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
3485
3532
  readonly type: v.LiteralSchema<"external", undefined>;
3486
- readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
3487
- readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
3488
- readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
3489
- readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
3490
- readonly holder_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
3533
+ readonly country: v.LiteralSchema<"CL", undefined>;
3534
+ readonly bank_code: 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`.">]>;
3535
+ readonly account_type: 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).">]>;
3536
+ readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
3537
+ readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
3538
+ readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
3539
+ readonly national_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, v.DescriptionAction<string, "The holder's RUT.">]>;
3491
3540
  }, undefined>], undefined>, v.DescriptionAction<{
3492
3541
  editable: false;
3493
3542
  type: "account_key";
@@ -3499,12 +3548,14 @@ export declare const approveIntent: import("@orpc/contract").ProcedureContractBu
3499
3548
  } | {
3500
3549
  editable: false;
3501
3550
  type: "external";
3502
- bank_id: string;
3503
- account_type: "checking" | "debit" | "savings";
3504
- account_id: string;
3505
- holder_id: string;
3506
- holder_name: string;
3507
- }, "Where a transfer's money lands when it is named, in the request and in the answered Intent alike. A named destination is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `destination: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a destination the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
3551
+ country: "CL";
3552
+ bank_code: string;
3553
+ account_type: "10" | "20" | "40";
3554
+ account_number: string;
3555
+ name: string;
3556
+ national_kind_id: "RUT";
3557
+ national_id: string;
3558
+ }, "The Receptor of a transfer when it is named, in the request and in the answered Intent alike. A named Receptor is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `receiver: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a Receptor the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
3508
3559
  editable: false;
3509
3560
  type: "account_key";
3510
3561
  accountKey: string;
@@ -3515,64 +3566,66 @@ export declare const approveIntent: import("@orpc/contract").ProcedureContractBu
3515
3566
  } | {
3516
3567
  editable: false;
3517
3568
  type: "external";
3518
- bank_id: string;
3519
- account_type: "checking" | "debit" | "savings";
3520
- account_id: string;
3521
- holder_id: string;
3522
- holder_name: string;
3523
- } | null, "Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
3569
+ country: "CL";
3570
+ bank_code: string;
3571
+ account_type: "10" | "20" | "40";
3572
+ account_number: string;
3573
+ name: string;
3574
+ national_kind_id: "RUT";
3575
+ national_id: string;
3576
+ } | null, "The Receptor. Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
3577
+ readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3578
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty one is allowed.">]>;
3579
+ readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
3580
+ }, undefined>, v.DescriptionAction<{
3581
+ value: string;
3582
+ editable: boolean;
3583
+ }, "The comment a transfer asks for, as Core's `comment`: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
3524
3584
  readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3525
3585
  readonly currency: v.LiteralSchema<"CLP", undefined>;
3526
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
3586
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "Immutable amount from the creation request, in the minor unit of the currency.">]>;
3527
3587
  readonly editable: v.BooleanSchema<undefined>;
3528
- readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
3588
+ readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>, undefined>, v.DescriptionAction<number | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
3529
3589
  }, undefined>, v.DescriptionAction<{
3530
3590
  currency: "CLP";
3531
- value: string;
3591
+ value: number;
3532
3592
  editable: boolean;
3533
- confirmed: string | null;
3534
- }, "The amount a transfer orders, as it is answered. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
3593
+ confirmed: number | null;
3594
+ }, "The amount a transfer orders, as it is answered: integers in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
3535
3595
  readonly settled: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3536
3596
  readonly currency: v.LiteralSchema<"CLP", undefined>;
3537
- readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
3597
+ readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>;
3538
3598
  readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3539
3599
  }, undefined>, v.DescriptionAction<{
3540
3600
  currency: "CLP";
3541
- value: string;
3601
+ value: number;
3542
3602
  at: string;
3543
3603
  }, "The money a transfer actually moved and when it settled. Present only once the transfer `succeeded`; null before, and null for ever when it fails, is rejected, cancelled or expires.">]>, undefined>;
3544
3604
  readonly fee: v.StrictObjectSchema<{
3545
3605
  readonly currency: v.LiteralSchema<"CLP", undefined>;
3546
3606
  readonly amount: v.LiteralSchema<"0", undefined>;
3547
3607
  }, undefined>;
3548
- readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and the bank asks the person to confirm it at `authorization_url` with their web PIN and an SMS code; the Intent becomes `processing.confirmed` only when the bank accepts it. A transfer created with `destination: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
3608
+ readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and AndCo asks the person to authorize it at `authorization_url` with their web AndPass and an SMS code; the Intent becomes `processing.confirmed` only when AndCo accepts it. A transfer created with `receiver: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
3549
3609
  readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
3550
3610
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
3551
3611
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3552
3612
  readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3553
- readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3554
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
3555
- readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
3556
- }, undefined>, v.DescriptionAction<{
3557
- value: string;
3558
- editable: boolean;
3559
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
3560
3613
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
3561
3614
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3562
3615
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3563
3616
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3564
3617
  }, undefined>, v.DescriptionAction<{
3565
3618
  type: "transfer";
3566
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
3619
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
3567
3620
  signed: boolean;
3568
- source: {
3621
+ sender: {
3569
3622
  type: "account_key";
3570
3623
  accountKey: string;
3571
3624
  } | {
3572
3625
  type: "account";
3573
3626
  id: string;
3574
3627
  } | null;
3575
- destination: {
3628
+ receiver: {
3576
3629
  editable: false;
3577
3630
  type: "account_key";
3578
3631
  accountKey: string;
@@ -3583,21 +3636,27 @@ export declare const approveIntent: import("@orpc/contract").ProcedureContractBu
3583
3636
  } | {
3584
3637
  editable: false;
3585
3638
  type: "external";
3586
- bank_id: string;
3587
- account_type: "checking" | "debit" | "savings";
3588
- account_id: string;
3589
- holder_id: string;
3590
- holder_name: string;
3639
+ country: "CL";
3640
+ bank_code: string;
3641
+ account_type: "10" | "20" | "40";
3642
+ account_number: string;
3643
+ name: string;
3644
+ national_kind_id: "RUT";
3645
+ national_id: string;
3591
3646
  } | null;
3647
+ comment?: {
3648
+ value: string;
3649
+ editable: boolean;
3650
+ } | undefined;
3592
3651
  amount: {
3593
3652
  currency: "CLP";
3594
- value: string;
3653
+ value: number;
3595
3654
  editable: boolean;
3596
- confirmed: string | null;
3655
+ confirmed: number | null;
3597
3656
  };
3598
3657
  settled: {
3599
3658
  currency: "CLP";
3600
- value: string;
3659
+ value: number;
3601
3660
  at: string;
3602
3661
  } | null;
3603
3662
  fee: {
@@ -3609,19 +3668,15 @@ export declare const approveIntent: import("@orpc/contract").ProcedureContractBu
3609
3668
  expires_in_seconds: number | null;
3610
3669
  id: string;
3611
3670
  resource_server: string;
3612
- note?: {
3613
- value: string;
3614
- editable: boolean;
3615
- } | undefined;
3616
3671
  metadata: {
3617
3672
  [x: string]: unknown;
3618
3673
  };
3619
3674
  server_time: string;
3620
3675
  created_at: string;
3621
3676
  authorization_url: string;
3622
- }, "Authoritative Project-facing state of a transfer. `source` and `destination` answer in the same matcher vocabulary as the request. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
3677
+ }, "Authoritative Project-facing state of a transfer, in Core's vocabulary (ADR 0093). `sender` and `receiver` answer in the same matcher vocabulary as the request, and `comment` is the request's comment. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
3623
3678
  readonly type: v.LiteralSchema<"account_opening", undefined>;
3624
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
3679
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
3625
3680
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
3626
3681
  readonly account: v.StrictObjectSchema<{
3627
3682
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -3631,22 +3686,22 @@ export declare const approveIntent: import("@orpc/contract").ProcedureContractBu
3631
3686
  }, undefined>;
3632
3687
  readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
3633
3688
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
3634
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3635
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3636
3689
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3637
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
3690
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
3638
3691
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
3639
3692
  }, undefined>, v.DescriptionAction<{
3640
3693
  value: string;
3641
3694
  editable: boolean;
3642
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
3695
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
3696
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3697
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3643
3698
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
3644
3699
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3645
3700
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3646
3701
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3647
3702
  }, undefined>, v.DescriptionAction<{
3648
3703
  type: "account_opening";
3649
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
3704
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
3650
3705
  signed: boolean;
3651
3706
  account: {
3652
3707
  accountKey: string;
@@ -3656,12 +3711,12 @@ export declare const approveIntent: import("@orpc/contract").ProcedureContractBu
3656
3711
  };
3657
3712
  expires_at: string | null;
3658
3713
  expires_in_seconds: number | null;
3659
- id: string;
3660
- resource_server: string;
3661
3714
  note?: {
3662
3715
  value: string;
3663
3716
  editable: boolean;
3664
3717
  } | undefined;
3718
+ id: string;
3719
+ resource_server: string;
3665
3720
  metadata: {
3666
3721
  [x: string]: unknown;
3667
3722
  };
@@ -3670,7 +3725,7 @@ export declare const approveIntent: import("@orpc/contract").ProcedureContractBu
3670
3725
  authorization_url: string;
3671
3726
  }, "Authoritative Project-facing state of an account opening. It carries no amount and no fee: an opening moves no money. Opening is asynchronous, so `account.bank_account_id` is absent until the core assigns the Número de Cuenta, which arrives on the account's own event stream rather than in this response.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
3672
3727
  readonly type: v.LiteralSchema<"account_closure", undefined>;
3673
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
3728
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
3674
3729
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
3675
3730
  readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3676
3731
  type: v.LiteralSchema<"account_key", undefined>;
@@ -3678,38 +3733,38 @@ export declare const approveIntent: import("@orpc/contract").ProcedureContractBu
3678
3733
  }, undefined>, v.DescriptionAction<{
3679
3734
  type: "account_key";
3680
3735
  accountKey: string;
3681
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3736
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3682
3737
  type: v.LiteralSchema<"account", undefined>;
3683
3738
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3684
3739
  }, undefined>, v.DescriptionAction<{
3685
3740
  type: "account";
3686
3741
  id: string;
3687
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
3742
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
3688
3743
  type: "account_key";
3689
3744
  accountKey: string;
3690
3745
  } | {
3691
3746
  type: "account";
3692
3747
  id: string;
3693
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
3748
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
3694
3749
  readonly resolved_account_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The account the reference resolved to, once resolution has happened, whether or not the closure itself has settled yet.">]>;
3695
3750
  readonly expires_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3696
3751
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.DescriptionAction<number, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
3697
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3698
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3699
3752
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3700
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
3753
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
3701
3754
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
3702
3755
  }, undefined>, v.DescriptionAction<{
3703
3756
  value: string;
3704
3757
  editable: boolean;
3705
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
3758
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
3759
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3760
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3706
3761
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
3707
3762
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3708
3763
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3709
3764
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3710
3765
  }, undefined>, v.DescriptionAction<{
3711
3766
  type: "account_closure";
3712
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
3767
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
3713
3768
  signed: boolean;
3714
3769
  account: {
3715
3770
  type: "account_key";
@@ -3721,12 +3776,12 @@ export declare const approveIntent: import("@orpc/contract").ProcedureContractBu
3721
3776
  resolved_account_id: string | null;
3722
3777
  expires_at: string;
3723
3778
  expires_in_seconds: number;
3724
- id: string;
3725
- resource_server: string;
3726
3779
  note?: {
3727
3780
  value: string;
3728
3781
  editable: boolean;
3729
3782
  } | undefined;
3783
+ id: string;
3784
+ resource_server: string;
3730
3785
  metadata: {
3731
3786
  [x: string]: unknown;
3732
3787
  };
@@ -3777,7 +3832,7 @@ export declare const rejectIntent: import("@orpc/contract").ProcedureContractBui
3777
3832
  account_type: "checking" | "debit" | "savings";
3778
3833
  holder_id: string | null;
3779
3834
  holder_name: string;
3780
- }, "The Andco account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
3835
+ }, "The AndCo account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
3781
3836
  readonly amount: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3782
3837
  readonly currency: v.LiteralSchema<"CLP", undefined>;
3783
3838
  readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
@@ -3801,8 +3856,8 @@ export declare const rejectIntent: import("@orpc/contract").ProcedureContractBui
3801
3856
  readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
3802
3857
  readonly outcome: v.PicklistSchema<["credited", "reversed"], undefined>;
3803
3858
  readonly receipt_time_source: v.PicklistSchema<["bank_timestamp", "unknown"], undefined>;
3804
- readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as the bank reported it.">]>;
3805
- readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as the bank reported it.">]>;
3859
+ readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as AndCo reported it.">]>;
3860
+ readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as AndCo reported it.">]>;
3806
3861
  readonly sender_bank_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Display name of the sender's bank.">]>;
3807
3862
  readonly sender_account_type: v.NullableSchema<v.PicklistSchema<["checking", "debit", "savings"], undefined>, undefined>;
3808
3863
  readonly sender_account_number: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
@@ -3816,49 +3871,49 @@ export declare const rejectIntent: import("@orpc/contract").ProcedureContractBui
3816
3871
  }, undefined>;
3817
3872
  readonly expires_at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
3818
3873
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
3819
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3820
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3821
3874
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3822
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
3875
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
3823
3876
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
3824
3877
  }, undefined>, v.DescriptionAction<{
3825
3878
  value: string;
3826
3879
  editable: boolean;
3827
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
3880
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
3881
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3882
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3828
3883
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
3829
3884
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3830
3885
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3831
3886
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3832
3887
  }, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
3833
3888
  readonly type: v.LiteralSchema<"transfer", undefined>;
3834
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
3889
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
3835
3890
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
3836
- readonly source: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3891
+ readonly sender: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3837
3892
  type: v.LiteralSchema<"account_key", undefined>;
3838
3893
  accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
3839
3894
  }, undefined>, v.DescriptionAction<{
3840
3895
  type: "account_key";
3841
3896
  accountKey: string;
3842
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3897
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3843
3898
  type: v.LiteralSchema<"account", undefined>;
3844
3899
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3845
3900
  }, undefined>, v.DescriptionAction<{
3846
3901
  type: "account";
3847
3902
  id: string;
3848
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
3903
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
3849
3904
  type: "account_key";
3850
3905
  accountKey: string;
3851
3906
  } | {
3852
3907
  type: "account";
3853
3908
  id: string;
3854
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
3909
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
3855
3910
  type: "account_key";
3856
3911
  accountKey: string;
3857
3912
  } | {
3858
3913
  type: "account";
3859
3914
  id: string;
3860
- } | null, "Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
3861
- readonly destination: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
3915
+ } | null, "The Remitente. Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
3916
+ readonly receiver: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
3862
3917
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
3863
3918
  readonly type: v.LiteralSchema<"account_key", undefined>;
3864
3919
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -3869,11 +3924,13 @@ export declare const rejectIntent: import("@orpc/contract").ProcedureContractBui
3869
3924
  }, undefined>, v.StrictObjectSchema<{
3870
3925
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
3871
3926
  readonly type: v.LiteralSchema<"external", undefined>;
3872
- readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
3873
- readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
3874
- readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
3875
- readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
3876
- readonly holder_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
3927
+ readonly country: v.LiteralSchema<"CL", undefined>;
3928
+ readonly bank_code: 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`.">]>;
3929
+ readonly account_type: 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).">]>;
3930
+ readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
3931
+ readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
3932
+ readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
3933
+ readonly national_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, v.DescriptionAction<string, "The holder's RUT.">]>;
3877
3934
  }, undefined>], undefined>, v.DescriptionAction<{
3878
3935
  editable: false;
3879
3936
  type: "account_key";
@@ -3885,12 +3942,14 @@ export declare const rejectIntent: import("@orpc/contract").ProcedureContractBui
3885
3942
  } | {
3886
3943
  editable: false;
3887
3944
  type: "external";
3888
- bank_id: string;
3889
- account_type: "checking" | "debit" | "savings";
3890
- account_id: string;
3891
- holder_id: string;
3892
- holder_name: string;
3893
- }, "Where a transfer's money lands when it is named, in the request and in the answered Intent alike. A named destination is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `destination: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a destination the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
3945
+ country: "CL";
3946
+ bank_code: string;
3947
+ account_type: "10" | "20" | "40";
3948
+ account_number: string;
3949
+ name: string;
3950
+ national_kind_id: "RUT";
3951
+ national_id: string;
3952
+ }, "The Receptor of a transfer when it is named, in the request and in the answered Intent alike. A named Receptor is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `receiver: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a Receptor the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
3894
3953
  editable: false;
3895
3954
  type: "account_key";
3896
3955
  accountKey: string;
@@ -3901,64 +3960,66 @@ export declare const rejectIntent: import("@orpc/contract").ProcedureContractBui
3901
3960
  } | {
3902
3961
  editable: false;
3903
3962
  type: "external";
3904
- bank_id: string;
3905
- account_type: "checking" | "debit" | "savings";
3906
- account_id: string;
3907
- holder_id: string;
3908
- holder_name: string;
3909
- } | null, "Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
3963
+ country: "CL";
3964
+ bank_code: string;
3965
+ account_type: "10" | "20" | "40";
3966
+ account_number: string;
3967
+ name: string;
3968
+ national_kind_id: "RUT";
3969
+ national_id: string;
3970
+ } | null, "The Receptor. Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
3971
+ readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3972
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty one is allowed.">]>;
3973
+ readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
3974
+ }, undefined>, v.DescriptionAction<{
3975
+ value: string;
3976
+ editable: boolean;
3977
+ }, "The comment a transfer asks for, as Core's `comment`: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
3910
3978
  readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3911
3979
  readonly currency: v.LiteralSchema<"CLP", undefined>;
3912
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
3980
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "Immutable amount from the creation request, in the minor unit of the currency.">]>;
3913
3981
  readonly editable: v.BooleanSchema<undefined>;
3914
- readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
3982
+ readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>, undefined>, v.DescriptionAction<number | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
3915
3983
  }, undefined>, v.DescriptionAction<{
3916
3984
  currency: "CLP";
3917
- value: string;
3985
+ value: number;
3918
3986
  editable: boolean;
3919
- confirmed: string | null;
3920
- }, "The amount a transfer orders, as it is answered. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
3987
+ confirmed: number | null;
3988
+ }, "The amount a transfer orders, as it is answered: integers in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
3921
3989
  readonly settled: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3922
3990
  readonly currency: v.LiteralSchema<"CLP", undefined>;
3923
- readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
3991
+ readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>;
3924
3992
  readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3925
3993
  }, undefined>, v.DescriptionAction<{
3926
3994
  currency: "CLP";
3927
- value: string;
3995
+ value: number;
3928
3996
  at: string;
3929
3997
  }, "The money a transfer actually moved and when it settled. Present only once the transfer `succeeded`; null before, and null for ever when it fails, is rejected, cancelled or expires.">]>, undefined>;
3930
3998
  readonly fee: v.StrictObjectSchema<{
3931
3999
  readonly currency: v.LiteralSchema<"CLP", undefined>;
3932
4000
  readonly amount: v.LiteralSchema<"0", undefined>;
3933
4001
  }, undefined>;
3934
- readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and the bank asks the person to confirm it at `authorization_url` with their web PIN and an SMS code; the Intent becomes `processing.confirmed` only when the bank accepts it. A transfer created with `destination: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
4002
+ readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and AndCo asks the person to authorize it at `authorization_url` with their web AndPass and an SMS code; the Intent becomes `processing.confirmed` only when AndCo accepts it. A transfer created with `receiver: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
3935
4003
  readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
3936
4004
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
3937
4005
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
3938
4006
  readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3939
- readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
3940
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
3941
- readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
3942
- }, undefined>, v.DescriptionAction<{
3943
- value: string;
3944
- editable: boolean;
3945
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
3946
4007
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
3947
4008
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3948
4009
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
3949
4010
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
3950
4011
  }, undefined>, v.DescriptionAction<{
3951
4012
  type: "transfer";
3952
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
4013
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
3953
4014
  signed: boolean;
3954
- source: {
4015
+ sender: {
3955
4016
  type: "account_key";
3956
4017
  accountKey: string;
3957
4018
  } | {
3958
4019
  type: "account";
3959
4020
  id: string;
3960
4021
  } | null;
3961
- destination: {
4022
+ receiver: {
3962
4023
  editable: false;
3963
4024
  type: "account_key";
3964
4025
  accountKey: string;
@@ -3969,21 +4030,27 @@ export declare const rejectIntent: import("@orpc/contract").ProcedureContractBui
3969
4030
  } | {
3970
4031
  editable: false;
3971
4032
  type: "external";
3972
- bank_id: string;
3973
- account_type: "checking" | "debit" | "savings";
3974
- account_id: string;
3975
- holder_id: string;
3976
- holder_name: string;
4033
+ country: "CL";
4034
+ bank_code: string;
4035
+ account_type: "10" | "20" | "40";
4036
+ account_number: string;
4037
+ name: string;
4038
+ national_kind_id: "RUT";
4039
+ national_id: string;
3977
4040
  } | null;
4041
+ comment?: {
4042
+ value: string;
4043
+ editable: boolean;
4044
+ } | undefined;
3978
4045
  amount: {
3979
4046
  currency: "CLP";
3980
- value: string;
4047
+ value: number;
3981
4048
  editable: boolean;
3982
- confirmed: string | null;
4049
+ confirmed: number | null;
3983
4050
  };
3984
4051
  settled: {
3985
4052
  currency: "CLP";
3986
- value: string;
4053
+ value: number;
3987
4054
  at: string;
3988
4055
  } | null;
3989
4056
  fee: {
@@ -3995,19 +4062,15 @@ export declare const rejectIntent: import("@orpc/contract").ProcedureContractBui
3995
4062
  expires_in_seconds: number | null;
3996
4063
  id: string;
3997
4064
  resource_server: string;
3998
- note?: {
3999
- value: string;
4000
- editable: boolean;
4001
- } | undefined;
4002
4065
  metadata: {
4003
4066
  [x: string]: unknown;
4004
4067
  };
4005
4068
  server_time: string;
4006
4069
  created_at: string;
4007
4070
  authorization_url: string;
4008
- }, "Authoritative Project-facing state of a transfer. `source` and `destination` answer in the same matcher vocabulary as the request. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
4071
+ }, "Authoritative Project-facing state of a transfer, in Core's vocabulary (ADR 0093). `sender` and `receiver` answer in the same matcher vocabulary as the request, and `comment` is the request's comment. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
4009
4072
  readonly type: v.LiteralSchema<"account_opening", undefined>;
4010
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
4073
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
4011
4074
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
4012
4075
  readonly account: v.StrictObjectSchema<{
4013
4076
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -4017,22 +4080,22 @@ export declare const rejectIntent: import("@orpc/contract").ProcedureContractBui
4017
4080
  }, undefined>;
4018
4081
  readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
4019
4082
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
4020
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
4021
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
4022
4083
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
4023
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
4084
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
4024
4085
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
4025
4086
  }, undefined>, v.DescriptionAction<{
4026
4087
  value: string;
4027
4088
  editable: boolean;
4028
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
4089
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
4090
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
4091
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
4029
4092
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
4030
4093
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
4031
4094
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
4032
4095
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
4033
4096
  }, undefined>, v.DescriptionAction<{
4034
4097
  type: "account_opening";
4035
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
4098
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
4036
4099
  signed: boolean;
4037
4100
  account: {
4038
4101
  accountKey: string;
@@ -4042,12 +4105,12 @@ export declare const rejectIntent: import("@orpc/contract").ProcedureContractBui
4042
4105
  };
4043
4106
  expires_at: string | null;
4044
4107
  expires_in_seconds: number | null;
4045
- id: string;
4046
- resource_server: string;
4047
4108
  note?: {
4048
4109
  value: string;
4049
4110
  editable: boolean;
4050
4111
  } | undefined;
4112
+ id: string;
4113
+ resource_server: string;
4051
4114
  metadata: {
4052
4115
  [x: string]: unknown;
4053
4116
  };
@@ -4056,7 +4119,7 @@ export declare const rejectIntent: import("@orpc/contract").ProcedureContractBui
4056
4119
  authorization_url: string;
4057
4120
  }, "Authoritative Project-facing state of an account opening. It carries no amount and no fee: an opening moves no money. Opening is asynchronous, so `account.bank_account_id` is absent until the core assigns the Número de Cuenta, which arrives on the account's own event stream rather than in this response.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
4058
4121
  readonly type: v.LiteralSchema<"account_closure", undefined>;
4059
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
4122
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
4060
4123
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
4061
4124
  readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
4062
4125
  type: v.LiteralSchema<"account_key", undefined>;
@@ -4064,38 +4127,38 @@ export declare const rejectIntent: import("@orpc/contract").ProcedureContractBui
4064
4127
  }, undefined>, v.DescriptionAction<{
4065
4128
  type: "account_key";
4066
4129
  accountKey: string;
4067
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
4130
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
4068
4131
  type: v.LiteralSchema<"account", undefined>;
4069
4132
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
4070
4133
  }, undefined>, v.DescriptionAction<{
4071
4134
  type: "account";
4072
4135
  id: string;
4073
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
4136
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
4074
4137
  type: "account_key";
4075
4138
  accountKey: string;
4076
4139
  } | {
4077
4140
  type: "account";
4078
4141
  id: string;
4079
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
4142
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
4080
4143
  readonly resolved_account_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The account the reference resolved to, once resolution has happened, whether or not the closure itself has settled yet.">]>;
4081
4144
  readonly expires_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
4082
4145
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.DescriptionAction<number, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
4083
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
4084
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
4085
4146
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
4086
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
4147
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
4087
4148
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
4088
4149
  }, undefined>, v.DescriptionAction<{
4089
4150
  value: string;
4090
4151
  editable: boolean;
4091
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
4152
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
4153
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
4154
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
4092
4155
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
4093
4156
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
4094
4157
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
4095
4158
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
4096
4159
  }, undefined>, v.DescriptionAction<{
4097
4160
  type: "account_closure";
4098
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
4161
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
4099
4162
  signed: boolean;
4100
4163
  account: {
4101
4164
  type: "account_key";
@@ -4107,12 +4170,12 @@ export declare const rejectIntent: import("@orpc/contract").ProcedureContractBui
4107
4170
  resolved_account_id: string | null;
4108
4171
  expires_at: string;
4109
4172
  expires_in_seconds: number;
4110
- id: string;
4111
- resource_server: string;
4112
4173
  note?: {
4113
4174
  value: string;
4114
4175
  editable: boolean;
4115
4176
  } | undefined;
4177
+ id: string;
4178
+ resource_server: string;
4116
4179
  metadata: {
4117
4180
  [x: string]: unknown;
4118
4181
  };
@@ -4163,7 +4226,7 @@ export declare const cancelIntent: import("@orpc/contract").ProcedureContractBui
4163
4226
  account_type: "checking" | "debit" | "savings";
4164
4227
  holder_id: string | null;
4165
4228
  holder_name: string;
4166
- }, "The Andco account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
4229
+ }, "The AndCo account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
4167
4230
  readonly amount: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
4168
4231
  readonly currency: v.LiteralSchema<"CLP", undefined>;
4169
4232
  readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
@@ -4187,8 +4250,8 @@ export declare const cancelIntent: import("@orpc/contract").ProcedureContractBui
4187
4250
  readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
4188
4251
  readonly outcome: v.PicklistSchema<["credited", "reversed"], undefined>;
4189
4252
  readonly receipt_time_source: v.PicklistSchema<["bank_timestamp", "unknown"], undefined>;
4190
- readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as the bank reported it.">]>;
4191
- readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as the bank reported it.">]>;
4253
+ readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as AndCo reported it.">]>;
4254
+ readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as AndCo reported it.">]>;
4192
4255
  readonly sender_bank_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Display name of the sender's bank.">]>;
4193
4256
  readonly sender_account_type: v.NullableSchema<v.PicklistSchema<["checking", "debit", "savings"], undefined>, undefined>;
4194
4257
  readonly sender_account_number: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
@@ -4202,49 +4265,49 @@ export declare const cancelIntent: import("@orpc/contract").ProcedureContractBui
4202
4265
  }, undefined>;
4203
4266
  readonly expires_at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
4204
4267
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
4205
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
4206
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
4207
4268
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
4208
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
4269
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
4209
4270
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
4210
4271
  }, undefined>, v.DescriptionAction<{
4211
4272
  value: string;
4212
4273
  editable: boolean;
4213
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
4274
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
4275
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
4276
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
4214
4277
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
4215
4278
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
4216
4279
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
4217
4280
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
4218
4281
  }, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
4219
4282
  readonly type: v.LiteralSchema<"transfer", undefined>;
4220
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
4283
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
4221
4284
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
4222
- readonly source: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
4285
+ readonly sender: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
4223
4286
  type: v.LiteralSchema<"account_key", undefined>;
4224
4287
  accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
4225
4288
  }, undefined>, v.DescriptionAction<{
4226
4289
  type: "account_key";
4227
4290
  accountKey: string;
4228
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
4291
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
4229
4292
  type: v.LiteralSchema<"account", undefined>;
4230
4293
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
4231
4294
  }, undefined>, v.DescriptionAction<{
4232
4295
  type: "account";
4233
4296
  id: string;
4234
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
4297
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
4235
4298
  type: "account_key";
4236
4299
  accountKey: string;
4237
4300
  } | {
4238
4301
  type: "account";
4239
4302
  id: string;
4240
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
4303
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
4241
4304
  type: "account_key";
4242
4305
  accountKey: string;
4243
4306
  } | {
4244
4307
  type: "account";
4245
4308
  id: string;
4246
- } | null, "Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
4247
- readonly destination: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
4309
+ } | null, "The Remitente. Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
4310
+ readonly receiver: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
4248
4311
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
4249
4312
  readonly type: v.LiteralSchema<"account_key", undefined>;
4250
4313
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -4255,11 +4318,13 @@ export declare const cancelIntent: import("@orpc/contract").ProcedureContractBui
4255
4318
  }, undefined>, v.StrictObjectSchema<{
4256
4319
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
4257
4320
  readonly type: v.LiteralSchema<"external", undefined>;
4258
- readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
4259
- readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
4260
- readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
4261
- readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
4262
- readonly holder_name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
4321
+ readonly country: v.LiteralSchema<"CL", undefined>;
4322
+ readonly bank_code: 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`.">]>;
4323
+ readonly account_type: 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).">]>;
4324
+ readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
4325
+ readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
4326
+ readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
4327
+ readonly national_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, v.DescriptionAction<string, "The holder's RUT.">]>;
4263
4328
  }, undefined>], undefined>, v.DescriptionAction<{
4264
4329
  editable: false;
4265
4330
  type: "account_key";
@@ -4271,12 +4336,14 @@ export declare const cancelIntent: import("@orpc/contract").ProcedureContractBui
4271
4336
  } | {
4272
4337
  editable: false;
4273
4338
  type: "external";
4274
- bank_id: string;
4275
- account_type: "checking" | "debit" | "savings";
4276
- account_id: string;
4277
- holder_id: string;
4278
- holder_name: string;
4279
- }, "Where a transfer's money lands when it is named, in the request and in the answered Intent alike. A named destination is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `destination: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a destination the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
4339
+ country: "CL";
4340
+ bank_code: string;
4341
+ account_type: "10" | "20" | "40";
4342
+ account_number: string;
4343
+ name: string;
4344
+ national_kind_id: "RUT";
4345
+ national_id: string;
4346
+ }, "The Receptor of a transfer when it is named, in the request and in the answered Intent alike. A named Receptor is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `receiver: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a Receptor the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
4280
4347
  editable: false;
4281
4348
  type: "account_key";
4282
4349
  accountKey: string;
@@ -4287,64 +4354,66 @@ export declare const cancelIntent: import("@orpc/contract").ProcedureContractBui
4287
4354
  } | {
4288
4355
  editable: false;
4289
4356
  type: "external";
4290
- bank_id: string;
4291
- account_type: "checking" | "debit" | "savings";
4292
- account_id: string;
4293
- holder_id: string;
4294
- holder_name: string;
4295
- } | null, "Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
4357
+ country: "CL";
4358
+ bank_code: string;
4359
+ account_type: "10" | "20" | "40";
4360
+ account_number: string;
4361
+ name: string;
4362
+ national_kind_id: "RUT";
4363
+ national_id: string;
4364
+ } | null, "The Receptor. Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
4365
+ readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
4366
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty one is allowed.">]>;
4367
+ readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
4368
+ }, undefined>, v.DescriptionAction<{
4369
+ value: string;
4370
+ editable: boolean;
4371
+ }, "The comment a transfer asks for, as Core's `comment`: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
4296
4372
  readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
4297
4373
  readonly currency: v.LiteralSchema<"CLP", undefined>;
4298
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
4374
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "Immutable amount from the creation request, in the minor unit of the currency.">]>;
4299
4375
  readonly editable: v.BooleanSchema<undefined>;
4300
- readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
4376
+ readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>, undefined>, v.DescriptionAction<number | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
4301
4377
  }, undefined>, v.DescriptionAction<{
4302
4378
  currency: "CLP";
4303
- value: string;
4379
+ value: number;
4304
4380
  editable: boolean;
4305
- confirmed: string | null;
4306
- }, "The amount a transfer orders, as it is answered. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
4381
+ confirmed: number | null;
4382
+ }, "The amount a transfer orders, as it is answered: integers in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
4307
4383
  readonly settled: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
4308
4384
  readonly currency: v.LiteralSchema<"CLP", undefined>;
4309
- readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
4385
+ readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>;
4310
4386
  readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
4311
4387
  }, undefined>, v.DescriptionAction<{
4312
4388
  currency: "CLP";
4313
- value: string;
4389
+ value: number;
4314
4390
  at: string;
4315
4391
  }, "The money a transfer actually moved and when it settled. Present only once the transfer `succeeded`; null before, and null for ever when it fails, is rejected, cancelled or expires.">]>, undefined>;
4316
4392
  readonly fee: v.StrictObjectSchema<{
4317
4393
  readonly currency: v.LiteralSchema<"CLP", undefined>;
4318
4394
  readonly amount: v.LiteralSchema<"0", undefined>;
4319
4395
  }, undefined>;
4320
- readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and the bank asks the person to confirm it at `authorization_url` with their web PIN and an SMS code; the Intent becomes `processing.confirmed` only when the bank accepts it. A transfer created with `destination: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
4396
+ readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and AndCo asks the person to authorize it at `authorization_url` with their web AndPass and an SMS code; the Intent becomes `processing.confirmed` only when AndCo accepts it. A transfer created with `receiver: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
4321
4397
  readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
4322
4398
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
4323
4399
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
4324
4400
  readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
4325
- readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
4326
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
4327
- readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
4328
- }, undefined>, v.DescriptionAction<{
4329
- value: string;
4330
- editable: boolean;
4331
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
4332
4401
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
4333
4402
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
4334
4403
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
4335
4404
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
4336
4405
  }, undefined>, v.DescriptionAction<{
4337
4406
  type: "transfer";
4338
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
4407
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
4339
4408
  signed: boolean;
4340
- source: {
4409
+ sender: {
4341
4410
  type: "account_key";
4342
4411
  accountKey: string;
4343
4412
  } | {
4344
4413
  type: "account";
4345
4414
  id: string;
4346
4415
  } | null;
4347
- destination: {
4416
+ receiver: {
4348
4417
  editable: false;
4349
4418
  type: "account_key";
4350
4419
  accountKey: string;
@@ -4355,21 +4424,27 @@ export declare const cancelIntent: import("@orpc/contract").ProcedureContractBui
4355
4424
  } | {
4356
4425
  editable: false;
4357
4426
  type: "external";
4358
- bank_id: string;
4359
- account_type: "checking" | "debit" | "savings";
4360
- account_id: string;
4361
- holder_id: string;
4362
- holder_name: string;
4427
+ country: "CL";
4428
+ bank_code: string;
4429
+ account_type: "10" | "20" | "40";
4430
+ account_number: string;
4431
+ name: string;
4432
+ national_kind_id: "RUT";
4433
+ national_id: string;
4363
4434
  } | null;
4435
+ comment?: {
4436
+ value: string;
4437
+ editable: boolean;
4438
+ } | undefined;
4364
4439
  amount: {
4365
4440
  currency: "CLP";
4366
- value: string;
4441
+ value: number;
4367
4442
  editable: boolean;
4368
- confirmed: string | null;
4443
+ confirmed: number | null;
4369
4444
  };
4370
4445
  settled: {
4371
4446
  currency: "CLP";
4372
- value: string;
4447
+ value: number;
4373
4448
  at: string;
4374
4449
  } | null;
4375
4450
  fee: {
@@ -4381,19 +4456,15 @@ export declare const cancelIntent: import("@orpc/contract").ProcedureContractBui
4381
4456
  expires_in_seconds: number | null;
4382
4457
  id: string;
4383
4458
  resource_server: string;
4384
- note?: {
4385
- value: string;
4386
- editable: boolean;
4387
- } | undefined;
4388
4459
  metadata: {
4389
4460
  [x: string]: unknown;
4390
4461
  };
4391
4462
  server_time: string;
4392
4463
  created_at: string;
4393
4464
  authorization_url: string;
4394
- }, "Authoritative Project-facing state of a transfer. `source` and `destination` answer in the same matcher vocabulary as the request. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
4465
+ }, "Authoritative Project-facing state of a transfer, in Core's vocabulary (ADR 0093). `sender` and `receiver` answer in the same matcher vocabulary as the request, and `comment` is the request's comment. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
4395
4466
  readonly type: v.LiteralSchema<"account_opening", undefined>;
4396
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
4467
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
4397
4468
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
4398
4469
  readonly account: v.StrictObjectSchema<{
4399
4470
  readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
@@ -4403,22 +4474,22 @@ export declare const cancelIntent: import("@orpc/contract").ProcedureContractBui
4403
4474
  }, undefined>;
4404
4475
  readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
4405
4476
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
4406
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
4407
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
4408
4477
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
4409
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
4478
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
4410
4479
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
4411
4480
  }, undefined>, v.DescriptionAction<{
4412
4481
  value: string;
4413
4482
  editable: boolean;
4414
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
4483
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
4484
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
4485
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
4415
4486
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
4416
4487
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
4417
4488
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
4418
4489
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
4419
4490
  }, undefined>, v.DescriptionAction<{
4420
4491
  type: "account_opening";
4421
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
4492
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
4422
4493
  signed: boolean;
4423
4494
  account: {
4424
4495
  accountKey: string;
@@ -4428,12 +4499,12 @@ export declare const cancelIntent: import("@orpc/contract").ProcedureContractBui
4428
4499
  };
4429
4500
  expires_at: string | null;
4430
4501
  expires_in_seconds: number | null;
4431
- id: string;
4432
- resource_server: string;
4433
4502
  note?: {
4434
4503
  value: string;
4435
4504
  editable: boolean;
4436
4505
  } | undefined;
4506
+ id: string;
4507
+ resource_server: string;
4437
4508
  metadata: {
4438
4509
  [x: string]: unknown;
4439
4510
  };
@@ -4442,7 +4513,7 @@ export declare const cancelIntent: import("@orpc/contract").ProcedureContractBui
4442
4513
  authorization_url: string;
4443
4514
  }, "Authoritative Project-facing state of an account opening. It carries no amount and no fee: an opening moves no money. Opening is asynchronous, so `account.bank_account_id` is absent until the core assigns the Número de Cuenta, which arrives on the account's own event stream rather than in this response.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
4444
4515
  readonly type: v.LiteralSchema<"account_closure", undefined>;
4445
- readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
4516
+ readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
4446
4517
  readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
4447
4518
  readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
4448
4519
  type: v.LiteralSchema<"account_key", undefined>;
@@ -4450,38 +4521,38 @@ export declare const cancelIntent: import("@orpc/contract").ProcedureContractBui
4450
4521
  }, undefined>, v.DescriptionAction<{
4451
4522
  type: "account_key";
4452
4523
  accountKey: string;
4453
- }, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
4524
+ }, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
4454
4525
  type: v.LiteralSchema<"account", undefined>;
4455
4526
  id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
4456
4527
  }, undefined>, v.DescriptionAction<{
4457
4528
  type: "account";
4458
4529
  id: string;
4459
- }, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
4530
+ }, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
4460
4531
  type: "account_key";
4461
4532
  accountKey: string;
4462
4533
  } | {
4463
4534
  type: "account";
4464
4535
  id: string;
4465
- }, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
4536
+ }, "One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
4466
4537
  readonly resolved_account_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The account the reference resolved to, once resolution has happened, whether or not the closure itself has settled yet.">]>;
4467
4538
  readonly expires_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
4468
4539
  readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.DescriptionAction<number, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
4469
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
4470
- readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
4471
4540
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
4472
- readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
4541
+ readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
4473
4542
  readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
4474
4543
  }, undefined>, v.DescriptionAction<{
4475
4544
  value: string;
4476
4545
  editable: boolean;
4477
- }, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
4546
+ }, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
4547
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
4548
+ readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
4478
4549
  readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
4479
4550
  readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
4480
4551
  readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
4481
4552
  readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
4482
4553
  }, undefined>, v.DescriptionAction<{
4483
4554
  type: "account_closure";
4484
- status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
4555
+ status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
4485
4556
  signed: boolean;
4486
4557
  account: {
4487
4558
  type: "account_key";
@@ -4493,12 +4564,12 @@ export declare const cancelIntent: import("@orpc/contract").ProcedureContractBui
4493
4564
  resolved_account_id: string | null;
4494
4565
  expires_at: string;
4495
4566
  expires_in_seconds: number;
4496
- id: string;
4497
- resource_server: string;
4498
4567
  note?: {
4499
4568
  value: string;
4500
4569
  editable: boolean;
4501
4570
  } | undefined;
4571
+ id: string;
4572
+ resource_server: string;
4502
4573
  metadata: {
4503
4574
  [x: string]: unknown;
4504
4575
  };