@andco/protocol 0.1.0-ti.0 → 0.1.0-ti.2

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.
@@ -8,8 +8,8 @@ export declare const BANK_ACCOUNT_MANAGE_ACTIONS: readonly ["create", "close"];
8
8
  export declare const BANK_ACCOUNT_APPROVAL_ACTIONS: readonly ["approve", "reject"];
9
9
  /** Every `bank_account` action, across its three forms. */
10
10
  export declare const BANK_ACCOUNT_ACTIONS: readonly ["read", "read_balance", "create", "close", "approve", "reject"];
11
- /** Reading the Transactions (movements) of accounts. */
12
- export declare const BANK_TRANSACTION_ACTIONS: readonly ["read"];
11
+ /** Reading the Movements of accounts. */
12
+ export declare const BANK_MOVEMENT_ACTIONS: readonly ["read"];
13
13
  /** Proposing Transfers within the detail's bounds. */
14
14
  export declare const BANK_TRANSFER_CREATE_ACTIONS: readonly ["create"];
15
15
  /** Reading every Transfer that leaves the accounts of `accounts`, whoever made it and in any status. */
@@ -18,6 +18,11 @@ export declare const BANK_TRANSFER_READ_ACTIONS: readonly ["read"];
18
18
  export declare const BANK_TRANSFER_APPROVAL_ACTIONS: readonly ["approve", "reject"];
19
19
  /** Every `bank_transfer` action, across its three forms. */
20
20
  export declare const BANK_TRANSFER_ACTIONS: readonly ["create", "read", "approve", "reject"];
21
+ /**
22
+ * Moving money between two accounts of the Grant's subject, each released at once with nobody present:
23
+ * the money never leaves its holder, so the consent is the standing approval.
24
+ */
25
+ export declare const BANK_OWN_ACCOUNT_TRANSFER_ACTIONS: readonly ["create"];
21
26
  /** Creating, reading and closing Deposits. A Deposit needs no Approval: money arriving is not money leaving. */
22
27
  export declare const BANK_DEPOSIT_ACTIONS: readonly ["create", "read", "close"];
23
28
  /** The only currency a bank detail names today. It is still required: a permission never assumes CLP. */
@@ -316,20 +321,20 @@ export declare const BankAccountGrantSchema: v.UnionSchema<[v.StrictObjectSchema
316
321
  }, undefined>], undefined>;
317
322
  export type BankAccountGrant = v.InferOutput<typeof BankAccountGrantSchema>;
318
323
  /**
319
- * `bank_transaction` Grant Request: read the Transactions of `accounts` (absent means every own
324
+ * `bank_movement` Grant Request: read the Movements of `accounts` (absent means every own
320
325
  * account).
321
326
  *
322
327
  * @example
323
- * const statement: BankTransactionGrantRequest = {
324
- * type: "bank_transaction",
328
+ * const statement: BankMovementGrantRequest = {
329
+ * type: "bank_movement",
325
330
  * actions: ["read"],
326
331
  * locations: ["https://api.andco.com"],
327
332
  * subject: { type: "profile" },
328
333
  * accounts: [{ type: "any", limit: "own" }],
329
334
  * };
330
335
  */
331
- export declare const BankTransactionGrantRequestSchema: v.StrictObjectSchema<{
332
- readonly type: v.LiteralSchema<"bank_transaction", undefined>;
336
+ export declare const BankMovementGrantRequestSchema: v.StrictObjectSchema<{
337
+ readonly type: v.LiteralSchema<"bank_movement", undefined>;
333
338
  readonly actions: v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["read"], undefined>, undefined>, v.MinLengthAction<"read"[], 1, undefined>, v.MetadataAction<"read"[], {
334
339
  readonly uniqueItems: true;
335
340
  }>]>;
@@ -402,10 +407,10 @@ export declare const BankTransactionGrantRequestSchema: v.StrictObjectSchema<{
402
407
  readonly uniqueItems: true;
403
408
  }>]>, undefined>;
404
409
  }, undefined>;
405
- export type BankTransactionGrantRequest = v.InferInput<typeof BankTransactionGrantRequestSchema>;
406
- /** `bank_transaction` Grant. */
407
- export declare const BankTransactionGrantSchema: v.StrictObjectSchema<{
408
- readonly type: v.LiteralSchema<"bank_transaction", undefined>;
410
+ export type BankMovementGrantRequest = v.InferInput<typeof BankMovementGrantRequestSchema>;
411
+ /** `bank_movement` Grant. */
412
+ export declare const BankMovementGrantSchema: v.StrictObjectSchema<{
413
+ readonly type: v.LiteralSchema<"bank_movement", undefined>;
409
414
  readonly actions: v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["read"], undefined>, undefined>, v.MinLengthAction<"read"[], 1, undefined>, v.MetadataAction<"read"[], {
410
415
  readonly uniqueItems: true;
411
416
  }>]>;
@@ -457,7 +462,7 @@ export declare const BankTransactionGrantSchema: v.StrictObjectSchema<{
457
462
  readonly uniqueItems: true;
458
463
  }>]>;
459
464
  }, undefined>;
460
- export type BankTransactionGrant = v.InferOutput<typeof BankTransactionGrantSchema>;
465
+ export type BankMovementGrant = v.InferOutput<typeof BankMovementGrantSchema>;
461
466
  /**
462
467
  * `bank_transfer` Grant Request, create form: propose Transfers within explicit bounds.
463
468
  *
@@ -1565,6 +1570,153 @@ export declare const BankTransferGrantSchema: v.UnionSchema<[v.StrictObjectSchem
1565
1570
  }, undefined>, undefined>;
1566
1571
  }, undefined>], undefined>;
1567
1572
  export type BankTransferGrant = v.InferOutput<typeof BankTransferGrantSchema>;
1573
+ /**
1574
+ * `bank_own_account_transfer` Grant Request: move money between two accounts of the subject, both
1575
+ * within `accounts` (own matchers, as in `bank_movement` or `bank_account` `read`; absent means every
1576
+ * own account). It bounds the sender and the receiver alike. There is no amount limit and no
1577
+ * Approval: each transfer is approved when its Intent is created, with nobody present, because the
1578
+ * money never leaves its holder. A transfer whose receiver is not an account of the subject is
1579
+ * refused, never sent as a transfer that leaves the holder; that one needs `bank_transfer`.
1580
+ *
1581
+ * @example
1582
+ * const sweep: BankOwnAccountTransferGrantRequest = {
1583
+ * type: "bank_own_account_transfer",
1584
+ * actions: ["create"],
1585
+ * locations: ["https://api.andco.com"],
1586
+ * subject: { type: "organization" },
1587
+ * accounts: [{ type: "account_key", pattern: "caja-*" }],
1588
+ * };
1589
+ */
1590
+ export declare const BankOwnAccountTransferGrantRequestSchema: v.StrictObjectSchema<{
1591
+ readonly type: v.LiteralSchema<"bank_own_account_transfer", undefined>;
1592
+ readonly actions: v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["create"], undefined>, undefined>, v.MinLengthAction<"create"[], 1, undefined>, v.MetadataAction<"create"[], {
1593
+ readonly uniqueItems: true;
1594
+ }>]>;
1595
+ readonly locations: v.StrictTupleSchema<[v.LiteralSchema<"https://api.andco.com", undefined>], undefined>;
1596
+ readonly subject: v.NullishSchema<v.VariantSchema<"type", [v.StrictObjectSchema<{
1597
+ readonly type: v.LiteralSchema<"profile", undefined>;
1598
+ readonly identifier: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
1599
+ }, undefined>, v.StrictObjectSchema<{
1600
+ readonly type: v.LiteralSchema<"organization", undefined>;
1601
+ readonly identifier: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
1602
+ readonly editable: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
1603
+ }, undefined>], undefined>, undefined>;
1604
+ readonly accounts: v.NullishSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.StrictObjectSchema<{
1605
+ readonly type: v.NullishSchema<v.LiteralSchema<"account_key", undefined>, undefined>;
1606
+ readonly pattern: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1607
+ readonly editable: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
1608
+ readonly selection: v.NullishSchema<v.PicklistSchema<readonly ["single", "multiple"], undefined>, undefined>;
1609
+ }, undefined>, v.StrictObjectSchema<{
1610
+ readonly type: v.LiteralSchema<"account", undefined>;
1611
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1612
+ readonly editable: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
1613
+ }, undefined>, v.StrictObjectSchema<{
1614
+ readonly type: v.LiteralSchema<"any", undefined>;
1615
+ readonly limit: v.LiteralSchema<"own", undefined>;
1616
+ readonly editable: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
1617
+ readonly selection: v.NullishSchema<v.PicklistSchema<readonly ["single", "multiple"], undefined>, undefined>;
1618
+ }, undefined>], undefined>, undefined>, v.MinLengthAction<({
1619
+ type?: "account_key" | null | undefined;
1620
+ pattern: string;
1621
+ editable?: boolean | null | undefined;
1622
+ selection?: "single" | "multiple" | null | undefined;
1623
+ } | {
1624
+ type: "account";
1625
+ id: string;
1626
+ editable?: boolean | null | undefined;
1627
+ } | {
1628
+ type: "any";
1629
+ limit: "own";
1630
+ editable?: boolean | null | undefined;
1631
+ selection?: "single" | "multiple" | null | undefined;
1632
+ })[], 1, undefined>, v.MaxLengthAction<({
1633
+ type?: "account_key" | null | undefined;
1634
+ pattern: string;
1635
+ editable?: boolean | null | undefined;
1636
+ selection?: "single" | "multiple" | null | undefined;
1637
+ } | {
1638
+ type: "account";
1639
+ id: string;
1640
+ editable?: boolean | null | undefined;
1641
+ } | {
1642
+ type: "any";
1643
+ limit: "own";
1644
+ editable?: boolean | null | undefined;
1645
+ selection?: "single" | "multiple" | null | undefined;
1646
+ })[], 100, undefined>, v.MetadataAction<({
1647
+ type?: "account_key" | null | undefined;
1648
+ pattern: string;
1649
+ editable?: boolean | null | undefined;
1650
+ selection?: "single" | "multiple" | null | undefined;
1651
+ } | {
1652
+ type: "account";
1653
+ id: string;
1654
+ editable?: boolean | null | undefined;
1655
+ } | {
1656
+ type: "any";
1657
+ limit: "own";
1658
+ editable?: boolean | null | undefined;
1659
+ selection?: "single" | "multiple" | null | undefined;
1660
+ })[], {
1661
+ readonly uniqueItems: true;
1662
+ }>]>, undefined>;
1663
+ }, undefined>;
1664
+ export type BankOwnAccountTransferGrantRequest = v.InferInput<typeof BankOwnAccountTransferGrantRequestSchema>;
1665
+ /** `bank_own_account_transfer` Grant: the subject resolved and `accounts` materialized. */
1666
+ export declare const BankOwnAccountTransferGrantSchema: v.StrictObjectSchema<{
1667
+ readonly type: v.LiteralSchema<"bank_own_account_transfer", undefined>;
1668
+ readonly actions: v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["create"], undefined>, undefined>, v.MinLengthAction<"create"[], 1, undefined>, v.MetadataAction<"create"[], {
1669
+ readonly uniqueItems: true;
1670
+ }>]>;
1671
+ readonly locations: v.StrictTupleSchema<[v.LiteralSchema<"https://api.andco.com", undefined>], undefined>;
1672
+ readonly subject: v.VariantSchema<"type", [v.StrictObjectSchema<{
1673
+ readonly type: v.LiteralSchema<"profile", undefined>;
1674
+ readonly identifier: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1675
+ }, undefined>, v.StrictObjectSchema<{
1676
+ readonly type: v.LiteralSchema<"organization", undefined>;
1677
+ readonly identifier: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1678
+ }, undefined>], undefined>;
1679
+ readonly accounts: v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.StrictObjectSchema<{
1680
+ readonly type: v.LiteralSchema<"account_key", undefined>;
1681
+ readonly pattern: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1682
+ }, undefined>, v.StrictObjectSchema<{
1683
+ readonly type: v.LiteralSchema<"account", undefined>;
1684
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1685
+ }, undefined>, v.StrictObjectSchema<{
1686
+ readonly type: v.LiteralSchema<"any", undefined>;
1687
+ readonly limit: v.LiteralSchema<"own", undefined>;
1688
+ }, undefined>], undefined>, undefined>, v.MinLengthAction<({
1689
+ type: "account_key";
1690
+ pattern: string;
1691
+ } | {
1692
+ type: "account";
1693
+ id: string;
1694
+ } | {
1695
+ type: "any";
1696
+ limit: "own";
1697
+ })[], 1, undefined>, v.MaxLengthAction<({
1698
+ type: "account_key";
1699
+ pattern: string;
1700
+ } | {
1701
+ type: "account";
1702
+ id: string;
1703
+ } | {
1704
+ type: "any";
1705
+ limit: "own";
1706
+ })[], 100, undefined>, v.MetadataAction<({
1707
+ type: "account_key";
1708
+ pattern: string;
1709
+ } | {
1710
+ type: "account";
1711
+ id: string;
1712
+ } | {
1713
+ type: "any";
1714
+ limit: "own";
1715
+ })[], {
1716
+ readonly uniqueItems: true;
1717
+ }>]>;
1718
+ }, undefined>;
1719
+ export type BankOwnAccountTransferGrant = v.InferOutput<typeof BankOwnAccountTransferGrantSchema>;
1568
1720
  /**
1569
1721
  * `bank_deposit` Grant Request: collect money into `destinations`, which is required and only takes
1570
1722
  * own matchers.
@@ -1 +1 @@
1
- {"version":3,"file":"bank.d.ts","sourceRoot":"","sources":["../../src/rar/bank.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAC7B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAgB1C,0EAA0E;AAC1E,eAAO,MAAM,yBAAyB,mCAAoC,CAAC;AAC3E,qGAAqG;AACrG,eAAO,MAAM,2BAA2B,8BAA+B,CAAC;AACxE,+FAA+F;AAC/F,eAAO,MAAM,6BAA6B,gCAAiC,CAAC;AAC5E,2DAA2D;AAC3D,eAAO,MAAM,oBAAoB,2EAIvB,CAAC;AACX,wDAAwD;AACxD,eAAO,MAAM,wBAAwB,mBAAoB,CAAC;AAC1D,sDAAsD;AACtD,eAAO,MAAM,4BAA4B,qBAAsB,CAAC;AAChE,wGAAwG;AACxG,eAAO,MAAM,0BAA0B,mBAAoB,CAAC;AAC5D,6FAA6F;AAC7F,eAAO,MAAM,8BAA8B,gCAAiC,CAAC;AAC7E,4DAA4D;AAC5D,eAAO,MAAM,qBAAqB,kDAIxB,CAAC;AACX,gHAAgH;AAChH,eAAO,MAAM,oBAAoB,sCAAuC,CAAC;AAEzE,yGAAyG;AACzG,eAAO,MAAM,eAAe,kBAAmB,CAAC;AAYhD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;0BAatC,CAAC;AAEH,gFAAgF;AAChF,eAAO,MAAM,yBAAyB;;;;;;;;0BAWpC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,2BAA2B;;;aAGtC,CAAC;AACH,sDAAsD;AACtD,eA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAIlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAI9E;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAMnD,CAAC;AACH,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,UAAU,CAAC,OAAO,wCAAwC,CAAC,CAAC;AAE/G,2FAA2F;AAC3F,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAM5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAIlG;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAMxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEzF,4BAA4B;AAC5B,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAMjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
package/dist/rar/bank.js CHANGED
@@ -16,8 +16,8 @@ export const BANK_ACCOUNT_ACTIONS = [
16
16
  ...BANK_ACCOUNT_MANAGE_ACTIONS,
17
17
  ...BANK_ACCOUNT_APPROVAL_ACTIONS,
18
18
  ];
19
- /** Reading the Transactions (movements) of accounts. */
20
- export const BANK_TRANSACTION_ACTIONS = ["read"];
19
+ /** Reading the Movements of accounts. */
20
+ export const BANK_MOVEMENT_ACTIONS = ["read"];
21
21
  /** Proposing Transfers within the detail's bounds. */
22
22
  export const BANK_TRANSFER_CREATE_ACTIONS = ["create"];
23
23
  /** Reading every Transfer that leaves the accounts of `accounts`, whoever made it and in any status. */
@@ -30,6 +30,11 @@ export const BANK_TRANSFER_ACTIONS = [
30
30
  ...BANK_TRANSFER_READ_ACTIONS,
31
31
  ...BANK_TRANSFER_APPROVAL_ACTIONS,
32
32
  ];
33
+ /**
34
+ * Moving money between two accounts of the Grant's subject, each released at once with nobody present:
35
+ * the money never leaves its holder, so the consent is the standing approval.
36
+ */
37
+ export const BANK_OWN_ACCOUNT_TRANSFER_ACTIONS = ["create"];
33
38
  /** Creating, reading and closing Deposits. A Deposit needs no Approval: money arriving is not money leaving. */
34
39
  export const BANK_DEPOSIT_ACTIONS = ["create", "read", "close"];
35
40
  /** The only currency a bank detail names today. It is still required: a permission never assumes CLP. */
@@ -175,31 +180,31 @@ export const BankAccountGrantSchema = /* @__PURE__ */ v.union([
175
180
  subject: GrantedSubjectSchema,
176
181
  }),
177
182
  ]);
178
- // -- bank_transaction ---------------------------------------------------------------------------
183
+ // -- bank_movement ------------------------------------------------------------------------------
179
184
  /**
180
- * `bank_transaction` Grant Request: read the Transactions of `accounts` (absent means every own
185
+ * `bank_movement` Grant Request: read the Movements of `accounts` (absent means every own
181
186
  * account).
182
187
  *
183
188
  * @example
184
- * const statement: BankTransactionGrantRequest = {
185
- * type: "bank_transaction",
189
+ * const statement: BankMovementGrantRequest = {
190
+ * type: "bank_movement",
186
191
  * actions: ["read"],
187
192
  * locations: ["https://api.andco.com"],
188
193
  * subject: { type: "profile" },
189
194
  * accounts: [{ type: "any", limit: "own" }],
190
195
  * };
191
196
  */
192
- export const BankTransactionGrantRequestSchema = /* @__PURE__ */ v.strictObject({
193
- type: v.literal("bank_transaction"),
194
- actions: actionSet(BANK_TRANSACTION_ACTIONS),
197
+ export const BankMovementGrantRequestSchema = /* @__PURE__ */ v.strictObject({
198
+ type: v.literal("bank_movement"),
199
+ actions: actionSet(BANK_MOVEMENT_ACTIONS),
195
200
  locations: AndcoRarLocationsSchema,
196
201
  subject: SubjectPickerSchema,
197
202
  accounts: v.nullish(ownList),
198
203
  });
199
- /** `bank_transaction` Grant. */
200
- export const BankTransactionGrantSchema = /* @__PURE__ */ v.strictObject({
201
- type: v.literal("bank_transaction"),
202
- actions: actionSet(BANK_TRANSACTION_ACTIONS),
204
+ /** `bank_movement` Grant. */
205
+ export const BankMovementGrantSchema = /* @__PURE__ */ v.strictObject({
206
+ type: v.literal("bank_movement"),
207
+ actions: actionSet(BANK_MOVEMENT_ACTIONS),
203
208
  locations: AndcoRarLocationsSchema,
204
209
  subject: GrantedSubjectSchema,
205
210
  accounts: grantedOwnList,
@@ -319,6 +324,39 @@ export const BankTransferGrantSchema = /* @__PURE__ */ v.union([
319
324
  BankTransferReadGrantSchema,
320
325
  BankTransferApprovalGrantSchema,
321
326
  ]);
327
+ // -- bank_own_account_transfer ------------------------------------------------------------------
328
+ /**
329
+ * `bank_own_account_transfer` Grant Request: move money between two accounts of the subject, both
330
+ * within `accounts` (own matchers, as in `bank_movement` or `bank_account` `read`; absent means every
331
+ * own account). It bounds the sender and the receiver alike. There is no amount limit and no
332
+ * Approval: each transfer is approved when its Intent is created, with nobody present, because the
333
+ * money never leaves its holder. A transfer whose receiver is not an account of the subject is
334
+ * refused, never sent as a transfer that leaves the holder; that one needs `bank_transfer`.
335
+ *
336
+ * @example
337
+ * const sweep: BankOwnAccountTransferGrantRequest = {
338
+ * type: "bank_own_account_transfer",
339
+ * actions: ["create"],
340
+ * locations: ["https://api.andco.com"],
341
+ * subject: { type: "organization" },
342
+ * accounts: [{ type: "account_key", pattern: "caja-*" }],
343
+ * };
344
+ */
345
+ export const BankOwnAccountTransferGrantRequestSchema = /* @__PURE__ */ v.strictObject({
346
+ type: v.literal("bank_own_account_transfer"),
347
+ actions: actionSet(BANK_OWN_ACCOUNT_TRANSFER_ACTIONS),
348
+ locations: AndcoRarLocationsSchema,
349
+ subject: SubjectPickerSchema,
350
+ accounts: v.nullish(ownList),
351
+ });
352
+ /** `bank_own_account_transfer` Grant: the subject resolved and `accounts` materialized. */
353
+ export const BankOwnAccountTransferGrantSchema = /* @__PURE__ */ v.strictObject({
354
+ type: v.literal("bank_own_account_transfer"),
355
+ actions: actionSet(BANK_OWN_ACCOUNT_TRANSFER_ACTIONS),
356
+ locations: AndcoRarLocationsSchema,
357
+ subject: GrantedSubjectSchema,
358
+ accounts: grantedOwnList,
359
+ });
322
360
  // -- bank_deposit -------------------------------------------------------------------------------
323
361
  /**
324
362
  * `bank_deposit` Grant Request: collect money into `destinations`, which is required and only takes
@@ -2,7 +2,7 @@ import * as v from "valibot";
2
2
  import { ErrorExtendable } from "../errors.js";
3
3
  import { type Issue } from "../issues.js";
4
4
  /** Every authorization detail type AndCo's Resource Server implements. */
5
- export declare const ANDCO_RAR_TYPES: readonly ["bank_account", "bank_transaction", "bank_transfer", "bank_deposit", "identity", "address", "organization", "profile", "project_users"];
5
+ export declare const ANDCO_RAR_TYPES: readonly ["bank_account", "bank_movement", "bank_transfer", "bank_own_account_transfer", "bank_deposit", "identity", "address", "organization", "profile", "project_users"];
6
6
  export type AndcoRarType = (typeof ANDCO_RAR_TYPES)[number];
7
7
  /**
8
8
  * Types that belong to the model but are not built yet. A detail naming one is rejected with
@@ -260,10 +260,10 @@ export declare const ANDCO_RAR_CATALOG: {
260
260
  }, undefined>], undefined>;
261
261
  }, undefined>], undefined>;
262
262
  };
263
- readonly bank_transaction: {
263
+ readonly bank_movement: {
264
264
  readonly actions: readonly ["read"];
265
265
  readonly grantRequest: v.StrictObjectSchema<{
266
- readonly type: v.LiteralSchema<"bank_transaction", undefined>;
266
+ readonly type: v.LiteralSchema<"bank_movement", undefined>;
267
267
  readonly actions: v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["read"], undefined>, undefined>, v.MinLengthAction<"read"[], 1, undefined>, v.MetadataAction<"read"[], {
268
268
  readonly uniqueItems: true;
269
269
  }>]>;
@@ -337,7 +337,7 @@ export declare const ANDCO_RAR_CATALOG: {
337
337
  }>]>, undefined>;
338
338
  }, undefined>;
339
339
  readonly grant: v.StrictObjectSchema<{
340
- readonly type: v.LiteralSchema<"bank_transaction", undefined>;
340
+ readonly type: v.LiteralSchema<"bank_movement", undefined>;
341
341
  readonly actions: v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["read"], undefined>, undefined>, v.MinLengthAction<"read"[], 1, undefined>, v.MetadataAction<"read"[], {
342
342
  readonly uniqueItems: true;
343
343
  }>]>;
@@ -913,6 +913,136 @@ export declare const ANDCO_RAR_CATALOG: {
913
913
  }, undefined>, undefined>;
914
914
  }, undefined>], undefined>;
915
915
  };
916
+ readonly bank_own_account_transfer: {
917
+ readonly actions: readonly ["create"];
918
+ readonly grantRequest: v.StrictObjectSchema<{
919
+ readonly type: v.LiteralSchema<"bank_own_account_transfer", undefined>;
920
+ readonly actions: v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["create"], undefined>, undefined>, v.MinLengthAction<"create"[], 1, undefined>, v.MetadataAction<"create"[], {
921
+ readonly uniqueItems: true;
922
+ }>]>;
923
+ readonly locations: v.StrictTupleSchema<[v.LiteralSchema<"https://api.andco.com", undefined>], undefined>;
924
+ readonly subject: v.NullishSchema<v.VariantSchema<"type", [v.StrictObjectSchema<{
925
+ readonly type: v.LiteralSchema<"profile", undefined>;
926
+ readonly identifier: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
927
+ }, undefined>, v.StrictObjectSchema<{
928
+ readonly type: v.LiteralSchema<"organization", undefined>;
929
+ readonly identifier: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
930
+ readonly editable: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
931
+ }, undefined>], undefined>, undefined>;
932
+ readonly accounts: v.NullishSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.StrictObjectSchema<{
933
+ readonly type: v.NullishSchema<v.LiteralSchema<"account_key", undefined>, undefined>;
934
+ readonly pattern: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
935
+ readonly editable: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
936
+ readonly selection: v.NullishSchema<v.PicklistSchema<readonly ["single", "multiple"], undefined>, undefined>;
937
+ }, undefined>, v.StrictObjectSchema<{
938
+ readonly type: v.LiteralSchema<"account", undefined>;
939
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
940
+ readonly editable: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
941
+ }, undefined>, v.StrictObjectSchema<{
942
+ readonly type: v.LiteralSchema<"any", undefined>;
943
+ readonly limit: v.LiteralSchema<"own", undefined>;
944
+ readonly editable: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
945
+ readonly selection: v.NullishSchema<v.PicklistSchema<readonly ["single", "multiple"], undefined>, undefined>;
946
+ }, undefined>], undefined>, undefined>, v.MinLengthAction<({
947
+ type?: "account_key" | null | undefined;
948
+ pattern: string;
949
+ editable?: boolean | null | undefined;
950
+ selection?: "single" | "multiple" | null | undefined;
951
+ } | {
952
+ type: "account";
953
+ id: string;
954
+ editable?: boolean | null | undefined;
955
+ } | {
956
+ type: "any";
957
+ limit: "own";
958
+ editable?: boolean | null | undefined;
959
+ selection?: "single" | "multiple" | null | undefined;
960
+ })[], 1, undefined>, v.MaxLengthAction<({
961
+ type?: "account_key" | null | undefined;
962
+ pattern: string;
963
+ editable?: boolean | null | undefined;
964
+ selection?: "single" | "multiple" | null | undefined;
965
+ } | {
966
+ type: "account";
967
+ id: string;
968
+ editable?: boolean | null | undefined;
969
+ } | {
970
+ type: "any";
971
+ limit: "own";
972
+ editable?: boolean | null | undefined;
973
+ selection?: "single" | "multiple" | null | undefined;
974
+ })[], 100, undefined>, v.MetadataAction<({
975
+ type?: "account_key" | null | undefined;
976
+ pattern: string;
977
+ editable?: boolean | null | undefined;
978
+ selection?: "single" | "multiple" | null | undefined;
979
+ } | {
980
+ type: "account";
981
+ id: string;
982
+ editable?: boolean | null | undefined;
983
+ } | {
984
+ type: "any";
985
+ limit: "own";
986
+ editable?: boolean | null | undefined;
987
+ selection?: "single" | "multiple" | null | undefined;
988
+ })[], {
989
+ readonly uniqueItems: true;
990
+ }>]>, undefined>;
991
+ }, undefined>;
992
+ readonly grant: v.StrictObjectSchema<{
993
+ readonly type: v.LiteralSchema<"bank_own_account_transfer", undefined>;
994
+ readonly actions: v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<readonly ["create"], undefined>, undefined>, v.MinLengthAction<"create"[], 1, undefined>, v.MetadataAction<"create"[], {
995
+ readonly uniqueItems: true;
996
+ }>]>;
997
+ readonly locations: v.StrictTupleSchema<[v.LiteralSchema<"https://api.andco.com", undefined>], undefined>;
998
+ readonly subject: v.VariantSchema<"type", [v.StrictObjectSchema<{
999
+ readonly type: v.LiteralSchema<"profile", undefined>;
1000
+ readonly identifier: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1001
+ }, undefined>, v.StrictObjectSchema<{
1002
+ readonly type: v.LiteralSchema<"organization", undefined>;
1003
+ readonly identifier: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1004
+ }, undefined>], undefined>;
1005
+ readonly accounts: v.SchemaWithPipe<readonly [v.ArraySchema<v.UnionSchema<[v.StrictObjectSchema<{
1006
+ readonly type: v.LiteralSchema<"account_key", undefined>;
1007
+ readonly pattern: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
1008
+ }, undefined>, v.StrictObjectSchema<{
1009
+ readonly type: v.LiteralSchema<"account", undefined>;
1010
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
1011
+ }, undefined>, v.StrictObjectSchema<{
1012
+ readonly type: v.LiteralSchema<"any", undefined>;
1013
+ readonly limit: v.LiteralSchema<"own", undefined>;
1014
+ }, undefined>], undefined>, undefined>, v.MinLengthAction<({
1015
+ type: "account_key";
1016
+ pattern: string;
1017
+ } | {
1018
+ type: "account";
1019
+ id: string;
1020
+ } | {
1021
+ type: "any";
1022
+ limit: "own";
1023
+ })[], 1, undefined>, v.MaxLengthAction<({
1024
+ type: "account_key";
1025
+ pattern: string;
1026
+ } | {
1027
+ type: "account";
1028
+ id: string;
1029
+ } | {
1030
+ type: "any";
1031
+ limit: "own";
1032
+ })[], 100, undefined>, v.MetadataAction<({
1033
+ type: "account_key";
1034
+ pattern: string;
1035
+ } | {
1036
+ type: "account";
1037
+ id: string;
1038
+ } | {
1039
+ type: "any";
1040
+ limit: "own";
1041
+ })[], {
1042
+ readonly uniqueItems: true;
1043
+ }>]>;
1044
+ }, undefined>;
1045
+ };
916
1046
  readonly bank_deposit: {
917
1047
  readonly actions: readonly ["create", "read", "close"];
918
1048
  readonly grantRequest: v.StrictObjectSchema<{
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/rar/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,KAAK,KAAK,EAAsB,MAAM,cAAc,CAAC;AAwC9D,0EAA0E;AAC1E,eAAO,MAAM,eAAe,mJAUlB,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,wBAAwB,uDAAwD,CAAC;AAC9F,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC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BAAgB,sBAAsB,CAAC,MAAM,EAAE,OAAO,GAAG,iBAAiB,CAEzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,UAAU,CAE3D"}
@@ -2,7 +2,7 @@ import * as v from "valibot";
2
2
  import { ErrorExtendable } from "../errors.js";
3
3
  import { issuesAt, issuesOf } from "../issues.js";
4
4
  import { accountMatcherListIssues } from "./account-matchers.js";
5
- import { amountRangeIssues, BANK_ACCOUNT_ACTIONS, BANK_DEPOSIT_ACTIONS, BANK_TRANSACTION_ACTIONS, BANK_TRANSFER_ACTIONS, BankAccountGrantRequestSchema, BankAccountGrantSchema, BankDepositGrantRequestSchema, BankDepositGrantSchema, BankTransactionGrantRequestSchema, BankTransactionGrantSchema, BankTransferGrantRequestSchema, BankTransferGrantSchema, } from "./bank.js";
5
+ import { amountRangeIssues, BANK_ACCOUNT_ACTIONS, BANK_DEPOSIT_ACTIONS, BANK_MOVEMENT_ACTIONS, BANK_OWN_ACCOUNT_TRANSFER_ACTIONS, BANK_TRANSFER_ACTIONS, BankAccountGrantRequestSchema, BankAccountGrantSchema, BankDepositGrantRequestSchema, BankDepositGrantSchema, BankMovementGrantRequestSchema, BankMovementGrantSchema, BankOwnAccountTransferGrantRequestSchema, BankOwnAccountTransferGrantSchema, BankTransferGrantRequestSchema, BankTransferGrantSchema, } from "./bank.js";
6
6
  import { actionSetIssues } from "./detail.js";
7
7
  import { PROJECT_USERS_ACTIONS, ProjectUsersGrantRequestSchema, ProjectUsersGrantSchema, projectUsersIssues, } from "./project-users.js";
8
8
  import { subjectIssues } from "./subject.js";
@@ -10,8 +10,9 @@ import { ADDRESS_ACTIONS, AddressGrantRequestSchema, AddressGrantSchema, IDENTIT
10
10
  /** Every authorization detail type AndCo's Resource Server implements. */
11
11
  export const ANDCO_RAR_TYPES = [
12
12
  "bank_account",
13
- "bank_transaction",
13
+ "bank_movement",
14
14
  "bank_transfer",
15
+ "bank_own_account_transfer",
15
16
  "bank_deposit",
16
17
  "identity",
17
18
  "address",
@@ -40,16 +41,21 @@ export const ANDCO_RAR_CATALOG = {
40
41
  grantRequest: BankAccountGrantRequestSchema,
41
42
  grant: BankAccountGrantSchema,
42
43
  },
43
- bank_transaction: {
44
- actions: BANK_TRANSACTION_ACTIONS,
45
- grantRequest: BankTransactionGrantRequestSchema,
46
- grant: BankTransactionGrantSchema,
44
+ bank_movement: {
45
+ actions: BANK_MOVEMENT_ACTIONS,
46
+ grantRequest: BankMovementGrantRequestSchema,
47
+ grant: BankMovementGrantSchema,
47
48
  },
48
49
  bank_transfer: {
49
50
  actions: BANK_TRANSFER_ACTIONS,
50
51
  grantRequest: BankTransferGrantRequestSchema,
51
52
  grant: BankTransferGrantSchema,
52
53
  },
54
+ bank_own_account_transfer: {
55
+ actions: BANK_OWN_ACCOUNT_TRANSFER_ACTIONS,
56
+ grantRequest: BankOwnAccountTransferGrantRequestSchema,
57
+ grant: BankOwnAccountTransferGrantSchema,
58
+ },
53
59
  bank_deposit: {
54
60
  actions: BANK_DEPOSIT_ACTIONS,
55
61
  grantRequest: BankDepositGrantRequestSchema,
@@ -1 +1 @@
1
- {"version":3,"file":"json-schemas.generated.d.ts","sourceRoot":"","sources":["../../src/rar/json-schemas.generated.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExD,wFAAwF;AACxF,eAAO,MAAM,sBAAsB,EAAE,mBAo2HpC,CAAC"}
1
+ {"version":3,"file":"json-schemas.generated.d.ts","sourceRoot":"","sources":["../../src/rar/json-schemas.generated.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExD,wFAAwF;AACxF,eAAO,MAAM,sBAAsB,EAAE,mBAwtIpC,CAAC"}