@andco/protocol 0.0.13 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/api-errors.d.ts +9 -9
- package/dist/api-errors.js +9 -9
- package/dist/authorization-preparation.js +2 -2
- package/dist/authorization.d.ts +1 -1
- package/dist/authorization.js +1 -1
- package/dist/consent.d.ts +2 -2
- package/dist/consent.js +2 -2
- package/dist/constants.d.ts +15 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +17 -3
- package/dist/errors.d.ts +36 -9
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +49 -11
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/intent-input.d.ts +431 -872
- package/dist/intent-input.d.ts.map +1 -1
- package/dist/intent-input.js +142 -121
- package/dist/miniapp-icon.js +1 -1
- package/dist/miniapp-manifest.d.ts +1 -1
- package/dist/native-intent.d.ts +82 -68
- package/dist/native-intent.d.ts.map +1 -1
- package/dist/native-intent.js +134 -84
- package/dist/native.d.ts +1 -1
- package/dist/rar/account-matchers.d.ts +35 -30
- package/dist/rar/account-matchers.d.ts.map +1 -1
- package/dist/rar/account-matchers.js +27 -21
- package/dist/rar/bank.d.ts +81 -81
- package/dist/rar/bank.js +1 -1
- package/dist/rar/catalog.d.ts +48 -48
- package/dist/rar/catalog.js +6 -6
- package/dist/rar/detail.d.ts +1 -1
- package/dist/rar/detail.js +1 -1
- package/dist/rar/json-schemas.generated.d.ts +1 -1
- package/dist/rar/json-schemas.generated.d.ts.map +1 -1
- package/dist/rar/json-schemas.generated.js +25 -21
- package/dist/rar/subject-data.d.ts +1 -1
- package/dist/rar/subject-data.js +1 -1
- package/dist/rar/subject.d.ts +1 -1
- package/dist/rar/subject.js +1 -1
- package/dist/rest/accounts.d.ts +28 -28
- package/dist/rest/accounts.d.ts.map +1 -1
- package/dist/rest/accounts.js +22 -22
- package/dist/rest/api-error.d.ts +1 -1
- package/dist/rest/api-error.js +1 -1
- package/dist/rest/catalog.d.ts +3 -3
- package/dist/rest/catalog.js +2 -2
- package/dist/rest/common.d.ts +3 -3
- package/dist/rest/common.js +3 -3
- package/dist/rest/contract.d.ts +905 -528
- package/dist/rest/contract.d.ts.map +1 -1
- package/dist/rest/contract.js +17 -5
- package/dist/rest/events.d.ts +1 -1
- package/dist/rest/events.d.ts.map +1 -1
- package/dist/rest/events.js +2 -2
- package/dist/rest/identity.d.ts +22 -22
- package/dist/rest/identity.js +5 -5
- package/dist/rest/index.d.ts +1 -0
- package/dist/rest/index.d.ts.map +1 -1
- package/dist/rest/index.js +1 -0
- package/dist/rest/intents.d.ts +787 -716
- package/dist/rest/intents.d.ts.map +1 -1
- package/dist/rest/intents.js +62 -53
- package/dist/rest/signatures.d.ts +11 -5
- package/dist/rest/signatures.d.ts.map +1 -1
- package/dist/rest/signatures.js +10 -0
- package/dist/rest/subjects.d.ts +1 -1
- package/dist/rest/subjects.d.ts.map +1 -1
- package/dist/rest/subjects.js +3 -2
- package/dist/rest/transfers.d.ts +612 -0
- package/dist/rest/transfers.d.ts.map +1 -0
- package/dist/rest/transfers.js +115 -0
- package/dist/scopes.d.ts +1 -1
- package/dist/signing.d.ts +13 -2
- package/dist/signing.d.ts.map +1 -1
- package/dist/signing.js +13 -0
- package/dist/transfer.d.ts +363 -0
- package/dist/transfer.d.ts.map +1 -0
- package/dist/transfer.js +287 -0
- package/dist/transport/financial-events.d.ts +21 -17
- package/dist/transport/financial-events.d.ts.map +1 -1
- package/dist/transport/generated/oauth-api.d.ts +1017 -194
- package/dist/transport/generated/oauth-api.d.ts.map +1 -1
- package/dist/transport/intents.d.ts +28 -12
- package/dist/transport/intents.d.ts.map +1 -1
- package/dist/transport/intents.js +1 -1
- package/dist/transport/rest.d.ts +4 -4
- package/dist/transport/rest.d.ts.map +1 -1
- package/dist/transport/rest.js +33 -4
- package/dist/urls.d.ts +25 -2
- package/dist/urls.d.ts.map +1 -1
- package/dist/urls.js +47 -4
- package/dist/userinfo.d.ts +2 -2
- package/dist/userinfo.js +2 -2
- package/dist/webhooks.d.ts +19 -15
- package/dist/webhooks.d.ts.map +1 -1
- package/dist/webhooks.js +17 -15
- package/dist/window-features.d.ts +2 -2
- package/dist/window-features.js +2 -2
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intents.d.ts","sourceRoot":"","sources":["../../src/rest/intents.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"intents.d.ts","sourceRoot":"","sources":["../../src/rest/intents.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAc7B,OAAO,EAEL,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,QAAQ,EAER,eAAe,EACf,WAAW,EACX,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBrB;;;GAGG;AACH,qBAAa,wBAAyB,SAAQ,eAAe,CAAC,6BAS7D;gBACa,OAAO,CAAC,EAAE,MAAM;CAG7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED;;;;GAIG;AACH,qBAAa,wBAAyB,SAAQ,eAAe,CAAC,6BAuB7D;gBACa,IAAI,EAAE,wBAAwB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM;CAGrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED;;;GAGG;AACH,qBAAa,wBAAyB,SAAQ,eAAe,CAAC,6BAI7D;gBACa,OAAO,CAAC,EAAE,MAAM;CAG7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED,4GAA4G;AAC5G,qBAAa,oBAAqB,SAAQ,eAAe,CAAC,yBAIzD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ntentAccountSchema, IntentCancellationSchema, IntentCreateSchema, IntentNoteSchema, IntentRejectionSchema,
|
|
3
|
+
import { IntentAccountSchema, IntentCancellationSchema, IntentCreateSchema, IntentNoteSchema, IntentRejectionSchema, TransferCommentProposalSchema, TransferIntentReceiverProposalSchema, } from "../intent-input.js";
|
|
4
4
|
import { AccountKeySchema } from "../rar/account-matchers.js";
|
|
5
5
|
import { MoneySchema } from "../rar/money.js";
|
|
6
|
+
import { PesosSchema } from "../transfer.js";
|
|
6
7
|
import { AndcoAPIError, errors } from "./api-error.js";
|
|
7
8
|
import { ApiIssue, InsufficientAuthorization, InvalidIdentifier, InvalidOrigin, InvalidRequest, InvalidToken, NotFound, PageQuery, PayloadTooLarge, ServerError, TemporarilyUnavailable, UnsupportedMediaType, UnsupportedVersion, } from "./common.js";
|
|
8
9
|
import { FinancialEventPage } from "./events.js";
|
|
@@ -34,8 +35,8 @@ export class InvalidSignedInstruction extends /* @__PURE__ */ AndcoAPIError.defi
|
|
|
34
35
|
reason: v.pipe(v.picklist([
|
|
35
36
|
...SignedInstructionRejectionReason.options.filter((reason) => reason !== "expired_assertion"),
|
|
36
37
|
"invalid_claims",
|
|
37
|
-
]), v.description("The one cause: what did not verify, or `invalid_claims` when the verified claims are not an Intent.")),
|
|
38
|
-
issues: v.pipe(v.optional(v.array(ApiIssue)), v.description("On `invalid_claims`, what failed in the claims,
|
|
38
|
+
]), v.description("The one cause: what did not verify, or `invalid_claims` when the verified claims are not what the operation takes (an Intent on `POST /intents`, a transfer on `POST /transfers`).")),
|
|
39
|
+
issues: v.pipe(v.optional(v.array(ApiIssue)), v.description("On `invalid_claims`, what failed in the claims; on `malformed_assertion` of a signed transfer, what failed in its envelope. As `invalid_request` names it.")),
|
|
39
40
|
}), v.description("The Signed Instruction did not verify, or its verified claims are not an Intent."))) {
|
|
40
41
|
constructor(data, message) {
|
|
41
42
|
super(data, message);
|
|
@@ -67,15 +68,14 @@ export class IdempotencyConflict extends /* @__PURE__ */ AndcoAPIError.define("i
|
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
70
|
/**
|
|
70
|
-
* Only a person can let this Intent go on. `reason` says why: `bank_verification_required` (the
|
|
71
|
-
* asks them to confirm the transfer with their web PIN and an SMS code) and `source_account_required`
|
|
71
|
+
* Only a person can let this Intent go on. `reason` says why: `bank_verification_required` (AndCo * asks them to confirm the transfer with their web AndPass and an SMS code) and `source_account_required`
|
|
72
72
|
* (they still pick the source account) come with `authorization_url`, where they do it; on the release
|
|
73
73
|
* of an Intent that moves with nobody present, `bank_connection_pin_required`,
|
|
74
74
|
* `bank_connection_reconnect_required` and `bank_representative_replacement_required` come with
|
|
75
75
|
* `interaction_url`. Nothing was approved, frozen or moved, and the same request succeeds once the
|
|
76
76
|
* person has acted.
|
|
77
77
|
*
|
|
78
|
-
* The same code on a read of
|
|
78
|
+
* The same code on a read of AndCo is {@link BankConnectionInteractionRequired}, with `code`.
|
|
79
79
|
*/
|
|
80
80
|
export class IntentInteractionRequired extends /* @__PURE__ */ AndcoAPIError.define("interaction_required", 409, v.pipe(v.object({
|
|
81
81
|
intent_id: refusedIntent,
|
|
@@ -87,7 +87,7 @@ export class IntentInteractionRequired extends /* @__PURE__ */ AndcoAPIError.def
|
|
|
87
87
|
"bank_representative_replacement_required",
|
|
88
88
|
])), v.description("Why only a person can go on.")),
|
|
89
89
|
authorization_url: v.pipe(v.optional(url), v.description("Where the person completes the Intent, for `bank_verification_required` and `source_account_required`.")),
|
|
90
|
-
interaction_url: v.pipe(v.optional(url), v.description("Where in Platform the person brings their
|
|
90
|
+
interaction_url: v.pipe(v.optional(url), v.description("Where in Platform the person brings their AndCo account connection back, for the `bank_*` reasons.")),
|
|
91
91
|
}), v.description("Only a person can let this Intent go on; nothing was approved, frozen or moved."))) {
|
|
92
92
|
constructor(data, message) {
|
|
93
93
|
super(data, message);
|
|
@@ -117,20 +117,20 @@ export class AccountKeyTaken extends /* @__PURE__ */ AndcoAPIError.define("accou
|
|
|
117
117
|
super(data, message, hint);
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
/** The Organization already holds as many
|
|
120
|
+
/** The Organization already holds as many digital accounts as its contract allows. */
|
|
121
121
|
export class BankAccountQuotaExceeded extends /* @__PURE__ */ AndcoAPIError.define("bank_account_quota_exceeded", 409, v.pipe(v.object({
|
|
122
122
|
intent_id: refusedIntent,
|
|
123
|
-
used: v.pipe(v.optional(v.pipe(v.number(), v.integer(), v.minValue(0))), v.description("How many
|
|
124
|
-
quota: v.pipe(v.optional(v.pipe(v.number(), v.integer(), v.minValue(0))), v.description("How many
|
|
125
|
-
}), v.description("The Organization holds every
|
|
123
|
+
used: v.pipe(v.optional(v.pipe(v.number(), v.integer(), v.minValue(0))), v.description("How many digital accounts the Organization holds, closed ones included. Absent when they could not be read after the refusal.")),
|
|
124
|
+
quota: v.pipe(v.optional(v.pipe(v.number(), v.integer(), v.minValue(0))), v.description("How many digital accounts the Organization may hold. Absent when it could not be read after the refusal.")),
|
|
125
|
+
}), v.description("The Organization holds every digital account its quota allows; nothing was opened."))) {
|
|
126
126
|
constructor(data, message, hint) {
|
|
127
127
|
super(data, message, hint);
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
/**
|
|
131
131
|
* The base of an error that refuses what an Intent asks (`422`): the request is valid, but the Grant or
|
|
132
|
-
*
|
|
133
|
-
* the same word when
|
|
132
|
+
* AndCo does not let it go on. On a release, `intent_id` names the Intent, which is `failed` with
|
|
133
|
+
* the same word when AndCo answered.
|
|
134
134
|
*/
|
|
135
135
|
/* @__NO_SIDE_EFFECTS__ */
|
|
136
136
|
function intentRefusal(error, description) {
|
|
@@ -167,43 +167,43 @@ export class DepositDestinationAmbiguous extends /* @__PURE__ */ intentRefusal("
|
|
|
167
167
|
export class TransferAmountRequired extends /* @__PURE__ */ intentRefusal("transfer_amount_required", "The person still sets the transfer's amount.") {
|
|
168
168
|
}
|
|
169
169
|
/** The destination of this transfer is the person's to complete, and a credential has none to offer. */
|
|
170
|
-
export class TransferDestinationRequired extends /* @__PURE__ */ intentRefusal("transfer_destination_required", "The person still completes the transfer's
|
|
170
|
+
export class TransferDestinationRequired extends /* @__PURE__ */ intentRefusal("transfer_destination_required", "The person still completes the transfer's receiver.") {
|
|
171
171
|
}
|
|
172
172
|
/** An Organization that never completed its business identity cannot be named to another bank. */
|
|
173
173
|
export class TransferSenderIdentityUnavailable extends /* @__PURE__ */ intentRefusal("transfer_sender_identity_unavailable", "The sender's identity cannot be named to the receiving bank.") {
|
|
174
174
|
}
|
|
175
|
-
/** The destination's bank is not one
|
|
175
|
+
/** The destination's bank is not one AndCo transfers to. */
|
|
176
176
|
export class UnsupportedBank extends /* @__PURE__ */ intentRefusal("unsupported_bank", "The destination's bank is not supported.") {
|
|
177
177
|
}
|
|
178
|
-
/** The subject has no
|
|
179
|
-
export class BankConnectionUnavailable extends /* @__PURE__ */ intentRefusal("bank_connection_unavailable", "The subject has no
|
|
178
|
+
/** The subject has no AndCo account connection to a company; nothing was asked of the bank. */
|
|
179
|
+
export class BankConnectionUnavailable extends /* @__PURE__ */ intentRefusal("bank_connection_unavailable", "The subject has no AndCo account connection to a company.") {
|
|
180
180
|
}
|
|
181
|
-
/**
|
|
182
|
-
export class BankAccountNumberMissing extends /* @__PURE__ */ intentRefusal("bank_account_number_missing", "
|
|
181
|
+
/** AndCo opened no account number for the opening. */
|
|
182
|
+
export class BankAccountNumberMissing extends /* @__PURE__ */ intentRefusal("bank_account_number_missing", "AndCo answered the opening without an account number.") {
|
|
183
183
|
}
|
|
184
|
-
/**
|
|
185
|
-
export class BankAuthorizationDenied extends /* @__PURE__ */ intentRefusal("bank_authorization_denied", "
|
|
184
|
+
/** AndCo does not let that person open accounts for that company. */
|
|
185
|
+
export class BankAuthorizationDenied extends /* @__PURE__ */ intentRefusal("bank_authorization_denied", "AndCo does not let that person open accounts for that company.") {
|
|
186
186
|
}
|
|
187
|
-
/**
|
|
188
|
-
export class BankHolderWithoutAccount extends /* @__PURE__ */ intentRefusal("bank_holder_without_account", "The holder has no account at
|
|
187
|
+
/** AndCo knows the holder without an account to open another one from. */
|
|
188
|
+
export class BankHolderWithoutAccount extends /* @__PURE__ */ intentRefusal("bank_holder_without_account", "The holder has no account at AndCo.") {
|
|
189
189
|
}
|
|
190
|
-
/**
|
|
191
|
-
export class BankAccountLimitReached extends /* @__PURE__ */ intentRefusal("bank_account_limit_reached", "The holder reached
|
|
190
|
+
/** AndCo's own ceiling of accounts for the holder is reached. */
|
|
191
|
+
export class BankAccountLimitReached extends /* @__PURE__ */ intentRefusal("bank_account_limit_reached", "The holder reached AndCo's ceiling of accounts.") {
|
|
192
192
|
}
|
|
193
|
-
/**
|
|
194
|
-
export class BankRefused extends /* @__PURE__ */ intentRefusal("bank_refused", "
|
|
193
|
+
/** AndCo or its ledger refused the request before accepting it; no money moved. */
|
|
194
|
+
export class BankRefused extends /* @__PURE__ */ intentRefusal("bank_refused", "AndCo refused the request.") {
|
|
195
195
|
}
|
|
196
196
|
/** The source account does not hold enough money for this movement. */
|
|
197
197
|
export class InsufficientFunds extends /* @__PURE__ */ intentRefusal("insufficient_funds", "The source account does not hold enough money.") {
|
|
198
198
|
}
|
|
199
199
|
/** The ledger refused an entry and nothing stays moved. */
|
|
200
|
-
export class BankRejected extends /* @__PURE__ */ intentRefusal("bank_rejected", "
|
|
200
|
+
export class BankRejected extends /* @__PURE__ */ intentRefusal("bank_rejected", "AndCo rejected the movement; nothing stays moved.") {
|
|
201
201
|
}
|
|
202
202
|
/**
|
|
203
|
-
*
|
|
204
|
-
* without reaching the destination, and
|
|
203
|
+
* AndCo stopped half way or gave no usable answer for a day: money may have left the source account
|
|
204
|
+
* without reaching the destination, and AndCo must review it. Never retry it under a new Intent.
|
|
205
205
|
*/
|
|
206
|
-
export class BankReviewRequired extends /* @__PURE__ */ intentRefusal("bank_review_required", "
|
|
206
|
+
export class BankReviewRequired extends /* @__PURE__ */ intentRefusal("bank_review_required", "AndCo must review the movement; money may have left the source account.") {
|
|
207
207
|
}
|
|
208
208
|
/**
|
|
209
209
|
* The requested case is not available, and `code` says which. Not a client error: do not retry. At
|
|
@@ -215,12 +215,13 @@ export class NotImplemented extends /* @__PURE__ */ AndcoAPIError.define("not_im
|
|
|
215
215
|
"account_closure_not_implemented",
|
|
216
216
|
"account_opening_not_implemented",
|
|
217
217
|
"own_account_transfer_not_implemented",
|
|
218
|
+
"signed_outgoing_transfer_not_implemented",
|
|
218
219
|
"external_transfer_execution_not_implemented",
|
|
219
220
|
"multiple_destinations_not_implemented",
|
|
220
221
|
"split_payments_not_implemented",
|
|
221
222
|
"multiple_instructions_not_implemented",
|
|
222
223
|
"intent_type_not_decidable",
|
|
223
|
-
])), v.description("Which case is unavailable: closing an account (postponed with no date), opening an additional account or a transfer between two accounts of the same holder where
|
|
224
|
+
])), v.description("Which case is unavailable: closing an account (postponed with no date), opening an additional account or a transfer between two accounts of the same holder where AndCo does not serve them, a signed transfer that leaves its holder where AndCo does not verify signatures yet, and the payment shapes not built yet. Absent for a case this version of the contract does not name yet.")),
|
|
224
225
|
intent_id: refusedIntent,
|
|
225
226
|
}), v.description("The requested case is unavailable, and `code` says which when the contract names it."))) {
|
|
226
227
|
constructor(data, message, hint) {
|
|
@@ -248,6 +249,13 @@ export const IntentStatus = /* @__PURE__ */ v.pipe(v.picklist([
|
|
|
248
249
|
"failed.bank_rejected",
|
|
249
250
|
"failed.bank_review_required",
|
|
250
251
|
"failed.own_account_transfer_not_implemented",
|
|
252
|
+
"failed.bank_challenge_required",
|
|
253
|
+
"failed.unknown_key",
|
|
254
|
+
"failed.revoked_key",
|
|
255
|
+
"failed.expired_key",
|
|
256
|
+
"failed.invalid_signature",
|
|
257
|
+
"failed.expired_signed_instruction",
|
|
258
|
+
"failed.sender_mismatch",
|
|
251
259
|
"failed.bank_authorization_denied",
|
|
252
260
|
"failed.bank_holder_without_account",
|
|
253
261
|
"failed.bank_account_limit_reached",
|
|
@@ -264,17 +272,18 @@ export const IntentStatus = /* @__PURE__ */ v.pipe(v.picklist([
|
|
|
264
272
|
"cancelled.grant_expired",
|
|
265
273
|
"rejected",
|
|
266
274
|
"expired",
|
|
267
|
-
]), v.description("`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another
|
|
268
|
-
/** What every answered Intent carries, whatever its type. */
|
|
269
|
-
const
|
|
275
|
+
]), v.description("`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another AndCo customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that AndCo holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts AndCo stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code AndCo records, and it may grow: a `failed.` value outside this list is a failure like any other."));
|
|
276
|
+
/** What every answered Intent carries, whatever its type, but its note or comment. */
|
|
277
|
+
const answeredIntentBase = {
|
|
270
278
|
id: uuid,
|
|
271
279
|
resource_server: url,
|
|
272
|
-
note: /* @__PURE__ */ v.optional(IntentNoteSchema),
|
|
273
280
|
metadata: /* @__PURE__ */ v.record(v.string(), v.unknown()),
|
|
274
281
|
server_time: dateTime,
|
|
275
282
|
created_at: dateTime,
|
|
276
283
|
authorization_url: url,
|
|
277
284
|
};
|
|
285
|
+
/** What a deposit or an account Intent carries: the base and its note. A transfer has a `comment`. */
|
|
286
|
+
const answeredIntent = { ...answeredIntentBase, note: /* @__PURE__ */ v.optional(IntentNoteSchema) };
|
|
278
287
|
/** A deadline that may be absent (`null`: the Intent never expires), and the lifetime left of it. */
|
|
279
288
|
const openEndedDeadline = {
|
|
280
289
|
expires_at: /* @__PURE__ */ v.pipe(v.nullable(dateTime), v.description("The deadline to approve and execute the Intent. `null`: the Intent never expires.")),
|
|
@@ -283,7 +292,7 @@ const openEndedDeadline = {
|
|
|
283
292
|
const noFee = /* @__PURE__ */ v.strictObject({ currency: v.literal("CLP"), amount: v.literal("0") });
|
|
284
293
|
/** Whether a Signed Instruction created the Intent. */
|
|
285
294
|
const signed = /* @__PURE__ */ v.pipe(v.boolean(), v.description("Whether a Signed Instruction created this Intent rather than a plain request."));
|
|
286
|
-
/** The
|
|
295
|
+
/** The AndCo account a deposit lands on, with what a payer at another bank types to pay into it. */
|
|
287
296
|
export const DepositDestination = /* @__PURE__ */ v.pipe(v.strictObject({
|
|
288
297
|
type: v.literal("account"),
|
|
289
298
|
id: uuid,
|
|
@@ -291,7 +300,7 @@ export const DepositDestination = /* @__PURE__ */ v.pipe(v.strictObject({
|
|
|
291
300
|
account_type: v.picklist(["checking", "debit", "savings"]),
|
|
292
301
|
holder_id: v.pipe(v.nullable(v.string()), v.description("Null when the holder has no identity document on file.")),
|
|
293
302
|
holder_name: v.string(),
|
|
294
|
-
}), v.description('The
|
|
303
|
+
}), v.description('The AndCo account a deposit lands on: the `{ type: "account", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder\'s RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.'));
|
|
295
304
|
/** What a deposit has collected so far, and what it still waits for. */
|
|
296
305
|
export const DepositProgress = /* @__PURE__ */ v.strictObject({ credited: pesos, remaining: v.nullable(pesos) });
|
|
297
306
|
/** The amount a deposit asks for, as it is answered. */
|
|
@@ -310,8 +319,8 @@ export const DepositTransaction = /* @__PURE__ */ v.strictObject({
|
|
|
310
319
|
note: v.nullable(v.string()),
|
|
311
320
|
outcome: v.picklist(["credited", "reversed"]),
|
|
312
321
|
receipt_time_source: v.picklist(["bank_timestamp", "unknown"]),
|
|
313
|
-
sender_name: v.pipe(v.nullable(boundedText(256)), v.description("Name of the account holder that sent the money, exactly as
|
|
314
|
-
sender_national_id: v.pipe(v.nullable(boundedText(64)), v.description("National id (RUT) of the sender, as
|
|
322
|
+
sender_name: v.pipe(v.nullable(boundedText(256)), v.description("Name of the account holder that sent the money, exactly as AndCo reported it.")),
|
|
323
|
+
sender_national_id: v.pipe(v.nullable(boundedText(64)), v.description("National id (RUT) of the sender, as AndCo reported it.")),
|
|
315
324
|
sender_bank_name: v.pipe(v.nullable(boundedText(256)), v.description("Display name of the sender's bank.")),
|
|
316
325
|
sender_account_type: v.nullable(v.picklist(["checking", "debit", "savings"])),
|
|
317
326
|
sender_account_number: v.nullable(boundedText(64)),
|
|
@@ -350,26 +359,27 @@ export const DepositIntent = /* @__PURE__ */ v.object({
|
|
|
350
359
|
/** The amount a transfer orders, as it is answered. */
|
|
351
360
|
export const TransferAmount = /* @__PURE__ */ v.pipe(v.strictObject({
|
|
352
361
|
currency: v.literal("CLP"),
|
|
353
|
-
value: v.pipe(
|
|
362
|
+
value: v.pipe(PesosSchema, v.description("Immutable amount from the creation request, in the minor unit of the currency.")),
|
|
354
363
|
editable: v.boolean(),
|
|
355
|
-
confirmed: v.pipe(v.nullable(
|
|
356
|
-
}), v.description("The amount a transfer orders, as it is answered. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that."));
|
|
364
|
+
confirmed: v.pipe(v.nullable(PesosSchema), v.description("The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.")),
|
|
365
|
+
}), v.description("The amount a transfer orders, as it is answered: integers in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that."));
|
|
357
366
|
/** The money a transfer actually moved and when it settled. */
|
|
358
|
-
export const TransferSettlement = /* @__PURE__ */ v.pipe(v.strictObject({ currency: v.literal("CLP"), value:
|
|
367
|
+
export const TransferSettlement = /* @__PURE__ */ v.pipe(v.strictObject({ currency: v.literal("CLP"), value: PesosSchema, at: dateTime }), v.description("The money a transfer actually moved and when it settled. Present only once the transfer `succeeded`; null before, and null for ever when it fails, is rejected, cancelled or expires."));
|
|
359
368
|
/** Authoritative Project-facing state of a transfer. */
|
|
360
369
|
export const TransferIntent = /* @__PURE__ */ v.pipe(v.object({
|
|
361
|
-
...
|
|
370
|
+
...answeredIntentBase,
|
|
362
371
|
...openEndedDeadline,
|
|
363
372
|
type: v.literal("transfer"),
|
|
364
373
|
status: IntentStatus,
|
|
365
374
|
signed,
|
|
366
|
-
|
|
367
|
-
|
|
375
|
+
sender: v.pipe(v.nullable(IntentAccountSchema), v.description("The Remitente. Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.")),
|
|
376
|
+
receiver: v.pipe(v.nullable(TransferIntentReceiverProposalSchema), v.description("The Receptor. Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.")),
|
|
377
|
+
comment: v.optional(TransferCommentProposalSchema),
|
|
368
378
|
amount: TransferAmount,
|
|
369
379
|
settled: v.nullable(TransferSettlement),
|
|
370
380
|
fee: noFee,
|
|
371
|
-
interaction_reason: v.pipe(v.optional(v.picklist(["bank_verification_required", "source_account_required"])), v.description("Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and
|
|
372
|
-
}), v.description("Authoritative Project-facing state of a transfer. `
|
|
381
|
+
interaction_reason: v.pipe(v.optional(v.picklist(["bank_verification_required", "source_account_required"])), v.description("Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and AndCo asks the person to authorize it at `authorization_url` with their web AndPass and an SMS code; the Intent becomes `processing.confirmed` only when AndCo accepts it. A transfer created with `receiver: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.")),
|
|
382
|
+
}), v.description("Authoritative Project-facing state of a transfer, in Core's vocabulary (ADR 0093). `sender` and `receiver` answer in the same matcher vocabulary as the request, and `comment` is the request's comment. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount."));
|
|
373
383
|
/** Authoritative Project-facing state of an account opening. */
|
|
374
384
|
export const AccountOpeningIntent = /* @__PURE__ */ v.pipe(v.object({
|
|
375
385
|
...answeredIntent,
|
|
@@ -434,7 +444,7 @@ export const createIntent = /* @__PURE__ */ oc
|
|
|
434
444
|
method: "POST",
|
|
435
445
|
path: "/intents",
|
|
436
446
|
summary: "Create an intent under the exact OAuth Grant",
|
|
437
|
-
description: "The same creation has two representations, and the content type picks between them. An `application/json` body is an Intent born waiting for an Approval. An `application/jwt` body is one Signed Instruction, sent as a compact JWS whose verified payload is `
|
|
447
|
+
description: "The same creation has two representations, and the content type picks between them. An `application/json` body is an Intent born waiting for an Approval. An `application/jwt` body is one Signed Instruction, sent as a compact JWS whose verified payload is `SignedAccountOpeningIntentClaims` or `SignedAccountClosureIntentClaims`, and every value the operation uses comes from those claims and none from the envelope carrying them. A string body sent as anything but `application/jwt` answers `415 unsupported_media_type`. A Signed Instruction that does not verify answers `400 invalid_signed_instruction` with its `reason`, and one whose `exp` passed `401 expired_signed_instruction`. A signed transfer is not an Intent: it is uploaded to `POST /transfers` as a `SignedTransferEnvelope` (ADR 0093), and transfer claims signed here are refused. A signed Intent is born approved when the signing client's Grant holds the family's `approve` action (`bank_account`); otherwise it waits, like a proposal, for the person on the hosted screen or for `POST /intents/{intent_id}/approve` by a Grant that holds it. Opening and closing an account fail synchronously with `403 account_key_out_of_grant` when the account_key is outside the Grant's `accounts` patterns and with `409 account_key_taken` when the account_key names an account of the subject (always for a closed one; otherwise unless `upsert`). The new account's number arrives in the `account_opening.succeeded` event as `account: { id, accountKey, number, name }`. Once the request is valid and authorized (a malformed body is still `400 invalid_request` and a Grant without the permission still `403 insufficient_authorization`), an opening and a transfer between two accounts of the same holder work where the bank serves them: the answer is `201` with the Intent `requires_action` and its `authorization_url`, or, for a Signed Instruction whose signer also holds the family's `approve`, the Intent as it is after its release. Where the deployment's bank does not serve one, the same request answers `501 not_implemented` with `code: account_opening_not_implemented` or `code: own_account_transfer_not_implemented`; a closure always answers `501 not_implemented` with `code: account_closure_not_implemented`. Nothing is created in those cases. A subject without a bank connection to a company cannot open an account: `422 bank_connection_unavailable` with the `intent_id`. A released Signed Instruction answers the refusals of `POST /intents/{intent_id}/approve`.",
|
|
438
448
|
successStatus: 201,
|
|
439
449
|
successDescription: "Intent created or returned from an idempotent retry",
|
|
440
450
|
inputStructure: "detailed",
|
|
@@ -449,7 +459,6 @@ export const createIntent = /* @__PURE__ */ oc
|
|
|
449
459
|
IntentCreateSchema,
|
|
450
460
|
signedInstructionBody("One Signed Instruction as a compact JWS, signed by a Signing Key this OAuth Client registered. The body is the serialized token, not a JSON object: what the claim schemas describe is its decoded payload.", {
|
|
451
461
|
oneOf: [
|
|
452
|
-
{ $ref: "#/components/schemas/SignedTransferIntentClaims" },
|
|
453
462
|
{ $ref: "#/components/schemas/SignedAccountOpeningIntentClaims" },
|
|
454
463
|
{ $ref: "#/components/schemas/SignedAccountClosureIntentClaims" },
|
|
455
464
|
],
|
|
@@ -474,7 +483,7 @@ export const closeDeposit = /* @__PURE__ */ oc
|
|
|
474
483
|
method: "POST",
|
|
475
484
|
path: "/intents/{intent_id}/close",
|
|
476
485
|
summary: "Close this application's no-target deposit collection with an explicit close Grant action",
|
|
477
|
-
description: "Idempotent. Preserves existing terminal outcomes. Does not move funds, cancel
|
|
486
|
+
description: "Idempotent. Preserves existing terminal outcomes. Does not move funds, cancel commands AndCo already accepted, or grant account transaction access.",
|
|
478
487
|
successDescription: "Current terminal state and historical manual closure, if any",
|
|
479
488
|
}))
|
|
480
489
|
.errors(errors(InvalidIdentifier, InvalidToken, InvalidOrigin, InsufficientAuthorization, NotFound, UnsupportedVersion, ServerError, InvalidIntentState, TemporarilyUnavailable))
|
|
@@ -486,7 +495,7 @@ export const approveIntent = /* @__PURE__ */ oc
|
|
|
486
495
|
method: "POST",
|
|
487
496
|
path: "/intents/{intent_id}/approve",
|
|
488
497
|
summary: "Approve an Intent with a Grant holding the family's approve action",
|
|
489
|
-
description: "Approval by a credential, without a person: the Grant behind the token must hold `approve` on the family that releases this Intent type (`bank_transfer` for a transfer) for the same subject, and within that detail's `transactions.maximum`. Above it the call answers `422 amount_out_of_grant` and the Intent stays pending for another approver. A transfer only a person can release answers `409 interaction_required` with `authorization_url` and `reason`, before any approval is recorded and before the bank is called: `bank_verification_required` for a transfer that leaves its holder's own accounts (to another bank or to another
|
|
498
|
+
description: "Approval by a credential, without a person: the Grant behind the token must hold `approve` on the family that releases this Intent type (`bank_transfer` for a transfer) for the same subject, and within that detail's `transactions.maximum`. Above it the call answers `422 amount_out_of_grant` and the Intent stays pending for another approver. A transfer only a person can release answers `409 interaction_required` with `authorization_url` and `reason`, before any approval is recorded and before the bank is called: `bank_verification_required` for a transfer that leaves its holder's own accounts (to another bank or to another AndCo customer), which the bank moves only after that person confirms it with their web AndPass and a code the bank sends to their phone, and also for a transfer created with `receiver: null` that nobody has completed yet; and `source_account_required` when the person still picks the source. Accepted is not moved: wait for `transfer.succeeded` or `transfer.failed`.\n\nTwo kinds of Intent are released with nobody present. Opening an additional account by Account Key needs `bank_account` `approve`; the answer is the Intent, and the account number never comes back in it: it arrives in the `account_opening.succeeded` event. A transfer between two accounts of the same holder needs `bank_transfer` `approve`; the bank asks no fraud engine and no challenge because the money does not leave the holder, and the answer is the Intent `succeeded`, or `processing.confirmed` (which for this rail begins at release, while for a transfer that leaves its holder it begins when the bank accepts it) when the bank has not answered for good yet, in which case nothing else is needed from the caller: the server asks the bank again under the same key on a bounded schedule and the outcome arrives as `transfer.succeeded` or `transfer.failed`. \"Same holder\" is decided by the bank: two accounts of one Organization (or of one person's business) qualify, while an account of a person and an account of a Company they represent do not, and that transfer is an ordinary one that leaves its holder.\n\nRefusals of such a release: `409 interaction_required` with `intent_id`, `reason` and `interaction_url`, where `reason` is `bank_connection_pin_required`, `bank_connection_reconnect_required` or `bank_representative_replacement_required`; the bank asks no challenge, but the web session that acts for the holder needs its person back (or the Organization must connect another account representative), nothing was opened, frozen or moved, the Intent is untouched and the same request succeeds once the person has acted at `interaction_url`. Also `409 bank_account_quota_exceeded` (with `used` and `quota`), `409 account_key_taken` (with `reason`), `409 intent_expired`, `409 invalid_intent_state` and `403 insufficient_authorization`. `422` with `intent_id` and `error` one of `bank_connection_unavailable` (the subject has no bank connection to a company), `bank_authorization_denied` (the bank does not let that person open accounts for that company), `bank_holder_without_account`, `bank_account_limit_reached`, `bank_refused`, `insufficient_funds`, `bank_rejected` or `bank_review_required`; the Intent is `failed` with the same detail (see `IntentStatus`). `503 temporarily_unavailable` means the bank could not be asked: asking again for the same Intent is safe and answers the same result, because the Intent's id is the bank's idempotency key. Where the bank does not serve the capability, `501 not_implemented` with `account_opening_not_implemented` or `own_account_transfer_not_implemented` and the `intent_id`; the Intent stays as it was. Safe to retry.",
|
|
490
499
|
successDescription: "The Intent after its approval",
|
|
491
500
|
}))
|
|
492
501
|
.errors(errors(InvalidRequest, InvalidIdentifier, InvalidToken, InvalidOrigin, InsufficientAuthorization, NotFound, UnsupportedVersion, ServerError, IntentInteractionRequired, AccountKeyTaken, BankAccountQuotaExceeded, InvalidIntentState, IntentExpired, TransferAmountRequired, TransferDestinationRequired, ...releaseRefusals, NotImplemented, TemporarilyUnavailable))
|
|
@@ -26,18 +26,24 @@ export declare function servedAsSignedInstruction(operation: Record<string, unkn
|
|
|
26
26
|
* Why a Signed Instruction did not verify. Every refusal names one cause, so an integrator can tell a
|
|
27
27
|
* `kid` that was never registered from one that was revoked, a clock that ran out from an audience
|
|
28
28
|
* that was wrong, and any of those from a payload altered in flight.
|
|
29
|
+
*
|
|
30
|
+
* Three causes belong to a signed transfer (`POST /transfers`) only: `missing_signature`, an envelope
|
|
31
|
+
* whose `signatures` is empty, `unsynced_key`, a key the core bancario does not accept yet, for a
|
|
32
|
+
* transfer that leaves its holder and that the core verifies too (ADR 0092), and
|
|
33
|
+
* `expiration_too_soon`, the `exp` of a new `jti` less than 15 minutes after the upload (a repeat of a stored
|
|
34
|
+
* transfer is never refused for it).
|
|
29
35
|
*/
|
|
30
|
-
export declare const SignedInstructionRejectionReason: v.PicklistSchema<["malformed_assertion", "missing_key_id", "disallowed_algorithm", "unknown_key", "revoked_key", "unusable_key", "invalid_signature", "expired_assertion", "premature_assertion", "missing_expiration", "missing_instruction_id", "missing_claim", "wrong_audience", "wrong_issuer", "verification_failed"], undefined>;
|
|
36
|
+
export declare const SignedInstructionRejectionReason: v.PicklistSchema<["malformed_assertion", "missing_signature", "missing_key_id", "disallowed_algorithm", "unknown_key", "revoked_key", "expired_key", "unusable_key", "unsynced_key", "invalid_signature", "expired_assertion", "premature_assertion", "missing_expiration", "expiration_too_soon", "missing_instruction_id", "missing_claim", "wrong_audience", "wrong_issuer", "verification_failed"], undefined>;
|
|
31
37
|
/** Why a Signed Instruction did not verify. */
|
|
32
38
|
export type SignedInstructionRejectionReason = v.InferOutput<typeof SignedInstructionRejectionReason>;
|
|
33
39
|
declare const UnverifiedSignedInstruction_base: (abstract new (data: {
|
|
34
|
-
reason: "malformed_assertion" | "missing_key_id" | "disallowed_algorithm" | "unknown_key" | "revoked_key" | "unusable_key" | "invalid_signature" | "expired_assertion" | "premature_assertion" | "missing_expiration" | "missing_instruction_id" | "missing_claim" | "wrong_audience" | "wrong_issuer" | "verification_failed";
|
|
40
|
+
reason: "malformed_assertion" | "missing_signature" | "missing_key_id" | "disallowed_algorithm" | "unknown_key" | "revoked_key" | "expired_key" | "unusable_key" | "unsynced_key" | "invalid_signature" | "expired_assertion" | "premature_assertion" | "missing_expiration" | "expiration_too_soon" | "missing_instruction_id" | "missing_claim" | "wrong_audience" | "wrong_issuer" | "verification_failed";
|
|
35
41
|
key_id: string | null;
|
|
36
42
|
}, message?: string, hint?: string) => {
|
|
37
43
|
readonly error: "unverified_signed_instruction";
|
|
38
44
|
readonly hint?: string;
|
|
39
45
|
readonly data: {
|
|
40
|
-
reason: "malformed_assertion" | "missing_key_id" | "disallowed_algorithm" | "unknown_key" | "revoked_key" | "unusable_key" | "invalid_signature" | "expired_assertion" | "premature_assertion" | "missing_expiration" | "missing_instruction_id" | "missing_claim" | "wrong_audience" | "wrong_issuer" | "verification_failed";
|
|
46
|
+
reason: "malformed_assertion" | "missing_signature" | "missing_key_id" | "disallowed_algorithm" | "unknown_key" | "revoked_key" | "expired_key" | "unusable_key" | "unsynced_key" | "invalid_signature" | "expired_assertion" | "premature_assertion" | "missing_expiration" | "expiration_too_soon" | "missing_instruction_id" | "missing_claim" | "wrong_audience" | "wrong_issuer" | "verification_failed";
|
|
41
47
|
key_id: string | null;
|
|
42
48
|
};
|
|
43
49
|
name: string;
|
|
@@ -48,10 +54,10 @@ declare const UnverifiedSignedInstruction_base: (abstract new (data: {
|
|
|
48
54
|
readonly error: "unverified_signed_instruction";
|
|
49
55
|
readonly status: 422;
|
|
50
56
|
readonly data: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
51
|
-
readonly reason: v.SchemaWithPipe<readonly [v.PicklistSchema<["malformed_assertion", "missing_key_id", "disallowed_algorithm", "unknown_key", "revoked_key", "unusable_key", "invalid_signature", "expired_assertion", "premature_assertion", "missing_expiration", "missing_instruction_id", "missing_claim", "wrong_audience", "wrong_issuer", "verification_failed"], undefined>, v.DescriptionAction<"malformed_assertion" | "missing_key_id" | "disallowed_algorithm" | "unknown_key" | "revoked_key" | "unusable_key" | "invalid_signature" | "expired_assertion" | "premature_assertion" | "missing_expiration" | "missing_instruction_id" | "missing_claim" | "wrong_audience" | "wrong_issuer" | "verification_failed", "The one cause, never a generic failure.">]>;
|
|
57
|
+
readonly reason: v.SchemaWithPipe<readonly [v.PicklistSchema<["malformed_assertion", "missing_signature", "missing_key_id", "disallowed_algorithm", "unknown_key", "revoked_key", "expired_key", "unusable_key", "unsynced_key", "invalid_signature", "expired_assertion", "premature_assertion", "missing_expiration", "expiration_too_soon", "missing_instruction_id", "missing_claim", "wrong_audience", "wrong_issuer", "verification_failed"], undefined>, v.DescriptionAction<"malformed_assertion" | "missing_signature" | "missing_key_id" | "disallowed_algorithm" | "unknown_key" | "revoked_key" | "expired_key" | "unusable_key" | "unsynced_key" | "invalid_signature" | "expired_assertion" | "premature_assertion" | "missing_expiration" | "expiration_too_soon" | "missing_instruction_id" | "missing_claim" | "wrong_audience" | "wrong_issuer" | "verification_failed", "The one cause, never a generic failure.">]>;
|
|
52
58
|
readonly key_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The `kid` the assertion declared, when one could be read from it.">]>;
|
|
53
59
|
}, undefined>, v.DescriptionAction<{
|
|
54
|
-
reason: "malformed_assertion" | "missing_key_id" | "disallowed_algorithm" | "unknown_key" | "revoked_key" | "unusable_key" | "invalid_signature" | "expired_assertion" | "premature_assertion" | "missing_expiration" | "missing_instruction_id" | "missing_claim" | "wrong_audience" | "wrong_issuer" | "verification_failed";
|
|
60
|
+
reason: "malformed_assertion" | "missing_signature" | "missing_key_id" | "disallowed_algorithm" | "unknown_key" | "revoked_key" | "expired_key" | "unusable_key" | "unsynced_key" | "invalid_signature" | "expired_assertion" | "premature_assertion" | "missing_expiration" | "expiration_too_soon" | "missing_instruction_id" | "missing_claim" | "wrong_audience" | "wrong_issuer" | "verification_failed";
|
|
55
61
|
key_id: string | null;
|
|
56
62
|
}, "The assertion did not verify against the OAuth Client's registered Signing Keys.">]>;
|
|
57
63
|
define<const Code extends string, const Status extends number, Data extends import("./api-error.js").AndcoAPIErrorDataSchema>(error: Code, status: Status, data: Data): (abstract new (data: v.InferOutput<Data>, message?: string, hint?: string) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signatures.d.ts","sourceRoot":"","sources":["../../src/rest/signatures.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,OAAO,EACL,aAAa,EACb,YAAY,EACZ,eAAe,EACf,WAAW,EACX,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,aAAa,CAAC;AAGrB,gFAAgF;AAChF,eAAO,MAAM,6BAA6B,oBAAoB,CAAC;AAK/D;;;;;;;;GAQG;AAEH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,kJAM1F;AAED;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,MAAM,6BAA6B,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEhG,sGAAsG;AACtG,eAAO,MAAM,eAAe;;;;;;;;;;4mBAyBY,CAAC"}
|
package/dist/rest/signatures.js
CHANGED
|
@@ -61,18 +61,28 @@ export function servedAsSignedInstruction(operation) {
|
|
|
61
61
|
* Why a Signed Instruction did not verify. Every refusal names one cause, so an integrator can tell a
|
|
62
62
|
* `kid` that was never registered from one that was revoked, a clock that ran out from an audience
|
|
63
63
|
* that was wrong, and any of those from a payload altered in flight.
|
|
64
|
+
*
|
|
65
|
+
* Three causes belong to a signed transfer (`POST /transfers`) only: `missing_signature`, an envelope
|
|
66
|
+
* whose `signatures` is empty, `unsynced_key`, a key the core bancario does not accept yet, for a
|
|
67
|
+
* transfer that leaves its holder and that the core verifies too (ADR 0092), and
|
|
68
|
+
* `expiration_too_soon`, the `exp` of a new `jti` less than 15 minutes after the upload (a repeat of a stored
|
|
69
|
+
* transfer is never refused for it).
|
|
64
70
|
*/
|
|
65
71
|
export const SignedInstructionRejectionReason = /* @__PURE__ */ v.picklist([
|
|
66
72
|
"malformed_assertion",
|
|
73
|
+
"missing_signature",
|
|
67
74
|
"missing_key_id",
|
|
68
75
|
"disallowed_algorithm",
|
|
69
76
|
"unknown_key",
|
|
70
77
|
"revoked_key",
|
|
78
|
+
"expired_key",
|
|
71
79
|
"unusable_key",
|
|
80
|
+
"unsynced_key",
|
|
72
81
|
"invalid_signature",
|
|
73
82
|
"expired_assertion",
|
|
74
83
|
"premature_assertion",
|
|
75
84
|
"missing_expiration",
|
|
85
|
+
"expiration_too_soon",
|
|
76
86
|
"missing_instruction_id",
|
|
77
87
|
"missing_claim",
|
|
78
88
|
"wrong_audience",
|
package/dist/rest/subjects.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as v from "valibot";
|
|
|
2
2
|
import { InsufficientAuthorization, InvalidIdentifier, InvalidOrigin, InvalidToken, NotFound, ServerError, TemporarilyUnavailable, UnsupportedVersion } from "./common.js";
|
|
3
3
|
/** The identifier of a Profile, in `/profiles/{profile_id}/…`. */
|
|
4
4
|
export declare const ProfileIdParameter: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "The Profile the Grant's subject names.">]>;
|
|
5
|
-
/** The identifier of an Organization, in `/organizations/{organization_id}
|
|
5
|
+
/** The identifier of an Organization, in `/organizations/{organization_id}/…`, as {@link ORGANIZATION_ID_PARAMETER_PATTERN} says. */
|
|
6
6
|
export declare const OrganizationIdParameter: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "The Organization the Grant's subject names.">]>;
|
|
7
7
|
/**
|
|
8
8
|
* The errors every route under `/profiles/{profile_id}` and `/organizations/{organization_id}`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subjects.d.ts","sourceRoot":"","sources":["../../src/rest/subjects.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"subjects.d.ts","sourceRoot":"","sources":["../../src/rest/subjects.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,aAAa,CAAC;AAErB,kEAAkE;AAClE,eAAO,MAAM,kBAAkB,6LAG9B,CAAC;AAEF,qIAAqI;AACrI,eAAO,MAAM,uBAAuB,mMAGnC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,aAAa,iNAShB,CAAC"}
|
package/dist/rest/subjects.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
+
import { ORGANIZATION_ID_PARAMETER_PATTERN } from "../constants.js";
|
|
2
3
|
import { InsufficientAuthorization, InvalidIdentifier, InvalidOrigin, InvalidToken, NotFound, ServerError, TemporarilyUnavailable, UnsupportedVersion, } from "./common.js";
|
|
3
4
|
/** The identifier of a Profile, in `/profiles/{profile_id}/…`. */
|
|
4
5
|
export const ProfileIdParameter = /* @__PURE__ */ v.pipe(v.pipe(v.string(), v.uuid()), v.description("The Profile the Grant's subject names."));
|
|
5
|
-
/** The identifier of an Organization, in `/organizations/{organization_id}
|
|
6
|
-
export const OrganizationIdParameter = /* @__PURE__ */ v.pipe(v.pipe(v.string(), v.regex(
|
|
6
|
+
/** The identifier of an Organization, in `/organizations/{organization_id}/…`, as {@link ORGANIZATION_ID_PARAMETER_PATTERN} says. */
|
|
7
|
+
export const OrganizationIdParameter = /* @__PURE__ */ v.pipe(v.pipe(v.string(), v.regex(new RegExp(ORGANIZATION_ID_PARAMETER_PATTERN))), v.description("The Organization the Grant's subject names."));
|
|
7
8
|
/**
|
|
8
9
|
* The errors every route under `/profiles/{profile_id}` and `/organizations/{organization_id}`
|
|
9
10
|
* answers, whatever it does: a malformed subject, a token that is not valid or whose Grant lacks the
|