@robbeverhelst/do 1.291.0 → 1.292.0
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/do.js +26 -2
- package/package.json +1 -1
package/dist/do.js
CHANGED
|
@@ -24683,7 +24683,13 @@ var moneyTransactionViewSchema = moneyTransactionSchema.omit({ dedupHash: true }
|
|
|
24683
24683
|
title: string2(),
|
|
24684
24684
|
type: string2()
|
|
24685
24685
|
})).default([]),
|
|
24686
|
-
recurring: string2().nullable().default(null)
|
|
24686
|
+
recurring: string2().nullable().default(null),
|
|
24687
|
+
contact: object({ id: ulidSchema, name: string2(), payments: number2().int().nonnegative() }).nullable().default(null),
|
|
24688
|
+
split: object({
|
|
24689
|
+
parts: number2().int().positive(),
|
|
24690
|
+
even: boolean3(),
|
|
24691
|
+
owed: array(object({ name: string2(), amount: amount3 }))
|
|
24692
|
+
}).nullable().default(null)
|
|
24687
24693
|
});
|
|
24688
24694
|
var moneyTransactionsQuerySchema = object({
|
|
24689
24695
|
accountId: ulidSchema.optional(),
|
|
@@ -24776,6 +24782,11 @@ var moneyRuleProposalSchema = object({
|
|
|
24776
24782
|
createdFromTransactionId: ulidSchema,
|
|
24777
24783
|
count: number2().int().positive()
|
|
24778
24784
|
});
|
|
24785
|
+
var moneyRuleSuggestionSchema = moneyRuleProposalSchema.extend({
|
|
24786
|
+
payee: string2(),
|
|
24787
|
+
categoryName: string2(),
|
|
24788
|
+
goal: object({ nodeId: ulidSchema, title: string2() }).nullable()
|
|
24789
|
+
});
|
|
24779
24790
|
var moneySortReceiptSchema = object({
|
|
24780
24791
|
items: array(object({
|
|
24781
24792
|
id: ulidSchema,
|
|
@@ -28763,7 +28774,7 @@ function parseCapture2(input, now) {
|
|
|
28763
28774
|
|
|
28764
28775
|
// src/meta.ts
|
|
28765
28776
|
var CLI_NAME = "do";
|
|
28766
|
-
var VERSION = "1.
|
|
28777
|
+
var VERSION = "1.292.0";
|
|
28767
28778
|
var API_PREFIX = "/api/v1";
|
|
28768
28779
|
var DEFAULT_API_URL = "http://localhost:3001";
|
|
28769
28780
|
|
|
@@ -33450,6 +33461,15 @@ var COMMAND_SPECS = [
|
|
|
33450
33461
|
returns: "MoneyRuleView[]",
|
|
33451
33462
|
notes: "GET /api/v1/money/rules."
|
|
33452
33463
|
},
|
|
33464
|
+
{
|
|
33465
|
+
path: ["money", "rule-suggestions"],
|
|
33466
|
+
summary: "The rules worth making now: payees sorted the same way by hand, with their goal.",
|
|
33467
|
+
args: [],
|
|
33468
|
+
flags: [],
|
|
33469
|
+
scopes: ["finance:read"],
|
|
33470
|
+
returns: "MoneyRuleSuggestion[]",
|
|
33471
|
+
notes: "GET /api/v1/money/rules/suggestions. Accept one with `do money rule-add --data` (its name, conditions and actions; add actions.link to its goal to count the next ones there)."
|
|
33472
|
+
},
|
|
33453
33473
|
{
|
|
33454
33474
|
path: ["money", "rule"],
|
|
33455
33475
|
summary: "Show one sorting rule.",
|
|
@@ -38680,6 +38700,10 @@ var HANDLERS = {
|
|
|
38680
38700
|
data: await requireClient().get("/money/rules"),
|
|
38681
38701
|
render: renderList
|
|
38682
38702
|
}),
|
|
38703
|
+
"money rule-suggestions": async ({ requireClient }) => ({
|
|
38704
|
+
data: await requireClient().get("/money/rules/suggestions"),
|
|
38705
|
+
render: renderList
|
|
38706
|
+
}),
|
|
38683
38707
|
"money rule": async ({ args, requireClient }) => {
|
|
38684
38708
|
const id = requireArg(args, 0, "rule id");
|
|
38685
38709
|
return { data: await requireClient().get(`/money/rules/${id}`), render: renderRecord };
|
package/package.json
CHANGED