@andco/protocol 0.0.3 → 0.0.5

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 (113) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +51 -3
  3. package/dist/api-errors.d.ts +114 -0
  4. package/dist/api-errors.d.ts.map +1 -0
  5. package/dist/api-errors.js +116 -0
  6. package/dist/authorization-preparation.d.ts +52 -543
  7. package/dist/authorization-preparation.d.ts.map +1 -1
  8. package/dist/authorization-preparation.js +19 -42
  9. package/dist/authorization.d.ts +64 -22
  10. package/dist/authorization.d.ts.map +1 -1
  11. package/dist/authorization.js +136 -55
  12. package/dist/consent.d.ts +5 -8
  13. package/dist/consent.d.ts.map +1 -1
  14. package/dist/consent.js +5 -62
  15. package/dist/constants.d.ts +19 -3
  16. package/dist/constants.d.ts.map +1 -1
  17. package/dist/constants.js +19 -3
  18. package/dist/errors.d.ts +154 -58
  19. package/dist/errors.d.ts.map +1 -1
  20. package/dist/errors.js +174 -57
  21. package/dist/index.d.ts +4 -4
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +4 -4
  24. package/dist/intent-input.d.ts +1022 -288
  25. package/dist/intent-input.d.ts.map +1 -1
  26. package/dist/intent-input.js +284 -40
  27. package/dist/messages/error.d.ts +1 -2
  28. package/dist/messages/error.d.ts.map +1 -1
  29. package/dist/messages/error.js +5 -2
  30. package/dist/messages/index.d.ts +1 -1
  31. package/dist/native-copy.d.ts +23 -2
  32. package/dist/native-copy.d.ts.map +1 -1
  33. package/dist/native-copy.js +65 -117
  34. package/dist/native-intent.d.ts +126 -75
  35. package/dist/native-intent.d.ts.map +1 -1
  36. package/dist/native-intent.js +140 -48
  37. package/dist/rar/account-matchers.d.ts +579 -0
  38. package/dist/rar/account-matchers.d.ts.map +1 -0
  39. package/dist/rar/account-matchers.js +480 -0
  40. package/dist/rar/bank.d.ts +1549 -0
  41. package/dist/rar/bank.d.ts.map +1 -0
  42. package/dist/rar/bank.js +379 -0
  43. package/dist/rar/catalog.d.ts +1155 -0
  44. package/dist/rar/catalog.d.ts.map +1 -0
  45. package/dist/rar/catalog.js +175 -0
  46. package/dist/rar/detail.d.ts +39 -0
  47. package/dist/rar/detail.d.ts.map +1 -0
  48. package/dist/rar/detail.js +44 -0
  49. package/dist/rar/index.d.ts +9 -0
  50. package/dist/rar/index.d.ts.map +1 -0
  51. package/dist/rar/index.js +8 -0
  52. package/dist/rar/money.d.ts +58 -0
  53. package/dist/rar/money.d.ts.map +1 -0
  54. package/dist/rar/money.js +61 -0
  55. package/dist/rar/project-users.d.ts +43 -0
  56. package/dist/rar/project-users.d.ts.map +1 -0
  57. package/dist/rar/project-users.js +63 -0
  58. package/dist/rar/subject-data.d.ts +170 -0
  59. package/dist/rar/subject-data.d.ts.map +1 -0
  60. package/dist/rar/subject-data.js +127 -0
  61. package/dist/rar/subject.d.ts +166 -0
  62. package/dist/rar/subject.d.ts.map +1 -0
  63. package/dist/rar/subject.js +119 -0
  64. package/dist/scopes.d.ts +5 -30
  65. package/dist/scopes.d.ts.map +1 -1
  66. package/dist/scopes.js +0 -13
  67. package/dist/service-grants.d.ts +44 -0
  68. package/dist/service-grants.d.ts.map +1 -0
  69. package/dist/service-grants.js +45 -0
  70. package/dist/signing.d.ts +56 -0
  71. package/dist/signing.d.ts.map +1 -0
  72. package/dist/signing.js +233 -0
  73. package/dist/transport/financial-events.d.ts +90 -35
  74. package/dist/transport/financial-events.d.ts.map +1 -1
  75. package/dist/transport/financial-events.js +7 -1
  76. package/dist/transport/generated/oauth-api.d.ts +932 -441
  77. package/dist/transport/generated/oauth-api.d.ts.map +1 -1
  78. package/dist/transport/index.d.ts +0 -1
  79. package/dist/transport/index.d.ts.map +1 -1
  80. package/dist/transport/index.js +0 -1
  81. package/dist/transport/intents.d.ts +155 -23
  82. package/dist/transport/intents.d.ts.map +1 -1
  83. package/dist/transport/intents.js +192 -59
  84. package/dist/transport/rest.d.ts +19 -8
  85. package/dist/transport/rest.d.ts.map +1 -1
  86. package/dist/transport/rest.js +1 -1
  87. package/dist/urls.d.ts.map +1 -1
  88. package/dist/urls.js +1 -1
  89. package/dist/userinfo.d.ts +10 -1
  90. package/dist/userinfo.d.ts.map +1 -1
  91. package/dist/userinfo.js +10 -1
  92. package/dist/utils.d.ts +15 -0
  93. package/dist/utils.d.ts.map +1 -1
  94. package/dist/utils.js +31 -0
  95. package/dist/webhooks.d.ts +154 -0
  96. package/dist/webhooks.d.ts.map +1 -0
  97. package/dist/webhooks.js +249 -0
  98. package/package.json +21 -2
  99. package/dist/automatic-charge.d.ts +0 -314
  100. package/dist/automatic-charge.d.ts.map +0 -1
  101. package/dist/automatic-charge.js +0 -126
  102. package/dist/bank-account-authorization.d.ts +0 -6
  103. package/dist/bank-account-authorization.d.ts.map +0 -1
  104. package/dist/bank-account-authorization.js +0 -13
  105. package/dist/transport/webhooks.d.ts +0 -27
  106. package/dist/transport/webhooks.d.ts.map +0 -1
  107. package/dist/transport/webhooks.js +0 -68
  108. package/dist/webhook-input.d.ts +0 -22
  109. package/dist/webhook-input.d.ts.map +0 -1
  110. package/dist/webhook-input.js +0 -11
  111. package/dist/webhook-signature.d.ts +0 -54
  112. package/dist/webhook-signature.d.ts.map +0 -1
  113. package/dist/webhook-signature.js +0 -74
@@ -1,150 +1,246 @@
1
1
  import * as v from "valibot";
2
+ /**
3
+ * One Andco account of the Grant's subject, named by Account Alias or by identifier: where a
4
+ * transfer's money leaves from, where a deposit lands, and the account a closure closes.
5
+ *
6
+ * @example
7
+ * const account: IntentAccount = { type: "alias", alias: "ventas" };
8
+ */
9
+ declare const andcoAccount: v.VariantSchema<"type", [v.StrictObjectSchema<{
10
+ type: v.LiteralSchema<"alias", undefined>;
11
+ alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
12
+ }, undefined>, v.StrictObjectSchema<{
13
+ type: v.LiteralSchema<"account", undefined>;
14
+ id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
15
+ }, undefined>], undefined>;
16
+ /** One Andco account named by Account Alias or by identifier, exactly as an Intent carries it. */
17
+ export type IntentAccount = v.InferOutput<typeof andcoAccount>;
18
+ /** Where a signed transfer's money lands: nothing on this path is left for a person to complete. */
19
+ declare const signedTransferDestination: v.VariantSchema<"type", [v.StrictObjectSchema<{
20
+ type: v.LiteralSchema<"alias", undefined>;
21
+ alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
22
+ }, undefined>, v.StrictObjectSchema<{
23
+ type: v.LiteralSchema<"account", undefined>;
24
+ id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
25
+ }, undefined>, v.StrictObjectSchema<{
26
+ type: v.LiteralSchema<"external", undefined>;
27
+ bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
28
+ account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
29
+ account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
30
+ holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
31
+ holder_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
32
+ }, undefined>], undefined>;
33
+ /** One account a transfer names, exactly as a signed instruction carries it. */
34
+ export type TransferAccount = v.InferOutput<typeof signedTransferDestination>;
2
35
  /** Validates fixed-duration syntax without anchoring it to a changing clock. */
3
36
  export declare function isIntentDuration(value: string): boolean;
4
37
  /** Validates a real ISO calendar datetime with a timezone; past dates remain valid for idempotent replay. */
5
38
  export declare function isIntentDeadline(value: string): boolean;
6
- /** Public creation validation shared by the API and SDK. SQL resolves deadlines and enforces authorization. */
39
+ /**
40
+ * Public creation validation shared by the API and SDK. SQL resolves deadlines and enforces authorization.
41
+ *
42
+ * This is the `application/json` half of the creation contract: an Intent born waiting for an
43
+ * Approval, where a `null` means a person will choose. The `application/jwt` half is
44
+ * {@link SignedIntentSchema}, and the two are separate schemas rather than one with optional fields
45
+ * on purpose — when signed and unsigned members share an object, something eventually reads the
46
+ * wrong ones.
47
+ *
48
+ * `transfer` is the only way money movement is expressed: money leaving an account towards a
49
+ * `destination`, both named in the `bank_transfer` matcher vocabulary (`alias`, `account`,
50
+ * `external`). A null `source` is the confirmation screen's source picker; the amount and the
51
+ * destination are always locked there (`editable: true` is refused). Who may approve the Intent without a person belongs to the Grant, never to
52
+ * the operation itself.
53
+ *
54
+ * @example
55
+ * safeParseIntentCreate({
56
+ * type: "transfer", expires_in: "30 minutes", source: null,
57
+ * destination: { type: "alias", alias: "proveedores" },
58
+ * amount: { currency: "CLP", value: "40000" },
59
+ * note: { value: "Factura 42", editable: true },
60
+ * });
61
+ *
62
+ * `account_opening` is here for the same reason money movement is: everything with banking
63
+ * consequence happens through an Intent, so `/accounts` has no `POST`. It carries no amount, no
64
+ * source and no destination — only the name the account will answer to, and whether naming one that
65
+ * already exists is an error or a request for the account that is already there.
66
+ */
7
67
  export declare const IntentCreateSchema: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
8
68
  readonly type: v.LiteralSchema<"deposit", undefined>;
69
+ readonly destination: v.OptionalSchema<v.VariantSchema<"type", [v.StrictObjectSchema<{
70
+ type: v.LiteralSchema<"alias", undefined>;
71
+ alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
72
+ }, undefined>, v.StrictObjectSchema<{
73
+ type: v.LiteralSchema<"account", undefined>;
74
+ id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
75
+ }, undefined>], undefined>, undefined>;
9
76
  readonly amount: v.OptionalSchema<v.StrictObjectSchema<{
10
77
  currency: v.LiteralSchema<"CLP", undefined>;
78
+ value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.CheckAction<string, undefined>]>;
11
79
  editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
12
- suggested: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.CheckAction<string, undefined>]>;
13
80
  }, undefined>, undefined>;
14
81
  readonly expires_at: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>, undefined>;
15
82
  readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
16
83
  readonly note: v.OptionalSchema<v.StrictObjectSchema<{
17
- readonly suggested: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>;
84
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>;
18
85
  readonly editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
19
86
  }, undefined>, undefined>;
20
87
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
21
88
  }, undefined>, v.StrictObjectSchema<{
22
- readonly type: v.LiteralSchema<"withdrawal", undefined>;
89
+ readonly type: v.LiteralSchema<"transfer", undefined>;
23
90
  readonly amount: v.StrictObjectSchema<{
24
91
  currency: v.LiteralSchema<"CLP", undefined>;
25
- editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
26
- suggested: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.CheckAction<string, undefined>]>;
92
+ value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.CheckAction<string, undefined>]>;
93
+ editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
27
94
  }, undefined>;
28
- readonly source: v.OptionalSchema<v.NullableSchema<v.UnionSchema<[v.StrictObjectSchema<{
29
- readonly bank_account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
95
+ readonly source: v.OptionalSchema<v.NullableSchema<v.VariantSchema<"type", [v.StrictObjectSchema<{
96
+ type: v.LiteralSchema<"alias", undefined>;
97
+ alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
30
98
  }, undefined>, v.StrictObjectSchema<{
31
- account_holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
32
- account_holder_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
33
- account_kind: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
34
- account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
35
- bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
36
- country: v.LiteralSchema<"CL", undefined>;
99
+ type: v.LiteralSchema<"account", undefined>;
100
+ id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
37
101
  }, undefined>], undefined>, undefined>, null>;
38
- readonly beneficiary: v.UnionSchema<[v.StrictObjectSchema<{
39
- readonly editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
40
- readonly account_holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
41
- readonly account_holder_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
42
- readonly account_kind: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
43
- readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
44
- readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
45
- readonly country: v.LiteralSchema<"CL", undefined>;
102
+ readonly destination: v.VariantSchema<"type", [v.StrictObjectSchema<{
103
+ readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
104
+ readonly type: v.LiteralSchema<"alias", undefined>;
105
+ readonly alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
46
106
  }, undefined>, v.StrictObjectSchema<{
47
- readonly bank_account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
48
107
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
108
+ readonly type: v.LiteralSchema<"account", undefined>;
109
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
110
+ }, undefined>, v.StrictObjectSchema<{
111
+ readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
112
+ readonly type: v.LiteralSchema<"external", undefined>;
113
+ readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
114
+ readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
115
+ readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
116
+ readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
117
+ readonly holder_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
49
118
  }, undefined>], undefined>;
50
119
  readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
51
120
  readonly expires_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>;
52
121
  readonly note: v.OptionalSchema<v.StrictObjectSchema<{
53
- readonly suggested: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>;
122
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>;
54
123
  readonly editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
55
124
  }, undefined>, undefined>;
56
125
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
57
126
  }, undefined>, v.StrictObjectSchema<{
58
- readonly type: v.LiteralSchema<"automatic_charge", undefined>;
59
- readonly amount: v.StrictObjectSchema<{
60
- readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
61
- readonly currency: v.LiteralSchema<"CLP", undefined>;
62
- readonly suggested: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.CheckAction<string, undefined>]>;
63
- }, undefined>;
64
- readonly source: v.OptionalSchema<v.NullableSchema<v.StrictObjectSchema<{
65
- readonly bank_account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
66
- }, undefined>, undefined>, null>;
67
- readonly beneficiary: v.StrictObjectSchema<{
68
- readonly bank_account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
69
- }, undefined>;
127
+ readonly type: v.LiteralSchema<"account_opening", undefined>;
128
+ readonly alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
129
+ readonly name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>, undefined>;
130
+ readonly upsert: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
70
131
  readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
71
132
  readonly expires_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>;
72
133
  readonly note: v.OptionalSchema<v.StrictObjectSchema<{
73
- readonly suggested: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>;
134
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>;
135
+ readonly editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
136
+ }, undefined>, undefined>;
137
+ readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
138
+ }, undefined>, v.StrictObjectSchema<{
139
+ readonly type: v.LiteralSchema<"account_closure", undefined>;
140
+ readonly account: v.VariantSchema<"type", [v.StrictObjectSchema<{
141
+ type: v.LiteralSchema<"alias", undefined>;
142
+ alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
143
+ }, undefined>, v.StrictObjectSchema<{
144
+ type: v.LiteralSchema<"account", undefined>;
145
+ id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
146
+ }, undefined>], undefined>;
147
+ readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
148
+ readonly expires_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>;
149
+ readonly note: v.OptionalSchema<v.StrictObjectSchema<{
150
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>;
74
151
  readonly editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
75
152
  }, undefined>, undefined>;
76
153
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
77
154
  }, undefined>], undefined>, v.CheckAction<{
78
155
  type: "deposit";
156
+ destination?: {
157
+ type: "alias";
158
+ alias: string;
159
+ } | {
160
+ type: "account";
161
+ id: string;
162
+ } | undefined;
79
163
  amount?: {
80
164
  currency: "CLP";
165
+ value: string;
81
166
  editable: boolean;
82
- suggested: string;
83
167
  } | undefined;
84
168
  expires_at?: string | null | undefined;
85
169
  expires_in?: string | undefined;
86
170
  note?: {
87
- suggested: string;
171
+ value: string;
88
172
  editable: boolean;
89
173
  } | undefined;
90
174
  metadata: {
91
175
  [x: string]: unknown;
92
176
  };
93
177
  } | {
94
- type: "withdrawal";
178
+ type: "transfer";
95
179
  amount: {
96
180
  currency: "CLP";
97
- editable: boolean;
98
- suggested: string;
181
+ value: string;
182
+ editable: false;
99
183
  };
100
184
  source: {
101
- bank_account_id: string;
185
+ type: "alias";
186
+ alias: string;
102
187
  } | {
103
- account_holder_id: string;
104
- account_holder_name: string;
105
- account_kind: "checking" | "debit" | "savings";
106
- account_number: string;
107
- bank_id: string;
108
- country: "CL";
188
+ type: "account";
189
+ id: string;
109
190
  } | null;
110
- beneficiary: {
111
- editable: boolean;
112
- account_holder_id: string;
113
- account_holder_name: string;
114
- account_kind: "checking" | "debit" | "savings";
115
- account_number: string;
116
- bank_id: string;
117
- country: "CL";
191
+ destination: {
192
+ editable: false;
193
+ type: "alias";
194
+ alias: string;
118
195
  } | {
119
- bank_account_id: string;
120
196
  editable: false;
197
+ type: "account";
198
+ id: string;
199
+ } | {
200
+ editable: false;
201
+ type: "external";
202
+ bank_id: string;
203
+ account_type: "checking" | "debit" | "savings";
204
+ account_id: string;
205
+ holder_id: string;
206
+ holder_name: string;
121
207
  };
122
208
  expires_in?: string | undefined;
123
209
  expires_at?: string | undefined;
124
210
  note?: {
125
- suggested: string;
211
+ value: string;
126
212
  editable: boolean;
127
213
  } | undefined;
128
214
  metadata: {
129
215
  [x: string]: unknown;
130
216
  };
131
217
  } | {
132
- type: "automatic_charge";
133
- amount: {
134
- editable: false;
135
- currency: "CLP";
136
- suggested: string;
218
+ type: "account_opening";
219
+ alias: string;
220
+ name?: string | undefined;
221
+ upsert: boolean;
222
+ expires_in?: string | undefined;
223
+ expires_at?: string | undefined;
224
+ note?: {
225
+ value: string;
226
+ editable: boolean;
227
+ } | undefined;
228
+ metadata: {
229
+ [x: string]: unknown;
137
230
  };
138
- source: {
139
- bank_account_id: string;
140
- } | null;
141
- beneficiary: {
142
- bank_account_id: string;
231
+ } | {
232
+ type: "account_closure";
233
+ account: {
234
+ type: "alias";
235
+ alias: string;
236
+ } | {
237
+ type: "account";
238
+ id: string;
143
239
  };
144
240
  expires_in?: string | undefined;
145
241
  expires_at?: string | undefined;
146
242
  note?: {
147
- suggested: string;
243
+ value: string;
148
244
  editable: boolean;
149
245
  } | undefined;
150
246
  metadata: {
@@ -152,75 +248,94 @@ export declare const IntentCreateSchema: v.SchemaWithPipe<readonly [v.VariantSch
152
248
  };
153
249
  }, "exactly_one_expiration_required">, v.CheckAction<{
154
250
  type: "deposit";
251
+ destination?: {
252
+ type: "alias";
253
+ alias: string;
254
+ } | {
255
+ type: "account";
256
+ id: string;
257
+ } | undefined;
155
258
  amount?: {
156
259
  currency: "CLP";
260
+ value: string;
157
261
  editable: boolean;
158
- suggested: string;
159
262
  } | undefined;
160
263
  expires_at?: string | null | undefined;
161
264
  expires_in?: string | undefined;
162
265
  note?: {
163
- suggested: string;
266
+ value: string;
164
267
  editable: boolean;
165
268
  } | undefined;
166
269
  metadata: {
167
270
  [x: string]: unknown;
168
271
  };
169
272
  } | {
170
- type: "withdrawal";
273
+ type: "transfer";
171
274
  amount: {
172
275
  currency: "CLP";
173
- editable: boolean;
174
- suggested: string;
276
+ value: string;
277
+ editable: false;
175
278
  };
176
279
  source: {
177
- bank_account_id: string;
280
+ type: "alias";
281
+ alias: string;
178
282
  } | {
179
- account_holder_id: string;
180
- account_holder_name: string;
181
- account_kind: "checking" | "debit" | "savings";
182
- account_number: string;
183
- bank_id: string;
184
- country: "CL";
283
+ type: "account";
284
+ id: string;
185
285
  } | null;
186
- beneficiary: {
187
- editable: boolean;
188
- account_holder_id: string;
189
- account_holder_name: string;
190
- account_kind: "checking" | "debit" | "savings";
191
- account_number: string;
192
- bank_id: string;
193
- country: "CL";
286
+ destination: {
287
+ editable: false;
288
+ type: "alias";
289
+ alias: string;
194
290
  } | {
195
- bank_account_id: string;
196
291
  editable: false;
292
+ type: "account";
293
+ id: string;
294
+ } | {
295
+ editable: false;
296
+ type: "external";
297
+ bank_id: string;
298
+ account_type: "checking" | "debit" | "savings";
299
+ account_id: string;
300
+ holder_id: string;
301
+ holder_name: string;
197
302
  };
198
303
  expires_in?: string | undefined;
199
304
  expires_at?: string | undefined;
200
305
  note?: {
201
- suggested: string;
306
+ value: string;
202
307
  editable: boolean;
203
308
  } | undefined;
204
309
  metadata: {
205
310
  [x: string]: unknown;
206
311
  };
207
312
  } | {
208
- type: "automatic_charge";
209
- amount: {
210
- editable: false;
211
- currency: "CLP";
212
- suggested: string;
313
+ type: "account_opening";
314
+ alias: string;
315
+ name?: string | undefined;
316
+ upsert: boolean;
317
+ expires_in?: string | undefined;
318
+ expires_at?: string | undefined;
319
+ note?: {
320
+ value: string;
321
+ editable: boolean;
322
+ } | undefined;
323
+ metadata: {
324
+ [x: string]: unknown;
213
325
  };
214
- source: {
215
- bank_account_id: string;
216
- } | null;
217
- beneficiary: {
218
- bank_account_id: string;
326
+ } | {
327
+ type: "account_closure";
328
+ account: {
329
+ type: "alias";
330
+ alias: string;
331
+ } | {
332
+ type: "account";
333
+ id: string;
219
334
  };
220
335
  expires_in?: string | undefined;
221
336
  expires_at?: string | undefined;
222
337
  note?: {
223
- suggested: string;
338
+ value: string;
224
339
  editable: boolean;
225
340
  } | undefined;
226
341
  metadata: {
@@ -228,223 +343,280 @@ export declare const IntentCreateSchema: v.SchemaWithPipe<readonly [v.VariantSch
228
343
  };
229
344
  }, "passive_deposit_requires_no_target">, v.CheckAction<{
230
345
  type: "deposit";
346
+ destination?: {
347
+ type: "alias";
348
+ alias: string;
349
+ } | {
350
+ type: "account";
351
+ id: string;
352
+ } | undefined;
231
353
  amount?: {
232
354
  currency: "CLP";
355
+ value: string;
233
356
  editable: boolean;
234
- suggested: string;
235
357
  } | undefined;
236
358
  expires_at?: string | null | undefined;
237
359
  expires_in?: string | undefined;
238
360
  note?: {
239
- suggested: string;
361
+ value: string;
240
362
  editable: boolean;
241
363
  } | undefined;
242
364
  metadata: {
243
365
  [x: string]: unknown;
244
366
  };
245
367
  } | {
246
- type: "withdrawal";
368
+ type: "transfer";
247
369
  amount: {
248
370
  currency: "CLP";
249
- editable: boolean;
250
- suggested: string;
371
+ value: string;
372
+ editable: false;
251
373
  };
252
374
  source: {
253
- bank_account_id: string;
375
+ type: "alias";
376
+ alias: string;
254
377
  } | {
255
- account_holder_id: string;
256
- account_holder_name: string;
257
- account_kind: "checking" | "debit" | "savings";
258
- account_number: string;
259
- bank_id: string;
260
- country: "CL";
378
+ type: "account";
379
+ id: string;
261
380
  } | null;
262
- beneficiary: {
263
- editable: boolean;
264
- account_holder_id: string;
265
- account_holder_name: string;
266
- account_kind: "checking" | "debit" | "savings";
267
- account_number: string;
268
- bank_id: string;
269
- country: "CL";
381
+ destination: {
382
+ editable: false;
383
+ type: "alias";
384
+ alias: string;
385
+ } | {
386
+ editable: false;
387
+ type: "account";
388
+ id: string;
270
389
  } | {
271
- bank_account_id: string;
272
390
  editable: false;
391
+ type: "external";
392
+ bank_id: string;
393
+ account_type: "checking" | "debit" | "savings";
394
+ account_id: string;
395
+ holder_id: string;
396
+ holder_name: string;
273
397
  };
274
398
  expires_in?: string | undefined;
275
399
  expires_at?: string | undefined;
276
400
  note?: {
277
- suggested: string;
401
+ value: string;
278
402
  editable: boolean;
279
403
  } | undefined;
280
404
  metadata: {
281
405
  [x: string]: unknown;
282
406
  };
283
407
  } | {
284
- type: "automatic_charge";
285
- amount: {
286
- editable: false;
287
- currency: "CLP";
288
- suggested: string;
408
+ type: "account_opening";
409
+ alias: string;
410
+ name?: string | undefined;
411
+ upsert: boolean;
412
+ expires_in?: string | undefined;
413
+ expires_at?: string | undefined;
414
+ note?: {
415
+ value: string;
416
+ editable: boolean;
417
+ } | undefined;
418
+ metadata: {
419
+ [x: string]: unknown;
289
420
  };
290
- source: {
291
- bank_account_id: string;
292
- } | null;
293
- beneficiary: {
294
- bank_account_id: string;
421
+ } | {
422
+ type: "account_closure";
423
+ account: {
424
+ type: "alias";
425
+ alias: string;
426
+ } | {
427
+ type: "account";
428
+ id: string;
295
429
  };
296
430
  expires_in?: string | undefined;
297
431
  expires_at?: string | undefined;
298
432
  note?: {
299
- suggested: string;
433
+ value: string;
300
434
  editable: boolean;
301
435
  } | undefined;
302
436
  metadata: {
303
437
  [x: string]: unknown;
304
438
  };
305
439
  }, "metadata_too_large">]>;
440
+ /** Validated Intent creation payload inferred from the public schema. */
441
+ export type IntentCreate = v.InferOutput<typeof IntentCreateSchema>;
306
442
  /** Returns validation issues without throwing across the HTTP boundary. */
307
443
  export declare function safeParseIntentCreate(input: unknown): v.SafeParseResult<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
308
444
  readonly type: v.LiteralSchema<"deposit", undefined>;
445
+ readonly destination: v.OptionalSchema<v.VariantSchema<"type", [v.StrictObjectSchema<{
446
+ type: v.LiteralSchema<"alias", undefined>;
447
+ alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
448
+ }, undefined>, v.StrictObjectSchema<{
449
+ type: v.LiteralSchema<"account", undefined>;
450
+ id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
451
+ }, undefined>], undefined>, undefined>;
309
452
  readonly amount: v.OptionalSchema<v.StrictObjectSchema<{
310
453
  currency: v.LiteralSchema<"CLP", undefined>;
454
+ value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.CheckAction<string, undefined>]>;
311
455
  editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
312
- suggested: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.CheckAction<string, undefined>]>;
313
456
  }, undefined>, undefined>;
314
457
  readonly expires_at: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>, undefined>;
315
458
  readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
316
459
  readonly note: v.OptionalSchema<v.StrictObjectSchema<{
317
- readonly suggested: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>;
460
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>;
318
461
  readonly editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
319
462
  }, undefined>, undefined>;
320
463
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
321
464
  }, undefined>, v.StrictObjectSchema<{
322
- readonly type: v.LiteralSchema<"withdrawal", undefined>;
465
+ readonly type: v.LiteralSchema<"transfer", undefined>;
323
466
  readonly amount: v.StrictObjectSchema<{
324
467
  currency: v.LiteralSchema<"CLP", undefined>;
325
- editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
326
- suggested: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.CheckAction<string, undefined>]>;
468
+ value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.CheckAction<string, undefined>]>;
469
+ editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
327
470
  }, undefined>;
328
- readonly source: v.OptionalSchema<v.NullableSchema<v.UnionSchema<[v.StrictObjectSchema<{
329
- readonly bank_account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
471
+ readonly source: v.OptionalSchema<v.NullableSchema<v.VariantSchema<"type", [v.StrictObjectSchema<{
472
+ type: v.LiteralSchema<"alias", undefined>;
473
+ alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
330
474
  }, undefined>, v.StrictObjectSchema<{
331
- account_holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
332
- account_holder_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
333
- account_kind: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
334
- account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
335
- bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
336
- country: v.LiteralSchema<"CL", undefined>;
475
+ type: v.LiteralSchema<"account", undefined>;
476
+ id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
337
477
  }, undefined>], undefined>, undefined>, null>;
338
- readonly beneficiary: v.UnionSchema<[v.StrictObjectSchema<{
339
- readonly editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
340
- readonly account_holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
341
- readonly account_holder_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
342
- readonly account_kind: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
343
- readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
344
- readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
345
- readonly country: v.LiteralSchema<"CL", undefined>;
478
+ readonly destination: v.VariantSchema<"type", [v.StrictObjectSchema<{
479
+ readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
480
+ readonly type: v.LiteralSchema<"alias", undefined>;
481
+ readonly alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
482
+ }, undefined>, v.StrictObjectSchema<{
483
+ readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
484
+ readonly type: v.LiteralSchema<"account", undefined>;
485
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
346
486
  }, undefined>, v.StrictObjectSchema<{
347
- readonly bank_account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
348
487
  readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
488
+ readonly type: v.LiteralSchema<"external", undefined>;
489
+ readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
490
+ readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
491
+ readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
492
+ readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
493
+ readonly holder_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
349
494
  }, undefined>], undefined>;
350
495
  readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
351
496
  readonly expires_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>;
352
497
  readonly note: v.OptionalSchema<v.StrictObjectSchema<{
353
- readonly suggested: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>;
498
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>;
354
499
  readonly editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
355
500
  }, undefined>, undefined>;
356
501
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
357
502
  }, undefined>, v.StrictObjectSchema<{
358
- readonly type: v.LiteralSchema<"automatic_charge", undefined>;
359
- readonly amount: v.StrictObjectSchema<{
360
- readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
361
- readonly currency: v.LiteralSchema<"CLP", undefined>;
362
- readonly suggested: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.CheckAction<string, undefined>]>;
363
- }, undefined>;
364
- readonly source: v.OptionalSchema<v.NullableSchema<v.StrictObjectSchema<{
365
- readonly bank_account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
366
- }, undefined>, undefined>, null>;
367
- readonly beneficiary: v.StrictObjectSchema<{
368
- readonly bank_account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
369
- }, undefined>;
503
+ readonly type: v.LiteralSchema<"account_opening", undefined>;
504
+ readonly alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
505
+ readonly name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>, undefined>;
506
+ readonly upsert: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
507
+ readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
508
+ readonly expires_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>;
509
+ readonly note: v.OptionalSchema<v.StrictObjectSchema<{
510
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>;
511
+ readonly editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
512
+ }, undefined>, undefined>;
513
+ readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
514
+ }, undefined>, v.StrictObjectSchema<{
515
+ readonly type: v.LiteralSchema<"account_closure", undefined>;
516
+ readonly account: v.VariantSchema<"type", [v.StrictObjectSchema<{
517
+ type: v.LiteralSchema<"alias", undefined>;
518
+ alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
519
+ }, undefined>, v.StrictObjectSchema<{
520
+ type: v.LiteralSchema<"account", undefined>;
521
+ id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
522
+ }, undefined>], undefined>;
370
523
  readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
371
524
  readonly expires_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>;
372
525
  readonly note: v.OptionalSchema<v.StrictObjectSchema<{
373
- readonly suggested: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>;
526
+ readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>;
374
527
  readonly editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
375
528
  }, undefined>, undefined>;
376
529
  readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
377
530
  }, undefined>], undefined>, v.CheckAction<{
378
531
  type: "deposit";
532
+ destination?: {
533
+ type: "alias";
534
+ alias: string;
535
+ } | {
536
+ type: "account";
537
+ id: string;
538
+ } | undefined;
379
539
  amount?: {
380
540
  currency: "CLP";
541
+ value: string;
381
542
  editable: boolean;
382
- suggested: string;
383
543
  } | undefined;
384
544
  expires_at?: string | null | undefined;
385
545
  expires_in?: string | undefined;
386
546
  note?: {
387
- suggested: string;
547
+ value: string;
388
548
  editable: boolean;
389
549
  } | undefined;
390
550
  metadata: {
391
551
  [x: string]: unknown;
392
552
  };
393
553
  } | {
394
- type: "withdrawal";
554
+ type: "transfer";
395
555
  amount: {
396
556
  currency: "CLP";
397
- editable: boolean;
398
- suggested: string;
557
+ value: string;
558
+ editable: false;
399
559
  };
400
560
  source: {
401
- bank_account_id: string;
561
+ type: "alias";
562
+ alias: string;
402
563
  } | {
403
- account_holder_id: string;
404
- account_holder_name: string;
405
- account_kind: "checking" | "debit" | "savings";
406
- account_number: string;
407
- bank_id: string;
408
- country: "CL";
564
+ type: "account";
565
+ id: string;
409
566
  } | null;
410
- beneficiary: {
411
- editable: boolean;
412
- account_holder_id: string;
413
- account_holder_name: string;
414
- account_kind: "checking" | "debit" | "savings";
415
- account_number: string;
416
- bank_id: string;
417
- country: "CL";
567
+ destination: {
568
+ editable: false;
569
+ type: "alias";
570
+ alias: string;
571
+ } | {
572
+ editable: false;
573
+ type: "account";
574
+ id: string;
418
575
  } | {
419
- bank_account_id: string;
420
576
  editable: false;
577
+ type: "external";
578
+ bank_id: string;
579
+ account_type: "checking" | "debit" | "savings";
580
+ account_id: string;
581
+ holder_id: string;
582
+ holder_name: string;
421
583
  };
422
584
  expires_in?: string | undefined;
423
585
  expires_at?: string | undefined;
424
586
  note?: {
425
- suggested: string;
587
+ value: string;
426
588
  editable: boolean;
427
589
  } | undefined;
428
590
  metadata: {
429
591
  [x: string]: unknown;
430
592
  };
431
593
  } | {
432
- type: "automatic_charge";
433
- amount: {
434
- editable: false;
435
- currency: "CLP";
436
- suggested: string;
594
+ type: "account_opening";
595
+ alias: string;
596
+ name?: string | undefined;
597
+ upsert: boolean;
598
+ expires_in?: string | undefined;
599
+ expires_at?: string | undefined;
600
+ note?: {
601
+ value: string;
602
+ editable: boolean;
603
+ } | undefined;
604
+ metadata: {
605
+ [x: string]: unknown;
437
606
  };
438
- source: {
439
- bank_account_id: string;
440
- } | null;
441
- beneficiary: {
442
- bank_account_id: string;
607
+ } | {
608
+ type: "account_closure";
609
+ account: {
610
+ type: "alias";
611
+ alias: string;
612
+ } | {
613
+ type: "account";
614
+ id: string;
443
615
  };
444
616
  expires_in?: string | undefined;
445
617
  expires_at?: string | undefined;
446
618
  note?: {
447
- suggested: string;
619
+ value: string;
448
620
  editable: boolean;
449
621
  } | undefined;
450
622
  metadata: {
@@ -452,75 +624,94 @@ export declare function safeParseIntentCreate(input: unknown): v.SafeParseResult
452
624
  };
453
625
  }, "exactly_one_expiration_required">, v.CheckAction<{
454
626
  type: "deposit";
627
+ destination?: {
628
+ type: "alias";
629
+ alias: string;
630
+ } | {
631
+ type: "account";
632
+ id: string;
633
+ } | undefined;
455
634
  amount?: {
456
635
  currency: "CLP";
636
+ value: string;
457
637
  editable: boolean;
458
- suggested: string;
459
638
  } | undefined;
460
639
  expires_at?: string | null | undefined;
461
640
  expires_in?: string | undefined;
462
641
  note?: {
463
- suggested: string;
642
+ value: string;
464
643
  editable: boolean;
465
644
  } | undefined;
466
645
  metadata: {
467
646
  [x: string]: unknown;
468
647
  };
469
648
  } | {
470
- type: "withdrawal";
649
+ type: "transfer";
471
650
  amount: {
472
651
  currency: "CLP";
473
- editable: boolean;
474
- suggested: string;
652
+ value: string;
653
+ editable: false;
475
654
  };
476
655
  source: {
477
- bank_account_id: string;
656
+ type: "alias";
657
+ alias: string;
478
658
  } | {
479
- account_holder_id: string;
480
- account_holder_name: string;
481
- account_kind: "checking" | "debit" | "savings";
482
- account_number: string;
483
- bank_id: string;
484
- country: "CL";
659
+ type: "account";
660
+ id: string;
485
661
  } | null;
486
- beneficiary: {
487
- editable: boolean;
488
- account_holder_id: string;
489
- account_holder_name: string;
490
- account_kind: "checking" | "debit" | "savings";
491
- account_number: string;
492
- bank_id: string;
493
- country: "CL";
662
+ destination: {
663
+ editable: false;
664
+ type: "alias";
665
+ alias: string;
666
+ } | {
667
+ editable: false;
668
+ type: "account";
669
+ id: string;
494
670
  } | {
495
- bank_account_id: string;
496
671
  editable: false;
672
+ type: "external";
673
+ bank_id: string;
674
+ account_type: "checking" | "debit" | "savings";
675
+ account_id: string;
676
+ holder_id: string;
677
+ holder_name: string;
497
678
  };
498
679
  expires_in?: string | undefined;
499
680
  expires_at?: string | undefined;
500
681
  note?: {
501
- suggested: string;
682
+ value: string;
502
683
  editable: boolean;
503
684
  } | undefined;
504
685
  metadata: {
505
686
  [x: string]: unknown;
506
687
  };
507
688
  } | {
508
- type: "automatic_charge";
509
- amount: {
510
- editable: false;
511
- currency: "CLP";
512
- suggested: string;
689
+ type: "account_opening";
690
+ alias: string;
691
+ name?: string | undefined;
692
+ upsert: boolean;
693
+ expires_in?: string | undefined;
694
+ expires_at?: string | undefined;
695
+ note?: {
696
+ value: string;
697
+ editable: boolean;
698
+ } | undefined;
699
+ metadata: {
700
+ [x: string]: unknown;
513
701
  };
514
- source: {
515
- bank_account_id: string;
516
- } | null;
517
- beneficiary: {
518
- bank_account_id: string;
702
+ } | {
703
+ type: "account_closure";
704
+ account: {
705
+ type: "alias";
706
+ alias: string;
707
+ } | {
708
+ type: "account";
709
+ id: string;
519
710
  };
520
711
  expires_in?: string | undefined;
521
712
  expires_at?: string | undefined;
522
713
  note?: {
523
- suggested: string;
714
+ value: string;
524
715
  editable: boolean;
525
716
  } | undefined;
526
717
  metadata: {
@@ -528,110 +719,653 @@ export declare function safeParseIntentCreate(input: unknown): v.SafeParseResult
528
719
  };
529
720
  }, "passive_deposit_requires_no_target">, v.CheckAction<{
530
721
  type: "deposit";
722
+ destination?: {
723
+ type: "alias";
724
+ alias: string;
725
+ } | {
726
+ type: "account";
727
+ id: string;
728
+ } | undefined;
531
729
  amount?: {
532
730
  currency: "CLP";
731
+ value: string;
533
732
  editable: boolean;
534
- suggested: string;
535
733
  } | undefined;
536
734
  expires_at?: string | null | undefined;
537
735
  expires_in?: string | undefined;
538
736
  note?: {
539
- suggested: string;
737
+ value: string;
540
738
  editable: boolean;
541
739
  } | undefined;
542
740
  metadata: {
543
741
  [x: string]: unknown;
544
742
  };
545
743
  } | {
546
- type: "withdrawal";
744
+ type: "transfer";
547
745
  amount: {
548
746
  currency: "CLP";
549
- editable: boolean;
550
- suggested: string;
747
+ value: string;
748
+ editable: false;
551
749
  };
552
750
  source: {
553
- bank_account_id: string;
751
+ type: "alias";
752
+ alias: string;
554
753
  } | {
555
- account_holder_id: string;
556
- account_holder_name: string;
557
- account_kind: "checking" | "debit" | "savings";
558
- account_number: string;
559
- bank_id: string;
560
- country: "CL";
754
+ type: "account";
755
+ id: string;
561
756
  } | null;
562
- beneficiary: {
563
- editable: boolean;
564
- account_holder_id: string;
565
- account_holder_name: string;
566
- account_kind: "checking" | "debit" | "savings";
567
- account_number: string;
568
- bank_id: string;
569
- country: "CL";
757
+ destination: {
758
+ editable: false;
759
+ type: "alias";
760
+ alias: string;
570
761
  } | {
571
- bank_account_id: string;
572
762
  editable: false;
763
+ type: "account";
764
+ id: string;
765
+ } | {
766
+ editable: false;
767
+ type: "external";
768
+ bank_id: string;
769
+ account_type: "checking" | "debit" | "savings";
770
+ account_id: string;
771
+ holder_id: string;
772
+ holder_name: string;
573
773
  };
574
774
  expires_in?: string | undefined;
575
775
  expires_at?: string | undefined;
576
776
  note?: {
577
- suggested: string;
777
+ value: string;
578
778
  editable: boolean;
579
779
  } | undefined;
580
780
  metadata: {
581
781
  [x: string]: unknown;
582
782
  };
583
783
  } | {
584
- type: "automatic_charge";
585
- amount: {
586
- editable: false;
587
- currency: "CLP";
588
- suggested: string;
784
+ type: "account_opening";
785
+ alias: string;
786
+ name?: string | undefined;
787
+ upsert: boolean;
788
+ expires_in?: string | undefined;
789
+ expires_at?: string | undefined;
790
+ note?: {
791
+ value: string;
792
+ editable: boolean;
793
+ } | undefined;
794
+ metadata: {
795
+ [x: string]: unknown;
589
796
  };
590
- source: {
591
- bank_account_id: string;
592
- } | null;
593
- beneficiary: {
594
- bank_account_id: string;
797
+ } | {
798
+ type: "account_closure";
799
+ account: {
800
+ type: "alias";
801
+ alias: string;
802
+ } | {
803
+ type: "account";
804
+ id: string;
595
805
  };
596
806
  expires_in?: string | undefined;
597
807
  expires_at?: string | undefined;
598
808
  note?: {
599
- suggested: string;
809
+ value: string;
600
810
  editable: boolean;
601
811
  } | undefined;
602
812
  metadata: {
603
813
  [x: string]: unknown;
604
814
  };
605
815
  }, "metadata_too_large">]>>;
816
+ /**
817
+ * The verified claims of a Signed Instruction: the `application/jwt` half of the same creation.
818
+ *
819
+ * Nothing here is optional that the transfer needs and nothing here is editable. An instruction that
820
+ * does not say where the money comes from or where it goes is not signable, so `source` and
821
+ * `destination` are required and the amount carries no `editable`. `note` is a plain reference for
822
+ * the same reason: there is no screen on this path, so there is nobody to propose it to.
823
+ *
824
+ * There is no `org_id`: the subject is the one of the Grant behind the access token that submits the
825
+ * instruction, and nothing inside the signature may name another.
826
+ *
827
+ * The expiration is present on this side too, and it is not `exp`. `exp` bounds how long the
828
+ * instruction may be *submitted*; the Intent expiration bounds how long the Intent may be approved
829
+ * and executed. They are different deadlines, and because every value a signed transfer uses has to
830
+ * come from inside the signature, the second one cannot arrive in a header or a query string.
831
+ *
832
+ * `account_opening` is signed on the same terms, and `upsert` is the reason it matters here. The
833
+ * flag decides whether naming an Account Alias that already exists is a refusal or a request for the
834
+ * account already carrying it, which is a difference in what the instruction *orders*. Carried as a
835
+ * transport option — a header, a query parameter, a field beside the assertion — anybody holding the
836
+ * signed instruction could flip it, and the order executed would not be the order signed.
837
+ *
838
+ * @example
839
+ * const claims = safeParseSignedIntent(verification.claims);
840
+ * if (claims.success) console.log(claims.output.jti, claims.output.amount.value);
841
+ */
842
+ export declare const SignedIntentSchema: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
843
+ readonly iss: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
844
+ readonly aud: v.LiteralSchema<"https://api.andco.com", undefined>;
845
+ readonly jti: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
846
+ readonly exp: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
847
+ readonly iat: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
848
+ readonly nbf: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
849
+ readonly type: v.LiteralSchema<"transfer", undefined>;
850
+ readonly source: v.VariantSchema<"type", [v.StrictObjectSchema<{
851
+ type: v.LiteralSchema<"alias", undefined>;
852
+ alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
853
+ }, undefined>, v.StrictObjectSchema<{
854
+ type: v.LiteralSchema<"account", undefined>;
855
+ id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
856
+ }, undefined>], undefined>;
857
+ readonly destination: v.VariantSchema<"type", [v.StrictObjectSchema<{
858
+ type: v.LiteralSchema<"alias", undefined>;
859
+ alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
860
+ }, undefined>, v.StrictObjectSchema<{
861
+ type: v.LiteralSchema<"account", undefined>;
862
+ id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
863
+ }, undefined>, v.StrictObjectSchema<{
864
+ type: v.LiteralSchema<"external", undefined>;
865
+ bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
866
+ account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
867
+ account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
868
+ holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
869
+ holder_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
870
+ }, undefined>], undefined>;
871
+ readonly amount: v.StrictObjectSchema<{
872
+ currency: v.LiteralSchema<"CLP", undefined>;
873
+ value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.CheckAction<string, undefined>]>;
874
+ }, undefined>;
875
+ readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
876
+ readonly expires_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>;
877
+ readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>, undefined>;
878
+ readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
879
+ }, undefined>, v.StrictObjectSchema<{
880
+ readonly iss: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
881
+ readonly aud: v.LiteralSchema<"https://api.andco.com", undefined>;
882
+ readonly jti: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
883
+ readonly exp: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
884
+ readonly iat: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
885
+ readonly nbf: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
886
+ readonly type: v.LiteralSchema<"account_opening", undefined>;
887
+ readonly alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
888
+ readonly name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>, undefined>;
889
+ readonly upsert: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
890
+ readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
891
+ readonly expires_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>;
892
+ readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
893
+ }, undefined>, v.StrictObjectSchema<{
894
+ readonly iss: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
895
+ readonly aud: v.LiteralSchema<"https://api.andco.com", undefined>;
896
+ readonly jti: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
897
+ readonly exp: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
898
+ readonly iat: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
899
+ readonly nbf: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
900
+ readonly type: v.LiteralSchema<"account_closure", undefined>;
901
+ readonly account: v.VariantSchema<"type", [v.StrictObjectSchema<{
902
+ type: v.LiteralSchema<"alias", undefined>;
903
+ alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
904
+ }, undefined>, v.StrictObjectSchema<{
905
+ type: v.LiteralSchema<"account", undefined>;
906
+ id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
907
+ }, undefined>], undefined>;
908
+ readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
909
+ readonly expires_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>;
910
+ readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
911
+ }, undefined>], undefined>, v.CheckAction<{
912
+ iss: string;
913
+ aud: "https://api.andco.com";
914
+ jti: string;
915
+ exp: number;
916
+ iat?: number | undefined;
917
+ nbf?: number | undefined;
918
+ type: "transfer";
919
+ source: {
920
+ type: "alias";
921
+ alias: string;
922
+ } | {
923
+ type: "account";
924
+ id: string;
925
+ };
926
+ destination: {
927
+ type: "alias";
928
+ alias: string;
929
+ } | {
930
+ type: "account";
931
+ id: string;
932
+ } | {
933
+ type: "external";
934
+ bank_id: string;
935
+ account_type: "checking" | "debit" | "savings";
936
+ account_id: string;
937
+ holder_id: string;
938
+ holder_name: string;
939
+ };
940
+ amount: {
941
+ currency: "CLP";
942
+ value: string;
943
+ };
944
+ expires_in?: string | undefined;
945
+ expires_at?: string | undefined;
946
+ note?: string | undefined;
947
+ metadata: {
948
+ [x: string]: unknown;
949
+ };
950
+ } | {
951
+ iss: string;
952
+ aud: "https://api.andco.com";
953
+ jti: string;
954
+ exp: number;
955
+ iat?: number | undefined;
956
+ nbf?: number | undefined;
957
+ type: "account_opening";
958
+ alias: string;
959
+ name?: string | undefined;
960
+ upsert: boolean;
961
+ expires_in?: string | undefined;
962
+ expires_at?: string | undefined;
963
+ metadata: {
964
+ [x: string]: unknown;
965
+ };
966
+ } | {
967
+ iss: string;
968
+ aud: "https://api.andco.com";
969
+ jti: string;
970
+ exp: number;
971
+ iat?: number | undefined;
972
+ nbf?: number | undefined;
973
+ type: "account_closure";
974
+ account: {
975
+ type: "alias";
976
+ alias: string;
977
+ } | {
978
+ type: "account";
979
+ id: string;
980
+ };
981
+ expires_in?: string | undefined;
982
+ expires_at?: string | undefined;
983
+ metadata: {
984
+ [x: string]: unknown;
985
+ };
986
+ }, "exactly_one_expiration_required">, v.CheckAction<{
987
+ iss: string;
988
+ aud: "https://api.andco.com";
989
+ jti: string;
990
+ exp: number;
991
+ iat?: number | undefined;
992
+ nbf?: number | undefined;
993
+ type: "transfer";
994
+ source: {
995
+ type: "alias";
996
+ alias: string;
997
+ } | {
998
+ type: "account";
999
+ id: string;
1000
+ };
1001
+ destination: {
1002
+ type: "alias";
1003
+ alias: string;
1004
+ } | {
1005
+ type: "account";
1006
+ id: string;
1007
+ } | {
1008
+ type: "external";
1009
+ bank_id: string;
1010
+ account_type: "checking" | "debit" | "savings";
1011
+ account_id: string;
1012
+ holder_id: string;
1013
+ holder_name: string;
1014
+ };
1015
+ amount: {
1016
+ currency: "CLP";
1017
+ value: string;
1018
+ };
1019
+ expires_in?: string | undefined;
1020
+ expires_at?: string | undefined;
1021
+ note?: string | undefined;
1022
+ metadata: {
1023
+ [x: string]: unknown;
1024
+ };
1025
+ } | {
1026
+ iss: string;
1027
+ aud: "https://api.andco.com";
1028
+ jti: string;
1029
+ exp: number;
1030
+ iat?: number | undefined;
1031
+ nbf?: number | undefined;
1032
+ type: "account_opening";
1033
+ alias: string;
1034
+ name?: string | undefined;
1035
+ upsert: boolean;
1036
+ expires_in?: string | undefined;
1037
+ expires_at?: string | undefined;
1038
+ metadata: {
1039
+ [x: string]: unknown;
1040
+ };
1041
+ } | {
1042
+ iss: string;
1043
+ aud: "https://api.andco.com";
1044
+ jti: string;
1045
+ exp: number;
1046
+ iat?: number | undefined;
1047
+ nbf?: number | undefined;
1048
+ type: "account_closure";
1049
+ account: {
1050
+ type: "alias";
1051
+ alias: string;
1052
+ } | {
1053
+ type: "account";
1054
+ id: string;
1055
+ };
1056
+ expires_in?: string | undefined;
1057
+ expires_at?: string | undefined;
1058
+ metadata: {
1059
+ [x: string]: unknown;
1060
+ };
1061
+ }, "metadata_too_large">]>;
1062
+ /** Validated signed Intent claims; schema parsing alone does not verify a signature. */
1063
+ export type SignedIntent = v.InferOutput<typeof SignedIntentSchema>;
1064
+ /**
1065
+ * Cancelling names why, because an Intent that vanished without a reason is an unexplained gap.
1066
+ * A Cancellation is the creator withdrawing its own request: only the client that created the
1067
+ * Intent may cancel it. An approver declining it is a Rejection ({@link IntentRejectionSchema}).
1068
+ *
1069
+ * @example
1070
+ * safeParseIntentCancellation({ reason: "rejected_by_erp" });
1071
+ */
1072
+ export declare const IntentCancellationSchema: v.StrictObjectSchema<{
1073
+ readonly reason: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.CheckAction<string, "reason_too_long">]>;
1074
+ }, undefined>;
1075
+ /** A required reason, 1–280 characters, naming why an Intent was cancelled. */
1076
+ export type IntentCancellation = v.InferOutput<typeof IntentCancellationSchema>;
1077
+ /** Returns validation issues for a cancellation reason without throwing across the HTTP boundary. */
1078
+ export declare function safeParseIntentCancellation(input: unknown): v.SafeParseResult<v.StrictObjectSchema<{
1079
+ readonly reason: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.CheckAction<string, "reason_too_long">]>;
1080
+ }, undefined>>;
1081
+ /**
1082
+ * Rejecting names why. A Rejection is an approver declining an Intent with a Grant holding the
1083
+ * family's `reject` action (`bank_transfer` for a transfer); the audit keeps it apart from a
1084
+ * Cancellation, which is the creator withdrawing its own request.
1085
+ *
1086
+ * @example
1087
+ * safeParseIntentRejection({ reason: "duplicated_invoice" });
1088
+ */
1089
+ export declare const IntentRejectionSchema: v.StrictObjectSchema<{
1090
+ readonly reason: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.CheckAction<string, "reason_too_long">]>;
1091
+ }, undefined>;
1092
+ /** A required reason, 1–280 characters, naming why an approver rejected an Intent. */
1093
+ export type IntentRejection = v.InferOutput<typeof IntentRejectionSchema>;
1094
+ /** Returns validation issues for a rejection reason without throwing across the HTTP boundary. */
1095
+ export declare function safeParseIntentRejection(input: unknown): v.SafeParseResult<v.StrictObjectSchema<{
1096
+ readonly reason: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.CheckAction<string, "reason_too_long">]>;
1097
+ }, undefined>>;
1098
+ /**
1099
+ * Error codes an Intent's Approval lifecycle answers with, beyond the generic transport codes.
1100
+ *
1101
+ * A cancellation or an approval may observe an Intent whose deadline to be approved and executed
1102
+ * has already passed; `intent_expired` names that failure so a caller can distinguish it from an
1103
+ * ordinary rejection.
1104
+ */
1105
+ export declare const ANDCO_INTENT_ERROR_CODES: {
1106
+ /** The Intent's deadline to be approved and executed has already passed. */
1107
+ readonly INTENT_EXPIRED: "intent_expired";
1108
+ };
1109
+ /** Returns validation issues for the verified claims without throwing across the HTTP boundary. */
1110
+ export declare function safeParseSignedIntent(input: unknown): v.SafeParseResult<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
1111
+ readonly iss: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1112
+ readonly aud: v.LiteralSchema<"https://api.andco.com", undefined>;
1113
+ readonly jti: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1114
+ readonly exp: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1115
+ readonly iat: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
1116
+ readonly nbf: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
1117
+ readonly type: v.LiteralSchema<"transfer", undefined>;
1118
+ readonly source: v.VariantSchema<"type", [v.StrictObjectSchema<{
1119
+ type: v.LiteralSchema<"alias", undefined>;
1120
+ alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1121
+ }, undefined>, v.StrictObjectSchema<{
1122
+ type: v.LiteralSchema<"account", undefined>;
1123
+ id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1124
+ }, undefined>], undefined>;
1125
+ readonly destination: v.VariantSchema<"type", [v.StrictObjectSchema<{
1126
+ type: v.LiteralSchema<"alias", undefined>;
1127
+ alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1128
+ }, undefined>, v.StrictObjectSchema<{
1129
+ type: v.LiteralSchema<"account", undefined>;
1130
+ id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1131
+ }, undefined>, v.StrictObjectSchema<{
1132
+ type: v.LiteralSchema<"external", undefined>;
1133
+ bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1134
+ account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
1135
+ account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1136
+ holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1137
+ holder_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1138
+ }, undefined>], undefined>;
1139
+ readonly amount: v.StrictObjectSchema<{
1140
+ currency: v.LiteralSchema<"CLP", undefined>;
1141
+ value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.CheckAction<string, undefined>]>;
1142
+ }, undefined>;
1143
+ readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
1144
+ readonly expires_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>;
1145
+ readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>, undefined>;
1146
+ readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
1147
+ }, undefined>, v.StrictObjectSchema<{
1148
+ readonly iss: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1149
+ readonly aud: v.LiteralSchema<"https://api.andco.com", undefined>;
1150
+ readonly jti: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1151
+ readonly exp: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1152
+ readonly iat: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
1153
+ readonly nbf: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
1154
+ readonly type: v.LiteralSchema<"account_opening", undefined>;
1155
+ readonly alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1156
+ readonly name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>, undefined>;
1157
+ readonly upsert: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
1158
+ readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
1159
+ readonly expires_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>;
1160
+ readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
1161
+ }, undefined>, v.StrictObjectSchema<{
1162
+ readonly iss: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1163
+ readonly aud: v.LiteralSchema<"https://api.andco.com", undefined>;
1164
+ readonly jti: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1165
+ readonly exp: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
1166
+ readonly iat: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
1167
+ readonly nbf: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
1168
+ readonly type: v.LiteralSchema<"account_closure", undefined>;
1169
+ readonly account: v.VariantSchema<"type", [v.StrictObjectSchema<{
1170
+ type: v.LiteralSchema<"alias", undefined>;
1171
+ alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1172
+ }, undefined>, v.StrictObjectSchema<{
1173
+ type: v.LiteralSchema<"account", undefined>;
1174
+ id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1175
+ }, undefined>], undefined>;
1176
+ readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
1177
+ readonly expires_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>;
1178
+ readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
1179
+ }, undefined>], undefined>, v.CheckAction<{
1180
+ iss: string;
1181
+ aud: "https://api.andco.com";
1182
+ jti: string;
1183
+ exp: number;
1184
+ iat?: number | undefined;
1185
+ nbf?: number | undefined;
1186
+ type: "transfer";
1187
+ source: {
1188
+ type: "alias";
1189
+ alias: string;
1190
+ } | {
1191
+ type: "account";
1192
+ id: string;
1193
+ };
1194
+ destination: {
1195
+ type: "alias";
1196
+ alias: string;
1197
+ } | {
1198
+ type: "account";
1199
+ id: string;
1200
+ } | {
1201
+ type: "external";
1202
+ bank_id: string;
1203
+ account_type: "checking" | "debit" | "savings";
1204
+ account_id: string;
1205
+ holder_id: string;
1206
+ holder_name: string;
1207
+ };
1208
+ amount: {
1209
+ currency: "CLP";
1210
+ value: string;
1211
+ };
1212
+ expires_in?: string | undefined;
1213
+ expires_at?: string | undefined;
1214
+ note?: string | undefined;
1215
+ metadata: {
1216
+ [x: string]: unknown;
1217
+ };
1218
+ } | {
1219
+ iss: string;
1220
+ aud: "https://api.andco.com";
1221
+ jti: string;
1222
+ exp: number;
1223
+ iat?: number | undefined;
1224
+ nbf?: number | undefined;
1225
+ type: "account_opening";
1226
+ alias: string;
1227
+ name?: string | undefined;
1228
+ upsert: boolean;
1229
+ expires_in?: string | undefined;
1230
+ expires_at?: string | undefined;
1231
+ metadata: {
1232
+ [x: string]: unknown;
1233
+ };
1234
+ } | {
1235
+ iss: string;
1236
+ aud: "https://api.andco.com";
1237
+ jti: string;
1238
+ exp: number;
1239
+ iat?: number | undefined;
1240
+ nbf?: number | undefined;
1241
+ type: "account_closure";
1242
+ account: {
1243
+ type: "alias";
1244
+ alias: string;
1245
+ } | {
1246
+ type: "account";
1247
+ id: string;
1248
+ };
1249
+ expires_in?: string | undefined;
1250
+ expires_at?: string | undefined;
1251
+ metadata: {
1252
+ [x: string]: unknown;
1253
+ };
1254
+ }, "exactly_one_expiration_required">, v.CheckAction<{
1255
+ iss: string;
1256
+ aud: "https://api.andco.com";
1257
+ jti: string;
1258
+ exp: number;
1259
+ iat?: number | undefined;
1260
+ nbf?: number | undefined;
1261
+ type: "transfer";
1262
+ source: {
1263
+ type: "alias";
1264
+ alias: string;
1265
+ } | {
1266
+ type: "account";
1267
+ id: string;
1268
+ };
1269
+ destination: {
1270
+ type: "alias";
1271
+ alias: string;
1272
+ } | {
1273
+ type: "account";
1274
+ id: string;
1275
+ } | {
1276
+ type: "external";
1277
+ bank_id: string;
1278
+ account_type: "checking" | "debit" | "savings";
1279
+ account_id: string;
1280
+ holder_id: string;
1281
+ holder_name: string;
1282
+ };
1283
+ amount: {
1284
+ currency: "CLP";
1285
+ value: string;
1286
+ };
1287
+ expires_in?: string | undefined;
1288
+ expires_at?: string | undefined;
1289
+ note?: string | undefined;
1290
+ metadata: {
1291
+ [x: string]: unknown;
1292
+ };
1293
+ } | {
1294
+ iss: string;
1295
+ aud: "https://api.andco.com";
1296
+ jti: string;
1297
+ exp: number;
1298
+ iat?: number | undefined;
1299
+ nbf?: number | undefined;
1300
+ type: "account_opening";
1301
+ alias: string;
1302
+ name?: string | undefined;
1303
+ upsert: boolean;
1304
+ expires_in?: string | undefined;
1305
+ expires_at?: string | undefined;
1306
+ metadata: {
1307
+ [x: string]: unknown;
1308
+ };
1309
+ } | {
1310
+ iss: string;
1311
+ aud: "https://api.andco.com";
1312
+ jti: string;
1313
+ exp: number;
1314
+ iat?: number | undefined;
1315
+ nbf?: number | undefined;
1316
+ type: "account_closure";
1317
+ account: {
1318
+ type: "alias";
1319
+ alias: string;
1320
+ } | {
1321
+ type: "account";
1322
+ id: string;
1323
+ };
1324
+ expires_in?: string | undefined;
1325
+ expires_at?: string | undefined;
1326
+ metadata: {
1327
+ [x: string]: unknown;
1328
+ };
1329
+ }, "metadata_too_large">]>>;
606
1330
  /** Identifies recognized unsupported payment shapes without silently dropping their extra instructions. */
607
1331
  export declare function unsupportedIntentPaymentShape(input: unknown): string | undefined;
608
- /** Values proposed by the account holder; the database enforces editability and freezes confirmation. */
609
- export declare const WithdrawalConfirmationSchema: v.StrictObjectSchema<{
1332
+ /**
1333
+ * Values proposed by the account holder; the database enforces editability and freezes confirmation.
1334
+ *
1335
+ * Every member but `intent_id` is optional because nothing here is necessarily editable: a screen
1336
+ * sends only what the Intent left open, and a value that was frozen has nowhere to arrive from.
1337
+ * A transfer is created with its amount and destination locked (`editable: true` is refused at
1338
+ * creation), so today `amount` and `destination` always meet `transfer_value_editing_not_implemented`;
1339
+ * they stay in the shape for when confirmation-time editing exists.
1340
+ */
1341
+ export declare const TransferConfirmationSchema: v.StrictObjectSchema<{
610
1342
  readonly intent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
611
1343
  readonly source_account_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>;
612
- readonly amount: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.CheckAction<string, undefined>]>, undefined>;
613
- readonly beneficiary: v.OptionalSchema<v.StrictObjectSchema<{
614
- account_holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
615
- account_holder_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
616
- account_kind: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
617
- account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1344
+ readonly amount: v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.CheckAction<string, undefined>]>, undefined>;
1345
+ readonly destination: v.OptionalSchema<v.StrictObjectSchema<{
1346
+ type: v.LiteralSchema<"external", undefined>;
618
1347
  bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
619
- country: v.LiteralSchema<"CL", undefined>;
1348
+ account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
1349
+ account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1350
+ holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1351
+ holder_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
620
1352
  }, undefined>, undefined>;
621
1353
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>, undefined>;
622
1354
  }, undefined>;
623
- export declare function safeParseWithdrawalConfirmation(input: unknown): v.SafeParseResult<v.StrictObjectSchema<{
1355
+ /** Validates proposed confirmation fields without throwing; the server enforces editability. */
1356
+ export declare function safeParseTransferConfirmation(input: unknown): v.SafeParseResult<v.StrictObjectSchema<{
624
1357
  readonly intent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
625
1358
  readonly source_account_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>;
626
- readonly amount: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.CheckAction<string, undefined>]>, undefined>;
627
- readonly beneficiary: v.OptionalSchema<v.StrictObjectSchema<{
628
- account_holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
629
- account_holder_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
630
- account_kind: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
631
- account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1359
+ readonly amount: v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.CheckAction<string, undefined>]>, undefined>;
1360
+ readonly destination: v.OptionalSchema<v.StrictObjectSchema<{
1361
+ type: v.LiteralSchema<"external", undefined>;
632
1362
  bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
633
- country: v.LiteralSchema<"CL", undefined>;
1363
+ account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
1364
+ account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1365
+ holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
1366
+ holder_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
634
1367
  }, undefined>, undefined>;
635
1368
  readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>, undefined>;
636
1369
  }, undefined>>;
1370
+ export {};
637
1371
  //# sourceMappingURL=intent-input.d.ts.map