@robbeverhelst/do 1.298.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 +194 -19
- package/package.json +1 -1
package/dist/do.js
CHANGED
|
@@ -5502,6 +5502,7 @@ var EVIDENCE_SOURCES = [
|
|
|
5502
5502
|
"routine_run",
|
|
5503
5503
|
"do_activity",
|
|
5504
5504
|
"github",
|
|
5505
|
+
"phone_location",
|
|
5505
5506
|
"plan_default"
|
|
5506
5507
|
];
|
|
5507
5508
|
var blockEvidence = pgTable("block_evidence", {
|
|
@@ -5518,7 +5519,7 @@ var blockEvidence = pgTable("block_evidence", {
|
|
|
5518
5519
|
}, (t) => [
|
|
5519
5520
|
index("block_evidence_block_idx").on(t.blockId, t.at),
|
|
5520
5521
|
check("block_evidence_weight_range", sql`${t.weight} BETWEEN 1 AND 5`),
|
|
5521
|
-
check("block_evidence_source_check", sql`${t.source} IN ('chat', 'edit_do', 'edit_google', 'google_health', 'wakehook', 'strava', 'habit', 'task', 'routine_run', 'do_activity', 'github', 'plan_default')`)
|
|
5522
|
+
check("block_evidence_source_check", sql`${t.source} IN ('chat', 'edit_do', 'edit_google', 'google_health', 'wakehook', 'strava', 'habit', 'task', 'routine_run', 'do_activity', 'github', 'phone_location', 'plan_default')`)
|
|
5522
5523
|
]);
|
|
5523
5524
|
|
|
5524
5525
|
// ../../packages/schema/src/db/food-log.ts
|
|
@@ -6118,6 +6119,21 @@ var journalRecaps = pgTable("journal_recaps", {
|
|
|
6118
6119
|
moments: jsonb("moments").$type().notNull().default(sql`'[]'::jsonb`),
|
|
6119
6120
|
pattern: text("pattern")
|
|
6120
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
|
+
]);
|
|
6121
6137
|
|
|
6122
6138
|
// ../../node_modules/zod/v4/core/core.js
|
|
6123
6139
|
var _a;
|
|
@@ -20713,9 +20729,20 @@ var METRICS = {
|
|
|
20713
20729
|
mood: { label: "Mood", unit: "/5", min: 1, max: 5, step: 1 },
|
|
20714
20730
|
rating: { label: "Day rating", unit: "/10", min: 1, max: 10, step: 1 },
|
|
20715
20731
|
energy: { label: "Energy", unit: "/10", min: 1, max: 10, step: 1 },
|
|
20716
|
-
bedtime: { label: "Bedtime", unit: "clock", min: 0, max: 720, step: 5 }
|
|
20732
|
+
bedtime: { label: "Bedtime", unit: "clock", min: 0, max: 720, step: 5 },
|
|
20733
|
+
resting_hr: { label: "Resting heart rate", unit: "bpm", min: 25, max: 200, step: 1 },
|
|
20734
|
+
hrv: { label: "HRV", unit: "ms", min: 1, max: 400, step: 1 }
|
|
20717
20735
|
};
|
|
20718
|
-
var metricKeySchema = _enum2([
|
|
20736
|
+
var metricKeySchema = _enum2([
|
|
20737
|
+
"weight",
|
|
20738
|
+
"sleep",
|
|
20739
|
+
"mood",
|
|
20740
|
+
"rating",
|
|
20741
|
+
"energy",
|
|
20742
|
+
"bedtime",
|
|
20743
|
+
"resting_hr",
|
|
20744
|
+
"hrv"
|
|
20745
|
+
]);
|
|
20719
20746
|
var metricSourceSchema = _enum2([
|
|
20720
20747
|
"manual",
|
|
20721
20748
|
"device",
|
|
@@ -22143,7 +22170,8 @@ var PLACE_SENSOR_READINGS = Object.keys(SHED_READING_TYPES);
|
|
|
22143
22170
|
var ASSET_READING_TYPES = {
|
|
22144
22171
|
state: "asset.state",
|
|
22145
22172
|
power: "asset.power",
|
|
22146
|
-
energy: "asset.energy"
|
|
22173
|
+
energy: "asset.energy",
|
|
22174
|
+
presence: "asset.presence"
|
|
22147
22175
|
};
|
|
22148
22176
|
var ASSET_SENSOR_READINGS = Object.keys(ASSET_READING_TYPES);
|
|
22149
22177
|
var sensorReadingValues = [
|
|
@@ -22216,6 +22244,27 @@ var assetReadingSchema = object({
|
|
|
22216
22244
|
device: string2().nullable(),
|
|
22217
22245
|
at: exports_coerce.date()
|
|
22218
22246
|
});
|
|
22247
|
+
var unifiLinkInputSchema = object({
|
|
22248
|
+
baseUrl: string2().trim().url().refine((u) => /^https?:\/\//i.test(u), "must start with http:// or https://"),
|
|
22249
|
+
apiKey: string2().trim().min(1).max(500),
|
|
22250
|
+
site: string2().trim().min(1).max(100).default("default")
|
|
22251
|
+
}).strict();
|
|
22252
|
+
var unifiStatusSchema = object({
|
|
22253
|
+
linked: boolean3(),
|
|
22254
|
+
host: string2().nullable(),
|
|
22255
|
+
site: string2().nullable(),
|
|
22256
|
+
links: number2().int().nonnegative(),
|
|
22257
|
+
lastReadingAt: string2().nullable()
|
|
22258
|
+
});
|
|
22259
|
+
var unifiDeviceSchema = object({
|
|
22260
|
+
mac: string2(),
|
|
22261
|
+
name: string2(),
|
|
22262
|
+
kind: _enum2(["device", "client"]),
|
|
22263
|
+
model: string2().nullable(),
|
|
22264
|
+
online: boolean3(),
|
|
22265
|
+
firmware: string2().nullable(),
|
|
22266
|
+
link: sensorLinkSchema.nullable()
|
|
22267
|
+
});
|
|
22219
22268
|
|
|
22220
22269
|
// ../../packages/schema/src/contracts/house.ts
|
|
22221
22270
|
var day = string2().regex(/^\d{4}-\d{2}-\d{2}$/, "must be a calendar day (YYYY-MM-DD)");
|
|
@@ -23554,10 +23603,17 @@ var JOURNAL_SEARCH_LIMIT = 30;
|
|
|
23554
23603
|
var journalSearchQuerySchema = object({
|
|
23555
23604
|
q: string2().trim().min(2, "search for at least 2 characters").max(100)
|
|
23556
23605
|
});
|
|
23606
|
+
var journalSearchUnderstoodSchema = object({
|
|
23607
|
+
words: array(string2()),
|
|
23608
|
+
from: journalDateSchema.nullable(),
|
|
23609
|
+
to: journalDateSchema.nullable(),
|
|
23610
|
+
feeling: _enum2(["low", "high"]).nullable()
|
|
23611
|
+
});
|
|
23557
23612
|
var journalSearchSchema = object({
|
|
23558
23613
|
q: string2(),
|
|
23559
23614
|
timezone: string2().min(1),
|
|
23560
|
-
days: array(journalDayListItemSchema).max(JOURNAL_SEARCH_LIMIT)
|
|
23615
|
+
days: array(journalDayListItemSchema).max(JOURNAL_SEARCH_LIMIT),
|
|
23616
|
+
understood: journalSearchUnderstoodSchema.nullable().default(null)
|
|
23561
23617
|
});
|
|
23562
23618
|
var journalLinkInputSchema = object({
|
|
23563
23619
|
kind: string2().trim().regex(/^[a-z][a-z_]{0,31}$/, "a link kind is a short lowercase word"),
|
|
@@ -27727,7 +27783,7 @@ var createSeatingProposalInputSchema = object({
|
|
|
27727
27783
|
return new Set(ids).size === ids.length;
|
|
27728
27784
|
}, { message: "a guest can sit at one table only", path: ["tables"] });
|
|
27729
27785
|
var seatingProposalsQuerySchema = object({ guestListId: ulidSchema });
|
|
27730
|
-
var GUEST_EXPORT_KINDS = ["caterer", "venue", "floor-plan", "church"];
|
|
27786
|
+
var GUEST_EXPORT_KINDS = ["caterer", "venue", "floor-plan", "church", "answers"];
|
|
27731
27787
|
var guestExportKindSchema = _enum2(GUEST_EXPORT_KINDS);
|
|
27732
27788
|
var thankYouGiftSchema = object({
|
|
27733
27789
|
momentId: ulidSchema,
|
|
@@ -27931,7 +27987,7 @@ var mailCampaignViewSchema = mailCampaignSchema.extend({
|
|
|
27931
27987
|
var RSVP_QUESTION_KINDS = ["choice", "multi", "text", "number", "yes_no"];
|
|
27932
27988
|
var rsvpQuestionKindSchema = _enum2(RSVP_QUESTION_KINDS);
|
|
27933
27989
|
var rsvpQuestionScopeSchema = _enum2(["household", "guest"]);
|
|
27934
|
-
var RSVP_QUESTION_PRESETS = ["diet", "message"];
|
|
27990
|
+
var RSVP_QUESTION_PRESETS = ["diet", "diet_other", "message"];
|
|
27935
27991
|
var rsvpQuestionPresetSchema = _enum2(RSVP_QUESTION_PRESETS);
|
|
27936
27992
|
var RSVP_SHOW_IF_MAX = 5;
|
|
27937
27993
|
var rsvpTextSchema = (max) => object({
|
|
@@ -28020,6 +28076,10 @@ var rsvpAnswersQuerySchema = object({
|
|
|
28020
28076
|
guestListId: ulidSchema,
|
|
28021
28077
|
householdId: ulidSchema.optional()
|
|
28022
28078
|
});
|
|
28079
|
+
var addRsvpPresetsInputSchema = object({
|
|
28080
|
+
guestListId: ulidSchema,
|
|
28081
|
+
presets: array(_enum2(["diet", "message"])).min(1).max(2)
|
|
28082
|
+
}).strict();
|
|
28023
28083
|
|
|
28024
28084
|
// ../../packages/schema/src/contracts/google-contacts.ts
|
|
28025
28085
|
var googleContactsModeSchema = _enum2(["off", "fake", "live"]);
|
|
@@ -29706,7 +29766,7 @@ function parseCapture2(input, now) {
|
|
|
29706
29766
|
|
|
29707
29767
|
// src/meta.ts
|
|
29708
29768
|
var CLI_NAME = "do";
|
|
29709
|
-
var VERSION = "1.
|
|
29769
|
+
var VERSION = "1.300.0";
|
|
29710
29770
|
var API_PREFIX = "/api/v1";
|
|
29711
29771
|
var DEFAULT_API_URL = "http://localhost:3001";
|
|
29712
29772
|
|
|
@@ -31002,6 +31062,21 @@ var HEALTH_COMMAND_SPECS = [
|
|
|
31002
31062
|
scopes: READ,
|
|
31003
31063
|
returns: "HealthSummary"
|
|
31004
31064
|
},
|
|
31065
|
+
{
|
|
31066
|
+
path: ["health", "export"],
|
|
31067
|
+
summary: "Take every health record with you: one FHIR R4 Bundle (JSON) with the documents inline.",
|
|
31068
|
+
args: [],
|
|
31069
|
+
flags: [
|
|
31070
|
+
{
|
|
31071
|
+
name: "no-files",
|
|
31072
|
+
type: "boolean",
|
|
31073
|
+
description: "Leave the documents' bytes out (their DocumentReferences stay)."
|
|
31074
|
+
}
|
|
31075
|
+
],
|
|
31076
|
+
scopes: ["health:export"],
|
|
31077
|
+
returns: "HealthExportBundle",
|
|
31078
|
+
notes: "Streams GET /api/v1/health/export verbatim: redirect it to a file (`do health export > health.json`). The export shows in your Who looked."
|
|
31079
|
+
},
|
|
31005
31080
|
{
|
|
31006
31081
|
path: ["health", "shares"],
|
|
31007
31082
|
summary: "Your For-the-doctor links: sections, expiry, opens; never the secret.",
|
|
@@ -31618,7 +31693,7 @@ var COMMAND_SPECS = [
|
|
|
31618
31693
|
flags: [],
|
|
31619
31694
|
scopes: ["journal:read"],
|
|
31620
31695
|
returns: "JournalSearch",
|
|
31621
|
-
notes: "GET /api/v1/journal/search?q= \u2014
|
|
31696
|
+
notes: "GET /api/v1/journal/search?q= \u2014 your own days only, best match first (at most 30): the words (and a few that mean the same, English and Dutch) in the one-liner, tags, highlights, summary and entries; a date phrase (in March, last week, 14 October, 2026-02) narrows to its window; a heavy or bright question (rough, tired, a great day) adds the days rated 4 or less / 8 or more. `understood` says how it was read. journal:read is a sensitive scope."
|
|
31622
31697
|
},
|
|
31623
31698
|
{
|
|
31624
31699
|
path: ["journal", "recall"],
|
|
@@ -32578,7 +32653,7 @@ var COMMAND_SPECS = [
|
|
|
32578
32653
|
},
|
|
32579
32654
|
{
|
|
32580
32655
|
path: ["metrics", "list"],
|
|
32581
|
-
summary: "Show weight, sleep, mood, the day rating, energy and
|
|
32656
|
+
summary: "Show weight, sleep, mood, the day rating, energy, bedtime, resting heart rate and HRV as daily trend lines (no target, no streak). Resting heart rate and HRV need health:read too.",
|
|
32582
32657
|
args: [],
|
|
32583
32658
|
flags: [{ name: "days", type: "string", description: "How far back, 1\u2013730 (default 90)." }],
|
|
32584
32659
|
scopes: ["habits:read"],
|
|
@@ -32586,7 +32661,7 @@ var COMMAND_SPECS = [
|
|
|
32586
32661
|
},
|
|
32587
32662
|
{
|
|
32588
32663
|
path: ["metrics", "sessions"],
|
|
32589
|
-
summary: "Show workout sessions your connections brought in (Google Fit, Strava), newest first.",
|
|
32664
|
+
summary: "Show workout sessions your connections brought in (Google Fit, Google Health, Strava), newest first.",
|
|
32590
32665
|
args: [],
|
|
32591
32666
|
flags: [{ name: "days", type: "string", description: "How far back, 1\u2013365 (default 14)." }],
|
|
32592
32667
|
scopes: ["habits:read"],
|
|
@@ -32594,9 +32669,13 @@ var COMMAND_SPECS = [
|
|
|
32594
32669
|
},
|
|
32595
32670
|
{
|
|
32596
32671
|
path: ["metrics", "log"],
|
|
32597
|
-
summary: "Log a value: weight (kg), sleep (h), mood (1\u20135), rating (1\u201310), energy (1\u201310)
|
|
32672
|
+
summary: "Log a value: weight (kg), sleep (h), mood (1\u20135), rating (1\u201310), energy (1\u201310), bedtime (HH:MM), resting_hr (bpm) or hrv (ms; these two need health:write).",
|
|
32598
32673
|
args: [
|
|
32599
|
-
{
|
|
32674
|
+
{
|
|
32675
|
+
name: "key",
|
|
32676
|
+
required: true,
|
|
32677
|
+
description: "weight|sleep|mood|rating|energy|bedtime|resting_hr|hrv."
|
|
32678
|
+
},
|
|
32600
32679
|
{
|
|
32601
32680
|
name: "value",
|
|
32602
32681
|
required: true,
|
|
@@ -34727,6 +34806,18 @@ var COMMAND_SPECS = [
|
|
|
34727
34806
|
returns: "{ copied, kept }",
|
|
34728
34807
|
notes: "POST /api/v1/money/budget/copy."
|
|
34729
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
|
+
},
|
|
34730
34821
|
{
|
|
34731
34822
|
path: ["money", "goals"],
|
|
34732
34823
|
summary: "List money goals: what's saved toward each, soonest first.",
|
|
@@ -35205,6 +35296,33 @@ var COMMAND_SPECS = [
|
|
|
35205
35296
|
returns: "SensorSyncResult",
|
|
35206
35297
|
notes: "POST /api/v1/sensors/home-assistant/sync. A room's readings feed its card and the room alarm; an asset's show on its page. Returns entities, written, skipped, missing and the error (unauthorized, unavailable, bad_response). 409 before Home Assistant is linked."
|
|
35207
35298
|
},
|
|
35299
|
+
{
|
|
35300
|
+
path: ["sensors", "unifi"],
|
|
35301
|
+
summary: "Whether the Space has linked UniFi, how many devices are mapped, the newest reading.",
|
|
35302
|
+
args: [],
|
|
35303
|
+
flags: [],
|
|
35304
|
+
scopes: ["places:read"],
|
|
35305
|
+
returns: "UnifiStatus",
|
|
35306
|
+
notes: "GET /api/v1/sensors/unifi. Linking UniFi (address + API key) is a member's, in Settings \u2192 Home; a key never sees the API key."
|
|
35307
|
+
},
|
|
35308
|
+
{
|
|
35309
|
+
path: ["sensors", "unifi-devices"],
|
|
35310
|
+
summary: "Every device and connected client UniFi sees, with the asset each is mapped to.",
|
|
35311
|
+
args: [],
|
|
35312
|
+
flags: [],
|
|
35313
|
+
scopes: ["places:read", "collections:read"],
|
|
35314
|
+
returns: "UnifiDevice[]",
|
|
35315
|
+
notes: "GET /api/v1/sensors/unifi/devices. Map one with `do sensors map <mac> <asset> --reading presence --provider unifi`, or give the asset `external.unifiMac` on its facet. 409 before UniFi is linked."
|
|
35316
|
+
},
|
|
35317
|
+
{
|
|
35318
|
+
path: ["sensors", "unifi-sync"],
|
|
35319
|
+
summary: "Put every mapped device's presence (online/offline, firmware) on its asset now.",
|
|
35320
|
+
args: [],
|
|
35321
|
+
flags: [],
|
|
35322
|
+
scopes: ["places:write"],
|
|
35323
|
+
returns: "SensorSyncResult",
|
|
35324
|
+
notes: "POST /api/v1/sensors/unifi/sync. Assets whose facet names a UniFi MAC are mapped first; readings land as asset.presence on change, else hourly. The worker does the same every five minutes. 409 before UniFi is linked."
|
|
35325
|
+
},
|
|
35208
35326
|
{
|
|
35209
35327
|
path: ["sensors", "links"],
|
|
35210
35328
|
summary: "The mapped entities, or the ones on one Place or asset.",
|
|
@@ -35229,7 +35347,12 @@ var COMMAND_SPECS = [
|
|
|
35229
35347
|
{
|
|
35230
35348
|
name: "reading",
|
|
35231
35349
|
type: "string",
|
|
35232
|
-
description: "A room's temp|humidity|heater|water|door|feeder|light, or an asset's state|power|energy."
|
|
35350
|
+
description: "A room's temp|humidity|heater|water|door|feeder|light, or an asset's state|power|energy|presence."
|
|
35351
|
+
},
|
|
35352
|
+
{
|
|
35353
|
+
name: "provider",
|
|
35354
|
+
type: "string",
|
|
35355
|
+
description: "home_assistant (default) or unifi: a UniFi device by its MAC, onto an asset's presence."
|
|
35233
35356
|
},
|
|
35234
35357
|
{ name: "label", type: "string", description: "A name for it (Home Assistant's own)." }
|
|
35235
35358
|
],
|
|
@@ -35557,6 +35680,20 @@ var COMMAND_SPECS = [
|
|
|
35557
35680
|
scopes: ["contacts:write"],
|
|
35558
35681
|
returns: "GuestView"
|
|
35559
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
|
+
},
|
|
35560
35697
|
{
|
|
35561
35698
|
path: ["rsvp-answers", "list"],
|
|
35562
35699
|
summary: "A guest list's answers to its RSVP questions, or one household's.",
|
|
@@ -35687,13 +35824,13 @@ var COMMAND_SPECS = [
|
|
|
35687
35824
|
},
|
|
35688
35825
|
{
|
|
35689
35826
|
path: ["guest-lists", "export"],
|
|
35690
|
-
summary: "Export for the caterer
|
|
35827
|
+
summary: "Export for the caterer, the venue, the church or the RSVP answers (CSV) to stdout, or save the floor plan (PDF) to a file.",
|
|
35691
35828
|
args: [{ name: "id", required: true, description: "The guest list's id." }],
|
|
35692
35829
|
flags: [
|
|
35693
35830
|
{
|
|
35694
35831
|
name: "kind",
|
|
35695
35832
|
type: "string",
|
|
35696
|
-
description: "caterer (meals and diets per table), venue (who sits where) or floor-plan (PDF)."
|
|
35833
|
+
description: "caterer (meals and diets per table), venue (who sits where), church (who comes to the ceremony), answers (every RSVP answer, a row per guest) or floor-plan (PDF)."
|
|
35697
35834
|
},
|
|
35698
35835
|
{
|
|
35699
35836
|
name: "out",
|
|
@@ -37217,9 +37354,15 @@ function renderJournalDays(data, mode) {
|
|
|
37217
37354
|
}
|
|
37218
37355
|
function renderJournalSearch(data, mode) {
|
|
37219
37356
|
const d = data;
|
|
37220
|
-
|
|
37221
|
-
|
|
37222
|
-
|
|
37357
|
+
const u = d.understood;
|
|
37358
|
+
const read = u && (u.from || u.feeling) ? paint(mode, "dim", `Read as: ${[
|
|
37359
|
+
u.from && u.to ? u.from === u.to ? u.from : `${u.from} \u2013 ${u.to}` : null,
|
|
37360
|
+
...u.words,
|
|
37361
|
+
u.feeling === "low" ? "heavier days" : u.feeling === "high" ? "brighter days" : null
|
|
37362
|
+
].filter(Boolean).join(" \xB7 ")}`) : null;
|
|
37363
|
+
const body = (d.days ?? []).length === 0 ? paint(mode, "dim", "(no journal days mention that)") : renderJournalDays({ days: d.days }, mode);
|
|
37364
|
+
return read ? `${read}
|
|
37365
|
+
${body}` : body;
|
|
37223
37366
|
}
|
|
37224
37367
|
function renderJournalRecall(data, mode) {
|
|
37225
37368
|
const d = data;
|
|
@@ -40313,6 +40456,12 @@ var HANDLERS = {
|
|
|
40313
40456
|
const route = flagBool(flags, "commit") ? "/money/imports" : "/money/imports/preview";
|
|
40314
40457
|
return { data: await requireClient().upload(route, form), render: renderRecord };
|
|
40315
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
|
+
}),
|
|
40316
40465
|
"money budget": async ({ flags, io, requireClient }) => ({
|
|
40317
40466
|
data: await requireClient().get("/money/budget", {
|
|
40318
40467
|
query: {
|
|
@@ -40673,6 +40822,18 @@ var HANDLERS = {
|
|
|
40673
40822
|
data: await requireClient().post("/sensors/home-assistant/sync", {}),
|
|
40674
40823
|
render: renderRecord
|
|
40675
40824
|
}),
|
|
40825
|
+
"sensors unifi": async ({ requireClient }) => ({
|
|
40826
|
+
data: await requireClient().get("/sensors/unifi"),
|
|
40827
|
+
render: renderRecord
|
|
40828
|
+
}),
|
|
40829
|
+
"sensors unifi-devices": async ({ requireClient }) => ({
|
|
40830
|
+
data: await requireClient().get("/sensors/unifi/devices"),
|
|
40831
|
+
render: renderList
|
|
40832
|
+
}),
|
|
40833
|
+
"sensors unifi-sync": async ({ requireClient }) => ({
|
|
40834
|
+
data: await requireClient().post("/sensors/unifi/sync", {}),
|
|
40835
|
+
render: renderRecord
|
|
40836
|
+
}),
|
|
40676
40837
|
"sensors links": async ({ flags, requireClient }) => ({
|
|
40677
40838
|
data: await requireClient().get("/sensors/links", {
|
|
40678
40839
|
query: { nodeId: flagString(flags, "node") }
|
|
@@ -40684,6 +40845,7 @@ var HANDLERS = {
|
|
|
40684
40845
|
externalId: requireArg(args, 0, "entity id"),
|
|
40685
40846
|
nodeId: requireArg(args, 1, "node id"),
|
|
40686
40847
|
reading: flagString(flags, "reading"),
|
|
40848
|
+
...flagString(flags, "provider") ? { provider: flagString(flags, "provider") } : {},
|
|
40687
40849
|
...flagString(flags, "label") ? { label: flagString(flags, "label") } : {}
|
|
40688
40850
|
});
|
|
40689
40851
|
return { data: await requireClient().post("/sensors/links", body), render: renderRecord };
|
|
@@ -40780,6 +40942,12 @@ var HANDLERS = {
|
|
|
40780
40942
|
}),
|
|
40781
40943
|
render: renderRecord
|
|
40782
40944
|
}),
|
|
40945
|
+
"health export": async ({ flags, requireClient }) => {
|
|
40946
|
+
const raw = await requireClient().getText("/health/export", {
|
|
40947
|
+
query: { files: flagBool(flags, "no-files") ? "false" : undefined }
|
|
40948
|
+
});
|
|
40949
|
+
return { raw, data: undefined, render: () => raw };
|
|
40950
|
+
},
|
|
40783
40951
|
"health shares": async ({ requireClient }) => ({
|
|
40784
40952
|
data: await requireClient().getPage("/health/shares"),
|
|
40785
40953
|
render: renderList
|
|
@@ -41179,6 +41347,13 @@ var HANDLERS = {
|
|
|
41179
41347
|
const body = parseInput(markGuestsSentInputSchema, readDataFlag(flags));
|
|
41180
41348
|
return { data: await requireClient().post("/guests/sent", body), render: renderRecord };
|
|
41181
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
|
+
},
|
|
41182
41357
|
"rsvp-answers list": async ({ flags, requireClient }) => {
|
|
41183
41358
|
const list = flagString(flags, "list");
|
|
41184
41359
|
if (!list)
|
package/package.json
CHANGED