@andco/protocol 0.1.0-ti.0 → 0.1.0-ti.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rar/bank.d.ts +12 -12
- package/dist/rar/bank.d.ts.map +1 -1
- package/dist/rar/bank.js +13 -13
- package/dist/rar/catalog.d.ts +4 -4
- package/dist/rar/catalog.d.ts.map +1 -1
- package/dist/rar/catalog.js +6 -6
- package/dist/rar/json-schemas.generated.js +3 -3
- package/dist/rar/money.d.ts +1 -1
- package/dist/rar/money.js +1 -1
- package/dist/rest/accounts.d.ts +66 -44
- package/dist/rest/accounts.d.ts.map +1 -1
- package/dist/rest/accounts.js +31 -21
- package/dist/rest/contract.d.ts +20 -14
- package/dist/rest/contract.d.ts.map +1 -1
- package/dist/rest/contract.js +4 -4
- package/dist/rest/events.js +1 -1
- package/dist/rest/intents.js +1 -1
- package/dist/transport/financial-events.d.ts +1 -1
- package/dist/transport/generated/oauth-api.d.ts +32 -22
- package/dist/transport/generated/oauth-api.d.ts.map +1 -1
- package/dist/transport/rest.d.ts +5 -4
- package/dist/transport/rest.d.ts.map +1 -1
- package/dist/transport/rest.js +1 -1
- package/package.json +1 -1
package/dist/rest/contract.d.ts
CHANGED
|
@@ -2655,7 +2655,7 @@ export declare const contract: {
|
|
|
2655
2655
|
hasNextPage: boolean;
|
|
2656
2656
|
};
|
|
2657
2657
|
}, string>]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidRequest, typeof import("./accounts.js").InvalidAccountsCursor, typeof import("./common.js").InvalidToken, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").InsufficientAuthorization, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./accounts.js").BankConnectionInteractionRequired, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
2658
|
-
|
|
2658
|
+
listAccountMovements: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
2659
2659
|
readonly after: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2048, undefined>, v.DescriptionAction<string, "Opaque cursor previously returned by this collection.">]>, undefined>;
|
|
2660
2660
|
readonly first: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 100, undefined>]>, undefined>, v.DescriptionAction<number | undefined, "Cursor page size; forward and backward argument families are exclusive.">]>;
|
|
2661
2661
|
readonly bank_account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The account's identifier (a UUID) or its Account Key.">]>;
|
|
@@ -2663,17 +2663,20 @@ export declare const contract: {
|
|
|
2663
2663
|
readonly edges: v.ArraySchema<v.StrictObjectSchema<{
|
|
2664
2664
|
readonly cursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2665
2665
|
readonly node: v.StrictObjectSchema<{
|
|
2666
|
+
readonly object: v.LiteralSchema<"movement", undefined>;
|
|
2666
2667
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2667
|
-
readonly
|
|
2668
|
+
readonly transaction_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The ledger id of the transaction that posted this Movement, or null when AndCo has none. A Transfer that succeeded carries the same id of its debit.">]>;
|
|
2668
2669
|
readonly description: v.StringSchema<undefined>;
|
|
2669
|
-
readonly amount: v.SchemaWithPipe<readonly [v.
|
|
2670
|
-
readonly
|
|
2671
|
-
readonly
|
|
2672
|
-
readonly
|
|
2673
|
-
readonly
|
|
2674
|
-
readonly
|
|
2670
|
+
readonly amount: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, number, undefined>, v.DescriptionAction<number, "A positive integer in whole pesos (CLP). What tells an inflow from an outflow is `movement_type`, not a sign.">]>;
|
|
2671
|
+
readonly currency: v.SchemaWithPipe<readonly [v.LiteralSchema<"CLP", undefined>, v.DescriptionAction<"CLP", "The currency of the account: a permission never assumes it, so the node names it.">]>;
|
|
2672
|
+
readonly movement_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["deposit", "interest", "withdrawal"], undefined>, v.DescriptionAction<"deposit" | "interest" | "withdrawal", "The kind of Movement, in AndCo's own words. `deposit` and `interest` bring money into this account and raise its balance; `withdrawal` takes money out and lowers it. `amount` is always positive, so `movement_type` is what tells an inflow from an outflow.">]>;
|
|
2673
|
+
readonly movement_origin: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2674
|
+
readonly movement_date: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
2675
|
+
readonly running_balance: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, number, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>, v.DescriptionAction<number | null, "The balance after this Movement, an integer in whole pesos, or null when AndCo did not send one: it is never made up. Real balances do go negative, so the sign is not narrowed away.">]>;
|
|
2676
|
+
readonly payment_type: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2675
2677
|
readonly reversed: v.BooleanSchema<undefined>;
|
|
2676
2678
|
readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2679
|
+
readonly transfer_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The id of the Transfer that this debit belongs to, only when the Grant may read that Transfer: one this client created for the same subject, or any Transfer of an account that a `bank_transfer` `read` detail covers. Always present. A null never means that no Transfer exists: it means no Transfer that this Grant may read, and it is also null for a credit, for a Movement without a `transaction_id` and for one that AndCo has posted before AndCo recorded the Transfer, which fills on a later read.">]>;
|
|
2677
2680
|
}, undefined>;
|
|
2678
2681
|
}, undefined>, undefined>;
|
|
2679
2682
|
readonly pageInfo: v.StrictObjectSchema<{
|
|
@@ -2686,17 +2689,20 @@ export declare const contract: {
|
|
|
2686
2689
|
edges: {
|
|
2687
2690
|
cursor: string | null;
|
|
2688
2691
|
node: {
|
|
2692
|
+
object: "movement";
|
|
2689
2693
|
id: string;
|
|
2690
|
-
|
|
2694
|
+
transaction_id: string | null;
|
|
2691
2695
|
description: string;
|
|
2692
|
-
amount:
|
|
2696
|
+
amount: number;
|
|
2697
|
+
currency: "CLP";
|
|
2693
2698
|
movement_type: "deposit" | "interest" | "withdrawal";
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2699
|
+
movement_origin: string | null;
|
|
2700
|
+
movement_date: string;
|
|
2701
|
+
running_balance: number | null;
|
|
2702
|
+
payment_type: string | null;
|
|
2698
2703
|
reversed: boolean;
|
|
2699
2704
|
note: string | null;
|
|
2705
|
+
transfer_id: string | null;
|
|
2700
2706
|
};
|
|
2701
2707
|
}[];
|
|
2702
2708
|
pageInfo: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src/rest/contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,CAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src/rest/contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,CAAC,MAAM,SAAS,CAAC;AAsHlC;;;;GAIG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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dist/rest/contract.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AccountClosureIntentCreateSchema, AccountOpeningIntentCreateSchema, DepositIntentCreateSchema, IntentAccountExternalSchema, IntentAccountIdSchema, IntentAccountKeySchema, IntentAccountSchema, IntentAmountSchema, IntentCancellationSchema, IntentNoteSchema, IntentRejectionSchema, SignedAccountClosureIntentClaimsSchema, SignedAccountOpeningIntentClaimsSchema, SignedAmountSchema, TransferAmountProposalSchema, TransferCommentProposalSchema, TransferIntentCreateSchema, TransferIntentReceiverProposalSchema, TransferIntentReceiverSchema, } from "../intent-input.js";
|
|
2
2
|
import { SignedTransferClaimsSchema, SignedTransferEnvelopeSchema, SignedTransferHeaderSchema, TransferPartySchema, TransferReceiverSchema, TransferSenderSchema, } from "../transfer.js";
|
|
3
3
|
import { UserInfo } from "../userinfo.js";
|
|
4
|
-
import { AccountPage, BankAccount,
|
|
4
|
+
import { AccountPage, BankAccount, listAccountMovements, listAccounts, Movement, MovementPage } from "./accounts.js";
|
|
5
5
|
import { Address, AddressCreate, AddressMutationResult, AddressPage, AddressUpdate, createOrganizationAddress, createProfileAddress, deleteOrganizationAddress, deleteProfileAddress, listOrganizationAddresses, listProfileAddresses, updateOrganizationAddress, updateProfileAddress, } from "./addresses.js";
|
|
6
6
|
import { ApplicationGrantSubject, GrantActor, GrantAuthorization, GrantHolder, GrantSubject, getGrantAuthorization, OrganizationGrantHolder, ProfileGrantHolder, ProfileGrantSubject, } from "./authorization.js";
|
|
7
7
|
import { BankCatalogEntry, BankCatalogPage, getBankCatalog, getPermissionCatalog, PermissionCatalogEntry, PermissionCatalogPage, } from "./catalog.js";
|
|
@@ -33,7 +33,7 @@ export const contract = {
|
|
|
33
33
|
getTransfer,
|
|
34
34
|
getUserInfo,
|
|
35
35
|
listAccounts,
|
|
36
|
-
|
|
36
|
+
listAccountMovements,
|
|
37
37
|
listAccountTransfers,
|
|
38
38
|
listOrganizationAddresses,
|
|
39
39
|
listOrganizationIdentities,
|
|
@@ -70,8 +70,8 @@ export const components = {
|
|
|
70
70
|
BankAccount,
|
|
71
71
|
BankCatalogEntry,
|
|
72
72
|
BankCatalogPage,
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
Movement,
|
|
74
|
+
MovementPage,
|
|
75
75
|
DepositCloseResult,
|
|
76
76
|
DepositDestination,
|
|
77
77
|
DepositIntent,
|
package/dist/rest/events.js
CHANGED
|
@@ -33,7 +33,7 @@ export const readAccountEvents = /* @__PURE__ */ oc
|
|
|
33
33
|
.meta(http({
|
|
34
34
|
method: "GET",
|
|
35
35
|
path: "/accounts/{bank_account_id}/events",
|
|
36
|
-
summary: "Replay account facts with account
|
|
36
|
+
summary: "Replay account facts with account movement read permission",
|
|
37
37
|
description: "Returns edges and camelCase pageInfo. Cursor and offset argument families cannot be mixed.",
|
|
38
38
|
successDescription: "Authorized event page in publication order",
|
|
39
39
|
}))
|
package/dist/rest/intents.js
CHANGED
|
@@ -497,7 +497,7 @@ export const closeDeposit = /* @__PURE__ */ oc
|
|
|
497
497
|
method: "POST",
|
|
498
498
|
path: "/intents/{intent_id}/close",
|
|
499
499
|
summary: "Close this application's no-target deposit collection with an explicit close Grant action",
|
|
500
|
-
description: "Idempotent. Preserves existing terminal outcomes. Does not move funds, cancel commands AndCo already accepted, or grant account
|
|
500
|
+
description: "Idempotent. Preserves existing terminal outcomes. Does not move funds, cancel commands AndCo already accepted, or grant account movement access.",
|
|
501
501
|
successDescription: "Current terminal state and historical manual closure, if any",
|
|
502
502
|
}))
|
|
503
503
|
.errors(errors(InvalidIdentifier, InvalidToken, InvalidOrigin, InsufficientAuthorization, NotFound, UnsupportedVersion, ServerError, InvalidIntentState, TemporarilyUnavailable))
|
|
@@ -57,7 +57,7 @@ export type AndCoIntentDepositEvent = AndCoFinancialEvent<"deposit.target_update
|
|
|
57
57
|
* An account-wide fact, independent of application attribution.
|
|
58
58
|
*
|
|
59
59
|
* Account events keep saying `deposit` and `withdrawal` on purpose. Here the word names the
|
|
60
|
-
* direction of a Movement — the entry a
|
|
60
|
+
* direction of a Movement — the entry a ledger transaction leaves in one account — and not the kind of
|
|
61
61
|
* request that produced it. One transfer publishes `transfer.succeeded` on the Transfer,
|
|
62
62
|
* `withdrawal.posted` on the account the money left, and `deposit.received` on the account it
|
|
63
63
|
* reached, and all three words are correct.
|
|
@@ -154,7 +154,7 @@ export interface paths {
|
|
|
154
154
|
put?: never;
|
|
155
155
|
/**
|
|
156
156
|
* Close this application's no-target deposit collection with an explicit close Grant action
|
|
157
|
-
* @description Idempotent. Preserves existing terminal outcomes. Does not move funds, cancel commands AndCo already accepted, or grant account
|
|
157
|
+
* @description Idempotent. Preserves existing terminal outcomes. Does not move funds, cancel commands AndCo already accepted, or grant account movement access.
|
|
158
158
|
*/
|
|
159
159
|
post: operations["closeDeposit"];
|
|
160
160
|
delete?: never;
|
|
@@ -351,7 +351,7 @@ export interface paths {
|
|
|
351
351
|
patch?: never;
|
|
352
352
|
trace?: never;
|
|
353
353
|
};
|
|
354
|
-
"/accounts/{bank_account_id}/
|
|
354
|
+
"/accounts/{bank_account_id}/movements": {
|
|
355
355
|
parameters: {
|
|
356
356
|
query?: never;
|
|
357
357
|
header?: never;
|
|
@@ -359,10 +359,10 @@ export interface paths {
|
|
|
359
359
|
cookie?: never;
|
|
360
360
|
};
|
|
361
361
|
/**
|
|
362
|
-
* List one account's
|
|
363
|
-
* @description Answers the
|
|
362
|
+
* List one account's Movements
|
|
363
|
+
* @description Answers the Movements the account's statement presentation reads, so an integrator sees exactly what a person would see, newest first, one page at a time: feed `pageInfo.endCursor` back as `?after=` while `pageInfo.hasNextPage`. Granted by a `bank_movement` authorization detail with `read` whose `accounts` reach this account. The account is named by its identifier or by its Account Key, whichever the integrator knows: a segment shaped like a UUID is an identifier, any other is an Account Key of the Grant's subject. The permission is the same for both and the key is resolved on this request: an account the Grant does not reach, by identifier or by key, and a key that names no account of the subject answer `404`, as if it did not exist, whether or not the account exists. The page is read from AndCo on behalf of the subject, and its read model walks forward only: `pageInfo.endCursor` is AndCo's own cursor for the next page, handed over untouched, and `after` accepts nothing else (`invalid_cursor` otherwise). There is no cursor per Movement, no backward walk and no offset: `before`, `last`, `offset` and `limit` answer `invalid_request`. Returns edges and camelCase pageInfo.
|
|
364
364
|
*/
|
|
365
|
-
get: operations["
|
|
365
|
+
get: operations["listAccountMovements"];
|
|
366
366
|
put?: never;
|
|
367
367
|
post?: never;
|
|
368
368
|
delete?: never;
|
|
@@ -479,7 +479,7 @@ export interface paths {
|
|
|
479
479
|
cookie?: never;
|
|
480
480
|
};
|
|
481
481
|
/**
|
|
482
|
-
* Replay account facts with account
|
|
482
|
+
* Replay account facts with account movement read permission
|
|
483
483
|
* @description Returns edges and camelCase pageInfo. Cursor and offset argument families cannot be mixed.
|
|
484
484
|
*/
|
|
485
485
|
get: operations["readAccountEvents"];
|
|
@@ -797,32 +797,42 @@ export interface components {
|
|
|
797
797
|
}[];
|
|
798
798
|
pageInfo: components["schemas"]["PageInfo"];
|
|
799
799
|
};
|
|
800
|
-
|
|
800
|
+
Movement: {
|
|
801
|
+
/** @constant */
|
|
802
|
+
object: "movement";
|
|
801
803
|
/** Format: uuid */
|
|
802
804
|
id: string;
|
|
803
|
-
|
|
805
|
+
/** @description The ledger id of the transaction that posted this Movement, or null when AndCo has none. A Transfer that succeeded carries the same id of its debit. */
|
|
806
|
+
transaction_id: string | null;
|
|
804
807
|
description: string;
|
|
805
|
-
/** @description
|
|
806
|
-
amount:
|
|
808
|
+
/** @description A positive integer in whole pesos (CLP). What tells an inflow from an outflow is `movement_type`, not a sign. */
|
|
809
|
+
amount: number;
|
|
807
810
|
/**
|
|
808
|
-
* @description The
|
|
811
|
+
* @description The currency of the account: a permission never assumes it, so the node names it.
|
|
812
|
+
* @constant
|
|
813
|
+
*/
|
|
814
|
+
currency: "CLP";
|
|
815
|
+
/**
|
|
816
|
+
* @description The kind of Movement, in AndCo's own words. `deposit` and `interest` bring money into this account and raise its balance; `withdrawal` takes money out and lowers it. `amount` is always positive, so `movement_type` is what tells an inflow from an outflow.
|
|
809
817
|
* @enum {string}
|
|
810
818
|
*/
|
|
811
819
|
movement_type: "deposit" | "interest" | "withdrawal";
|
|
812
|
-
|
|
820
|
+
movement_origin: string | null;
|
|
813
821
|
/** Format: date-time */
|
|
814
|
-
|
|
815
|
-
/** @description
|
|
816
|
-
|
|
817
|
-
|
|
822
|
+
movement_date: string;
|
|
823
|
+
/** @description The balance after this Movement, an integer in whole pesos, or null when AndCo did not send one: it is never made up. Real balances do go negative, so the sign is not narrowed away. */
|
|
824
|
+
running_balance: number | null;
|
|
825
|
+
payment_type: string | null;
|
|
818
826
|
reversed: boolean;
|
|
819
827
|
note: string | null;
|
|
828
|
+
/** @description The id of the Transfer that this debit belongs to, only when the Grant may read that Transfer: one this client created for the same subject, or any Transfer of an account that a `bank_transfer` `read` detail covers. Always present. A null never means that no Transfer exists: it means no Transfer that this Grant may read, and it is also null for a credit, for a Movement without a `transaction_id` and for one that AndCo has posted before AndCo recorded the Transfer, which fills on a later read. */
|
|
829
|
+
transfer_id: string | null;
|
|
820
830
|
};
|
|
821
|
-
/** @description A connection read live from AndCo, which issues one cursor per page and walks forward only. `pageInfo.endCursor` is that cursor and is null on the last page; `pageInfo.startCursor` is always null and `pageInfo.hasPreviousPage` always false. An edge's `cursor` is null: AndCo names no position inside a page, so a walk resumes from the end of a page, never from one
|
|
822
|
-
|
|
831
|
+
/** @description A connection read live from AndCo, which issues one cursor per page and walks forward only. `pageInfo.endCursor` is that cursor and is null on the last page; `pageInfo.startCursor` is always null and `pageInfo.hasPreviousPage` always false. An edge's `cursor` is null: AndCo names no position inside a page, so a walk resumes from the end of a page, never from one Movement. */
|
|
832
|
+
MovementPage: {
|
|
823
833
|
edges: {
|
|
824
834
|
cursor: string | null;
|
|
825
|
-
node: components["schemas"]["
|
|
835
|
+
node: components["schemas"]["Movement"];
|
|
826
836
|
}[];
|
|
827
837
|
pageInfo: components["schemas"]["PageInfo"];
|
|
828
838
|
};
|
|
@@ -5902,7 +5912,7 @@ export interface operations {
|
|
|
5902
5912
|
};
|
|
5903
5913
|
};
|
|
5904
5914
|
};
|
|
5905
|
-
|
|
5915
|
+
listAccountMovements: {
|
|
5906
5916
|
parameters: {
|
|
5907
5917
|
query?: {
|
|
5908
5918
|
after?: components["parameters"]["After"];
|
|
@@ -5916,13 +5926,13 @@ export interface operations {
|
|
|
5916
5926
|
};
|
|
5917
5927
|
requestBody?: never;
|
|
5918
5928
|
responses: {
|
|
5919
|
-
/** @description Authorized cursor page of account
|
|
5929
|
+
/** @description Authorized cursor page of account Movements, newest first */
|
|
5920
5930
|
200: {
|
|
5921
5931
|
headers: {
|
|
5922
5932
|
[name: string]: unknown;
|
|
5923
5933
|
};
|
|
5924
5934
|
content: {
|
|
5925
|
-
"application/json": components["schemas"]["
|
|
5935
|
+
"application/json": components["schemas"]["MovementPage"];
|
|
5926
5936
|
};
|
|
5927
5937
|
};
|
|
5928
5938
|
/** @description `invalid_request`, `invalid_identifier`, `invalid_cursor` */
|