@robbeverhelst/do 1.280.0 → 1.282.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.
Files changed (2) hide show
  1. package/dist/do.js +76 -17
  2. package/package.json +1 -1
package/dist/do.js CHANGED
@@ -20967,7 +20967,8 @@ var medsFacetSchema = object({
20967
20967
  }).strict();
20968
20968
  var feedFacetSchema = object({
20969
20969
  dailyUse: number2().positive().max(1e5).nullish(),
20970
- perHead: boolean3().nullish()
20970
+ perHead: boolean3().nullish(),
20971
+ full: number2().positive().max(1e5).nullish()
20971
20972
  }).strict();
20972
20973
  var facetSchemasByDisplayKind = {
20973
20974
  [PANTRY_DISPLAY_KIND]: pantryFacetSchema,
@@ -22379,7 +22380,10 @@ var journalDayListItemSchema = object({
22379
22380
  metrics: record(string2(), number2()),
22380
22381
  photos: number2().int().nonnegative(),
22381
22382
  entries: number2().int().nonnegative(),
22382
- links: array(journalLinkSchema).max(3)
22383
+ links: array(journalLinkSchema).max(3),
22384
+ source: journalDaySourceSchema.nullable().default(null),
22385
+ landed: number2().int().nonnegative().default(0),
22386
+ habitsDone: number2().int().nonnegative().default(0)
22383
22387
  });
22384
22388
  var journalDayListSchema = object({
22385
22389
  from: journalDateSchema,
@@ -23422,18 +23426,42 @@ var mealLogListQuerySchema = object({ from: exports_coerce.date(), to: exports_c
23422
23426
  message: "ask for at most 92 days"
23423
23427
  });
23424
23428
  var foodDaysQuerySchema = object({ from: civilDate, to: civilDate }).refine((q) => q.from <= q.to, { message: "from must not be after to" });
23429
+ var FOOD_AFTER_MARK_VALUES = ["tired", "symptom"];
23425
23430
  var plannedMealSchema = object({
23426
23431
  id: string2(),
23427
23432
  title: string2(),
23428
23433
  mealType: _enum2(["breakfast", "lunch", "dinner", "snack"]),
23429
23434
  recipeId: string2().nullable(),
23430
- servings: number2().nullable()
23435
+ servings: number2().nullable(),
23436
+ kcalPerServing: number2().nullable(),
23437
+ plannedAt: exports_coerce.date().nullable(),
23438
+ minutesBeforeBed: number2().int().nullable()
23439
+ });
23440
+ var foodDayMarkSchema = object({
23441
+ kind: _enum2(FOOD_AFTER_MARK_VALUES),
23442
+ label: string2(),
23443
+ severity: number2().int().nullable(),
23444
+ minutesAfter: number2().int().nonnegative()
23445
+ });
23446
+ var foodDayMealNoteSchema = object({
23447
+ mealLogId: string2(),
23448
+ byAgent: boolean3(),
23449
+ marks: array(foodDayMarkSchema)
23450
+ });
23451
+ var foodDayIntakeSchema = object({
23452
+ id: string2(),
23453
+ at: exports_coerce.date(),
23454
+ name: string2(),
23455
+ amount: string2().nullable(),
23456
+ note: string2().nullable()
23431
23457
  });
23432
23458
  var foodDayViewSchema = object({
23433
23459
  date: civilDate,
23434
23460
  logs: array(mealLogViewSchema),
23435
23461
  total: foodDaySchema.nullable(),
23436
- planned: array(plannedMealSchema)
23462
+ planned: array(plannedMealSchema),
23463
+ notes: array(foodDayMealNoteSchema),
23464
+ intakes: array(foodDayIntakeSchema)
23437
23465
  });
23438
23466
  var MEAL_PLAN_STATUS_VALUES = ["as_planned", "swapped", "unplanned"];
23439
23467
  var MEAL_AFTER_KIND_VALUES = ["symptom", "episode", "dose", "sleep", "rating"];
@@ -23451,6 +23479,7 @@ var mealAfterEntrySchema = object({
23451
23479
  episodeStarts: boolean3()
23452
23480
  });
23453
23481
  var mealContextSchema = object({
23482
+ byAgent: boolean3(),
23454
23483
  plan: object({
23455
23484
  id: string2(),
23456
23485
  title: string2(),
@@ -23472,7 +23501,6 @@ var mealContextSchema = object({
23472
23501
  }).nullable()
23473
23502
  });
23474
23503
  var foodWeekQuerySchema = object({ start: civilDate.optional() });
23475
- var FOOD_AFTER_MARK_VALUES = ["tired", "symptom"];
23476
23504
  var foodWeekMealSchema = object({
23477
23505
  id: string2(),
23478
23506
  title: string2(),
@@ -24057,7 +24085,9 @@ var peopleOverviewSchema = object({
24057
24085
  contactId: ulidSchema,
24058
24086
  contactTitle: string2(),
24059
24087
  label: string2().nullable(),
24060
- date: keyDateDaySchema
24088
+ date: keyDateDaySchema,
24089
+ taskId: ulidSchema.nullable().default(null),
24090
+ about: object({ summary: string2(), at: exports_coerce.date() }).nullable().default(null)
24061
24091
  })),
24062
24092
  niceToSee: array(object({
24063
24093
  contactId: ulidSchema,
@@ -24641,6 +24671,7 @@ var moneyRecurringViewSchema = moneyRecurringSchema.extend({
24641
24671
  contactName: string2().nullable(),
24642
24672
  categoryName: string2().nullable(),
24643
24673
  documentTitle: string2().nullable(),
24674
+ documentKind: string2().nullable().default(null),
24644
24675
  keyDate: object({ kind: string2(), label: string2().nullable(), nextOn: keyDateDaySchema }).nullable(),
24645
24676
  lastPaid: object({ on: keyDateDaySchema, amount: amount3 }).nullable()
24646
24677
  });
@@ -24669,6 +24700,7 @@ var moneyRecurringOverviewSchema = object({
24669
24700
  streams: array(moneyRecurringViewSchema),
24670
24701
  found: array(moneyRecurringFoundSchema),
24671
24702
  changes: array(moneyRecurringChangeSchema),
24703
+ since: keyDateDaySchema.nullable().default(null),
24672
24704
  summary: object({ yearly: amount3, household: amount3, mine: amount3, business: amount3 })
24673
24705
  });
24674
24706
  var createMoneyRecurringInputSchema = object({
@@ -25779,7 +25811,9 @@ var animalSupplySchema = nodeRefSchema.extend({
25779
25811
  lowStock: boolean3(),
25780
25812
  dailyUse: number2().nullable(),
25781
25813
  perHead: boolean3(),
25782
- daysLeft: number2().int().nullable()
25814
+ daysLeft: number2().int().nullable(),
25815
+ full: number2().nullable(),
25816
+ onList: string2().nullable()
25783
25817
  });
25784
25818
  var animalDayCountSchema = object({ day: string2(), count: number2().int() });
25785
25819
  var animalWeightPointSchema = object({
@@ -25806,7 +25840,10 @@ var animalLinksSchema = object({
25806
25840
  habits: array(animalHabitSchema),
25807
25841
  supplies: array(animalSupplySchema),
25808
25842
  papers: array(animalPaperSchema),
25809
- files: array(animalFileSchema)
25843
+ files: array(animalFileSchema),
25844
+ healthVisits: object({ count: number2().int(), lastAt: exports_coerce.date().nullable() }),
25845
+ assets: array(nodeRefSchema.extend({ location: string2().nullable() })),
25846
+ companions: array(nodeRefSchema)
25810
25847
  });
25811
25848
  var animalPapersCheckSchema = object({
25812
25849
  needed: string2(),
@@ -25884,7 +25921,8 @@ var animalFieldsSchema = object({
25884
25921
  cameFromId: ulidSchema.nullish(),
25885
25922
  habitIds: idList,
25886
25923
  supplyIds: idList,
25887
- paperIds: idList
25924
+ paperIds: idList,
25925
+ assetIds: idList
25888
25926
  });
25889
25927
  var createAnimalInputSchema = animalFieldsSchema.partial().required({ title: true }).extend({ id: ulidSchema }).strict();
25890
25928
  var updateAnimalInputSchema = animalFieldsSchema.partial().strict();
@@ -25925,7 +25963,8 @@ var animalTimelineEntrySchema = object({
25925
25963
  animalId: ulidSchema,
25926
25964
  animalTitle: string2(),
25927
25965
  value: number2().nullable(),
25928
- text: string2().nullable()
25966
+ text: string2().nullable(),
25967
+ byAgent: boolean3().default(false)
25929
25968
  });
25930
25969
  var animalTimelineQuerySchema = object({
25931
25970
  days: exports_coerce.number().int().min(1).max(3650).default(90)
@@ -26494,6 +26533,7 @@ var rsvpLinksQuerySchema = object({ guestListId: ulidSchema });
26494
26533
  var publicRsvpGuestSchema = object({
26495
26534
  id: ulidSchema,
26496
26535
  name: string2(),
26536
+ email: string2().nullable(),
26497
26537
  tiers: array(guestTierSchema),
26498
26538
  rsvp: answersSchema,
26499
26539
  diet: string2().nullable(),
@@ -26515,7 +26555,8 @@ var submitRsvpInputSchema = object({
26515
26555
  id: ulidSchema,
26516
26556
  rsvp: answersSchema,
26517
26557
  diet: string2().trim().max(200).nullish(),
26518
- plusOneName: string2().trim().max(120).nullish()
26558
+ plusOneName: string2().trim().max(120).nullish(),
26559
+ email: string2().trim().email().max(254).nullish()
26519
26560
  }).strict()).min(1).max(30),
26520
26561
  address: householdAddressSchema.nullish()
26521
26562
  }).strict();
@@ -27292,13 +27333,20 @@ var recipeAreaNodeSchema = object({
27292
27333
  icon: string2().min(1).nullish(),
27293
27334
  reviewCadence: reviewCadenceSchema.nullish()
27294
27335
  });
27336
+ var recipeKeyDateSchema = object({
27337
+ label: string2().min(1).max(200),
27338
+ kind: keyDateKindSchema.optional(),
27339
+ offsetDays: number2().int().min(-3650).max(3650),
27340
+ leadDays: number2().int().min(0).max(365).optional()
27341
+ });
27295
27342
  var recipeProjectNodeSchema = object({
27296
27343
  ...recipeNodeBase,
27297
27344
  kind: literal("project"),
27298
27345
  title: string2().min(1),
27299
27346
  status: projectStatusSchema.optional(),
27300
27347
  notes: string2().min(1).nullish(),
27301
- milestones: array(object({ title: string2().min(1) })).optional()
27348
+ milestones: array(object({ title: string2().min(1) })).optional(),
27349
+ keyDates: array(recipeKeyDateSchema).optional()
27302
27350
  });
27303
27351
  var recipeIngredientItemSchema = object({
27304
27352
  name: string2().min(1),
@@ -27368,8 +27416,11 @@ var presetSchema = object({
27368
27416
  category: string2().min(1),
27369
27417
  displayKind: string2().min(1).optional(),
27370
27418
  featured: boolean3().optional(),
27419
+ anchor: object({ label: string2().min(1).max(80) }).optional(),
27371
27420
  recipe: presetRecipeSchema
27372
27421
  });
27422
+ var installPresetInputSchema = object({ on: keyDateDaySchema.optional() }).strict();
27423
+ var installPresetBodySchema = preprocess((v) => v ?? {}, installPresetInputSchema);
27373
27424
  var presetInstallResultSchema = object({
27374
27425
  key: string2().min(1),
27375
27426
  entity: presetEntitySchema,
@@ -28264,7 +28315,7 @@ function parseCapture2(input, now) {
28264
28315
 
28265
28316
  // src/meta.ts
28266
28317
  var CLI_NAME = "do";
28267
- var VERSION = "1.280.0";
28318
+ var VERSION = "1.282.0";
28268
28319
  var API_PREFIX = "/api/v1";
28269
28320
  var DEFAULT_API_URL = "http://localhost:3001";
28270
28321
 
@@ -32050,10 +32101,16 @@ var COMMAND_SPECS = [
32050
32101
  path: ["presets", "install"],
32051
32102
  summary: "Install a preset into the Space; prints the nodes it created.",
32052
32103
  args: [{ name: "key", required: true, description: "Preset catalog key (kebab-case)." }],
32053
- flags: [],
32104
+ flags: [
32105
+ {
32106
+ name: "on",
32107
+ type: "string",
32108
+ description: "The day the preset's key dates count from (YYYY-MM-DD), for a preset that names one (the Wedding: the wedding day)."
32109
+ }
32110
+ ],
32054
32111
  scopes: ["presets:install"],
32055
32112
  returns: "PresetInstallResult",
32056
- notes: "Authors content as the caller, so it needs a key minted while logged in."
32113
+ notes: "Authors content as the caller, so it needs a key minted while logged in. A preset with a day (`anchor` in `presets list`) needs --on, else the API answers 422."
32057
32114
  },
32058
32115
  {
32059
32116
  path: ["collection", "types"],
@@ -36848,9 +36905,11 @@ var HANDLERS = {
36848
36905
  const presets = entity ? catalog.filter((p) => p.entity === entity) : catalog;
36849
36906
  return { data: presets, render: renderPresetList };
36850
36907
  },
36851
- "presets install": async ({ args, requireClient }) => {
36908
+ "presets install": async ({ args, flags, requireClient }) => {
36852
36909
  const key = requireArg(args, 0, "preset key");
36853
- const result = presetInstallResultSchema.parse(await requireClient().post(`/presets/${encodeURIComponent(key)}/install`, undefined));
36910
+ const on = flagString(flags, "on");
36911
+ const body = on === undefined ? undefined : parseInput(installPresetInputSchema, { on });
36912
+ const result = presetInstallResultSchema.parse(await requireClient().post(`/presets/${encodeURIComponent(key)}/install`, body));
36854
36913
  return { data: result, render: renderPresetInstall };
36855
36914
  },
36856
36915
  "collection types": async ({ requireClient }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robbeverhelst/do",
3
- "version": "1.280.0",
3
+ "version": "1.282.0",
4
4
  "private": false,
5
5
  "description": "do — the agent-drivable CLI over the public /api/v1 surface",
6
6
  "homepage": "https://github.com/robbeverhelst/do/tree/main/apps/cli",