@robbeverhelst/do 1.286.0 → 1.288.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 +174 -14
  2. package/package.json +1 -1
package/dist/do.js CHANGED
@@ -3974,7 +3974,8 @@ var notificationType = pgEnum("notification_type", [
3974
3974
  "echo",
3975
3975
  "card",
3976
3976
  "bank_link",
3977
- "import_failed"
3977
+ "import_failed",
3978
+ "animal_ask"
3978
3979
  ]);
3979
3980
  var notificationDomain = pgEnum("notification_domain", [
3980
3981
  "task",
@@ -21288,8 +21289,10 @@ var houseAssetSchema = object({
21288
21289
  trail: array(houseTrailStepSchema),
21289
21290
  parts: array(houseAssetPartSchema),
21290
21291
  linked: array(houseAssetLinkSchema),
21291
- warrantyUntil: day.nullable()
21292
+ warrantyUntil: day.nullable(),
21293
+ visibility: _enum2(NODE_VISIBILITY_VALUES).default("space")
21292
21294
  });
21295
+ var setAssetVisibilityInputSchema = object({ visibility: _enum2(NODE_VISIBILITY_VALUES) }).strict();
21293
21296
  var linkAssetPartInputSchema = object({ inventoryItemId: ulidSchema }).strict();
21294
21297
  var lendAssetInputSchema = object({
21295
21298
  direction: _enum2(["lent", "borrowed"]),
@@ -21594,10 +21597,13 @@ var postRunSchema = object({
21594
21597
  steps: array(runStepSchema).max(12).optional()
21595
21598
  });
21596
21599
  var POST_RECEIPT_ABOUT_VALUES = ["red_flags", "saved"];
21600
+ var POST_RECEIPT_SOURCE_MAX = 80;
21597
21601
  var postReceiptInputSchema = object({
21598
21602
  nodeId: ulidSchema,
21599
21603
  parts: array(ulidSchema).min(1).max(10).optional(),
21600
- about: _enum2(POST_RECEIPT_ABOUT_VALUES).optional()
21604
+ about: _enum2(POST_RECEIPT_ABOUT_VALUES).optional(),
21605
+ source: string2().trim().min(1).max(POST_RECEIPT_SOURCE_MAX).optional(),
21606
+ personNotes: array(ulidSchema).min(1).max(10).optional()
21601
21607
  }).strict();
21602
21608
  var postReceiptPartSchema = object({
21603
21609
  id: string2(),
@@ -21609,7 +21615,8 @@ var postReceiptSchema = object({
21609
21615
  nodeType: string2(),
21610
21616
  parts: array(string2()).optional(),
21611
21617
  partNodes: array(postReceiptPartSchema).optional(),
21612
- about: _enum2(POST_RECEIPT_ABOUT_VALUES).optional()
21618
+ about: _enum2(POST_RECEIPT_ABOUT_VALUES).optional(),
21619
+ source: string2().optional()
21613
21620
  });
21614
21621
  var POST_TITLE_MAX = 200;
21615
21622
  var postTitleSchema = string2().trim().min(1).max(POST_TITLE_MAX);
@@ -23810,15 +23817,30 @@ var recipeUsedInSchema = object({
23810
23817
  eatenAt: exports_coerce.date(),
23811
23818
  mealType: mealLogTypeSchema,
23812
23819
  servings: number2().nullable(),
23813
- alongside: array(string2())
23820
+ alongside: array(string2()),
23821
+ sides: array(object({
23822
+ label: string2(),
23823
+ grams: number2(),
23824
+ kcal: number2(),
23825
+ source: mealItemSourceSchema
23826
+ })).default([]),
23827
+ after: array(object({ kind: _enum2(["tired", "symptom"]), label: string2() })).default([])
23814
23828
  })),
23829
+ eatenCount: number2().int().nonnegative().default(0),
23815
23830
  plans: array(object({
23816
23831
  id: ulidSchema,
23817
23832
  plannedFor: exports_coerce.date(),
23818
23833
  mealType: mealTypeSchema,
23819
23834
  servings: number2().int().nullable()
23820
- }))
23835
+ })),
23836
+ shopping: array(object({
23837
+ listId: ulidSchema,
23838
+ title: string2(),
23839
+ items: number2().int().positive(),
23840
+ addedAt: exports_coerce.date()
23841
+ })).default([])
23821
23842
  });
23843
+ var recipeIngredientMatchInputSchema = object({ foodId: string2().min(1) }).strict();
23822
23844
 
23823
23845
  // ../../packages/schema/src/contracts/meal-plans.ts
23824
23846
  var mealPlanSchema = createSelectSchema(mealPlans, {
@@ -24082,7 +24104,9 @@ var personNoteReceiptItemSchema = object({
24082
24104
  id: ulidSchema,
24083
24105
  kind: string2().nullable(),
24084
24106
  summary: string2(),
24085
- sensitive: boolean3()
24107
+ sensitive: boolean3(),
24108
+ label: string2().nullable().default(null),
24109
+ date: keyDateDaySchema.nullable().default(null)
24086
24110
  });
24087
24111
  var personNoteReceiptSchema = object({
24088
24112
  id: ulidSchema,
@@ -24178,6 +24202,15 @@ var personPrivateNoteSchema = object({
24178
24202
  updatedAt: exports_coerce.date().nullable()
24179
24203
  });
24180
24204
  var putPersonPrivateNoteInputSchema = object({ body: string2().max(20000) }).strict();
24205
+ var eventFollowUpsQuerySchema = object({ eventId: ulidSchema });
24206
+ var eventFollowUpSchema = object({
24207
+ id: ulidSchema,
24208
+ contactId: ulidSchema,
24209
+ title: string2(),
24210
+ label: string2().nullable(),
24211
+ date: keyDateDaySchema,
24212
+ taskId: ulidSchema.nullable()
24213
+ });
24181
24214
 
24182
24215
  // ../../packages/schema/src/contracts/contacts.ts
24183
24216
  var contactKindSchema = _enum2(contactKind.enumValues);
@@ -24826,6 +24859,9 @@ var insuranceFieldsSchema = object({
24826
24859
  deductible: amount4,
24827
24860
  extras: array(text4).max(30),
24828
24861
  claimPhone: phone,
24862
+ claimHours: text4,
24863
+ reportWithinDays: number2().int().min(1).max(365),
24864
+ leakSearchLimit: amount4,
24829
24865
  brokerContactId: ulidSchema,
24830
24866
  renewalDate: keyDateDaySchema,
24831
24867
  exclusionsSummary: longText
@@ -25070,14 +25106,20 @@ var incidentPolicySchema = refSchema.extend({
25070
25106
  broker: refSchema.nullable(),
25071
25107
  claimPhone: string2().nullable(),
25072
25108
  policyNo: string2().nullable(),
25073
- deductible: number2().nullable()
25109
+ deductible: number2().nullable(),
25110
+ claimHours: string2().nullable().default(null),
25111
+ reportWithinDays: number2().nullable().default(null),
25112
+ leakSearchLimit: number2().nullable().default(null),
25113
+ covers: boolean3().default(false),
25114
+ readByAgent: boolean3().default(false)
25074
25115
  });
25075
25116
  var incidentViewSchema = incidentSchema.extend({
25076
25117
  title: string2(),
25077
25118
  visibility: _enum2(NODE_VISIBILITY_VALUES),
25078
25119
  policy: incidentPolicySchema.nullable(),
25079
25120
  place: refSchema.nullable(),
25080
- fileCount: number2().int().nonnegative()
25121
+ fileCount: number2().int().nonnegative(),
25122
+ stepNotes: record(string2(), string2()).default({})
25081
25123
  });
25082
25124
  var createIncidentInputSchema = object({
25083
25125
  id: ulidSchema,
@@ -25690,7 +25732,8 @@ var animalIdsSchema = object({
25690
25732
  passportNoMasked: string2().trim().min(1).max(40).optional(),
25691
25733
  ringNo: string2().trim().min(1).max(40).optional(),
25692
25734
  ringYear: number2().int().min(1900).max(2200).optional(),
25693
- ringIssuer: string2().trim().min(1).max(80).optional()
25735
+ ringIssuer: string2().trim().min(1).max(80).optional(),
25736
+ ringType: _enum2(["open", "closed"]).optional()
25694
25737
  }).strict();
25695
25738
  function isMaskedNumber(value) {
25696
25739
  const shown = value.replace(/[\s*\u2022xX.-]/g, "");
@@ -25980,6 +26023,7 @@ var animalRoomReadingSchema = object({
25980
26023
  unit: string2().nullable(),
25981
26024
  text: string2().nullable(),
25982
26025
  detail: string2().nullish(),
26026
+ device: string2().nullish(),
25983
26027
  at: exports_coerce.date()
25984
26028
  });
25985
26029
  var animalRoomAlertSchema = object({
@@ -26846,6 +26890,28 @@ var mailMessageDataSchema = object({
26846
26890
  pt: mailMessageCopySchema.optional(),
26847
26891
  footer: mailFooterSchema.optional()
26848
26892
  }).strict();
26893
+ var mailDaySchema = object({
26894
+ date: keyDateDaySchema,
26895
+ label: object({
26896
+ nl: string2().trim().min(1).max(120),
26897
+ pt: string2().trim().min(1).max(120).optional()
26898
+ }).strict(),
26899
+ place: string2().trim().min(1).max(200).optional()
26900
+ }).strict();
26901
+ var mailSaveTheDateCopySchema = object({
26902
+ subject: string2().trim().min(1).max(200),
26903
+ heading: string2().trim().min(1).max(200),
26904
+ paragraphs: array(lineSchema).max(20).default([]),
26905
+ button: string2().trim().min(1).max(80)
26906
+ }).strict();
26907
+ var mailSaveTheDateDataSchema = object({
26908
+ nl: mailSaveTheDateCopySchema,
26909
+ pt: mailSaveTheDateCopySchema.optional(),
26910
+ days: array(mailDaySchema).min(1).max(5),
26911
+ calendarTitle: string2().trim().min(1).max(120).optional(),
26912
+ footer: mailFooterSchema.optional()
26913
+ }).strict();
26914
+ var mailSaveTheDateDeliverySchema = object({ link: url().optional() }).strict();
26849
26915
  var mailProviderEventSchema = looseObject({
26850
26916
  type: string2().min(1),
26851
26917
  created_at: string2().optional(),
@@ -26860,10 +26926,11 @@ var mailProviderEventSchema = looseObject({
26860
26926
  });
26861
26927
  var MAIL_CAMPAIGN_KINDS = ["message", "save_the_date", "invitation"];
26862
26928
  var mailCampaignKindSchema = _enum2(MAIL_CAMPAIGN_KINDS);
26863
- var MAIL_TEMPLATES = ["message"];
26929
+ var MAIL_TEMPLATES = ["message", "save_the_date"];
26864
26930
  var mailTemplateSchema = _enum2(MAIL_TEMPLATES);
26865
26931
  var mailTemplateDataSchemas = {
26866
- message: mailMessageDataSchema
26932
+ message: mailMessageDataSchema,
26933
+ save_the_date: mailSaveTheDateDataSchema
26867
26934
  };
26868
26935
  function mailTemplateDataError(template, data) {
26869
26936
  const parsed = mailTemplateDataSchemas[template].safeParse(data);
@@ -26893,7 +26960,8 @@ var mailPreviewSchema = object({
26893
26960
  language: mailLanguageSchema,
26894
26961
  subject: string2(),
26895
26962
  html: string2(),
26896
- text: string2()
26963
+ text: string2(),
26964
+ attachments: array(string2()).default([])
26897
26965
  });
26898
26966
  var mailTestResultSchema = object({ to: array(string2()) });
26899
26967
  var sendMailCampaignInputSchema = object({ households: number2().int().positive() }).strict();
@@ -28618,7 +28686,7 @@ function parseCapture2(input, now) {
28618
28686
 
28619
28687
  // src/meta.ts
28620
28688
  var CLI_NAME = "do";
28621
- var VERSION = "1.286.0";
28689
+ var VERSION = "1.288.0";
28622
28690
  var API_PREFIX = "/api/v1";
28623
28691
  var DEFAULT_API_URL = "http://localhost:3001";
28624
28692
 
@@ -32076,6 +32144,19 @@ var COMMAND_SPECS = [
32076
32144
  returns: "RecipeUsedIn",
32077
32145
  notes: "GET /api/v1/recipes/{id}/used-in. At most five of each; meals need health:read too (without it, plans only)."
32078
32146
  },
32147
+ {
32148
+ path: ["recipes", "match"],
32149
+ summary: "Confirm or swap what a recipe ingredient matched: the reference food it is.",
32150
+ args: [
32151
+ { name: "id", required: true, description: "Recipe ULID." },
32152
+ { name: "ingredient", required: true, description: "The ingredient's id." },
32153
+ { name: "food", required: true, description: "A food id from `do foods search`." }
32154
+ ],
32155
+ flags: [],
32156
+ scopes: ["meals:write"],
32157
+ returns: "RecipeDetail",
32158
+ notes: "PUT /api/v1/recipes/{id}/ingredients/{ingredientId}/match. The ingredient's product becomes that food and the nutrition is worked out again."
32159
+ },
32079
32160
  {
32080
32161
  path: ["agents", "list"],
32081
32162
  summary: "List the Space's Agents (id + name).",
@@ -32289,6 +32370,21 @@ var COMMAND_SPECS = [
32289
32370
  returns: "EchoThreadSummary",
32290
32371
  notes: "For later and Silent posts never push. The home thread and conversations start at all, a standing thread you add at needs_you."
32291
32372
  },
32373
+ {
32374
+ path: ["echo", "threads", "people"],
32375
+ summary: "Switch People capture for one of your agent threads.",
32376
+ args: [
32377
+ { name: "id", required: true, description: "Thread ULID (see `echo threads list`)." },
32378
+ {
32379
+ name: "setting",
32380
+ required: true,
32381
+ description: "on (what you say about someone may go on their person page) or off."
32382
+ }
32383
+ ],
32384
+ flags: [],
32385
+ scopes: ["agents:write"],
32386
+ returns: "EchoThreadSummary"
32387
+ },
32292
32388
  {
32293
32389
  path: ["echo", "briefs"],
32294
32390
  summary: "Show today's briefs from the agent, as Now shows them.",
@@ -33837,6 +33933,30 @@ var COMMAND_SPECS = [
33837
33933
  returns: "PersonNoteReceipt",
33838
33934
  notes: "Name the person by contactId or by person (a name or \"Sam's sister\"); no match is not found, several is a conflict listing the candidates. Items: moment (kind, summary, sensitive), gift_idea (title, url), follow_up (label, date), key_date (birthday|anniversary|other, date). The id is minted when omitted; it's the receipt's id, which `do people undo` takes."
33839
33935
  },
33936
+ {
33937
+ path: ["people", "follow-ups"],
33938
+ summary: "The open follow-ups for the people a calendar event is with.",
33939
+ args: [],
33940
+ flags: [{ name: "event", type: "string", description: "The calendar event's id." }],
33941
+ scopes: ["contacts:read"],
33942
+ returns: "EventFollowUp"
33943
+ },
33944
+ {
33945
+ path: ["people", "receipt"],
33946
+ summary: "Read one person note's receipt again: who it was about and what is still there.",
33947
+ args: [{ name: "id", required: true, description: "The note's (receipt's) id." }],
33948
+ flags: [],
33949
+ scopes: ["contacts:read"],
33950
+ returns: "PersonNoteReceipt"
33951
+ },
33952
+ {
33953
+ path: ["people", "drop-sensitive"],
33954
+ summary: "Don't keep a person note's sensitive detail (its summary goes now).",
33955
+ args: [{ name: "id", required: true, description: "The note's (receipt's) id." }],
33956
+ flags: [],
33957
+ scopes: ["contacts:write"],
33958
+ returns: "PersonNoteReceipt"
33959
+ },
33840
33960
  {
33841
33961
  path: ["people", "undo"],
33842
33962
  summary: "Take back everything one person note wrote.",
@@ -37354,6 +37474,17 @@ var HANDLERS = {
37354
37474
  const id = requireArg(args, 0, "recipe id");
37355
37475
  return { data: await requireClient().get(`/recipes/${id}/used-in`), render: renderRecord };
37356
37476
  },
37477
+ "recipes match": async ({ args, requireClient }) => {
37478
+ const id = requireArg(args, 0, "recipe id");
37479
+ const ingredient = requireArg(args, 1, "ingredient id");
37480
+ const foodId = requireArg(args, 2, "food id");
37481
+ return {
37482
+ data: await requireClient().put(`/recipes/${id}/ingredients/${ingredient}/match`, {
37483
+ foodId
37484
+ }),
37485
+ render: renderRecord
37486
+ };
37487
+ },
37357
37488
  "notes backlinks": async ({ args, requireClient }) => {
37358
37489
  const id = requireArg(args, 0, "note id");
37359
37490
  return {
@@ -37827,6 +37958,18 @@ var HANDLERS = {
37827
37958
  }),
37828
37959
  render: renderRecord
37829
37960
  }),
37961
+ "echo threads people": async ({ args, requireClient }) => {
37962
+ const id = requireArg(args, 0, "thread id");
37963
+ const setting = requireArg(args, 1, "on or off");
37964
+ if (setting !== "on" && setting !== "off")
37965
+ throw usageError("say on or off");
37966
+ return {
37967
+ data: await requireClient().patch(`/echo/threads/${id}`, {
37968
+ peopleCapture: setting === "on"
37969
+ }),
37970
+ render: renderRecord
37971
+ };
37972
+ },
37830
37973
  "echo briefs": async ({ flags, requireClient }) => {
37831
37974
  const since = flagString(flags, "since") ?? startOfToday().toISOString();
37832
37975
  return {
@@ -39072,6 +39215,23 @@ var HANDLERS = {
39072
39215
  const body = parseInput(createPersonNoteInputSchema, { id: ulid3(), ...readDataFlag(flags) });
39073
39216
  return { data: await requireClient().post("/people/notes", body), render: renderRecord };
39074
39217
  },
39218
+ "people follow-ups": async ({ flags, requireClient }) => {
39219
+ const eventId = flagString(flags, "event");
39220
+ if (!eventId)
39221
+ throw usageError("people follow-ups needs --event <calendar event id>");
39222
+ return {
39223
+ data: await requireClient().get("/people/follow-ups", { query: { eventId } }),
39224
+ render: renderRecord
39225
+ };
39226
+ },
39227
+ "people receipt": async ({ args, requireClient }) => ({
39228
+ data: await requireClient().get(`/people/notes/${requireArg(args, 0, "note id")}`),
39229
+ render: renderRecord
39230
+ }),
39231
+ "people drop-sensitive": async ({ args, requireClient }) => ({
39232
+ data: await requireClient().post(`/people/notes/${requireArg(args, 0, "note id")}/drop-sensitive`, {}),
39233
+ render: renderRecord
39234
+ }),
39075
39235
  "people undo": async ({ args, requireClient }) => {
39076
39236
  const id = requireArg(args, 0, "note id");
39077
39237
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robbeverhelst/do",
3
- "version": "1.286.0",
3
+ "version": "1.288.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",