@andco/protocol 0.1.0-ti.1 → 0.1.0-ti.3
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/dist/intent-input.d.ts +2 -12
- package/dist/intent-input.d.ts.map +1 -1
- package/dist/intent-input.js +2 -12
- package/dist/rar/bank.d.ts +152 -0
- package/dist/rar/bank.d.ts.map +1 -1
- package/dist/rar/bank.js +38 -0
- package/dist/rar/catalog.d.ts +131 -1
- package/dist/rar/catalog.d.ts.map +1 -1
- package/dist/rar/catalog.js +7 -1
- package/dist/rar/json-schemas.generated.d.ts.map +1 -1
- package/dist/rar/json-schemas.generated.js +372 -0
- package/dist/rest/accounts.d.ts +3 -3
- package/dist/rest/accounts.js +1 -1
- package/dist/rest/contract.d.ts +12 -12
- package/dist/rest/intents.d.ts +42 -71
- package/dist/rest/intents.d.ts.map +1 -1
- package/dist/rest/intents.js +11 -23
- package/dist/rest/signatures.d.ts +10 -9
- package/dist/rest/signatures.d.ts.map +1 -1
- package/dist/rest/signatures.js +11 -10
- package/dist/rest/transfers.d.ts +16 -16
- package/dist/rest/transfers.d.ts.map +1 -1
- package/dist/rest/transfers.js +6 -6
- package/dist/transfer.d.ts +10 -10
- package/dist/transfer.d.ts.map +1 -1
- package/dist/transfer.js +10 -9
- package/dist/transport/generated/oauth-api.d.ts +29 -31
- package/dist/transport/generated/oauth-api.d.ts.map +1 -1
- package/dist/transport/intents.d.ts +9 -1
- package/dist/transport/intents.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/rest/intents.d.ts
CHANGED
|
@@ -34,76 +34,6 @@ declare const IdempotencyKeyNotAllowed_base: (abstract new (data: {}, message?:
|
|
|
34
34
|
export declare class IdempotencyKeyNotAllowed extends /* @__PURE__ */ IdempotencyKeyNotAllowed_base {
|
|
35
35
|
constructor(message?: string);
|
|
36
36
|
}
|
|
37
|
-
declare const ApprovalRequiredUseIntents_base: (abstract new (data: {}, message?: string, hint?: string) => {
|
|
38
|
-
readonly error: "approval_required_use_intents";
|
|
39
|
-
readonly hint?: string;
|
|
40
|
-
readonly data: {};
|
|
41
|
-
name: string;
|
|
42
|
-
message: string;
|
|
43
|
-
stack?: string;
|
|
44
|
-
cause?: unknown;
|
|
45
|
-
}) & {
|
|
46
|
-
readonly error: "approval_required_use_intents";
|
|
47
|
-
readonly status: 400;
|
|
48
|
-
readonly data: v.SchemaWithPipe<readonly [v.ObjectSchema<{}, undefined>, v.DescriptionAction<{}, "`POST /transfers` takes only a signed transfer with `approved: true`. Send one with `approved: false` to `POST /intents`.">]>;
|
|
49
|
-
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) => {
|
|
50
|
-
readonly error: Code;
|
|
51
|
-
readonly hint?: string;
|
|
52
|
-
readonly data: v.InferOutput<Data>;
|
|
53
|
-
name: string;
|
|
54
|
-
message: string;
|
|
55
|
-
stack?: string;
|
|
56
|
-
cause?: unknown;
|
|
57
|
-
}) & {
|
|
58
|
-
readonly error: Code;
|
|
59
|
-
readonly status: Status;
|
|
60
|
-
readonly data: Data;
|
|
61
|
-
define<const Code extends string, const Status extends number, Data extends import("./api-error.js").AndcoAPIErrorDataSchema>(error: Code, status: Status, data: Data): /*elided*/ any;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* A signed transfer with `approved: false` arrived at `POST /transfers`. That door takes a transfer
|
|
66
|
-
* its own signature approved. A signed transfer that waits for a decision is an Intent: send it to
|
|
67
|
-
* `POST /intents`. Nothing was recorded.
|
|
68
|
-
*/
|
|
69
|
-
export declare class ApprovalRequiredUseIntents extends /* @__PURE__ */ ApprovalRequiredUseIntents_base {
|
|
70
|
-
constructor(message?: string);
|
|
71
|
-
}
|
|
72
|
-
declare const ApprovedUseTransfers_base: (abstract new (data: {}, message?: string, hint?: string) => {
|
|
73
|
-
readonly error: "approved_use_transfers";
|
|
74
|
-
readonly hint?: string;
|
|
75
|
-
readonly data: {};
|
|
76
|
-
name: string;
|
|
77
|
-
message: string;
|
|
78
|
-
stack?: string;
|
|
79
|
-
cause?: unknown;
|
|
80
|
-
}) & {
|
|
81
|
-
readonly error: "approved_use_transfers";
|
|
82
|
-
readonly status: 400;
|
|
83
|
-
readonly data: v.SchemaWithPipe<readonly [v.ObjectSchema<{}, undefined>, v.DescriptionAction<{}, "`POST /intents` takes a signed transfer only with `approved: false`. Send one with `approved: true` to `POST /transfers`.">]>;
|
|
84
|
-
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) => {
|
|
85
|
-
readonly error: Code;
|
|
86
|
-
readonly hint?: string;
|
|
87
|
-
readonly data: v.InferOutput<Data>;
|
|
88
|
-
name: string;
|
|
89
|
-
message: string;
|
|
90
|
-
stack?: string;
|
|
91
|
-
cause?: unknown;
|
|
92
|
-
}) & {
|
|
93
|
-
readonly error: Code;
|
|
94
|
-
readonly status: Status;
|
|
95
|
-
readonly data: Data;
|
|
96
|
-
define<const Code extends string, const Status extends number, Data extends import("./api-error.js").AndcoAPIErrorDataSchema>(error: Code, status: Status, data: Data): /*elided*/ any;
|
|
97
|
-
};
|
|
98
|
-
};
|
|
99
|
-
/**
|
|
100
|
-
* A signed transfer with `approved: true` arrived at `POST /intents`. Its signature is the approval,
|
|
101
|
-
* so no decision is left to wait for: send it to `POST /transfers`. A signed account opening or
|
|
102
|
-
* closure with `approved: true` stays accepted here. Nothing was recorded.
|
|
103
|
-
*/
|
|
104
|
-
export declare class ApprovedUseTransfers extends /* @__PURE__ */ ApprovedUseTransfers_base {
|
|
105
|
-
constructor(message?: string);
|
|
106
|
-
}
|
|
107
37
|
declare const InvalidSignedInstruction_base: (abstract new (data: {
|
|
108
38
|
reason: "malformed_assertion" | "missing_signature" | "missing_key_id" | "disallowed_algorithm" | "unknown_key" | "revoked_key" | "expired_key" | "unusable_key" | "unsynced_key" | "invalid_signature" | "premature_assertion" | "missing_expiration" | "expiration_too_soon" | "missing_instruction_id" | "missing_claim" | "wrong_audience" | "wrong_issuer" | "verification_failed" | "invalid_claims";
|
|
109
39
|
issues?: {
|
|
@@ -650,6 +580,47 @@ declare const InvalidDestination_base: (abstract new (intentId?: string, message
|
|
|
650
580
|
/** The destination of a transfer, or the account a deposit names, is not one the Grant admits. */
|
|
651
581
|
export declare class InvalidDestination extends /* @__PURE__ */ InvalidDestination_base {
|
|
652
582
|
}
|
|
583
|
+
declare const DestinationNotOwnAccount_base: (abstract new (intentId?: string, message?: string) => {
|
|
584
|
+
readonly error: "destination_not_own_account";
|
|
585
|
+
readonly hint?: string;
|
|
586
|
+
readonly data: {
|
|
587
|
+
intent_id?: string | undefined;
|
|
588
|
+
};
|
|
589
|
+
name: string;
|
|
590
|
+
message: string;
|
|
591
|
+
stack?: string;
|
|
592
|
+
cause?: unknown;
|
|
593
|
+
}) & {
|
|
594
|
+
readonly error: "destination_not_own_account";
|
|
595
|
+
readonly status: 422;
|
|
596
|
+
readonly data: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
597
|
+
readonly intent_id: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "The Intent the refusal is about, when it was refused at its release rather than at its creation.">]>;
|
|
598
|
+
}, undefined>, v.DescriptionAction<{
|
|
599
|
+
intent_id?: string | undefined;
|
|
600
|
+
}, string>]>;
|
|
601
|
+
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) => {
|
|
602
|
+
readonly error: Code;
|
|
603
|
+
readonly hint?: string;
|
|
604
|
+
readonly data: v.InferOutput<Data>;
|
|
605
|
+
name: string;
|
|
606
|
+
message: string;
|
|
607
|
+
stack?: string;
|
|
608
|
+
cause?: unknown;
|
|
609
|
+
}) & {
|
|
610
|
+
readonly error: Code;
|
|
611
|
+
readonly status: Status;
|
|
612
|
+
readonly data: Data;
|
|
613
|
+
define<const Code extends string, const Status extends number, Data extends import("./api-error.js").AndcoAPIErrorDataSchema>(error: Code, status: Status, data: Data): /*elided*/ any;
|
|
614
|
+
};
|
|
615
|
+
};
|
|
616
|
+
/**
|
|
617
|
+
* The receiver of a transfer is not an account of the Grant's subject, and the only authority the
|
|
618
|
+
* Grant holds for a transfer is `bank_own_account_transfer`, which never moves money out of its
|
|
619
|
+
* holder. At creation nothing is created. A transfer that leaves its holder needs `bank_transfer`
|
|
620
|
+
* `create`.
|
|
621
|
+
*/
|
|
622
|
+
export declare class DestinationNotOwnAccount extends /* @__PURE__ */ DestinationNotOwnAccount_base {
|
|
623
|
+
}
|
|
653
624
|
declare const DepositDestinationAmbiguous_base: (abstract new (intentId?: string, message?: string) => {
|
|
654
625
|
readonly error: "deposit_destination_ambiguous";
|
|
655
626
|
readonly hint?: string;
|
|
@@ -3117,7 +3088,7 @@ export declare const createIntent: import("@orpc/contract").ProcedureContractBui
|
|
|
3117
3088
|
server_time: string;
|
|
3118
3089
|
created_at: string;
|
|
3119
3090
|
authorization_url: string;
|
|
3120
|
-
}, "Authoritative Project-facing state of an account closure. It carries no amount and no fee.">]>], undefined>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof InvalidRequest, typeof IdempotencyKeyNotAllowed, typeof
|
|
3091
|
+
}, "Authoritative Project-facing state of an account closure. It carries no amount and no fee.">]>], undefined>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof InvalidRequest, typeof IdempotencyKeyNotAllowed, typeof InvalidSignedInstruction, typeof InvalidToken, typeof ExpiredSignedInstruction, typeof InvalidOrigin, typeof InsufficientAuthorization, typeof AccountKeyOutOfGrant, typeof NotFound, typeof UnsupportedVersion, typeof ServerError, typeof IdempotencyConflict, typeof IntentInteractionRequired, typeof AccountKeyTaken, typeof BankAccountQuotaExceeded, typeof InvalidIntentState, typeof IntentExpired, typeof PayloadTooLarge, typeof UnsupportedMediaType, typeof DepositAmountOutOfBounds, typeof DepositDestinationAmbiguous, typeof DestinationNotOwnAccount, typeof AmountOutOfGrant, typeof InvalidSource, typeof InvalidDestination, typeof TransferSenderIdentityUnavailable, typeof UnsupportedBank, typeof BankConnectionUnavailable, typeof BankAccountNumberMissing, typeof BankAuthorizationDenied, typeof BankHolderWithoutAccount, typeof BankAccountLimitReached, typeof BankRefused, typeof InsufficientFunds, typeof BankRejected, typeof BankReviewRequired, typeof NotImplemented, typeof TemporarilyUnavailable]>>;
|
|
3121
3092
|
/** Reads one Intent created under the same exact OAuth Grant. */
|
|
3122
3093
|
export declare const getIntent: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
3123
3094
|
readonly intent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
@@ -1 +1 @@
|
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBrB;;;GAGG;AACH,qBAAa,wBAAyB,SAAQ,eAAe,CAAC,6BAS7D;gBACa,OAAO,CAAC,EAAE,MAAM;CAG7B
|
|
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,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4cA6BR,CAAC;AAElB,sDAAsD;AACtD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0aA4BR,CAAC;AAElB,0EAA0E;AAC1E,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8PAuBA,CAAC"}
|
package/dist/rest/intents.js
CHANGED
|
@@ -26,26 +26,6 @@ export class IdempotencyKeyNotAllowed extends /* @__PURE__ */ AndcoAPIError.defi
|
|
|
26
26
|
super({}, message);
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
/**
|
|
30
|
-
* A signed transfer with `approved: false` arrived at `POST /transfers`. That door takes a transfer
|
|
31
|
-
* its own signature approved. A signed transfer that waits for a decision is an Intent: send it to
|
|
32
|
-
* `POST /intents`. Nothing was recorded.
|
|
33
|
-
*/
|
|
34
|
-
export class ApprovalRequiredUseIntents extends /* @__PURE__ */ AndcoAPIError.define("approval_required_use_intents", 400, v.pipe(v.object({}), v.description("`POST /transfers` takes only a signed transfer with `approved: true`. Send one with `approved: false` to `POST /intents`."))) {
|
|
35
|
-
constructor(message) {
|
|
36
|
-
super({}, message);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* A signed transfer with `approved: true` arrived at `POST /intents`. Its signature is the approval,
|
|
41
|
-
* so no decision is left to wait for: send it to `POST /transfers`. A signed account opening or
|
|
42
|
-
* closure with `approved: true` stays accepted here. Nothing was recorded.
|
|
43
|
-
*/
|
|
44
|
-
export class ApprovedUseTransfers extends /* @__PURE__ */ AndcoAPIError.define("approved_use_transfers", 400, v.pipe(v.object({}), v.description("`POST /intents` takes a signed transfer only with `approved: false`. Send one with `approved: true` to `POST /transfers`."))) {
|
|
45
|
-
constructor(message) {
|
|
46
|
-
super({}, message);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
29
|
/**
|
|
50
30
|
* The Signed Instruction sent to create an Intent was refused: it did not verify (`reason` names the
|
|
51
31
|
* one cause), or its verified claims are not an Intent (`invalid_claims`, with `issues`). An expired
|
|
@@ -177,6 +157,14 @@ export class InvalidSource extends /* @__PURE__ */ intentRefusal("invalid_source
|
|
|
177
157
|
/** The destination of a transfer, or the account a deposit names, is not one the Grant admits. */
|
|
178
158
|
export class InvalidDestination extends /* @__PURE__ */ intentRefusal("invalid_destination", "The destination is not one the Grant admits.") {
|
|
179
159
|
}
|
|
160
|
+
/**
|
|
161
|
+
* The receiver of a transfer is not an account of the Grant's subject, and the only authority the
|
|
162
|
+
* Grant holds for a transfer is `bank_own_account_transfer`, which never moves money out of its
|
|
163
|
+
* holder. At creation nothing is created. A transfer that leaves its holder needs `bank_transfer`
|
|
164
|
+
* `create`.
|
|
165
|
+
*/
|
|
166
|
+
export class DestinationNotOwnAccount extends /* @__PURE__ */ intentRefusal("destination_not_own_account", "The receiver is not an account of the Grant's subject; a transfer between own accounts never leaves its holder.") {
|
|
167
|
+
}
|
|
180
168
|
/**
|
|
181
169
|
* A deposit named no `destination` and the `bank_deposit` Grant admits more than one account. Name
|
|
182
170
|
* the account in `destination`; a new Grant is not needed.
|
|
@@ -457,20 +445,20 @@ export const createIntent = /* @__PURE__ */ oc
|
|
|
457
445
|
method: "POST",
|
|
458
446
|
path: "/intents",
|
|
459
447
|
summary: "Create an intent under the exact OAuth Grant",
|
|
460
|
-
description: "The same creation has three 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. An `application/jose+json` body is a signed transfer
|
|
448
|
+
description: "The same creation has three 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. An `application/jose+json` body is a signed transfer: a `SignedTransferEnvelope`, a JWS in the General JSON Serialization, whose payload is `SignedTransferClaims` (no `approved`: this route is the request, `POST /transfers` the submission). It creates a transfer Intent that waits for a member of the holder to approve it in AndCo (dual control) and answers a TransferIntent with `transfer_id` null. The Intent waits until it is decided or until its deadline, `min(exp, 24 hours after its creation)`, passes; on approval AndCo sends that same signed instruction to the bank, so the Transfer is the one the signature describes. It is verified as `POST /transfers` verifies a signed transfer, with the same rules for the `jti` (a UUID in lowercase, and the only idempotency-key), `exp`, the keys, the `sender` and the `receiver`; the `unusable_key` reason means that the key is registered, but AndCo could not load it to check this signature, so its person registers a new key and revokes this one, then you sign again. A repeat of the same envelope answers the same Intent, and another body under the same `jti` answers `409 idempotency_conflict`. A signed account opening or closure with `approved: true` stays accepted here and is born approved. 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 account 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 `bank_transfer` proposal 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 account Intent whose signer also holds the family's `approve`, the Intent born `approved`. A transfer that `bank_own_account_transfer` covers is released at once instead (below). 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 signed account Intent born approved answers the refusals of `POST /intents/{intent_id}/approve`.\n\nA `transfer` proposal needs `bank_transfer` `create` or `bank_own_account_transfer` `create`. When the Grant holds `bank_own_account_transfer` `create` whose `accounts` cover the named `sender` and `receiver` (two different active accounts of the Grant's subject) and the amount is not `editable`, the answer is a TransferIntent born `approved` with `transfer_id` set: nobody decides it, and it is released at once with nobody present. Its outcome lives on the Transfer, which reads `processing` and then `succeeded` or `failed`, never on the Intent. The same `Idempotency-Key` never names both kinds of transfer (`409 idempotency_conflict`). Any other transfer is a `bank_transfer` proposal, bounded by that detail alone. A Grant that holds no `bank_transfer` `create` refuses what `bank_own_account_transfer` does not cover with nothing created: `422 destination_not_own_account` when the `receiver` is missing or is not an account of the subject, `422 invalid_source` when the `sender` is missing, unusable or outside `accounts`, `422 invalid_destination` when the `receiver` cannot receive (closed, another currency, the `sender` itself) or is outside `accounts`, and `400 invalid_request` with the detail `transfer_amount_not_editable` for an editable amount. Where the deployment's bank does not serve transfers between own accounts, `501 not_implemented` with `code: own_account_transfer_not_implemented`. If the release cannot go on because only a person can, the answer is `409 interaction_required` before anything is stored. If it fails after the Transfer was stored, the same request sent again releases that Transfer again and answers the same Intent. An approved Intent has no client cancel.",
|
|
461
449
|
successStatus: 201,
|
|
462
450
|
successDescription: "Intent created or returned from an idempotent retry",
|
|
463
451
|
inputStructure: "detailed",
|
|
464
452
|
spec: (operation) => servedAsSignedInstructionOrTransfer(withCanonicalHeaderNames(operation)),
|
|
465
453
|
}))
|
|
466
|
-
.errors(errors(InvalidRequest, IdempotencyKeyNotAllowed,
|
|
454
|
+
.errors(errors(InvalidRequest, IdempotencyKeyNotAllowed, InvalidSignedInstruction, InvalidToken, ExpiredSignedInstruction, InvalidOrigin, InsufficientAuthorization, AccountKeyOutOfGrant, NotFound, UnsupportedVersion, ServerError, IdempotencyConflict, IntentInteractionRequired, AccountKeyTaken, BankAccountQuotaExceeded, InvalidIntentState, IntentExpired, PayloadTooLarge, UnsupportedMediaType, DepositAmountOutOfBounds, DepositDestinationAmbiguous, DestinationNotOwnAccount, ...releaseRefusals, NotImplemented, TemporarilyUnavailable))
|
|
467
455
|
.input(v.object({
|
|
468
456
|
headers: v.object({
|
|
469
457
|
"idempotency-key": v.pipe(v.optional(v.pipe(v.string(), v.regex(/^[A-Za-z0-9._:-]{1,128}$/))), v.description("Required with `application/json`, and refused with `application/jwt` and `application/jose+json`, which answer `400 idempotency_key_not_allowed` when it arrives beside a signature: the idempotency key of a Signed Instruction is its own `jti`, and two candidates for one key is exactly the ambiguity that gets read the wrong way round. OpenAPI cannot make a header conditional on the media type, so it is published as optional rather than demanding what the server refuses.")),
|
|
470
458
|
}),
|
|
471
459
|
body: v.union([
|
|
472
460
|
IntentCreateSchema,
|
|
473
|
-
signedInstructionBody("One Signed Instruction as a compact JWS, signed by a Signing Key
|
|
461
|
+
signedInstructionBody("One Signed Instruction as a compact JWS, signed by a Signing Key of a person who may sign for the Grant's holder. The body is the serialized token, not a JSON object: what the claim schemas describe is its decoded payload.", {
|
|
474
462
|
oneOf: [
|
|
475
463
|
{ $ref: "#/components/schemas/SignedAccountOpeningIntentClaims" },
|
|
476
464
|
{ $ref: "#/components/schemas/SignedAccountClosureIntentClaims" },
|
|
@@ -4,8 +4,8 @@ import { InvalidOrigin, InvalidToken, PayloadTooLarge, ServerError, TemporarilyU
|
|
|
4
4
|
export declare const SIGNED_INSTRUCTION_MEDIA_TYPE = "application/jwt";
|
|
5
5
|
/**
|
|
6
6
|
* The media type a signed transfer travels as: a JWS in the General JSON Serialization (RFC 7515
|
|
7
|
-
* §7.2.1), the `SignedTransferEnvelope` itself. `POST /transfers` takes it
|
|
8
|
-
*
|
|
7
|
+
* §7.2.1), the `SignedTransferEnvelope` itself. `POST /transfers` takes it to submit the transfer now, and
|
|
8
|
+
* `POST /intents` takes the same envelope to request a decision on it.
|
|
9
9
|
*/
|
|
10
10
|
export declare const SIGNED_TRANSFER_MEDIA_TYPE = "application/jose+json";
|
|
11
11
|
/**
|
|
@@ -40,9 +40,10 @@ export declare function servedAsSignedInstructionOrTransfer(operation: Record<st
|
|
|
40
40
|
* `kid` that was never registered from one that was revoked, a clock that ran out from an audience
|
|
41
41
|
* that was wrong, and any of those from a payload altered in flight.
|
|
42
42
|
*
|
|
43
|
-
* Four causes belong to a signed transfer (`POST /transfers`, and `POST /intents`
|
|
44
|
-
* `missing_signature`, an envelope whose `signatures` is empty; `unsynced_key`, a key
|
|
45
|
-
*
|
|
43
|
+
* Four causes belong to a signed transfer (`POST /transfers`, and `POST /intents` for a signed transfer):
|
|
44
|
+
* `missing_signature`, an envelope whose `signatures` is empty; `unsynced_key`, a key that signed the
|
|
45
|
+
* transfer and is not active for transfers yet (its person activates it in her settings with one AndCo
|
|
46
|
+
* verification, then the same envelope is sent again); `unusable_key`, a key that is registered but that AndCo could not
|
|
46
47
|
* load to check this signature (its person registers a new key and revokes this one, then you sign
|
|
47
48
|
* again); and `expiration_too_soon`, the `exp` of a new `jti` less than 15 minutes after the submission
|
|
48
49
|
* (a repeat of a stored transfer is never refused for it).
|
|
@@ -73,7 +74,7 @@ declare const UnverifiedSignedInstruction_base: (abstract new (data: {
|
|
|
73
74
|
}, undefined>, v.DescriptionAction<{
|
|
74
75
|
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";
|
|
75
76
|
key_id: string | null;
|
|
76
|
-
}, "The assertion did not verify against the
|
|
77
|
+
}, "The assertion did not verify against the Signing Keys of a person who may sign for the Grant's holder.">]>;
|
|
77
78
|
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) => {
|
|
78
79
|
readonly error: Code;
|
|
79
80
|
readonly hint?: string;
|
|
@@ -111,10 +112,10 @@ export declare const SignedInstructionVerification: v.SchemaWithPipe<readonly [v
|
|
|
111
112
|
claims: {
|
|
112
113
|
[x: string]: unknown;
|
|
113
114
|
};
|
|
114
|
-
}, "The verified `kid`, algorithm and claims of a Signed Instruction that verified against the
|
|
115
|
+
}, "The verified `kid`, algorithm and claims of a Signed Instruction that verified against the keys of a person who may sign for the Grant's holder. `claims` is the decoded JWT payload as signed -- this operation checks only `exp` and `jti` structurally and otherwise passes every claim through untouched, so it never narrows to one Intent family's claim schema.">]>;
|
|
115
116
|
/** The verified `kid`, algorithm and claims of a Signed Instruction. */
|
|
116
117
|
export type SignedInstructionVerification = v.InferOutput<typeof SignedInstructionVerification>;
|
|
117
|
-
/** Verifies a Signed Instruction against the
|
|
118
|
+
/** Verifies a Signed Instruction against the keys of a person who may sign for the Grant's holder, without acting on it. */
|
|
118
119
|
export declare const verifySignature: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, string>, v.MetadataAction<string, Record<string, unknown>>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
119
120
|
readonly key_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "RFC 7638 JWK Thumbprint of the Signing Key that verified the assertion.">]>;
|
|
120
121
|
readonly algorithm: v.PicklistSchema<["RS256", "ES256"], undefined>;
|
|
@@ -125,6 +126,6 @@ export declare const verifySignature: import("@orpc/contract").ProcedureContract
|
|
|
125
126
|
claims: {
|
|
126
127
|
[x: string]: unknown;
|
|
127
128
|
};
|
|
128
|
-
}, "The verified `kid`, algorithm and claims of a Signed Instruction that verified against the
|
|
129
|
+
}, "The verified `kid`, algorithm and claims of a Signed Instruction that verified against the keys of a person who may sign for the Grant's holder. `claims` is the decoded JWT payload as signed -- this operation checks only `exp` and `jti` structurally and otherwise passes every claim through untouched, so it never narrows to one Intent family's claim schema.">]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof InvalidToken, typeof InvalidOrigin, typeof UnsupportedVersion, typeof ServerError, typeof PayloadTooLarge, typeof UnsupportedMediaType, typeof UnverifiedSignedInstruction, typeof TemporarilyUnavailable]>>;
|
|
129
130
|
export {};
|
|
130
131
|
//# sourceMappingURL=signatures.d.ts.map
|
|
@@ -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;AAE/D;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,0BAA0B,CAAC;AA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;;GAYG;AACH,eAAO,MAAM,gCAAgC,oZAoB3C,CAAC;AAEH,+CAA+C;AAC/C,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,gCAAgC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtG;;;;GAIG;AACH,qBAAa,2BAA4B,SAAQ,eAAe,CAAC,gCAehE;gBACa,IAAI,EAAE;QAAE,MAAM,EAAE,gCAAgC,CAAC;QAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,EAAE,OAAO,CAAC,EAAE,MAAM;CAGxG;AAED,wEAAwE;AACxE,eAAO,MAAM,6BAA6B;;;;;;;;;;8WAYzC,CAAC;AAEF,wEAAwE;AACxE,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEhG,4HAA4H;AAC5H,eAAO,MAAM,eAAe;;;;;;;;;;unBA0BY,CAAC"}
|
package/dist/rest/signatures.js
CHANGED
|
@@ -7,8 +7,8 @@ import { http } from "./http.js";
|
|
|
7
7
|
export const SIGNED_INSTRUCTION_MEDIA_TYPE = "application/jwt";
|
|
8
8
|
/**
|
|
9
9
|
* The media type a signed transfer travels as: a JWS in the General JSON Serialization (RFC 7515
|
|
10
|
-
* §7.2.1), the `SignedTransferEnvelope` itself. `POST /transfers` takes it
|
|
11
|
-
*
|
|
10
|
+
* §7.2.1), the `SignedTransferEnvelope` itself. `POST /transfers` takes it to submit the transfer now, and
|
|
11
|
+
* `POST /intents` takes the same envelope to request a decision on it.
|
|
12
12
|
*/
|
|
13
13
|
export const SIGNED_TRANSFER_MEDIA_TYPE = "application/jose+json";
|
|
14
14
|
/** What a compact JWS looks like: three base64url segments separated by dots. */
|
|
@@ -103,9 +103,10 @@ export function servedAsSignedInstructionOrTransfer(operation) {
|
|
|
103
103
|
* `kid` that was never registered from one that was revoked, a clock that ran out from an audience
|
|
104
104
|
* that was wrong, and any of those from a payload altered in flight.
|
|
105
105
|
*
|
|
106
|
-
* Four causes belong to a signed transfer (`POST /transfers`, and `POST /intents`
|
|
107
|
-
* `missing_signature`, an envelope whose `signatures` is empty; `unsynced_key`, a key
|
|
108
|
-
*
|
|
106
|
+
* Four causes belong to a signed transfer (`POST /transfers`, and `POST /intents` for a signed transfer):
|
|
107
|
+
* `missing_signature`, an envelope whose `signatures` is empty; `unsynced_key`, a key that signed the
|
|
108
|
+
* transfer and is not active for transfers yet (its person activates it in her settings with one AndCo
|
|
109
|
+
* verification, then the same envelope is sent again); `unusable_key`, a key that is registered but that AndCo could not
|
|
109
110
|
* load to check this signature (its person registers a new key and revokes this one, then you sign
|
|
110
111
|
* again); and `expiration_too_soon`, the `exp` of a new `jti` less than 15 minutes after the submission
|
|
111
112
|
* (a repeat of a stored transfer is never refused for it).
|
|
@@ -139,7 +140,7 @@ export const SignedInstructionRejectionReason = /* @__PURE__ */ v.picklist([
|
|
|
139
140
|
export class UnverifiedSignedInstruction extends /* @__PURE__ */ AndcoAPIError.define("unverified_signed_instruction", 422, v.pipe(v.object({
|
|
140
141
|
reason: v.pipe(SignedInstructionRejectionReason, v.description("The one cause, never a generic failure.")),
|
|
141
142
|
key_id: v.pipe(v.nullable(v.string()), v.description("The `kid` the assertion declared, when one could be read from it.")),
|
|
142
|
-
}), v.description("The assertion did not verify against the
|
|
143
|
+
}), v.description("The assertion did not verify against the Signing Keys of a person who may sign for the Grant's holder."))) {
|
|
143
144
|
constructor(data, message) {
|
|
144
145
|
super(data, message);
|
|
145
146
|
}
|
|
@@ -149,14 +150,14 @@ export const SignedInstructionVerification = /* @__PURE__ */ v.pipe(v.object({
|
|
|
149
150
|
key_id: v.pipe(v.string(), v.description("RFC 7638 JWK Thumbprint of the Signing Key that verified the assertion.")),
|
|
150
151
|
algorithm: v.picklist(["RS256", "ES256"]),
|
|
151
152
|
claims: v.record(v.string(), v.unknown()),
|
|
152
|
-
}), v.description("The verified `kid`, algorithm and claims of a Signed Instruction that verified against the
|
|
153
|
-
/** Verifies a Signed Instruction against the
|
|
153
|
+
}), v.description("The verified `kid`, algorithm and claims of a Signed Instruction that verified against the keys of a person who may sign for the Grant's holder. `claims` is the decoded JWT payload as signed -- this operation checks only `exp` and `jti` structurally and otherwise passes every claim through untouched, so it never narrows to one Intent family's claim schema."));
|
|
154
|
+
/** Verifies a Signed Instruction against the keys of a person who may sign for the Grant's holder, without acting on it. */
|
|
154
155
|
export const verifySignature = /* @__PURE__ */ oc
|
|
155
156
|
.meta(http({
|
|
156
157
|
method: "POST",
|
|
157
158
|
path: "/signatures/verify",
|
|
158
|
-
summary: "Verify a Signed Instruction against the
|
|
159
|
-
description: "Verifies the assertion's signature, `kid`, algorithm, issuer, audience and expiration against the Signing Keys the
|
|
159
|
+
summary: "Verify a Signed Instruction against the keys of a person who may sign for the Grant's holder, without acting on it",
|
|
160
|
+
description: "Verifies the assertion's signature, `kid`, algorithm, issuer, audience and expiration against the Signing Keys of a person who may sign for the Grant's holder (a key belongs to a person, who registers it in her own settings), and returns its verified claims untouched. Acts on nothing: this is the smallest surface that exercises signing end to end, so an integrator can confirm that the key registered for it, the `kid` its SDK derived and the claims it signs all line up before any of them is submitted to create, execute or approve an Intent. Requires only a valid OAuth bearer token, no scope or authorization detail.",
|
|
160
161
|
successDescription: "The assertion verified; its claims as signed",
|
|
161
162
|
spec: servedAsSignedInstruction,
|
|
162
163
|
}))
|
package/dist/rest/transfers.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
2
|
import { InvalidCursor } from "./accounts.js";
|
|
3
3
|
import { InsufficientAuthorization, InvalidIdentifier, InvalidOrigin, InvalidRequest, InvalidToken, NotFound, PayloadTooLarge, ServerError, TemporarilyUnavailable, UnsupportedMediaType, UnsupportedVersion } from "./common.js";
|
|
4
|
-
import { AmountOutOfGrant,
|
|
4
|
+
import { AmountOutOfGrant, BankConnectionUnavailable, BankRefused, BankRejected, BankReviewRequired, ExpiredSignedInstruction, IdempotencyConflict, IdempotencyKeyNotAllowed, InsufficientFunds, IntentInteractionRequired, InvalidDestination, InvalidSignedInstruction, InvalidSource, NotImplemented, TransferSenderIdentityUnavailable } from "./intents.js";
|
|
5
5
|
import { SIGNED_TRANSFER_MEDIA_TYPE } from "./signatures.js";
|
|
6
6
|
export { SIGNED_TRANSFER_MEDIA_TYPE };
|
|
7
7
|
declare const SenderMismatch_base: (abstract new (data: {}, message?: string, hint?: string) => {
|
|
@@ -120,8 +120,8 @@ export declare const Transfer: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
|
120
120
|
national_id: string | null;
|
|
121
121
|
}, "The Receptor: the account the money lands on and its holder.">]>;
|
|
122
122
|
readonly comment: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The Nota de operación, at most 60 bytes of UTF-8, or null when there is none.">]>;
|
|
123
|
-
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer
|
|
124
|
-
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer
|
|
123
|
+
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer submitted through `POST /transfers` (approved when it was submitted, so there was no request).">]>;
|
|
124
|
+
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer that submitted it through `POST /transfers`, a UUID in lowercase. Null for any other Transfer: the `jti` of a signed Intent stays on the Intent, even after it is approved. `GET /transfers?jti=` finds only a Transfer that has one.">]>;
|
|
125
125
|
readonly transaction_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The ledger id of the debit once the Transfer succeeded, else null. A Movement carries the same id.">]>;
|
|
126
126
|
readonly created_at: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.DescriptionAction<string, "When the Transfer came to exist.">]>;
|
|
127
127
|
}, undefined>, v.DescriptionAction<{
|
|
@@ -236,8 +236,8 @@ export declare const createTransfer: import("@orpc/contract").ProcedureContractB
|
|
|
236
236
|
national_id: string | null;
|
|
237
237
|
}, "The Receptor: the account the money lands on and its holder.">]>;
|
|
238
238
|
readonly comment: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The Nota de operación, at most 60 bytes of UTF-8, or null when there is none.">]>;
|
|
239
|
-
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer
|
|
240
|
-
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer
|
|
239
|
+
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer submitted through `POST /transfers` (approved when it was submitted, so there was no request).">]>;
|
|
240
|
+
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer that submitted it through `POST /transfers`, a UUID in lowercase. Null for any other Transfer: the `jti` of a signed Intent stays on the Intent, even after it is approved. `GET /transfers?jti=` finds only a Transfer that has one.">]>;
|
|
241
241
|
readonly transaction_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The ledger id of the debit once the Transfer succeeded, else null. A Movement carries the same id.">]>;
|
|
242
242
|
readonly created_at: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.DescriptionAction<string, "When the Transfer came to exist.">]>;
|
|
243
243
|
}, undefined>, v.DescriptionAction<{
|
|
@@ -271,7 +271,7 @@ export declare const createTransfer: import("@orpc/contract").ProcedureContractB
|
|
|
271
271
|
jti: string | null;
|
|
272
272
|
transaction_id: string | null;
|
|
273
273
|
created_at: string;
|
|
274
|
-
}, "A Transfer, with one shape for every origin. `sender` and `receiver` have the same fields, and `amount` and `currency` sit on the Transfer. It has no `approved` and no deadline: the decision belongs to the Intent.">]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof InvalidRequest, typeof IdempotencyKeyNotAllowed, typeof
|
|
274
|
+
}, "A Transfer, with one shape for every origin. `sender` and `receiver` have the same fields, and `amount` and `currency` sit on the Transfer. It has no `approved` and no deadline: the decision belongs to the Intent.">]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof InvalidRequest, typeof IdempotencyKeyNotAllowed, typeof InvalidSignedInstruction, typeof InvalidToken, typeof ExpiredSignedInstruction, typeof InvalidOrigin, typeof InsufficientAuthorization, typeof UnsupportedVersion, typeof ServerError, typeof IdempotencyConflict, typeof IntentInteractionRequired, typeof PayloadTooLarge, typeof UnsupportedMediaType, typeof SenderMismatch, typeof TransferSenderIdentityUnavailable, typeof AmountOutOfGrant, typeof InvalidSource, typeof InvalidDestination, typeof BankConnectionUnavailable, typeof BankRefused, typeof InsufficientFunds, typeof BankRejected, typeof BankReviewRequired, typeof NotImplemented, typeof TemporarilyUnavailable]>>;
|
|
275
275
|
/** Reads one Transfer the Grant may read. */
|
|
276
276
|
export declare const getTransfer: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
277
277
|
readonly transfer_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
@@ -334,8 +334,8 @@ export declare const getTransfer: import("@orpc/contract").ProcedureContractBuil
|
|
|
334
334
|
national_id: string | null;
|
|
335
335
|
}, "The Receptor: the account the money lands on and its holder.">]>;
|
|
336
336
|
readonly comment: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The Nota de operación, at most 60 bytes of UTF-8, or null when there is none.">]>;
|
|
337
|
-
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer
|
|
338
|
-
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer
|
|
337
|
+
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer submitted through `POST /transfers` (approved when it was submitted, so there was no request).">]>;
|
|
338
|
+
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer that submitted it through `POST /transfers`, a UUID in lowercase. Null for any other Transfer: the `jti` of a signed Intent stays on the Intent, even after it is approved. `GET /transfers?jti=` finds only a Transfer that has one.">]>;
|
|
339
339
|
readonly transaction_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The ledger id of the debit once the Transfer succeeded, else null. A Movement carries the same id.">]>;
|
|
340
340
|
readonly created_at: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.DescriptionAction<string, "When the Transfer came to exist.">]>;
|
|
341
341
|
}, undefined>, v.DescriptionAction<{
|
|
@@ -436,8 +436,8 @@ export declare const TransferPage: v.SchemaWithPipe<readonly [v.StrictObjectSche
|
|
|
436
436
|
national_id: string | null;
|
|
437
437
|
}, "The Receptor: the account the money lands on and its holder.">]>;
|
|
438
438
|
readonly comment: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The Nota de operación, at most 60 bytes of UTF-8, or null when there is none.">]>;
|
|
439
|
-
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer
|
|
440
|
-
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer
|
|
439
|
+
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer submitted through `POST /transfers` (approved when it was submitted, so there was no request).">]>;
|
|
440
|
+
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer that submitted it through `POST /transfers`, a UUID in lowercase. Null for any other Transfer: the `jti` of a signed Intent stays on the Intent, even after it is approved. `GET /transfers?jti=` finds only a Transfer that has one.">]>;
|
|
441
441
|
readonly transaction_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The ledger id of the debit once the Transfer succeeded, else null. A Movement carries the same id.">]>;
|
|
442
442
|
readonly created_at: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.DescriptionAction<string, "When the Transfer came to exist.">]>;
|
|
443
443
|
}, undefined>, v.DescriptionAction<{
|
|
@@ -592,8 +592,8 @@ export declare const listTransfers: import("@orpc/contract").ProcedureContractBu
|
|
|
592
592
|
national_id: string | null;
|
|
593
593
|
}, "The Receptor: the account the money lands on and its holder.">]>;
|
|
594
594
|
readonly comment: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The Nota de operación, at most 60 bytes of UTF-8, or null when there is none.">]>;
|
|
595
|
-
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer
|
|
596
|
-
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer
|
|
595
|
+
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer submitted through `POST /transfers` (approved when it was submitted, so there was no request).">]>;
|
|
596
|
+
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer that submitted it through `POST /transfers`, a UUID in lowercase. Null for any other Transfer: the `jti` of a signed Intent stays on the Intent, even after it is approved. `GET /transfers?jti=` finds only a Transfer that has one.">]>;
|
|
597
597
|
readonly transaction_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The ledger id of the debit once the Transfer succeeded, else null. A Movement carries the same id.">]>;
|
|
598
598
|
readonly created_at: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.DescriptionAction<string, "When the Transfer came to exist.">]>;
|
|
599
599
|
}, undefined>, v.DescriptionAction<{
|
|
@@ -744,8 +744,8 @@ export declare const TransferListPage: v.SchemaWithPipe<readonly [v.StrictObject
|
|
|
744
744
|
national_id: string | null;
|
|
745
745
|
}, "The Receptor: the account the money lands on and its holder.">]>;
|
|
746
746
|
readonly comment: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The Nota de operación, at most 60 bytes of UTF-8, or null when there is none.">]>;
|
|
747
|
-
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer
|
|
748
|
-
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer
|
|
747
|
+
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer submitted through `POST /transfers` (approved when it was submitted, so there was no request).">]>;
|
|
748
|
+
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer that submitted it through `POST /transfers`, a UUID in lowercase. Null for any other Transfer: the `jti` of a signed Intent stays on the Intent, even after it is approved. `GET /transfers?jti=` finds only a Transfer that has one.">]>;
|
|
749
749
|
readonly transaction_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The ledger id of the debit once the Transfer succeeded, else null. A Movement carries the same id.">]>;
|
|
750
750
|
readonly created_at: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.DescriptionAction<string, "When the Transfer came to exist.">]>;
|
|
751
751
|
}, undefined>, v.DescriptionAction<{
|
|
@@ -899,8 +899,8 @@ export declare const listAccountTransfers: import("@orpc/contract").ProcedureCon
|
|
|
899
899
|
national_id: string | null;
|
|
900
900
|
}, "The Receptor: the account the money lands on and its holder.">]>;
|
|
901
901
|
readonly comment: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The Nota de operación, at most 60 bytes of UTF-8, or null when there is none.">]>;
|
|
902
|
-
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer
|
|
903
|
-
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer
|
|
902
|
+
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer submitted through `POST /transfers` (approved when it was submitted, so there was no request).">]>;
|
|
903
|
+
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer that submitted it through `POST /transfers`, a UUID in lowercase. Null for any other Transfer: the `jti` of a signed Intent stays on the Intent, even after it is approved. `GET /transfers?jti=` finds only a Transfer that has one.">]>;
|
|
904
904
|
readonly transaction_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The ledger id of the debit once the Transfer succeeded, else null. A Movement carries the same id.">]>;
|
|
905
905
|
readonly created_at: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.DescriptionAction<string, "When the Transfer came to exist.">]>;
|
|
906
906
|
}, undefined>, v.DescriptionAction<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transfers.d.ts","sourceRoot":"","sources":["../../src/rest/transfers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAO7B,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EAIL,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,QAAQ,EACR,eAAe,EACf,WAAW,EACX,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,gBAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"transfers.d.ts","sourceRoot":"","sources":["../../src/rest/transfers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAO7B,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EAIL,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,QAAQ,EACR,eAAe,EACf,WAAW,EACX,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EACzB,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,wBAAwB,EACxB,mBAAmB,EACnB,wBAAwB,EACxB,iBAAiB,EACjB,yBAAyB,EACzB,kBAAkB,EAClB,wBAAwB,EACxB,aAAa,EACb,cAAc,EACd,iCAAiC,EAClC,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAE7D,OAAO,EAAE,0BAA0B,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBtC;;;;;GAKG;AACH,qBAAa,cAAe,SAAQ,eAAe,CAAC,mBASnD;gBACa,OAAO,CAAC,EAAE,MAAM;CAG7B;AAID;;;;GAIG;AACH,eAAO,MAAM,cAAc,0jBAK1B,CAAC;AAEF,+BAA+B;AAC/B,MAAM,MAAM,cAAc,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