@andco/protocol 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +44 -0
  3. package/dist/authorization-preparation.d.ts +754 -0
  4. package/dist/authorization-preparation.d.ts.map +1 -0
  5. package/dist/authorization-preparation.js +187 -0
  6. package/dist/authorization.d.ts +99 -0
  7. package/dist/authorization.d.ts.map +1 -0
  8. package/dist/authorization.js +227 -0
  9. package/dist/automatic-charge.d.ts +314 -0
  10. package/dist/automatic-charge.d.ts.map +1 -0
  11. package/dist/automatic-charge.js +126 -0
  12. package/dist/bank-account-authorization.d.ts +6 -0
  13. package/dist/bank-account-authorization.d.ts.map +1 -0
  14. package/dist/bank-account-authorization.js +13 -0
  15. package/dist/callback-state.d.ts +10 -0
  16. package/dist/callback-state.d.ts.map +1 -0
  17. package/dist/callback-state.js +28 -0
  18. package/dist/consent.d.ts +48 -0
  19. package/dist/consent.d.ts.map +1 -0
  20. package/dist/consent.js +110 -0
  21. package/dist/constants.d.ts +17 -0
  22. package/dist/constants.d.ts.map +1 -0
  23. package/dist/constants.js +20 -0
  24. package/dist/errors.d.ts +70 -0
  25. package/dist/errors.d.ts.map +1 -0
  26. package/dist/errors.js +80 -0
  27. package/dist/index.d.ts +33 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +32 -0
  30. package/dist/intent-input.d.ts +637 -0
  31. package/dist/intent-input.d.ts.map +1 -0
  32. package/dist/intent-input.js +101 -0
  33. package/dist/messages/authorization-response.d.ts +12 -0
  34. package/dist/messages/authorization-response.d.ts.map +1 -0
  35. package/dist/messages/authorization-response.js +9 -0
  36. package/dist/messages/base.d.ts +31 -0
  37. package/dist/messages/base.d.ts.map +1 -0
  38. package/dist/messages/base.js +30 -0
  39. package/dist/messages/click.d.ts +11 -0
  40. package/dist/messages/click.d.ts.map +1 -0
  41. package/dist/messages/click.js +8 -0
  42. package/dist/messages/error.d.ts +13 -0
  43. package/dist/messages/error.d.ts.map +1 -0
  44. package/dist/messages/error.js +9 -0
  45. package/dist/messages/index.d.ts +75 -0
  46. package/dist/messages/index.d.ts.map +1 -0
  47. package/dist/messages/index.js +27 -0
  48. package/dist/messages/init.d.ts +9 -0
  49. package/dist/messages/init.d.ts.map +1 -0
  50. package/dist/messages/init.js +6 -0
  51. package/dist/messages/popup.d.ts +108 -0
  52. package/dist/messages/popup.d.ts.map +1 -0
  53. package/dist/messages/popup.js +62 -0
  54. package/dist/messages/ready.d.ts +9 -0
  55. package/dist/messages/ready.d.ts.map +1 -0
  56. package/dist/messages/ready.js +6 -0
  57. package/dist/messages/set-preferences.d.ts +16 -0
  58. package/dist/messages/set-preferences.d.ts.map +1 -0
  59. package/dist/messages/set-preferences.js +20 -0
  60. package/dist/miniapp-icon.d.ts +4 -0
  61. package/dist/miniapp-icon.d.ts.map +1 -0
  62. package/dist/miniapp-icon.js +68 -0
  63. package/dist/miniapp-manifest.d.ts +71 -0
  64. package/dist/miniapp-manifest.d.ts.map +1 -0
  65. package/dist/miniapp-manifest.js +46 -0
  66. package/dist/native-copy.d.ts +7 -0
  67. package/dist/native-copy.d.ts.map +1 -0
  68. package/dist/native-copy.js +436 -0
  69. package/dist/native-intent.d.ts +402 -0
  70. package/dist/native-intent.d.ts.map +1 -0
  71. package/dist/native-intent.js +410 -0
  72. package/dist/native.d.ts +55 -0
  73. package/dist/native.d.ts.map +1 -0
  74. package/dist/native.js +53 -0
  75. package/dist/oauth.d.ts +4 -0
  76. package/dist/oauth.d.ts.map +1 -0
  77. package/dist/oauth.js +3 -0
  78. package/dist/release.d.ts +3 -0
  79. package/dist/release.d.ts.map +1 -0
  80. package/dist/release.js +2 -0
  81. package/dist/scopes.d.ts +35 -0
  82. package/dist/scopes.d.ts.map +1 -0
  83. package/dist/scopes.js +15 -0
  84. package/dist/server.d.ts +9 -0
  85. package/dist/server.d.ts.map +1 -0
  86. package/dist/server.js +14 -0
  87. package/dist/transport/financial-events.d.ts +134 -0
  88. package/dist/transport/financial-events.d.ts.map +1 -0
  89. package/dist/transport/financial-events.js +120 -0
  90. package/dist/transport/generated/oauth-api.d.ts +1685 -0
  91. package/dist/transport/generated/oauth-api.d.ts.map +1 -0
  92. package/dist/transport/generated/oauth-api.js +5 -0
  93. package/dist/transport/index.d.ts +6 -0
  94. package/dist/transport/index.d.ts.map +1 -0
  95. package/dist/transport/index.js +5 -0
  96. package/dist/transport/intents.d.ts +81 -0
  97. package/dist/transport/intents.d.ts.map +1 -0
  98. package/dist/transport/intents.js +286 -0
  99. package/dist/transport/rest.d.ts +76 -0
  100. package/dist/transport/rest.d.ts.map +1 -0
  101. package/dist/transport/rest.js +48 -0
  102. package/dist/transport/runtime.d.ts +8 -0
  103. package/dist/transport/runtime.d.ts.map +1 -0
  104. package/dist/transport/runtime.js +16 -0
  105. package/dist/transport/webhooks.d.ts +27 -0
  106. package/dist/transport/webhooks.d.ts.map +1 -0
  107. package/dist/transport/webhooks.js +68 -0
  108. package/dist/urls.d.ts +71 -0
  109. package/dist/urls.d.ts.map +1 -0
  110. package/dist/urls.js +132 -0
  111. package/dist/userinfo.d.ts +11 -0
  112. package/dist/userinfo.d.ts.map +1 -0
  113. package/dist/userinfo.js +9 -0
  114. package/dist/utils.d.ts +20 -0
  115. package/dist/utils.d.ts.map +1 -0
  116. package/dist/utils.js +45 -0
  117. package/dist/webhook-input.d.ts +22 -0
  118. package/dist/webhook-input.d.ts.map +1 -0
  119. package/dist/webhook-input.js +11 -0
  120. package/dist/webhook-signature.d.ts +54 -0
  121. package/dist/webhook-signature.d.ts.map +1 -0
  122. package/dist/webhook-signature.js +74 -0
  123. package/dist/window-features.d.ts +28 -0
  124. package/dist/window-features.d.ts.map +1 -0
  125. package/dist/window-features.js +55 -0
  126. package/package.json +63 -0
@@ -0,0 +1,637 @@
1
+ import * as v from "valibot";
2
+ /** Validates fixed-duration syntax without anchoring it to a changing clock. */
3
+ export declare function isIntentDuration(value: string): boolean;
4
+ /** Validates a real ISO calendar datetime with a timezone; past dates remain valid for idempotent replay. */
5
+ export declare function isIntentDeadline(value: string): boolean;
6
+ /** Public creation validation shared by the API and SDK. SQL resolves deadlines and enforces authorization. */
7
+ export declare const IntentCreateSchema: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
8
+ readonly type: v.LiteralSchema<"deposit", undefined>;
9
+ readonly amount: v.OptionalSchema<v.StrictObjectSchema<{
10
+ currency: v.LiteralSchema<"CLP", undefined>;
11
+ editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
12
+ suggested: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.CheckAction<string, undefined>]>;
13
+ }, undefined>, undefined>;
14
+ readonly expires_at: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>, undefined>;
15
+ readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
16
+ readonly note: v.OptionalSchema<v.StrictObjectSchema<{
17
+ readonly suggested: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>;
18
+ readonly editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
19
+ }, undefined>, undefined>;
20
+ readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
21
+ }, undefined>, v.StrictObjectSchema<{
22
+ readonly type: v.LiteralSchema<"withdrawal", undefined>;
23
+ readonly amount: v.StrictObjectSchema<{
24
+ 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>]>;
27
+ }, 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>]>;
30
+ }, 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>;
37
+ }, 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>;
46
+ }, undefined>, v.StrictObjectSchema<{
47
+ readonly bank_account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
48
+ readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
49
+ }, undefined>], undefined>;
50
+ readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
51
+ readonly expires_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>;
52
+ readonly note: v.OptionalSchema<v.StrictObjectSchema<{
53
+ readonly suggested: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>;
54
+ readonly editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
55
+ }, undefined>, undefined>;
56
+ readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
57
+ }, 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>;
70
+ readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
71
+ readonly expires_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>;
72
+ readonly note: v.OptionalSchema<v.StrictObjectSchema<{
73
+ readonly suggested: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>;
74
+ readonly editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
75
+ }, undefined>, undefined>;
76
+ readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
77
+ }, undefined>], undefined>, v.CheckAction<{
78
+ type: "deposit";
79
+ amount?: {
80
+ currency: "CLP";
81
+ editable: boolean;
82
+ suggested: string;
83
+ } | undefined;
84
+ expires_at?: string | null | undefined;
85
+ expires_in?: string | undefined;
86
+ note?: {
87
+ suggested: string;
88
+ editable: boolean;
89
+ } | undefined;
90
+ metadata: {
91
+ [x: string]: unknown;
92
+ };
93
+ } | {
94
+ type: "withdrawal";
95
+ amount: {
96
+ currency: "CLP";
97
+ editable: boolean;
98
+ suggested: string;
99
+ };
100
+ source: {
101
+ bank_account_id: string;
102
+ } | {
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";
109
+ } | 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";
118
+ } | {
119
+ bank_account_id: string;
120
+ editable: false;
121
+ };
122
+ expires_in?: string | undefined;
123
+ expires_at?: string | undefined;
124
+ note?: {
125
+ suggested: string;
126
+ editable: boolean;
127
+ } | undefined;
128
+ metadata: {
129
+ [x: string]: unknown;
130
+ };
131
+ } | {
132
+ type: "automatic_charge";
133
+ amount: {
134
+ editable: false;
135
+ currency: "CLP";
136
+ suggested: string;
137
+ };
138
+ source: {
139
+ bank_account_id: string;
140
+ } | null;
141
+ beneficiary: {
142
+ bank_account_id: string;
143
+ };
144
+ expires_in?: string | undefined;
145
+ expires_at?: string | undefined;
146
+ note?: {
147
+ suggested: string;
148
+ editable: boolean;
149
+ } | undefined;
150
+ metadata: {
151
+ [x: string]: unknown;
152
+ };
153
+ }, "exactly_one_expiration_required">, v.CheckAction<{
154
+ type: "deposit";
155
+ amount?: {
156
+ currency: "CLP";
157
+ editable: boolean;
158
+ suggested: string;
159
+ } | undefined;
160
+ expires_at?: string | null | undefined;
161
+ expires_in?: string | undefined;
162
+ note?: {
163
+ suggested: string;
164
+ editable: boolean;
165
+ } | undefined;
166
+ metadata: {
167
+ [x: string]: unknown;
168
+ };
169
+ } | {
170
+ type: "withdrawal";
171
+ amount: {
172
+ currency: "CLP";
173
+ editable: boolean;
174
+ suggested: string;
175
+ };
176
+ source: {
177
+ bank_account_id: string;
178
+ } | {
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";
185
+ } | 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";
194
+ } | {
195
+ bank_account_id: string;
196
+ editable: false;
197
+ };
198
+ expires_in?: string | undefined;
199
+ expires_at?: string | undefined;
200
+ note?: {
201
+ suggested: string;
202
+ editable: boolean;
203
+ } | undefined;
204
+ metadata: {
205
+ [x: string]: unknown;
206
+ };
207
+ } | {
208
+ type: "automatic_charge";
209
+ amount: {
210
+ editable: false;
211
+ currency: "CLP";
212
+ suggested: string;
213
+ };
214
+ source: {
215
+ bank_account_id: string;
216
+ } | null;
217
+ beneficiary: {
218
+ bank_account_id: string;
219
+ };
220
+ expires_in?: string | undefined;
221
+ expires_at?: string | undefined;
222
+ note?: {
223
+ suggested: string;
224
+ editable: boolean;
225
+ } | undefined;
226
+ metadata: {
227
+ [x: string]: unknown;
228
+ };
229
+ }, "passive_deposit_requires_no_target">, v.CheckAction<{
230
+ type: "deposit";
231
+ amount?: {
232
+ currency: "CLP";
233
+ editable: boolean;
234
+ suggested: string;
235
+ } | undefined;
236
+ expires_at?: string | null | undefined;
237
+ expires_in?: string | undefined;
238
+ note?: {
239
+ suggested: string;
240
+ editable: boolean;
241
+ } | undefined;
242
+ metadata: {
243
+ [x: string]: unknown;
244
+ };
245
+ } | {
246
+ type: "withdrawal";
247
+ amount: {
248
+ currency: "CLP";
249
+ editable: boolean;
250
+ suggested: string;
251
+ };
252
+ source: {
253
+ bank_account_id: string;
254
+ } | {
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";
261
+ } | 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";
270
+ } | {
271
+ bank_account_id: string;
272
+ editable: false;
273
+ };
274
+ expires_in?: string | undefined;
275
+ expires_at?: string | undefined;
276
+ note?: {
277
+ suggested: string;
278
+ editable: boolean;
279
+ } | undefined;
280
+ metadata: {
281
+ [x: string]: unknown;
282
+ };
283
+ } | {
284
+ type: "automatic_charge";
285
+ amount: {
286
+ editable: false;
287
+ currency: "CLP";
288
+ suggested: string;
289
+ };
290
+ source: {
291
+ bank_account_id: string;
292
+ } | null;
293
+ beneficiary: {
294
+ bank_account_id: string;
295
+ };
296
+ expires_in?: string | undefined;
297
+ expires_at?: string | undefined;
298
+ note?: {
299
+ suggested: string;
300
+ editable: boolean;
301
+ } | undefined;
302
+ metadata: {
303
+ [x: string]: unknown;
304
+ };
305
+ }, "metadata_too_large">]>;
306
+ /** Returns validation issues without throwing across the HTTP boundary. */
307
+ export declare function safeParseIntentCreate(input: unknown): v.SafeParseResult<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
308
+ readonly type: v.LiteralSchema<"deposit", undefined>;
309
+ readonly amount: v.OptionalSchema<v.StrictObjectSchema<{
310
+ currency: v.LiteralSchema<"CLP", undefined>;
311
+ editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
312
+ suggested: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.CheckAction<string, undefined>]>;
313
+ }, undefined>, undefined>;
314
+ readonly expires_at: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>, undefined>;
315
+ readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
316
+ readonly note: v.OptionalSchema<v.StrictObjectSchema<{
317
+ readonly suggested: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>;
318
+ readonly editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
319
+ }, undefined>, undefined>;
320
+ readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
321
+ }, undefined>, v.StrictObjectSchema<{
322
+ readonly type: v.LiteralSchema<"withdrawal", undefined>;
323
+ readonly amount: v.StrictObjectSchema<{
324
+ 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>]>;
327
+ }, 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>]>;
330
+ }, 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>;
337
+ }, 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>;
346
+ }, undefined>, v.StrictObjectSchema<{
347
+ readonly bank_account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
348
+ readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
349
+ }, undefined>], undefined>;
350
+ readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
351
+ readonly expires_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>;
352
+ readonly note: v.OptionalSchema<v.StrictObjectSchema<{
353
+ readonly suggested: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>;
354
+ readonly editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
355
+ }, undefined>, undefined>;
356
+ readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
357
+ }, 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>;
370
+ readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
371
+ readonly expires_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>;
372
+ readonly note: v.OptionalSchema<v.StrictObjectSchema<{
373
+ readonly suggested: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>;
374
+ readonly editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
375
+ }, undefined>, undefined>;
376
+ readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
377
+ }, undefined>], undefined>, v.CheckAction<{
378
+ type: "deposit";
379
+ amount?: {
380
+ currency: "CLP";
381
+ editable: boolean;
382
+ suggested: string;
383
+ } | undefined;
384
+ expires_at?: string | null | undefined;
385
+ expires_in?: string | undefined;
386
+ note?: {
387
+ suggested: string;
388
+ editable: boolean;
389
+ } | undefined;
390
+ metadata: {
391
+ [x: string]: unknown;
392
+ };
393
+ } | {
394
+ type: "withdrawal";
395
+ amount: {
396
+ currency: "CLP";
397
+ editable: boolean;
398
+ suggested: string;
399
+ };
400
+ source: {
401
+ bank_account_id: string;
402
+ } | {
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";
409
+ } | 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";
418
+ } | {
419
+ bank_account_id: string;
420
+ editable: false;
421
+ };
422
+ expires_in?: string | undefined;
423
+ expires_at?: string | undefined;
424
+ note?: {
425
+ suggested: string;
426
+ editable: boolean;
427
+ } | undefined;
428
+ metadata: {
429
+ [x: string]: unknown;
430
+ };
431
+ } | {
432
+ type: "automatic_charge";
433
+ amount: {
434
+ editable: false;
435
+ currency: "CLP";
436
+ suggested: string;
437
+ };
438
+ source: {
439
+ bank_account_id: string;
440
+ } | null;
441
+ beneficiary: {
442
+ bank_account_id: string;
443
+ };
444
+ expires_in?: string | undefined;
445
+ expires_at?: string | undefined;
446
+ note?: {
447
+ suggested: string;
448
+ editable: boolean;
449
+ } | undefined;
450
+ metadata: {
451
+ [x: string]: unknown;
452
+ };
453
+ }, "exactly_one_expiration_required">, v.CheckAction<{
454
+ type: "deposit";
455
+ amount?: {
456
+ currency: "CLP";
457
+ editable: boolean;
458
+ suggested: string;
459
+ } | undefined;
460
+ expires_at?: string | null | undefined;
461
+ expires_in?: string | undefined;
462
+ note?: {
463
+ suggested: string;
464
+ editable: boolean;
465
+ } | undefined;
466
+ metadata: {
467
+ [x: string]: unknown;
468
+ };
469
+ } | {
470
+ type: "withdrawal";
471
+ amount: {
472
+ currency: "CLP";
473
+ editable: boolean;
474
+ suggested: string;
475
+ };
476
+ source: {
477
+ bank_account_id: string;
478
+ } | {
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";
485
+ } | 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";
494
+ } | {
495
+ bank_account_id: string;
496
+ editable: false;
497
+ };
498
+ expires_in?: string | undefined;
499
+ expires_at?: string | undefined;
500
+ note?: {
501
+ suggested: string;
502
+ editable: boolean;
503
+ } | undefined;
504
+ metadata: {
505
+ [x: string]: unknown;
506
+ };
507
+ } | {
508
+ type: "automatic_charge";
509
+ amount: {
510
+ editable: false;
511
+ currency: "CLP";
512
+ suggested: string;
513
+ };
514
+ source: {
515
+ bank_account_id: string;
516
+ } | null;
517
+ beneficiary: {
518
+ bank_account_id: string;
519
+ };
520
+ expires_in?: string | undefined;
521
+ expires_at?: string | undefined;
522
+ note?: {
523
+ suggested: string;
524
+ editable: boolean;
525
+ } | undefined;
526
+ metadata: {
527
+ [x: string]: unknown;
528
+ };
529
+ }, "passive_deposit_requires_no_target">, v.CheckAction<{
530
+ type: "deposit";
531
+ amount?: {
532
+ currency: "CLP";
533
+ editable: boolean;
534
+ suggested: string;
535
+ } | undefined;
536
+ expires_at?: string | null | undefined;
537
+ expires_in?: string | undefined;
538
+ note?: {
539
+ suggested: string;
540
+ editable: boolean;
541
+ } | undefined;
542
+ metadata: {
543
+ [x: string]: unknown;
544
+ };
545
+ } | {
546
+ type: "withdrawal";
547
+ amount: {
548
+ currency: "CLP";
549
+ editable: boolean;
550
+ suggested: string;
551
+ };
552
+ source: {
553
+ bank_account_id: string;
554
+ } | {
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";
561
+ } | 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";
570
+ } | {
571
+ bank_account_id: string;
572
+ editable: false;
573
+ };
574
+ expires_in?: string | undefined;
575
+ expires_at?: string | undefined;
576
+ note?: {
577
+ suggested: string;
578
+ editable: boolean;
579
+ } | undefined;
580
+ metadata: {
581
+ [x: string]: unknown;
582
+ };
583
+ } | {
584
+ type: "automatic_charge";
585
+ amount: {
586
+ editable: false;
587
+ currency: "CLP";
588
+ suggested: string;
589
+ };
590
+ source: {
591
+ bank_account_id: string;
592
+ } | null;
593
+ beneficiary: {
594
+ bank_account_id: string;
595
+ };
596
+ expires_in?: string | undefined;
597
+ expires_at?: string | undefined;
598
+ note?: {
599
+ suggested: string;
600
+ editable: boolean;
601
+ } | undefined;
602
+ metadata: {
603
+ [x: string]: unknown;
604
+ };
605
+ }, "metadata_too_large">]>>;
606
+ /** Identifies recognized unsupported payment shapes without silently dropping their extra instructions. */
607
+ 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<{
610
+ readonly intent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
611
+ 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>]>;
618
+ bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
619
+ country: v.LiteralSchema<"CL", undefined>;
620
+ }, undefined>, undefined>;
621
+ readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>, undefined>;
622
+ }, undefined>;
623
+ export declare function safeParseWithdrawalConfirmation(input: unknown): v.SafeParseResult<v.StrictObjectSchema<{
624
+ readonly intent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
625
+ 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>]>;
632
+ bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
633
+ country: v.LiteralSchema<"CL", undefined>;
634
+ }, undefined>, undefined>;
635
+ readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>, undefined>;
636
+ }, undefined>>;
637
+ //# sourceMappingURL=intent-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intent-input.d.ts","sourceRoot":"","sources":["../src/intent-input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAsB7B,gFAAgF;AAChF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAOvD;AAED,6GAA6G;AAC7G,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CASvD;AAkBD,+GAA+G;AAC/G,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAsC9B,CAAC;AAEF,2EAA2E;AAC3E,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAEnD;AAED,2GAA2G;AAC3G,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAShF;AAED,yGAAyG;AACzG,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;aAYvC,CAAC;AAEH,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,OAAO;;;;;;;;;;;;;eAE7D"}