@robbeverhelst/do 1.299.0 → 1.300.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 +60 -2
- package/package.json +1 -1
package/dist/do.js
CHANGED
|
@@ -6119,6 +6119,21 @@ var journalRecaps = pgTable("journal_recaps", {
|
|
|
6119
6119
|
moments: jsonb("moments").$type().notNull().default(sql`'[]'::jsonb`),
|
|
6120
6120
|
pattern: text("pattern")
|
|
6121
6121
|
}, (t) => [unique("journal_recaps_owner_period_uniq").on(t.tenantId, t.ownerUserId, t.periodKey)]);
|
|
6122
|
+
var journalDayShares = pgTable("journal_day_shares", {
|
|
6123
|
+
id: text("id").primaryKey(),
|
|
6124
|
+
tenantId: text("tenant_id").notNull().references(() => tenants.id),
|
|
6125
|
+
ownerUserId: text("owner_user_id").notNull().references(() => users.id),
|
|
6126
|
+
journalDayId: text("journal_day_id").notNull().references(() => journalDays.id, { onDelete: "cascade" }),
|
|
6127
|
+
day: date("day", { mode: "string" }).notNull(),
|
|
6128
|
+
recipientUserId: text("recipient_user_id").references(() => users.id),
|
|
6129
|
+
note: text("note"),
|
|
6130
|
+
snapshot: jsonb("snapshot").$type().notNull(),
|
|
6131
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
6132
|
+
revokedAt: timestamp("revoked_at", { withTimezone: true })
|
|
6133
|
+
}, (t) => [
|
|
6134
|
+
index("journal_day_shares_owner_idx").on(t.tenantId, t.ownerUserId, t.day),
|
|
6135
|
+
index("journal_day_shares_recipient_idx").on(t.tenantId, t.recipientUserId, t.createdAt)
|
|
6136
|
+
]);
|
|
6122
6137
|
|
|
6123
6138
|
// ../../node_modules/zod/v4/core/core.js
|
|
6124
6139
|
var _a;
|
|
@@ -27972,7 +27987,7 @@ var mailCampaignViewSchema = mailCampaignSchema.extend({
|
|
|
27972
27987
|
var RSVP_QUESTION_KINDS = ["choice", "multi", "text", "number", "yes_no"];
|
|
27973
27988
|
var rsvpQuestionKindSchema = _enum2(RSVP_QUESTION_KINDS);
|
|
27974
27989
|
var rsvpQuestionScopeSchema = _enum2(["household", "guest"]);
|
|
27975
|
-
var RSVP_QUESTION_PRESETS = ["diet", "message"];
|
|
27990
|
+
var RSVP_QUESTION_PRESETS = ["diet", "diet_other", "message"];
|
|
27976
27991
|
var rsvpQuestionPresetSchema = _enum2(RSVP_QUESTION_PRESETS);
|
|
27977
27992
|
var RSVP_SHOW_IF_MAX = 5;
|
|
27978
27993
|
var rsvpTextSchema = (max) => object({
|
|
@@ -28061,6 +28076,10 @@ var rsvpAnswersQuerySchema = object({
|
|
|
28061
28076
|
guestListId: ulidSchema,
|
|
28062
28077
|
householdId: ulidSchema.optional()
|
|
28063
28078
|
});
|
|
28079
|
+
var addRsvpPresetsInputSchema = object({
|
|
28080
|
+
guestListId: ulidSchema,
|
|
28081
|
+
presets: array(_enum2(["diet", "message"])).min(1).max(2)
|
|
28082
|
+
}).strict();
|
|
28064
28083
|
|
|
28065
28084
|
// ../../packages/schema/src/contracts/google-contacts.ts
|
|
28066
28085
|
var googleContactsModeSchema = _enum2(["off", "fake", "live"]);
|
|
@@ -29747,7 +29766,7 @@ function parseCapture2(input, now) {
|
|
|
29747
29766
|
|
|
29748
29767
|
// src/meta.ts
|
|
29749
29768
|
var CLI_NAME = "do";
|
|
29750
|
-
var VERSION = "1.
|
|
29769
|
+
var VERSION = "1.300.0";
|
|
29751
29770
|
var API_PREFIX = "/api/v1";
|
|
29752
29771
|
var DEFAULT_API_URL = "http://localhost:3001";
|
|
29753
29772
|
|
|
@@ -34787,6 +34806,18 @@ var COMMAND_SPECS = [
|
|
|
34787
34806
|
returns: "{ copied, kept }",
|
|
34788
34807
|
notes: "POST /api/v1/money/budget/copy."
|
|
34789
34808
|
},
|
|
34809
|
+
{
|
|
34810
|
+
path: ["money", "year"],
|
|
34811
|
+
summary: "The year in money: in and out per month and category, the streams' year, the goals.",
|
|
34812
|
+
args: [],
|
|
34813
|
+
flags: [
|
|
34814
|
+
{ name: "year", type: "string", description: "The calendar year (default this one)." },
|
|
34815
|
+
{ name: "scope", type: "string", description: "all (default) | space | owner." }
|
|
34816
|
+
],
|
|
34817
|
+
scopes: ["finance:read"],
|
|
34818
|
+
returns: "MoneyYear",
|
|
34819
|
+
notes: "GET /api/v1/money/year. totals (income, spent, saved) and lastYear (the same months a year earlier, null with nothing booked then); months Jan\u2013Dec; spending and income by category, biggest first, each with lastYear; recurring streams with thisYear, lastYear and change (new \xB7 stopped \xB7 up \xB7 down \xB7 same); goals with what went toward them this year. A year under way counts to this month (through)."
|
|
34820
|
+
},
|
|
34790
34821
|
{
|
|
34791
34822
|
path: ["money", "goals"],
|
|
34792
34823
|
summary: "List money goals: what's saved toward each, soonest first.",
|
|
@@ -35649,6 +35680,20 @@ var COMMAND_SPECS = [
|
|
|
35649
35680
|
scopes: ["contacts:write"],
|
|
35650
35681
|
returns: "GuestView"
|
|
35651
35682
|
},
|
|
35683
|
+
{
|
|
35684
|
+
path: ["rsvp-questions", "presets"],
|
|
35685
|
+
summary: "Add the built-in diet (per guest who comes, with a line for other) and/or message questions.",
|
|
35686
|
+
args: [],
|
|
35687
|
+
flags: [
|
|
35688
|
+
{
|
|
35689
|
+
name: "data",
|
|
35690
|
+
type: "string",
|
|
35691
|
+
description: 'JSON AddRsvpPresetsInput, e.g. {"guestListId":"01\u2026","presets":["diet","message"]}'
|
|
35692
|
+
}
|
|
35693
|
+
],
|
|
35694
|
+
scopes: ["contacts:write"],
|
|
35695
|
+
returns: "RsvpQuestion"
|
|
35696
|
+
},
|
|
35652
35697
|
{
|
|
35653
35698
|
path: ["rsvp-answers", "list"],
|
|
35654
35699
|
summary: "A guest list's answers to its RSVP questions, or one household's.",
|
|
@@ -40411,6 +40456,12 @@ var HANDLERS = {
|
|
|
40411
40456
|
const route = flagBool(flags, "commit") ? "/money/imports" : "/money/imports/preview";
|
|
40412
40457
|
return { data: await requireClient().upload(route, form), render: renderRecord };
|
|
40413
40458
|
},
|
|
40459
|
+
"money year": async ({ flags, requireClient }) => ({
|
|
40460
|
+
data: await requireClient().get("/money/year", {
|
|
40461
|
+
query: { year: flagString(flags, "year"), scope: flagString(flags, "scope") }
|
|
40462
|
+
}),
|
|
40463
|
+
render: renderRecord
|
|
40464
|
+
}),
|
|
40414
40465
|
"money budget": async ({ flags, io, requireClient }) => ({
|
|
40415
40466
|
data: await requireClient().get("/money/budget", {
|
|
40416
40467
|
query: {
|
|
@@ -41296,6 +41347,13 @@ var HANDLERS = {
|
|
|
41296
41347
|
const body = parseInput(markGuestsSentInputSchema, readDataFlag(flags));
|
|
41297
41348
|
return { data: await requireClient().post("/guests/sent", body), render: renderRecord };
|
|
41298
41349
|
},
|
|
41350
|
+
"rsvp-questions presets": async ({ flags, requireClient }) => {
|
|
41351
|
+
const body = parseInput(addRsvpPresetsInputSchema, readDataFlag(flags));
|
|
41352
|
+
return {
|
|
41353
|
+
data: await requireClient().post("/rsvp-questions/presets", body),
|
|
41354
|
+
render: renderRecord
|
|
41355
|
+
};
|
|
41356
|
+
},
|
|
41299
41357
|
"rsvp-answers list": async ({ flags, requireClient }) => {
|
|
41300
41358
|
const list = flagString(flags, "list");
|
|
41301
41359
|
if (!list)
|
package/package.json
CHANGED