@robbeverhelst/do 1.295.0 → 1.297.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 +1715 -843
  2. package/package.json +1 -1
package/dist/do.js CHANGED
@@ -4496,6 +4496,26 @@ var periods = pgTable("periods", {
4496
4496
  index("periods_tenant_starts_idx").on(t.tenantId, t.startsAt)
4497
4497
  ]);
4498
4498
 
4499
+ // ../../packages/schema/src/db/sensors.ts
4500
+ var sensorProvider = pgEnum("sensor_provider", ["home_assistant", "unifi"]);
4501
+ var sensorTarget = pgEnum("sensor_target", ["place", "asset"]);
4502
+ var sensorLinks = pgTable("sensor_links", {
4503
+ id: text("id").primaryKey(),
4504
+ tenantId: text("tenant_id").notNull().references(() => tenants.id),
4505
+ provider: sensorProvider("provider").notNull(),
4506
+ externalId: text("external_id").notNull(),
4507
+ nodeId: text("node_id").notNull().references(() => nodes.id),
4508
+ target: sensorTarget("target").notNull(),
4509
+ reading: text("reading").notNull(),
4510
+ label: text("label"),
4511
+ createdBy: text("created_by").references(() => users.id, { onDelete: "set null" }),
4512
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
4513
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
4514
+ }, (t) => [
4515
+ uniqueIndex("sensor_links_entity_idx").on(t.tenantId, t.provider, t.externalId),
4516
+ index("sensor_links_node_idx").on(t.nodeId)
4517
+ ]);
4518
+
4499
4519
  // ../../packages/schema/src/db/planning-rules.ts
4500
4520
  var planningRuleKind = pgEnum("planning_rule_kind", [
4501
4521
  "fixed_time",
@@ -4579,6 +4599,17 @@ var animals = pgTable("animals", {
4579
4599
  breeding: animalBreeding("breeding").notNull().default("avoid"),
4580
4600
  areaId: text("area_id").references(() => areas.id, { onDelete: "set null" })
4581
4601
  }, (t) => [index("animals_tenant_idx").on(t.tenantId), index("animals_species_idx").on(t.speciesId)]);
4602
+ var animalLostCards = pgTable("animal_lost_cards", {
4603
+ animalId: text("animal_id").primaryKey().references(() => animals.id, { onDelete: "cascade" }),
4604
+ tenantId: text("tenant_id").notNull().references(() => tenants.id),
4605
+ token: text("token").notNull().unique(),
4606
+ photoFileId: text("photo_file_id"),
4607
+ phone: text("phone"),
4608
+ showChipped: boolean("show_chipped").notNull().default(false),
4609
+ note: text("note"),
4610
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
4611
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
4612
+ }, (t) => [index("animal_lost_cards_tenant_idx").on(t.tenantId)]);
4582
4613
 
4583
4614
  // ../../packages/schema/src/db/integrations.ts
4584
4615
  var connectionStatus = pgEnum("connection_status", [
@@ -5221,6 +5252,46 @@ var mailDeliveries = pgTable("mail_deliveries", {
5221
5252
  uniqueIndex("mail_deliveries_campaign_email_uniq").on(t.campaignId, t.toEmail)
5222
5253
  ]);
5223
5254
 
5255
+ // ../../packages/schema/src/db/rsvp-questions.ts
5256
+ var rsvpQuestionKind = pgEnum("rsvp_question_kind", [
5257
+ "choice",
5258
+ "multi",
5259
+ "text",
5260
+ "number",
5261
+ "yes_no"
5262
+ ]);
5263
+ var rsvpQuestionScope = pgEnum("rsvp_question_scope", ["household", "guest"]);
5264
+ var rsvpQuestions = pgTable("rsvp_questions", {
5265
+ id: text("id").primaryKey(),
5266
+ tenantId: text("tenant_id").notNull().references(() => tenants.id),
5267
+ guestListId: text("guest_list_id").notNull().references(() => guestLists.id, { onDelete: "cascade" }),
5268
+ kind: rsvpQuestionKind("kind").notNull(),
5269
+ label: jsonb("label").$type().notNull(),
5270
+ options: jsonb("options").$type().notNull().default([]),
5271
+ scope: rsvpQuestionScope("scope").notNull().default("household"),
5272
+ eventKey: text("event_key"),
5273
+ required: boolean("required").notNull().default(false),
5274
+ sort: integer("sort").notNull().default(0),
5275
+ showIf: jsonb("show_if").$type().notNull().default([]),
5276
+ preset: text("preset"),
5277
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
5278
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
5279
+ }, (t) => [index("rsvp_questions_list_idx").on(t.guestListId)]);
5280
+ var rsvpAnswers = pgTable("rsvp_answers", {
5281
+ id: text("id").primaryKey(),
5282
+ tenantId: text("tenant_id").notNull().references(() => tenants.id),
5283
+ guestListId: text("guest_list_id").notNull().references(() => guestLists.id, { onDelete: "cascade" }),
5284
+ questionId: text("question_id").notNull().references(() => rsvpQuestions.id, { onDelete: "cascade" }),
5285
+ householdId: text("household_id").notNull().references(() => households.id, { onDelete: "cascade" }),
5286
+ guestId: text("guest_id").references(() => guests.id, { onDelete: "cascade" }),
5287
+ value: jsonb("value").$type().notNull(),
5288
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
5289
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
5290
+ }, (t) => [
5291
+ unique("rsvp_answers_uniq").on(t.questionId, t.householdId, t.guestId).nullsNotDistinct(),
5292
+ index("rsvp_answers_list_idx").on(t.guestListId)
5293
+ ]);
5294
+
5224
5295
  // ../../packages/schema/src/db/calendar.ts
5225
5296
  var calendarLinkPurpose = pgEnum("calendar_link_purpose", ["block", "deadline"]);
5226
5297
  var calendarEventLinks = pgTable("calendar_event_links", {
@@ -20590,7 +20661,14 @@ var METRICS = {
20590
20661
  bedtime: { label: "Bedtime", unit: "clock", min: 0, max: 720, step: 5 }
20591
20662
  };
20592
20663
  var metricKeySchema = _enum2(["weight", "sleep", "mood", "rating", "energy", "bedtime"]);
20593
- var metricSourceSchema = _enum2(["manual", "device", "agent", "google_fit"]);
20664
+ var metricSourceSchema = _enum2([
20665
+ "manual",
20666
+ "device",
20667
+ "agent",
20668
+ "google_fit",
20669
+ "google_health",
20670
+ "health_connect"
20671
+ ]);
20594
20672
  var loggedMetricSourceSchema = _enum2(["manual", "device", "agent"]);
20595
20673
  var metricPointSchema = object({
20596
20674
  day: string2(),
@@ -20614,7 +20692,7 @@ var sessionSchema = object({
20614
20692
  sport: string2(),
20615
20693
  name: string2().nullable(),
20616
20694
  minutes: number2().nullable(),
20617
- source: _enum2(["google_fit", "strava"])
20695
+ source: _enum2(["google_fit", "google_health", "strava"])
20618
20696
  });
20619
20697
  var sessionsQuerySchema = object({
20620
20698
  days: exports_coerce.number().int().min(1).max(365).default(14)
@@ -20624,6 +20702,21 @@ var logMetricInputSchema = object({
20624
20702
  occurredAt: exports_coerce.date().optional(),
20625
20703
  source: loggedMetricSourceSchema.optional()
20626
20704
  }).strict();
20705
+ var HEALTH_CONNECT_METRICS = ["weight", "sleep", "bedtime"];
20706
+ var importedMetricPointSchema = object({
20707
+ key: _enum2(HEALTH_CONNECT_METRICS),
20708
+ value: number2().finite(),
20709
+ occurredAt: exports_coerce.date(),
20710
+ recordId: string2().min(1).max(200)
20711
+ }).strict();
20712
+ var importMetricsInputSchema = object({
20713
+ source: literal("health_connect"),
20714
+ points: array(importedMetricPointSchema).min(1).max(500)
20715
+ }).strict();
20716
+ var importMetricsResultSchema = object({
20717
+ imported: number2().int().min(0),
20718
+ skipped: number2().int().min(0)
20719
+ });
20627
20720
  function bedtimeMinutes(clock) {
20628
20721
  const m = /^([01]?\d|2[0-3]):([0-5]\d)$/.exec(clock.trim());
20629
20722
  if (!m)
@@ -21260,136 +21353,923 @@ var assetUpkeepSchema = object({
21260
21353
  repairs: array(taskViewSchema)
21261
21354
  });
21262
21355
 
21263
- // ../../packages/schema/src/contracts/house.ts
21264
- var day = string2().regex(/^\d{4}-\d{2}-\d{2}$/, "must be a calendar day (YYYY-MM-DD)");
21265
- var houseBrokenSchema = object({
21266
- item: collectionItemViewSchema,
21267
- repair: taskViewSchema.nullable()
21356
+ // ../../packages/schema/src/contracts/key-dates.ts
21357
+ var keyDateDaySchema = string2().regex(/^\d{4}-\d{2}-\d{2}$/, "expected YYYY-MM-DD").refine((s) => {
21358
+ const d = new Date(`${s}T00:00:00Z`);
21359
+ return !Number.isNaN(d.getTime()) && d.toISOString().slice(0, 10) === s;
21360
+ }, "not a real date");
21361
+ var keyDateRepeatSchema = _enum2(["yearly"]);
21362
+ var keyDateSchema = createSelectSchema(keyDates, {
21363
+ date: keyDateDaySchema,
21364
+ confirmedAt: exports_coerce.date().nullable(),
21365
+ createdAt: exports_coerce.date(),
21366
+ updatedAt: exports_coerce.date()
21268
21367
  });
21269
- var houseUpkeepSoonSchema = object({
21270
- task: taskViewSchema,
21271
- itemId: string2(),
21272
- itemTitle: string2(),
21273
- nextOn: day.nullable(),
21274
- placeTitle: string2().nullable().default(null),
21275
- lastOn: day.nullable().default(null)
21368
+ var keyDateViewSchema = keyDateSchema.extend({
21369
+ nodeTitle: string2(),
21370
+ nodeType: string2(),
21371
+ repeat: keyDateRepeatSchema.nullable(),
21372
+ nextOn: keyDateDaySchema,
21373
+ task: object({
21374
+ id: ulidSchema,
21375
+ status: string2(),
21376
+ dueAt: exports_coerce.date().nullable(),
21377
+ title: string2().nullable().optional(),
21378
+ area: string2().nullable().optional()
21379
+ }).nullable()
21276
21380
  });
21277
- var housePlaceTileSchema = object({
21278
- id: string2(),
21279
- title: string2(),
21280
- kind: string2(),
21281
- gardenFeatureId: string2().nullable(),
21282
- thingCount: number2().int().min(0)
21381
+ var leadDaysSchema = number2().int().min(0).max(366);
21382
+ var sourceSchema = string2().trim().min(1).max(120);
21383
+ var createKeyDateInputSchema = object({
21384
+ id: ulidSchema,
21385
+ nodeId: ulidSchema,
21386
+ kind: keyDateKindSchema.optional(),
21387
+ label: string2().trim().min(1).max(200).nullish(),
21388
+ date: keyDateDaySchema,
21389
+ yearKnown: boolean3().optional(),
21390
+ repeat: keyDateRepeatSchema.nullish(),
21391
+ leadDays: leadDaysSchema.optional(),
21392
+ derivedFrom: string2().trim().min(1).max(120).nullish(),
21393
+ source: sourceSchema.optional(),
21394
+ confirmed: boolean3().optional()
21395
+ }).strict();
21396
+ var updateKeyDateInputSchema = object({
21397
+ kind: keyDateKindSchema.optional(),
21398
+ label: string2().trim().min(1).max(200).nullish(),
21399
+ date: keyDateDaySchema.optional(),
21400
+ yearKnown: boolean3().optional(),
21401
+ repeat: keyDateRepeatSchema.nullish(),
21402
+ leadDays: leadDaysSchema.optional(),
21403
+ derivedFrom: string2().trim().min(1).max(120).nullish(),
21404
+ source: sourceSchema.optional(),
21405
+ confirmed: boolean3().optional()
21406
+ }).strict();
21407
+ var keyDatesQuerySchema = object({
21408
+ nodeId: ulidSchema.optional(),
21409
+ kind: keyDateKindSchema.optional(),
21410
+ from: keyDateDaySchema.optional(),
21411
+ to: keyDateDaySchema.optional()
21283
21412
  });
21284
- var houseOverviewSchema = object({
21285
- broken: array(houseBrokenSchema),
21286
- upkeepSoon: array(houseUpkeepSoonSchema),
21287
- places: array(housePlaceTileSchema),
21288
- thingCount: number2().int().min(0),
21289
- upkeepCount: number2().int().min(0),
21290
- toolCount: number2().int().min(0),
21291
- animalCount: number2().int().min(0),
21292
- toConfirm: number2().int().min(0).default(0)
21413
+
21414
+ // ../../packages/schema/src/contracts/periods.ts
21415
+ var periodKindSchema = _enum2(periodKind.enumValues);
21416
+ var periodRuleSchema = record(string2(), unknown());
21417
+ var periodSchema = createSelectSchema(periods, {
21418
+ startsAt: exports_coerce.date(),
21419
+ endsAt: exports_coerce.date().nullable(),
21420
+ plannedEndAt: exports_coerce.date().nullable(),
21421
+ rule: periodRuleSchema,
21422
+ createdAt: exports_coerce.date(),
21423
+ updatedAt: exports_coerce.date()
21293
21424
  });
21294
- var upkeepScheduleSchema = object({
21295
- every: number2().int().min(1).max(365),
21296
- unit: _enum2(["day", "week", "month", "year"]),
21297
- startOn: day.optional()
21425
+ var periodViewSchema = periodSchema.extend({
21426
+ nodeTitle: string2(),
21427
+ nodeType: string2(),
21428
+ active: boolean3()
21429
+ });
21430
+ var noteSchema2 = string2().trim().min(1).max(500);
21431
+ function endsAfterStart(p, ctx) {
21432
+ if (!p.startsAt)
21433
+ return;
21434
+ for (const key of ["endsAt", "plannedEndAt"]) {
21435
+ const at = p[key];
21436
+ if (at && at < p.startsAt) {
21437
+ ctx.addIssue({ code: "custom", path: [key], message: `${key} is before startsAt` });
21438
+ }
21439
+ }
21440
+ }
21441
+ var createPeriodInputSchema = object({
21442
+ id: ulidSchema,
21443
+ nodeId: ulidSchema,
21444
+ kind: periodKindSchema.optional(),
21445
+ startsAt: exports_coerce.date(),
21446
+ endsAt: exports_coerce.date().nullish(),
21447
+ plannedEndAt: exports_coerce.date().nullish(),
21448
+ rule: periodRuleSchema.optional(),
21449
+ note: noteSchema2.nullish()
21450
+ }).strict().superRefine(endsAfterStart);
21451
+ var updatePeriodInputSchema = object({
21452
+ kind: periodKindSchema.optional(),
21453
+ startsAt: exports_coerce.date().optional(),
21454
+ endsAt: exports_coerce.date().nullish(),
21455
+ plannedEndAt: exports_coerce.date().nullish(),
21456
+ rule: periodRuleSchema.optional(),
21457
+ note: noteSchema2.nullish()
21458
+ }).strict().superRefine(endsAfterStart);
21459
+ var periodsQuerySchema = object({
21460
+ nodeId: ulidSchema.optional(),
21461
+ kind: periodKindSchema.optional(),
21462
+ active: _enum2(["true", "false"]).transform((v) => v === "true").optional()
21463
+ });
21464
+
21465
+ // ../../packages/schema/src/contracts/animals.ts
21466
+ var animalFormSchema = _enum2(animalForm.enumValues);
21467
+ var animalStatusSchema = _enum2(animalStatus.enumValues);
21468
+ var animalAcquiredHowSchema = _enum2(animalAcquiredHow.enumValues);
21469
+ var animalSexSchema = _enum2(animalSex.enumValues);
21470
+ var animalBreedingSchema = _enum2(animalBreeding.enumValues);
21471
+ var animalClassSchema = _enum2(animalClass.enumValues);
21472
+ var animalLegalSchema = _enum2(animalLegal.enumValues);
21473
+ var animalBornOnSchema = string2().regex(/^\d{4}(-(0[1-9]|1[0-2])(-(0[1-9]|[12]\d|3[01]))?)?$/, "expected YYYY, YYYY-MM or YYYY-MM-DD");
21474
+ var animalIdsSchema = object({
21475
+ chipNoMasked: string2().trim().min(1).max(40).optional(),
21476
+ passportNoMasked: string2().trim().min(1).max(40).optional(),
21477
+ ringNo: string2().trim().min(1).max(40).optional(),
21478
+ ringYear: number2().int().min(1900).max(2200).optional(),
21479
+ ringIssuer: string2().trim().min(1).max(80).optional(),
21480
+ ringType: _enum2(["open", "closed"]).optional()
21298
21481
  }).strict();
21299
- var setAssetUpkeepInputSchema = object({
21300
- title: string2().trim().min(1).max(200),
21301
- schedule: upkeepScheduleSchema,
21302
- placeId: ulidSchema.nullish(),
21303
- areaId: ulidSchema.nullish(),
21304
- nextStep: string2().trim().max(500).nullish()
21482
+ function isMaskedNumber(value) {
21483
+ const shown = value.replace(/[\s*\u2022xX.-]/g, "");
21484
+ return shown.length <= 4 && shown.length < value.replace(/\s/g, "").length;
21485
+ }
21486
+ var maskedIdsSchema = animalIdsSchema.superRefine((ids, ctx) => {
21487
+ for (const key of ["chipNoMasked", "passportNoMasked"]) {
21488
+ const v = ids[key];
21489
+ if (v && !isMaskedNumber(v)) {
21490
+ ctx.addIssue({
21491
+ code: "custom",
21492
+ path: [key],
21493
+ message: "mask all but the last four characters (e.g. ***********1234)"
21494
+ });
21495
+ }
21496
+ }
21497
+ });
21498
+ var animalScheduleStepSchema = object({
21499
+ key: string2().trim().min(1).max(40),
21500
+ label: string2().trim().min(1).max(120),
21501
+ everyMonths: number2().int().min(1).max(120)
21305
21502
  }).strict();
21306
- var fileAssetInputSchema = object({
21307
- id: ulidSchema.optional(),
21308
- title: string2().trim().min(1).max(200),
21309
- placeId: ulidSchema.nullish(),
21310
- areaId: ulidSchema.nullish(),
21311
- status: _enum2(["want", "have"]).optional(),
21312
- facet: record(string2(), unknown()).optional(),
21313
- tags: array(string2().min(1).max(60)).max(20).optional(),
21314
- fileIds: array(ulidSchema).max(20).optional(),
21315
- match: boolean3().default(true),
21316
- upkeep: setAssetUpkeepInputSchema.optional(),
21317
- fault: object({
21318
- note: string2().trim().min(1).max(2000),
21319
- repairTitle: string2().trim().min(1).max(200).optional()
21320
- }).strict().optional()
21503
+ var animalSpeciesSchema = createSelectSchema(animalSpecies, {
21504
+ incompatibleWith: array(string2()),
21505
+ defaultSchedule: array(animalScheduleStepSchema),
21506
+ createdAt: exports_coerce.date()
21507
+ });
21508
+ var speciesKeySchema = string2().regex(/^[a-z][a-z0-9_]{1,39}$/, "a lowercase slug, e.g. hermann_tortoise");
21509
+ var createAnimalSpeciesInputSchema = object({
21510
+ id: ulidSchema,
21511
+ key: speciesKeySchema,
21512
+ commonName: string2().trim().min(1).max(120),
21513
+ commonNameNl: string2().trim().min(1).max(120).nullish(),
21514
+ latin: string2().trim().min(1).max(120).nullish(),
21515
+ class: animalClassSchema.optional(),
21516
+ legal: animalLegalSchema.optional(),
21517
+ hibernates: boolean3().optional(),
21518
+ defaultForm: animalFormSchema.optional(),
21519
+ minGroupSize: number2().int().min(1).max(1000).nullish(),
21520
+ incompatibleWith: array(speciesKeySchema).max(20).optional(),
21521
+ defaultSchedule: array(animalScheduleStepSchema).max(20).optional(),
21522
+ careSheetMd: string2().trim().min(1).max(20000).nullish()
21321
21523
  }).strict();
21322
- var houseReceiptSchema = object({
21323
- itemId: string2(),
21324
- created: boolean3(),
21325
- before: object({
21326
- facet: record(string2(), unknown()).nullable(),
21327
- placeId: string2().nullable(),
21328
- status: string2()
21329
- }).nullable(),
21330
- taskIds: array(string2()),
21331
- entryIds: array(string2()),
21332
- files: array(object({ id: string2(), previousOwnerId: string2().nullable() }))
21524
+ var updateAnimalSpeciesInputSchema = createAnimalSpeciesInputSchema.omit({ id: true, key: true }).partial().strict();
21525
+ var DEWORM = {
21526
+ key: "deworm",
21527
+ label: "Deworm",
21528
+ everyMonths: 3
21529
+ };
21530
+ var BOOSTER = { key: "booster", label: "Yearly booster", everyMonths: 12 };
21531
+ var NATIVE_FINCH = {
21532
+ class: "bird",
21533
+ legal: "native_closed_ring"
21534
+ };
21535
+ var EXOTIC_FINCH = {
21536
+ class: "bird",
21537
+ legal: "none",
21538
+ defaultForm: "group",
21539
+ minGroupSize: 2
21540
+ };
21541
+ var ANIMAL_SPECIES_SEED = [
21542
+ {
21543
+ key: "dog",
21544
+ commonName: "Dog",
21545
+ commonNameNl: "Hond",
21546
+ latin: "Canis familiaris",
21547
+ class: "mammal",
21548
+ legal: "dog_id",
21549
+ defaultSchedule: [DEWORM, BOOSTER]
21550
+ },
21551
+ {
21552
+ key: "cat",
21553
+ commonName: "Cat",
21554
+ commonNameNl: "Kat",
21555
+ latin: "Felis catus",
21556
+ class: "mammal",
21557
+ legal: "cat_id",
21558
+ defaultSchedule: [DEWORM, BOOSTER]
21559
+ },
21560
+ {
21561
+ key: "chicken",
21562
+ commonName: "Chicken",
21563
+ commonNameNl: "Kip",
21564
+ latin: "Gallus gallus domesticus",
21565
+ class: "bird",
21566
+ defaultForm: "group",
21567
+ minGroupSize: 3,
21568
+ defaultSchedule: [
21569
+ { key: "mite_check", label: "Mite check", everyMonths: 1 },
21570
+ { key: "deworm", label: "Deworm", everyMonths: 6 }
21571
+ ]
21572
+ },
21573
+ {
21574
+ key: "duck",
21575
+ commonName: "Duck",
21576
+ commonNameNl: "Eend",
21577
+ latin: "Anas platyrhynchos domesticus",
21578
+ class: "bird",
21579
+ defaultForm: "group",
21580
+ minGroupSize: 2
21581
+ },
21582
+ {
21583
+ key: "quail",
21584
+ commonName: "Quail",
21585
+ commonNameNl: "Kwartel",
21586
+ latin: "Coturnix japonica",
21587
+ class: "bird",
21588
+ defaultForm: "group",
21589
+ minGroupSize: 3
21590
+ },
21591
+ {
21592
+ key: "hermann_tortoise",
21593
+ commonName: "Hermann's tortoise",
21594
+ commonNameNl: "Griekse landschildpad",
21595
+ latin: "Testudo hermanni",
21596
+ class: "reptile",
21597
+ legal: "cites_a",
21598
+ hibernates: true,
21599
+ defaultSchedule: [{ key: "health_check", label: "Health check", everyMonths: 12 }]
21600
+ },
21601
+ {
21602
+ key: "zebra_finch",
21603
+ commonName: "Zebra finch",
21604
+ commonNameNl: "Zebravink",
21605
+ latin: "Taeniopygia guttata",
21606
+ ...EXOTIC_FINCH
21607
+ },
21608
+ {
21609
+ key: "bengalese_finch",
21610
+ commonName: "Bengalese finch",
21611
+ commonNameNl: "Japans meeuwtje",
21612
+ latin: "Lonchura striata domestica",
21613
+ ...EXOTIC_FINCH
21614
+ },
21615
+ {
21616
+ key: "star_finch",
21617
+ commonName: "Star finch",
21618
+ commonNameNl: "Binsenastrild",
21619
+ latin: "Bathilda ruficauda",
21620
+ ...EXOTIC_FINCH
21621
+ },
21622
+ {
21623
+ key: "diamond_dove",
21624
+ commonName: "Diamond dove",
21625
+ commonNameNl: "Diamantduif",
21626
+ latin: "Geopelia cuneata",
21627
+ ...EXOTIC_FINCH
21628
+ },
21629
+ {
21630
+ key: "bullfinch",
21631
+ commonName: "Eurasian bullfinch",
21632
+ commonNameNl: "Goudvink",
21633
+ latin: "Pyrrhula pyrrhula",
21634
+ ...NATIVE_FINCH
21635
+ },
21636
+ {
21637
+ key: "bearded_reedling",
21638
+ commonName: "Bearded reedling",
21639
+ commonNameNl: "Baardmannetje",
21640
+ latin: "Panurus biarmicus",
21641
+ ...NATIVE_FINCH
21642
+ },
21643
+ {
21644
+ key: "siskin",
21645
+ commonName: "Eurasian siskin",
21646
+ commonNameNl: "Sijs",
21647
+ latin: "Spinus spinus",
21648
+ ...NATIVE_FINCH
21649
+ },
21650
+ {
21651
+ key: "goldfinch",
21652
+ commonName: "European goldfinch",
21653
+ commonNameNl: "Putter",
21654
+ latin: "Carduelis carduelis",
21655
+ ...NATIVE_FINCH
21656
+ },
21657
+ {
21658
+ key: "linnet",
21659
+ commonName: "Common linnet",
21660
+ commonNameNl: "Kneu",
21661
+ latin: "Linaria cannabina",
21662
+ ...NATIVE_FINCH
21663
+ },
21664
+ {
21665
+ key: "rabbit",
21666
+ commonName: "Rabbit",
21667
+ commonNameNl: "Konijn",
21668
+ latin: "Oryctolagus cuniculus",
21669
+ class: "mammal",
21670
+ defaultForm: "group",
21671
+ minGroupSize: 2,
21672
+ incompatibleWith: ["guinea_pig"],
21673
+ defaultSchedule: [{ key: "vaccine", label: "Myxo/RHD vaccine", everyMonths: 12 }]
21674
+ },
21675
+ {
21676
+ key: "guinea_pig",
21677
+ commonName: "Guinea pig",
21678
+ commonNameNl: "Cavia",
21679
+ latin: "Cavia porcellus",
21680
+ class: "mammal",
21681
+ defaultForm: "group",
21682
+ minGroupSize: 2,
21683
+ incompatibleWith: ["rabbit"]
21684
+ }
21685
+ ];
21686
+ var animalSchema = createSelectSchema(animals, {
21687
+ ids: animalIdsSchema
21333
21688
  });
21334
- var houseWriteResultSchema = object({
21335
- item: collectionItemDetailSchema,
21336
- receipt: houseReceiptSchema
21689
+ var animalSpeciesRefSchema = object({
21690
+ id: ulidSchema,
21691
+ key: string2(),
21692
+ commonName: string2(),
21693
+ latin: string2().nullable(),
21694
+ class: animalClassSchema,
21695
+ legal: animalLegalSchema,
21696
+ hibernates: boolean3()
21337
21697
  });
21338
- var undoHouseWriteInputSchema = houseReceiptSchema.strict();
21339
- var houseTrailStepSchema = object({ id: string2(), title: string2() });
21340
- var houseAssetPartSchema = object({
21341
- id: string2(),
21698
+ var animalViewSchema = animalSchema.extend({
21342
21699
  title: string2(),
21700
+ parentId: ulidSchema.nullable(),
21701
+ species: animalSpeciesRefSchema.nullable(),
21702
+ memberCount: number2().int(),
21703
+ heads: number2().int(),
21704
+ createdAt: exports_coerce.date(),
21705
+ updatedAt: exports_coerce.date()
21706
+ });
21707
+ var nodeRefSchema = object({ id: ulidSchema, title: string2() });
21708
+ var animalHabitSchema = nodeRefSchema.extend({ doneToday: boolean3() });
21709
+ var animalSupplySchema = nodeRefSchema.extend({
21343
21710
  quantity: number2(),
21344
21711
  unit: string2().nullable(),
21345
- lowStockThreshold: number2().nullable()
21712
+ lowStock: boolean3(),
21713
+ dailyUse: number2().nullable(),
21714
+ perHead: boolean3(),
21715
+ daysLeft: number2().int().nullable(),
21716
+ full: number2().nullable(),
21717
+ onList: string2().nullable()
21346
21718
  });
21347
- var houseAssetLinkSchema = object({
21348
- nodeId: string2(),
21349
- title: string2(),
21350
- type: string2(),
21351
- kind: string2(),
21352
- direction: _enum2(["in", "out"]),
21353
- label: string2().nullable().default(null),
21354
- context: string2().nullable().default(null),
21355
- at: exports_coerce.date().nullable().default(null),
21356
- timed: boolean3().default(false)
21719
+ var animalDayCountSchema = object({ day: string2(), count: number2().int() });
21720
+ var animalWeightPointSchema = object({
21721
+ day: string2(),
21722
+ grams: number2(),
21723
+ at: exports_coerce.date()
21357
21724
  });
21358
- var houseAssetSchema = object({
21359
- item: collectionItemDetailSchema,
21360
- trail: array(houseTrailStepSchema),
21361
- parts: array(houseAssetPartSchema),
21362
- linked: array(houseAssetLinkSchema),
21363
- warrantyUntil: day.nullable(),
21364
- visibility: _enum2(NODE_VISIBILITY_VALUES).default("space")
21725
+ var animalFileSchema = object({
21726
+ id: ulidSchema,
21727
+ name: string2(),
21728
+ mime: string2(),
21729
+ size: number2().int(),
21730
+ createdAt: exports_coerce.date()
21365
21731
  });
21366
- var setAssetVisibilityInputSchema = object({ visibility: _enum2(NODE_VISIBILITY_VALUES) }).strict();
21367
- var linkAssetPartInputSchema = object({ inventoryItemId: ulidSchema }).strict();
21368
- var lendAssetInputSchema = object({
21369
- direction: _enum2(["lent", "borrowed"]),
21370
- who: string2().trim().min(1).max(200),
21371
- contactId: ulidSchema.nullish(),
21372
- since: day.optional(),
21373
- dueBack: day.nullish(),
21374
- note: string2().trim().max(500).nullish()
21375
- }).strict();
21376
- var returnAssetInputSchema = object({
21377
- on: day.optional(),
21378
- note: string2().trim().max(500).nullish()
21379
- }).strict();
21380
- var houseValueProofSchema = _enum2(["receipt_photo", "receipt", "photo", "none"]);
21381
- var houseValueRowSchema = object({
21382
- id: string2(),
21383
- title: string2(),
21384
- model: string2().nullable(),
21385
- placeId: string2().nullable(),
21386
- placeTitle: string2().nullable(),
21387
- placeGroup: string2().nullable().default(null),
21388
- withHouse: boolean3().default(false),
21389
- paidApprox: boolean3().default(false),
21390
- borrowedFrom: string2().nullable().default(null),
21391
- bought: day.nullable(),
21392
- paid: number2().nullable(),
21732
+ var animalVetSchema = nodeRefSchema.extend({ role: string2().nullable() });
21733
+ var animalPaperSchema = nodeRefSchema.extend({
21734
+ status: _enum2(documentStatus.enumValues),
21735
+ reference: string2().nullable()
21736
+ });
21737
+ var animalLinksSchema = object({
21738
+ place: nodeRefSchema.nullable(),
21739
+ vets: array(animalVetSchema),
21740
+ cameFrom: nodeRefSchema.nullable(),
21741
+ habits: array(animalHabitSchema),
21742
+ supplies: array(animalSupplySchema),
21743
+ papers: array(animalPaperSchema),
21744
+ files: array(animalFileSchema),
21745
+ healthVisits: object({ count: number2().int(), lastAt: exports_coerce.date().nullable() }),
21746
+ assets: array(nodeRefSchema.extend({ location: string2().nullable() })),
21747
+ companions: array(nodeRefSchema)
21748
+ });
21749
+ var animalPapersCheckSchema = object({
21750
+ needed: string2(),
21751
+ onFile: boolean3()
21752
+ });
21753
+ var animalMemberSchema = animalViewSchema.extend({
21754
+ papersCheck: animalPapersCheckSchema.nullable()
21755
+ });
21756
+ var SHED_READING_TYPES = {
21757
+ temp: "shed.temp",
21758
+ humidity: "shed.humidity",
21759
+ heater: "shed.heater",
21760
+ water: "shed.water_pct",
21761
+ door: "shed.door",
21762
+ feeder: "shed.feed_kg",
21763
+ light: "shed.light"
21764
+ };
21765
+ var animalRoomReadingSchema = object({
21766
+ kind: _enum2(Object.keys(SHED_READING_TYPES)),
21767
+ value: number2().nullable(),
21768
+ unit: string2().nullable(),
21769
+ text: string2().nullable(),
21770
+ detail: string2().nullish(),
21771
+ device: string2().nullish(),
21772
+ at: exports_coerce.date()
21773
+ });
21774
+ var animalRoomAlertSchema = object({
21775
+ id: string2(),
21776
+ at: exports_coerce.date(),
21777
+ text: string2(),
21778
+ detail: string2().nullable(),
21779
+ source: _enum2(["camera", "power", "other"])
21780
+ });
21781
+ var animalRoomSchema = object({
21782
+ place: nodeRefSchema,
21783
+ readings: array(animalRoomReadingSchema),
21784
+ temperature24h: array(object({ at: exports_coerce.date(), value: number2() })),
21785
+ alerts: array(animalRoomAlertSchema)
21786
+ });
21787
+ var animalDetailSchema = animalViewSchema.extend({
21788
+ group: nodeRefSchema.nullable(),
21789
+ members: array(animalMemberSchema),
21790
+ links: animalLinksSchema,
21791
+ weights: array(animalWeightPointSchema),
21792
+ latestLength: object({ mm: number2(), at: exports_coerce.date() }).nullable(),
21793
+ eggs: array(animalDayCountSchema),
21794
+ periods: array(periodViewSchema),
21795
+ keyDates: array(keyDateViewSchema),
21796
+ papersCheck: animalPapersCheckSchema.nullable(),
21797
+ room: animalRoomSchema.nullable()
21798
+ });
21799
+ var titleSchema = string2().trim().min(1).max(120);
21800
+ var shortText = (max) => string2().trim().min(1).max(max);
21801
+ var idList = array(ulidSchema).max(20);
21802
+ var animalFieldsSchema = object({
21803
+ title: titleSchema,
21804
+ form: animalFormSchema,
21805
+ speciesId: ulidSchema.nullish(),
21806
+ speciesKey: speciesKeySchema,
21807
+ breed: shortText(120).nullish(),
21808
+ sex: animalSexSchema.nullish(),
21809
+ bornOn: animalBornOnSchema.nullish(),
21810
+ bornApprox: boolean3(),
21811
+ acquiredOn: keyDateDaySchema.nullish(),
21812
+ acquiredHow: animalAcquiredHowSchema.nullish(),
21813
+ status: animalStatusSchema,
21814
+ endedOn: keyDateDaySchema.nullish(),
21815
+ endNote: shortText(500).nullish(),
21816
+ headCount: number2().int().min(0).max(1e4).nullish(),
21817
+ ids: maskedIdsSchema,
21818
+ markings: shortText(200).nullish(),
21819
+ breeding: animalBreedingSchema,
21820
+ groupId: ulidSchema.nullish(),
21821
+ areaId: ulidSchema.nullish(),
21822
+ placeId: ulidSchema.nullish(),
21823
+ vetIds: idList,
21824
+ cameFromId: ulidSchema.nullish(),
21825
+ habitIds: idList,
21826
+ supplyIds: idList,
21827
+ paperIds: idList,
21828
+ assetIds: idList
21829
+ });
21830
+ var createAnimalInputSchema = animalFieldsSchema.partial().required({ title: true }).extend({ id: ulidSchema }).strict();
21831
+ var updateAnimalInputSchema = animalFieldsSchema.partial().strict();
21832
+ var animalsQuerySchema = object({
21833
+ status: animalStatusSchema.optional(),
21834
+ form: animalFormSchema.optional(),
21835
+ groupId: ulidSchema.optional(),
21836
+ includeEnded: _enum2(["true", "false"]).transform((v) => v === "true").optional()
21837
+ });
21838
+ var occurredAtSchema = exports_coerce.date().optional();
21839
+ var animalLogInputSchema = discriminatedUnion("kind", [
21840
+ object({
21841
+ kind: literal("weight"),
21842
+ value: number2().positive().max(200000),
21843
+ unit: _enum2(["g", "kg"]).default("g"),
21844
+ occurredAt: occurredAtSchema
21845
+ }).strict(),
21846
+ object({
21847
+ kind: literal("length"),
21848
+ value: number2().positive().max(5000),
21849
+ occurredAt: occurredAtSchema
21850
+ }).strict(),
21851
+ object({
21852
+ kind: literal("eggs"),
21853
+ count: number2().int().min(0).max(500),
21854
+ occurredAt: occurredAtSchema
21855
+ }).strict(),
21856
+ object({
21857
+ kind: literal("note"),
21858
+ text: string2().trim().min(1).max(1000),
21859
+ occurredAt: occurredAtSchema
21860
+ }).strict()
21861
+ ]);
21862
+ var animalVetVisitSourceSchema = _enum2(["sticker", "photo", "said"]);
21863
+ var visitTextSchema = string2().trim().min(1).max(120);
21864
+ var visitCostSchema = object({
21865
+ amount: number2().positive().max(1e5),
21866
+ currency: string2().trim().length(3).default("EUR")
21867
+ }).strict();
21868
+ var animalVetVisitInputSchema = object({
21869
+ id: ulidSchema,
21870
+ at: exports_coerce.date().optional(),
21871
+ vetContactId: ulidSchema.optional(),
21872
+ clinician: visitTextSchema.optional(),
21873
+ reason: visitTextSchema.optional(),
21874
+ vaccine: object({ name: visitTextSchema, source: animalVetVisitSourceSchema.optional() }).strict().optional(),
21875
+ dewormer: visitTextSchema.optional(),
21876
+ weight: object({
21877
+ value: number2().positive().max(200000),
21878
+ unit: _enum2(["g", "kg"]).default("kg")
21879
+ }).strict().optional(),
21880
+ nextDates: array(object({
21881
+ id: ulidSchema,
21882
+ label: visitTextSchema,
21883
+ date: string2().regex(/^\d{4}-\d{2}-\d{2}$/, "expected YYYY-MM-DD")
21884
+ }).strict()).max(5).default([]),
21885
+ files: array(object({ id: ulidSchema, name: visitTextSchema.optional() }).strict()).max(5).default([]),
21886
+ cost: visitCostSchema.optional()
21887
+ }).strict();
21888
+ var animalVetVisitPatchSchema = object({
21889
+ vetContactId: ulidSchema.nullable().optional(),
21890
+ clinician: visitTextSchema.nullable().optional(),
21891
+ reason: visitTextSchema.nullable().optional(),
21892
+ vaccine: object({ name: visitTextSchema, source: animalVetVisitSourceSchema.optional() }).strict().nullable().optional(),
21893
+ dewormer: visitTextSchema.nullable().optional(),
21894
+ cost: visitCostSchema.nullable().optional()
21895
+ }).strict().refine((v) => Object.keys(v).length > 0, { message: "Change at least one field." });
21896
+ var animalVetVisitSchema = object({
21897
+ id: ulidSchema,
21898
+ animal: object({
21899
+ id: ulidSchema,
21900
+ title: string2(),
21901
+ speciesKey: string2().nullable(),
21902
+ speciesClass: animalClassSchema.nullable()
21903
+ }),
21904
+ at: exports_coerce.date(),
21905
+ vet: nodeRefSchema.nullable(),
21906
+ clinician: string2().nullable(),
21907
+ reason: string2().nullable(),
21908
+ vaccine: object({ name: string2(), source: animalVetVisitSourceSchema.nullable() }).nullable(),
21909
+ dewormer: string2().nullable(),
21910
+ weight: object({
21911
+ grams: number2(),
21912
+ deltaGrams: number2().nullable(),
21913
+ since: string2().nullable()
21914
+ }).nullable(),
21915
+ keyDates: array(object({ id: string2(), label: string2(), date: string2() })),
21916
+ files: array(object({ id: string2(), name: string2() })),
21917
+ cost: object({ amount: number2(), currency: string2() }).nullable(),
21918
+ byAgent: boolean3(),
21919
+ undone: boolean3()
21920
+ });
21921
+ var animalTimelineEntrySchema = object({
21922
+ id: string2(),
21923
+ at: exports_coerce.date(),
21924
+ kind: _enum2([
21925
+ "weight",
21926
+ "length",
21927
+ "eggs",
21928
+ "note",
21929
+ "vet_visit",
21930
+ "period_started",
21931
+ "period_ended",
21932
+ "key_date"
21933
+ ]),
21934
+ animalId: ulidSchema,
21935
+ animalTitle: string2(),
21936
+ value: number2().nullable(),
21937
+ text: string2().nullable(),
21938
+ byAgent: boolean3().default(false)
21939
+ });
21940
+ var animalTimelineQuerySchema = object({
21941
+ days: exports_coerce.number().int().min(1).max(3650).default(90)
21942
+ });
21943
+ var animalEggsTodaySchema = object({
21944
+ animalId: ulidSchema,
21945
+ title: string2(),
21946
+ today: number2().int(),
21947
+ heads: number2().int(),
21948
+ last7: array(animalDayCountSchema)
21949
+ });
21950
+ var animalsOverviewSchema = object({
21951
+ animals: array(animalViewSchema),
21952
+ today: object({
21953
+ day: string2(),
21954
+ eggs: array(animalEggsTodaySchema),
21955
+ supplies: array(animalSupplySchema),
21956
+ habits: array(animalHabitSchema)
21957
+ }),
21958
+ comingUp: array(keyDateViewSchema.extend({ vet: string2().nullable() })),
21959
+ periods: array(periodViewSchema)
21960
+ });
21961
+ var animalHolidayModeSchema = object({
21962
+ popHole: boolean3(),
21963
+ heater: boolean3(),
21964
+ alerts: boolean3(),
21965
+ dailyPhoto: boolean3(),
21966
+ feedReorder: boolean3()
21967
+ });
21968
+ var animalHandoverRuleSchema = object({
21969
+ sitter: string2().trim().min(1).max(120).optional(),
21970
+ houseNote: string2().trim().min(1).max(300).optional(),
21971
+ holidayMode: animalHolidayModeSchema.partial().optional(),
21972
+ share: object({ tokenHash: string2(), until: string2() }).optional(),
21973
+ agentNote: string2().trim().min(1).max(500).optional()
21974
+ }).passthrough();
21975
+ var animalHandoverQuerySchema = object({ periodId: ulidSchema.optional() });
21976
+ var animalHandoverTripSchema = object({
21977
+ periodId: ulidSchema.nullable(),
21978
+ title: string2(),
21979
+ from: string2(),
21980
+ to: string2(),
21981
+ sitter: string2().nullable(),
21982
+ houseNote: string2().nullable(),
21983
+ holidayMode: animalHolidayModeSchema,
21984
+ sharedUntil: string2().nullable(),
21985
+ agentNote: string2().nullable(),
21986
+ calendar: string2().nullable()
21987
+ });
21988
+ var animalHandoverAnimalSchema = object({
21989
+ id: ulidSchema,
21990
+ title: string2(),
21991
+ form: animalFormSchema,
21992
+ heads: number2().int(),
21993
+ species: string2().nullable(),
21994
+ speciesKey: string2().nullable(),
21995
+ speciesClass: animalClassSchema.nullable(),
21996
+ asleep: boolean3(),
21997
+ steps: array(string2()),
21998
+ aside: string2().nullable()
21999
+ });
22000
+ var animalHandoverContactSchema = object({
22001
+ id: ulidSchema,
22002
+ title: string2(),
22003
+ kind: _enum2(["vet", "member"]),
22004
+ label: string2().nullable(),
22005
+ phone: string2().nullable()
22006
+ });
22007
+ var animalHandoverSupplySchema = animalSupplySchema.extend({
22008
+ lastsTrip: boolean3().nullable()
22009
+ });
22010
+ var animalHandoverHabitSchema = nodeRefSchema.extend({ restsThroughTrip: boolean3() });
22011
+ var animalHandoverSchema = object({
22012
+ trip: animalHandoverTripSchema.nullable(),
22013
+ areaId: ulidSchema.nullable(),
22014
+ animals: array(animalHandoverAnimalSchema),
22015
+ contacts: array(animalHandoverContactSchema),
22016
+ supplies: array(animalHandoverSupplySchema),
22017
+ habits: array(animalHandoverHabitSchema),
22018
+ sensors: boolean3(),
22019
+ generatedAt: exports_coerce.date()
22020
+ });
22021
+ var animalHolidayModeInputSchema = animalHolidayModeSchema.partial().extend({ periodId: ulidSchema }).strict().refine((v) => Object.keys(v).length > 1, { message: "Turn at least one switch." });
22022
+ var animalHandoverShareInputSchema = object({ periodId: ulidSchema }).strict();
22023
+ var animalHandoverShareSchema = object({
22024
+ token: string2(),
22025
+ path: string2(),
22026
+ until: string2()
22027
+ });
22028
+ var animalLostCardInputSchema = object({
22029
+ photoFileId: ulidSchema.nullish(),
22030
+ phone: string2().trim().regex(/^\+?[0-9][0-9 ()./-]{4,30}$/, "A phone number: digits, spaces, + ( ) . / -").nullish(),
22031
+ showChipped: boolean3().optional(),
22032
+ note: string2().trim().min(1).max(200).nullish()
22033
+ }).strict();
22034
+ var animalLostCardPhotoSchema = object({ id: ulidSchema, name: string2() });
22035
+ var animalLostCardPublicSchema = object({
22036
+ name: string2(),
22037
+ speciesKey: string2().nullable(),
22038
+ kind: string2().nullable(),
22039
+ missing: boolean3(),
22040
+ hasPhoto: boolean3(),
22041
+ phone: string2().nullable(),
22042
+ chipped: boolean3(),
22043
+ note: string2().nullable()
22044
+ });
22045
+ var animalLostCardStateSchema = object({
22046
+ card: object({
22047
+ path: string2(),
22048
+ photoFileId: ulidSchema.nullable(),
22049
+ phone: string2().nullable(),
22050
+ showChipped: boolean3(),
22051
+ note: string2().nullable(),
22052
+ since: exports_coerce.date(),
22053
+ preview: animalLostCardPublicSchema
22054
+ }).nullable(),
22055
+ photos: array(animalLostCardPhotoSchema),
22056
+ chipOnFile: boolean3()
22057
+ });
22058
+
22059
+ // ../../packages/schema/src/contracts/sensors.ts
22060
+ var sensorProviderValues = ["home_assistant", "unifi"];
22061
+ var sensorProviderSchema = _enum2(sensorProviderValues);
22062
+ var sensorTargetValues = ["place", "asset"];
22063
+ var sensorTargetSchema = _enum2(sensorTargetValues);
22064
+ var PLACE_SENSOR_READINGS = Object.keys(SHED_READING_TYPES);
22065
+ var ASSET_READING_TYPES = {
22066
+ state: "asset.state",
22067
+ power: "asset.power",
22068
+ energy: "asset.energy"
22069
+ };
22070
+ var ASSET_SENSOR_READINGS = Object.keys(ASSET_READING_TYPES);
22071
+ var sensorReadingValues = [
22072
+ ...new Set([...PLACE_SENSOR_READINGS, ...ASSET_SENSOR_READINGS])
22073
+ ];
22074
+ var sensorReadingSchema = _enum2(sensorReadingValues);
22075
+ var SENSOR_DATAPOINT_TYPES = [
22076
+ ...Object.values(SHED_READING_TYPES),
22077
+ ...Object.values(ASSET_READING_TYPES)
22078
+ ];
22079
+ var homeAssistantLinkInputSchema = object({
22080
+ baseUrl: string2().trim().url().refine((u) => /^https?:\/\//i.test(u), "must start with http:// or https://"),
22081
+ token: string2().trim().min(1).max(2000)
22082
+ }).strict();
22083
+ var homeAssistantStatusSchema = object({
22084
+ linked: boolean3(),
22085
+ host: string2().nullable(),
22086
+ links: number2().int().nonnegative(),
22087
+ lastReadingAt: string2().nullable()
22088
+ });
22089
+ var homeAssistantErrorValues = ["unauthorized", "unavailable", "bad_response"];
22090
+ var homeAssistantErrorSchema = _enum2(homeAssistantErrorValues);
22091
+ var sensorSyncResultSchema = object({
22092
+ syncedAt: string2(),
22093
+ entities: number2().int().nonnegative(),
22094
+ written: number2().int().nonnegative(),
22095
+ skipped: number2().int().nonnegative(),
22096
+ missing: array(string2()),
22097
+ error: homeAssistantErrorSchema.nullable()
22098
+ });
22099
+ var sensorLinkRowSchema = createSelectSchema(sensorLinks, {
22100
+ createdAt: exports_coerce.date(),
22101
+ updatedAt: exports_coerce.date()
22102
+ });
22103
+ var sensorLinkSchema = object({
22104
+ id: ulidSchema,
22105
+ provider: sensorProviderSchema,
22106
+ externalId: string2(),
22107
+ nodeId: ulidSchema,
22108
+ target: sensorTargetSchema,
22109
+ reading: string2(),
22110
+ label: string2().nullable(),
22111
+ nodeTitle: string2(),
22112
+ createdAt: exports_coerce.date()
22113
+ });
22114
+ var createSensorLinkInputSchema = object({
22115
+ provider: sensorProviderSchema.default("home_assistant"),
22116
+ externalId: string2().trim().min(1).max(255),
22117
+ nodeId: ulidSchema,
22118
+ reading: sensorReadingSchema,
22119
+ label: string2().trim().min(1).max(200).nullish()
22120
+ }).strict();
22121
+ var sensorLinksQuerySchema = object({ nodeId: ulidSchema.optional() });
22122
+ var homeAssistantEntitySchema = object({
22123
+ entityId: string2(),
22124
+ name: string2(),
22125
+ domain: string2(),
22126
+ state: string2(),
22127
+ unit: string2().nullable(),
22128
+ deviceClass: string2().nullable(),
22129
+ lastUpdated: string2(),
22130
+ suggested: object({ place: string2().nullable(), asset: string2().nullable() }),
22131
+ link: sensorLinkSchema.nullable()
22132
+ });
22133
+ var assetReadingSchema = object({
22134
+ kind: _enum2(ASSET_SENSOR_READINGS),
22135
+ value: number2().nullable(),
22136
+ unit: string2().nullable(),
22137
+ text: string2().nullable(),
22138
+ device: string2().nullable(),
22139
+ at: exports_coerce.date()
22140
+ });
22141
+
22142
+ // ../../packages/schema/src/contracts/house.ts
22143
+ var day = string2().regex(/^\d{4}-\d{2}-\d{2}$/, "must be a calendar day (YYYY-MM-DD)");
22144
+ var houseBrokenSchema = object({
22145
+ item: collectionItemViewSchema,
22146
+ repair: taskViewSchema.nullable()
22147
+ });
22148
+ var houseUpkeepSoonSchema = object({
22149
+ task: taskViewSchema,
22150
+ itemId: string2(),
22151
+ itemTitle: string2(),
22152
+ nextOn: day.nullable(),
22153
+ placeTitle: string2().nullable().default(null),
22154
+ lastOn: day.nullable().default(null)
22155
+ });
22156
+ var housePlaceTileSchema = object({
22157
+ id: string2(),
22158
+ title: string2(),
22159
+ kind: string2(),
22160
+ gardenFeatureId: string2().nullable(),
22161
+ thingCount: number2().int().min(0)
22162
+ });
22163
+ var houseOverviewSchema = object({
22164
+ broken: array(houseBrokenSchema),
22165
+ upkeepSoon: array(houseUpkeepSoonSchema),
22166
+ places: array(housePlaceTileSchema),
22167
+ thingCount: number2().int().min(0),
22168
+ upkeepCount: number2().int().min(0),
22169
+ toolCount: number2().int().min(0),
22170
+ animalCount: number2().int().min(0),
22171
+ toConfirm: number2().int().min(0).default(0)
22172
+ });
22173
+ var upkeepScheduleSchema = object({
22174
+ every: number2().int().min(1).max(365),
22175
+ unit: _enum2(["day", "week", "month", "year"]),
22176
+ startOn: day.optional()
22177
+ }).strict();
22178
+ var setAssetUpkeepInputSchema = object({
22179
+ title: string2().trim().min(1).max(200),
22180
+ schedule: upkeepScheduleSchema,
22181
+ placeId: ulidSchema.nullish(),
22182
+ areaId: ulidSchema.nullish(),
22183
+ nextStep: string2().trim().max(500).nullish()
22184
+ }).strict();
22185
+ var fileAssetInputSchema = object({
22186
+ id: ulidSchema.optional(),
22187
+ title: string2().trim().min(1).max(200),
22188
+ placeId: ulidSchema.nullish(),
22189
+ areaId: ulidSchema.nullish(),
22190
+ status: _enum2(["want", "have"]).optional(),
22191
+ facet: record(string2(), unknown()).optional(),
22192
+ tags: array(string2().min(1).max(60)).max(20).optional(),
22193
+ fileIds: array(ulidSchema).max(20).optional(),
22194
+ match: boolean3().default(true),
22195
+ upkeep: setAssetUpkeepInputSchema.optional(),
22196
+ fault: object({
22197
+ note: string2().trim().min(1).max(2000),
22198
+ repairTitle: string2().trim().min(1).max(200).optional()
22199
+ }).strict().optional()
22200
+ }).strict();
22201
+ var houseReceiptSchema = object({
22202
+ itemId: string2(),
22203
+ created: boolean3(),
22204
+ before: object({
22205
+ facet: record(string2(), unknown()).nullable(),
22206
+ placeId: string2().nullable(),
22207
+ status: string2()
22208
+ }).nullable(),
22209
+ taskIds: array(string2()),
22210
+ entryIds: array(string2()),
22211
+ files: array(object({ id: string2(), previousOwnerId: string2().nullable() }))
22212
+ });
22213
+ var houseWriteResultSchema = object({
22214
+ item: collectionItemDetailSchema,
22215
+ receipt: houseReceiptSchema
22216
+ });
22217
+ var undoHouseWriteInputSchema = houseReceiptSchema.strict();
22218
+ var houseTrailStepSchema = object({ id: string2(), title: string2() });
22219
+ var houseAssetPartSchema = object({
22220
+ id: string2(),
22221
+ title: string2(),
22222
+ quantity: number2(),
22223
+ unit: string2().nullable(),
22224
+ lowStockThreshold: number2().nullable()
22225
+ });
22226
+ var houseAssetLinkSchema = object({
22227
+ nodeId: string2(),
22228
+ title: string2(),
22229
+ type: string2(),
22230
+ kind: string2(),
22231
+ direction: _enum2(["in", "out"]),
22232
+ label: string2().nullable().default(null),
22233
+ context: string2().nullable().default(null),
22234
+ at: exports_coerce.date().nullable().default(null),
22235
+ timed: boolean3().default(false)
22236
+ });
22237
+ var houseAssetSchema = object({
22238
+ item: collectionItemDetailSchema,
22239
+ trail: array(houseTrailStepSchema),
22240
+ parts: array(houseAssetPartSchema),
22241
+ linked: array(houseAssetLinkSchema),
22242
+ warrantyUntil: day.nullable(),
22243
+ visibility: _enum2(NODE_VISIBILITY_VALUES).default("space"),
22244
+ readings: array(assetReadingSchema).default([])
22245
+ });
22246
+ var setAssetVisibilityInputSchema = object({ visibility: _enum2(NODE_VISIBILITY_VALUES) }).strict();
22247
+ var linkAssetPartInputSchema = object({ inventoryItemId: ulidSchema }).strict();
22248
+ var lendAssetInputSchema = object({
22249
+ direction: _enum2(["lent", "borrowed"]),
22250
+ who: string2().trim().min(1).max(200),
22251
+ contactId: ulidSchema.nullish(),
22252
+ since: day.optional(),
22253
+ dueBack: day.nullish(),
22254
+ note: string2().trim().max(500).nullish()
22255
+ }).strict();
22256
+ var returnAssetInputSchema = object({
22257
+ on: day.optional(),
22258
+ note: string2().trim().max(500).nullish()
22259
+ }).strict();
22260
+ var houseValueProofSchema = _enum2(["receipt_photo", "receipt", "photo", "none"]);
22261
+ var houseValueRowSchema = object({
22262
+ id: string2(),
22263
+ title: string2(),
22264
+ model: string2().nullable(),
22265
+ placeId: string2().nullable(),
22266
+ placeTitle: string2().nullable(),
22267
+ placeGroup: string2().nullable().default(null),
22268
+ withHouse: boolean3().default(false),
22269
+ paidApprox: boolean3().default(false),
22270
+ borrowedFrom: string2().nullable().default(null),
22271
+ bought: day.nullable(),
22272
+ paid: number2().nullable(),
21393
22273
  now: number2().nullable(),
21394
22274
  nowSource: string2().nullable(),
21395
22275
  proof: houseValueProofSchema,
@@ -22279,6 +23159,20 @@ var healthSummarySchema = object({
22279
23159
  trends: array(healthTrendSchema).default([])
22280
23160
  });
22281
23161
  var healthSummaryQuerySchema = object({ episodeId: ulidSchema.optional() });
23162
+ var healthMedicalIdSchema = object({
23163
+ name: string2().nullable(),
23164
+ bloodGroup: string2().nullable(),
23165
+ allergies: array(string2()),
23166
+ heightCm: number2().nullable(),
23167
+ medications: array(object({
23168
+ id: string2(),
23169
+ title: string2(),
23170
+ dose: string2().nullable(),
23171
+ kind: healthMedicationKindSchema,
23172
+ schedule: healthMedicationScheduleSchema
23173
+ })),
23174
+ emergencyContact: object({ id: string2(), name: string2(), phone: string2().nullable() }).nullable()
23175
+ });
22282
23176
 
22283
23177
  // ../../packages/schema/src/contracts/health-labs.ts
22284
23178
  var LAB_GROUP_VALUES = [
@@ -22739,10 +23633,10 @@ var JOURNAL_MILESTONE_PRECISION_VALUES = ["year", "month", "day"];
22739
23633
  var journalMilestonePrecisionSchema = _enum2(JOURNAL_MILESTONE_PRECISION_VALUES);
22740
23634
  var journalMilestoneStatusSchema = _enum2(["suggested", "kept"]);
22741
23635
  var journalMilestoneVisibilitySchema = _enum2(["owner", "space"]);
22742
- var titleSchema = string2().trim().min(1).max(200);
23636
+ var titleSchema2 = string2().trim().min(1).max(200);
22743
23637
  var descriptionSchema = string2().trim().min(1).max(2000);
22744
23638
  var journalCreateMilestoneInputSchema = object({
22745
- title: titleSchema,
23639
+ title: titleSchema2,
22746
23640
  kind: journalMilestoneKindSchema.default("other"),
22747
23641
  happenedOn: journalDateSchema,
22748
23642
  precision: journalMilestonePrecisionSchema.default("day"),
@@ -22757,7 +23651,7 @@ var journalCreateMilestoneInputSchema = object({
22757
23651
  path: ["remindYearly"]
22758
23652
  });
22759
23653
  var journalUpdateMilestoneInputSchema = object({
22760
- title: titleSchema.optional(),
23654
+ title: titleSchema2.optional(),
22761
23655
  kind: journalMilestoneKindSchema.optional(),
22762
23656
  happenedOn: journalDateSchema.optional(),
22763
23657
  precision: journalMilestonePrecisionSchema.optional(),
@@ -22801,6 +23695,65 @@ var journalMilestoneListSchema = object({
22801
23695
  milestones: array(journalMilestoneSchema)
22802
23696
  });
22803
23697
 
23698
+ // ../../packages/schema/src/contracts/journal-recall.ts
23699
+ var JOURNAL_RECALL_LIMIT = 30;
23700
+ var JOURNAL_RECALL_MAX_DAYS = 366;
23701
+ var daysBetween = (from, to) => (Date.parse(`${to}T00:00:00Z`) - Date.parse(`${from}T00:00:00Z`)) / 86400000;
23702
+ var journalRecallQuerySchema = object({
23703
+ q: string2().trim().min(2, "search for at least 2 characters").max(100).optional(),
23704
+ around: journalDateSchema.optional(),
23705
+ from: journalDateSchema.optional(),
23706
+ to: journalDateSchema.optional(),
23707
+ limit: exports_coerce.number().int().min(1).max(JOURNAL_RECALL_LIMIT).optional()
23708
+ }).strict().refine((q) => !(q.around && (q.from || q.to)), {
23709
+ message: "give around, or from and to, not both",
23710
+ path: ["around"]
23711
+ }).refine((q) => !q.from || !q.to || q.from <= q.to, {
23712
+ message: "from must be on or before to",
23713
+ path: ["to"]
23714
+ }).refine((q) => !q.from || !q.to || daysBetween(q.from, q.to) < JOURNAL_RECALL_MAX_DAYS, {
23715
+ message: `a recall covers at most ${JOURNAL_RECALL_MAX_DAYS} days`,
23716
+ path: ["to"]
23717
+ });
23718
+ var journalRecallMilestoneSchema = object({
23719
+ id: string2(),
23720
+ title: string2(),
23721
+ kind: journalMilestoneKindSchema,
23722
+ happenedOn: journalDateSchema,
23723
+ precision: journalMilestonePrecisionSchema,
23724
+ planned: boolean3()
23725
+ });
23726
+ var journalRecallEarlierSchema = object({
23727
+ date: journalDateSchema,
23728
+ yearsAgo: number2().int().positive(),
23729
+ title: string2().nullable(),
23730
+ rating: number2().nullable()
23731
+ });
23732
+ var journalRecallSchema = object({
23733
+ q: string2().nullable(),
23734
+ from: journalDateSchema.nullable(),
23735
+ to: journalDateSchema.nullable(),
23736
+ timezone: string2().min(1),
23737
+ days: array(journalDayListItemSchema).max(JOURNAL_RECALL_LIMIT),
23738
+ rated: number2().int().nonnegative(),
23739
+ average: number2().nullable(),
23740
+ milestones: array(journalRecallMilestoneSchema),
23741
+ earlier: array(journalRecallEarlierSchema)
23742
+ });
23743
+ var journalDigestDaySchema = object({
23744
+ date: journalDateSchema,
23745
+ title: string2().nullable(),
23746
+ rating: number2().nullable()
23747
+ });
23748
+ var journalDigestSchema = object({
23749
+ from: journalDateSchema,
23750
+ to: journalDateSchema,
23751
+ timezone: string2().min(1),
23752
+ days: array(journalDigestDaySchema),
23753
+ milestones: array(journalRecallMilestoneSchema),
23754
+ text: string2()
23755
+ });
23756
+
22804
23757
  // ../../packages/schema/src/contracts/journal-recap.ts
22805
23758
  var journalWeekKeySchema = string2().regex(/^\d{4}-W(0[1-9]|[1-4]\d|5[0-3])$/, "must be an ISO week (YYYY-Www)");
22806
23759
  var JOURNAL_MOMENTS_MAX = 3;
@@ -24120,62 +25073,6 @@ var mealPlanCookResultSchema = object({
24120
25073
  ingredients: array(cookedIngredientSchema)
24121
25074
  });
24122
25075
 
24123
- // ../../packages/schema/src/contracts/key-dates.ts
24124
- var keyDateDaySchema = string2().regex(/^\d{4}-\d{2}-\d{2}$/, "expected YYYY-MM-DD").refine((s) => {
24125
- const d = new Date(`${s}T00:00:00Z`);
24126
- return !Number.isNaN(d.getTime()) && d.toISOString().slice(0, 10) === s;
24127
- }, "not a real date");
24128
- var keyDateRepeatSchema = _enum2(["yearly"]);
24129
- var keyDateSchema = createSelectSchema(keyDates, {
24130
- date: keyDateDaySchema,
24131
- confirmedAt: exports_coerce.date().nullable(),
24132
- createdAt: exports_coerce.date(),
24133
- updatedAt: exports_coerce.date()
24134
- });
24135
- var keyDateViewSchema = keyDateSchema.extend({
24136
- nodeTitle: string2(),
24137
- nodeType: string2(),
24138
- repeat: keyDateRepeatSchema.nullable(),
24139
- nextOn: keyDateDaySchema,
24140
- task: object({
24141
- id: ulidSchema,
24142
- status: string2(),
24143
- dueAt: exports_coerce.date().nullable()
24144
- }).nullable()
24145
- });
24146
- var leadDaysSchema = number2().int().min(0).max(366);
24147
- var sourceSchema = string2().trim().min(1).max(120);
24148
- var createKeyDateInputSchema = object({
24149
- id: ulidSchema,
24150
- nodeId: ulidSchema,
24151
- kind: keyDateKindSchema.optional(),
24152
- label: string2().trim().min(1).max(200).nullish(),
24153
- date: keyDateDaySchema,
24154
- yearKnown: boolean3().optional(),
24155
- repeat: keyDateRepeatSchema.nullish(),
24156
- leadDays: leadDaysSchema.optional(),
24157
- derivedFrom: string2().trim().min(1).max(120).nullish(),
24158
- source: sourceSchema.optional(),
24159
- confirmed: boolean3().optional()
24160
- }).strict();
24161
- var updateKeyDateInputSchema = object({
24162
- kind: keyDateKindSchema.optional(),
24163
- label: string2().trim().min(1).max(200).nullish(),
24164
- date: keyDateDaySchema.optional(),
24165
- yearKnown: boolean3().optional(),
24166
- repeat: keyDateRepeatSchema.nullish(),
24167
- leadDays: leadDaysSchema.optional(),
24168
- derivedFrom: string2().trim().min(1).max(120).nullish(),
24169
- source: sourceSchema.optional(),
24170
- confirmed: boolean3().optional()
24171
- }).strict();
24172
- var keyDatesQuerySchema = object({
24173
- nodeId: ulidSchema.optional(),
24174
- kind: keyDateKindSchema.optional(),
24175
- from: keyDateDaySchema.optional(),
24176
- to: keyDateDaySchema.optional()
24177
- });
24178
-
24179
25076
  // ../../packages/schema/src/contracts/people.ts
24180
25077
  var sourceSchema2 = string2().trim().min(1).max(120);
24181
25078
  var rhythmDaysSchema = number2().int().min(1).max(366);
@@ -25141,9 +26038,12 @@ var insuranceFieldsSchema = object({
25141
26038
  product: text4,
25142
26039
  insuredObject: text4,
25143
26040
  insuredValue: amount4,
26041
+ buildingValue: amount4,
25144
26042
  premium: amount4,
25145
26043
  cadence: documentCadenceSchema,
26044
+ paymentMethod: text4,
25146
26045
  deductible: amount4,
26046
+ deductibleIndexed: boolean3(),
25147
26047
  extras: array(text4).max(30),
25148
26048
  claimPhone: phone,
25149
26049
  claimHours: text4,
@@ -25279,11 +26179,28 @@ var documentLinkSchema = object({
25279
26179
  title: string2(),
25280
26180
  type: string2(),
25281
26181
  kind: string2(),
25282
- direction: _enum2(["in", "out"])
26182
+ direction: _enum2(["in", "out"]),
26183
+ facts: object({
26184
+ dueOn: keyDateDaySchema.nullable(),
26185
+ status: string2().nullable(),
26186
+ amount: number2().nullable(),
26187
+ cadence: string2().nullable(),
26188
+ area: string2().nullable(),
26189
+ roles: array(string2()),
26190
+ phone: string2().nullable(),
26191
+ papers: array(object({ title: string2(), certType: string2().nullable() }))
26192
+ }).partial().default({})
26193
+ });
26194
+ var documentBrokerSchema = object({
26195
+ id: ulidSchema,
26196
+ title: string2(),
26197
+ phone: string2().nullable()
25283
26198
  });
25284
26199
  var documentDetailSchema = documentViewSchema.extend({
25285
26200
  keyDates: array(keyDateViewSchema),
25286
- linked: array(documentLinkSchema).default([])
26201
+ linked: array(documentLinkSchema).default([]),
26202
+ providerRoles: array(string2()).default([]),
26203
+ broker: documentBrokerSchema.nullable().default(null)
25287
26204
  });
25288
26205
  var fieldsInputSchema = record(string2(), unknown());
25289
26206
  function checkFields(kind, fields, ctx) {
@@ -25434,57 +26351,6 @@ var incidentsQuerySchema = object({
25434
26351
  policyId: ulidSchema.optional()
25435
26352
  });
25436
26353
 
25437
- // ../../packages/schema/src/contracts/periods.ts
25438
- var periodKindSchema = _enum2(periodKind.enumValues);
25439
- var periodRuleSchema = record(string2(), unknown());
25440
- var periodSchema = createSelectSchema(periods, {
25441
- startsAt: exports_coerce.date(),
25442
- endsAt: exports_coerce.date().nullable(),
25443
- plannedEndAt: exports_coerce.date().nullable(),
25444
- rule: periodRuleSchema,
25445
- createdAt: exports_coerce.date(),
25446
- updatedAt: exports_coerce.date()
25447
- });
25448
- var periodViewSchema = periodSchema.extend({
25449
- nodeTitle: string2(),
25450
- nodeType: string2(),
25451
- active: boolean3()
25452
- });
25453
- var noteSchema2 = string2().trim().min(1).max(500);
25454
- function endsAfterStart(p, ctx) {
25455
- if (!p.startsAt)
25456
- return;
25457
- for (const key of ["endsAt", "plannedEndAt"]) {
25458
- const at = p[key];
25459
- if (at && at < p.startsAt) {
25460
- ctx.addIssue({ code: "custom", path: [key], message: `${key} is before startsAt` });
25461
- }
25462
- }
25463
- }
25464
- var createPeriodInputSchema = object({
25465
- id: ulidSchema,
25466
- nodeId: ulidSchema,
25467
- kind: periodKindSchema.optional(),
25468
- startsAt: exports_coerce.date(),
25469
- endsAt: exports_coerce.date().nullish(),
25470
- plannedEndAt: exports_coerce.date().nullish(),
25471
- rule: periodRuleSchema.optional(),
25472
- note: noteSchema2.nullish()
25473
- }).strict().superRefine(endsAfterStart);
25474
- var updatePeriodInputSchema = object({
25475
- kind: periodKindSchema.optional(),
25476
- startsAt: exports_coerce.date().optional(),
25477
- endsAt: exports_coerce.date().nullish(),
25478
- plannedEndAt: exports_coerce.date().nullish(),
25479
- rule: periodRuleSchema.optional(),
25480
- note: noteSchema2.nullish()
25481
- }).strict().superRefine(endsAfterStart);
25482
- var periodsQuerySchema = object({
25483
- nodeId: ulidSchema.optional(),
25484
- kind: periodKindSchema.optional(),
25485
- active: _enum2(["true", "false"]).transform((v) => v === "true").optional()
25486
- });
25487
-
25488
26354
  // ../../packages/schema/src/contracts/planning-rules.ts
25489
26355
  var PLANNING_RULE_KINDS = planningRuleKind.enumValues;
25490
26356
  var planningRuleKindSchema = _enum2(PLANNING_RULE_KINDS);
@@ -25660,27 +26526,27 @@ var runPlayStatusValues = [
25660
26526
  var runPlayStatusSchema = _enum2(runPlayStatusValues);
25661
26527
  var name = string2().trim().min(1).max(200);
25662
26528
  var text5 = string2().trim().max(2000);
25663
- var shortText = string2().trim().max(300);
26529
+ var shortText2 = string2().trim().max(300);
25664
26530
  var isoDate = string2().regex(/^\d{4}-\d{2}-\d{2}$/, "must be an ISO date (YYYY-MM-DD)");
25665
26531
  var ref = string2().trim().min(1).max(200);
25666
26532
  var runCharacterSchema = object({
25667
26533
  name,
25668
26534
  pronoun: _enum2(["he", "she", "they"]).nullish(),
25669
- subtitle: shortText.nullish(),
26535
+ subtitle: shortText2.nullish(),
25670
26536
  level: number2().int().min(0).max(1e4).nullish(),
25671
- build: shortText.nullish(),
25672
- stats: array(object({ k: name, v: union([number2(), shortText]) }).strict()).max(40).optional(),
25673
- traits: array(shortText).max(20).optional(),
26537
+ build: shortText2.nullish(),
26538
+ stats: array(object({ k: name, v: union([number2(), shortText2]) }).strict()).max(40).optional(),
26539
+ traits: array(shortText2).max(20).optional(),
25674
26540
  backstory: text5.nullish(),
25675
- rules: array(shortText).max(30).optional(),
25676
- faith: shortText.nullish()
26541
+ rules: array(shortText2).max(30).optional(),
26542
+ faith: shortText2.nullish()
25677
26543
  }).strict();
25678
26544
  var runArcSchema = object({
25679
- title: shortText.nullish(),
26545
+ title: shortText2.nullish(),
25680
26546
  chapters: array(object({
25681
26547
  key: name,
25682
26548
  name,
25683
- range: shortText.nullish(),
26549
+ range: shortText2.nullish(),
25684
26550
  moral: text5.nullish()
25685
26551
  }).strict()).max(40),
25686
26552
  current: name.nullish()
@@ -25688,7 +26554,7 @@ var runArcSchema = object({
25688
26554
  var runStepStatusValues = ["done", "now", "todo", "skipped"];
25689
26555
  var runStepStatusSchema = _enum2(runStepStatusValues);
25690
26556
  var runOrderStepSchema = object({
25691
- text: shortText.pipe(string2().min(1)),
26557
+ text: shortText2.pipe(string2().min(1)),
25692
26558
  status: runStepStatusSchema.default("todo"),
25693
26559
  questRef: ref.nullish()
25694
26560
  }).strict();
@@ -25697,33 +26563,33 @@ var runQuestStatusSchema = _enum2(runQuestStatusValues);
25697
26563
  var runQuestSchema = object({
25698
26564
  ref: ref.nullish(),
25699
26565
  name,
25700
- line: shortText.nullish(),
26566
+ line: shortText2.nullish(),
25701
26567
  status: runQuestStatusSchema.default("active"),
25702
26568
  objective: text5.nullish(),
25703
- hint: shortText.nullish(),
25704
- reward: shortText.nullish(),
25705
- place: shortText.nullish(),
26569
+ hint: shortText2.nullish(),
26570
+ reward: shortText2.nullish(),
26571
+ place: shortText2.nullish(),
25706
26572
  steps: array(object({
25707
- text: shortText.pipe(string2().min(1)),
26573
+ text: shortText2.pipe(string2().min(1)),
25708
26574
  done: boolean3().default(false),
25709
26575
  now: boolean3().optional(),
25710
- hint: shortText.nullish()
26576
+ hint: shortText2.nullish()
25711
26577
  }).strict()).max(40).optional(),
25712
- pausedAt: shortText.nullish(),
26578
+ pausedAt: shortText2.nullish(),
25713
26579
  why: text5.nullish(),
25714
26580
  revisitAt: name.nullish()
25715
26581
  }).strict();
25716
26582
  var runNextStepsSchema = object({
25717
- items: array(shortText.pipe(string2().min(1))).max(3),
26583
+ items: array(shortText2.pipe(string2().min(1))).max(3),
25718
26584
  pinned: boolean3().default(false),
25719
26585
  note: text5.nullish()
25720
26586
  }).strict();
25721
26587
  var runChoiceSchema = object({
25722
26588
  ref: ref.nullish(),
25723
26589
  title: name,
25724
- place: shortText.nullish(),
26590
+ place: shortText2.nullish(),
25725
26591
  status: _enum2(["made", "planned"]).default("made"),
25726
- options: array(shortText).max(6).optional(),
26592
+ options: array(shortText2).max(6).optional(),
25727
26593
  why: text5.nullish(),
25728
26594
  consequence: text5.nullish(),
25729
26595
  revisitAt: name.nullish(),
@@ -25735,9 +26601,9 @@ var runHomeSchema = object({
25735
26601
  ref: ref.nullish(),
25736
26602
  name,
25737
26603
  role: _enum2(["home", "collector", "storage", "planned", "later"]).default("home"),
25738
- place: shortText.nullish(),
26604
+ place: shortText2.nullish(),
25739
26605
  upgrades: array(object({ name, done: boolean3().default(false) }).strict()).max(40).optional(),
25740
- steward: shortText.nullish(),
26606
+ steward: shortText2.nullish(),
25741
26607
  note: text5.nullish()
25742
26608
  }).strict();
25743
26609
  var runPersonSchema = object({
@@ -25745,7 +26611,7 @@ var runPersonSchema = object({
25745
26611
  name,
25746
26612
  role: _enum2(["child", "spouse", "steward", "follower", "pet", "rival", "other"]),
25747
26613
  status: _enum2(["with", "planned", "lost"]).default("with"),
25748
- home: shortText.nullish(),
26614
+ home: shortText2.nullish(),
25749
26615
  note: text5.nullish()
25750
26616
  }).strict();
25751
26617
  var runMountSchema = object({
@@ -25757,46 +26623,46 @@ var runUniqueSchema = object({
25757
26623
  ref: ref.nullish(),
25758
26624
  name,
25759
26625
  status: _enum2(["have", "now", "want"]).default("have"),
25760
- source: shortText.nullish(),
25761
- displayAt: shortText.nullish(),
26626
+ source: shortText2.nullish(),
26627
+ displayAt: shortText2.nullish(),
25762
26628
  set: name.nullish()
25763
26629
  }).strict();
25764
26630
  var runChecklistSchema = object({
25765
26631
  key: string2().trim().min(1).max(60).regex(/^[a-z0-9][a-z0-9_-]*$/, "must be a lowercase slug"),
25766
26632
  label: name,
25767
26633
  total: number2().int().min(0).max(5000).nullish(),
25768
- items: array(object({ id: ref, label: shortText.nullish() }).strict()).max(5000).optional(),
26634
+ items: array(object({ id: ref, label: shortText2.nullish() }).strict()).max(5000).optional(),
25769
26635
  done: array(ref).max(5000),
25770
- notes: record(ref, shortText).optional(),
26636
+ notes: record(ref, shortText2).optional(),
25771
26637
  carrying: array(ref).max(5000).optional(),
25772
- legend: shortText.nullish()
26638
+ legend: shortText2.nullish()
25773
26639
  }).strict();
25774
26640
  var runTeamMemberSchema = object({
25775
26641
  species: name,
25776
- nick: shortText.nullish(),
26642
+ nick: shortText2.nullish(),
25777
26643
  level: number2().int().min(1).max(100).nullish(),
25778
- nature: shortText.nullish(),
25779
- types: array(shortText).max(2).optional(),
25780
- moves: array(shortText).max(4).optional(),
26644
+ nature: shortText2.nullish(),
26645
+ types: array(shortText2).max(2).optional(),
26646
+ moves: array(shortText2).max(4).optional(),
25781
26647
  hp: number2().int().min(0).max(100).nullish(),
25782
- note: shortText.nullish(),
26648
+ note: shortText2.nullish(),
25783
26649
  status: _enum2(["team", "plan", "boxed"]).default("team")
25784
26650
  }).strict();
25785
26651
  var runAchievementsSchema = object({
25786
26652
  source: _enum2(["steam", "xbox", "psn", "manual"]).default("manual"),
25787
26653
  total: number2().int().min(0).max(5000).nullish(),
25788
26654
  enabled: boolean3().default(true),
25789
- unlocked: array(object({ name, on: isoDate.nullish(), hint: shortText.nullish(), key: ref.nullish() }).strict()).max(5000),
25790
- locked: array(object({ name, hint: shortText.nullish(), key: ref.nullish() }).strict()).max(5000).optional(),
26655
+ unlocked: array(object({ name, on: isoDate.nullish(), hint: shortText2.nullish(), key: ref.nullish() }).strict()).max(5000),
26656
+ locked: array(object({ name, hint: shortText2.nullish(), key: ref.nullish() }).strict()).max(5000).optional(),
25791
26657
  syncedAt: string2().datetime({ offset: true }).nullish()
25792
26658
  }).strict();
25793
26659
  var runRareFindsSchema = object({
25794
- place: shortText.nullish(),
25795
- items: array(shortText).max(200),
26660
+ place: shortText2.nullish(),
26661
+ items: array(shortText2).max(200),
25796
26662
  note: text5.nullish()
25797
26663
  }).strict();
25798
26664
  var runInstallSchema = object({
25799
- edition: shortText.nullish(),
26665
+ edition: shortText2.nullish(),
25800
26666
  mods: array(object({ name, url: string2().url().max(2000).nullish() }).strict()).max(200).default([]),
25801
26667
  savePath: string2().trim().max(500).nullish(),
25802
26668
  lastBackup: isoDate.nullish(),
@@ -25805,22 +26671,22 @@ var runInstallSchema = object({
25805
26671
  var SAVE_SCREENSHOT_MAX_BASE64 = 1500000;
25806
26672
  var runSaveFields = {
25807
26673
  game: _enum2(["skyrim"]).default("skyrim"),
25808
- fileName: shortText.nullish(),
26674
+ fileName: shortText2.nullish(),
25809
26675
  saveNumber: number2().int().min(0).max(1e9),
25810
26676
  playerName: name,
25811
26677
  level: number2().int().min(0).max(1e4),
25812
- location: shortText,
25813
- race: shortText.nullish(),
26678
+ location: shortText2,
26679
+ race: shortText2.nullish(),
25814
26680
  sex: _enum2(["male", "female"]).nullish(),
25815
26681
  playTimeMinutes: number2().int().min(0).max(1e4 * 60).nullish(),
25816
26682
  savedAt: string2().datetime({ offset: true }).nullish(),
25817
26683
  gameDate: object({
25818
- text: shortText.pipe(string2().min(1)),
26684
+ text: shortText2.pipe(string2().min(1)),
25819
26685
  hour: number2().min(0).max(24).nullish(),
25820
26686
  daysPassed: number2().min(0).max(1e6).nullish()
25821
26687
  }).strict().nullish(),
25822
- plugins: array(shortText).max(600).optional(),
25823
- stats: record(shortText, number2().int()).refine((r) => Object.keys(r).length <= 300, "at most 300 stats").optional()
26688
+ plugins: array(shortText2).max(600).optional(),
26689
+ stats: record(shortText2, number2().int()).refine((r) => Object.keys(r).length <= 300, "at most 300 stats").optional()
25824
26690
  };
25825
26691
  var runSaveSchema = object({
25826
26692
  ...runSaveFields,
@@ -25833,9 +26699,9 @@ var uploadRunSaveHeaderInputSchema = object({
25833
26699
  }).strict();
25834
26700
  var runFacetSchema = object({
25835
26701
  theme: runThemeSchema.default("generic"),
25836
- edition: shortText.nullish(),
25837
- platform: shortText.nullish(),
25838
- modeFlags: array(shortText).max(20).optional(),
26702
+ edition: shortText2.nullish(),
26703
+ platform: shortText2.nullish(),
26704
+ modeFlags: array(shortText2).max(20).optional(),
25839
26705
  character: runCharacterSchema.nullish(),
25840
26706
  arc: runArcSchema.nullish(),
25841
26707
  orderOfPlay: array(runOrderStepSchema).max(200).optional(),
@@ -25852,7 +26718,7 @@ var runFacetSchema = object({
25852
26718
  rareFinds: runRareFindsSchema.nullish(),
25853
26719
  install: runInstallSchema.nullish(),
25854
26720
  save: runSaveSchema.nullish(),
25855
- money: object({ goal: shortText.nullish(), purpose: shortText.nullish() }).strict().nullish(),
26721
+ money: object({ goal: shortText2.nullish(), purpose: shortText2.nullish() }).strict().nullish(),
25856
26722
  links: array(object({ label: name, url: string2().url().max(2000) }).strict()).max(50).optional()
25857
26723
  }).strict();
25858
26724
  var runListSectionValues = [
@@ -26040,569 +26906,6 @@ var steamSyncResultSchema = object({
26040
26906
  games: array(steamGameSyncSchema)
26041
26907
  });
26042
26908
 
26043
- // ../../packages/schema/src/contracts/animals.ts
26044
- var animalFormSchema = _enum2(animalForm.enumValues);
26045
- var animalStatusSchema = _enum2(animalStatus.enumValues);
26046
- var animalAcquiredHowSchema = _enum2(animalAcquiredHow.enumValues);
26047
- var animalSexSchema = _enum2(animalSex.enumValues);
26048
- var animalBreedingSchema = _enum2(animalBreeding.enumValues);
26049
- var animalClassSchema = _enum2(animalClass.enumValues);
26050
- var animalLegalSchema = _enum2(animalLegal.enumValues);
26051
- var animalBornOnSchema = string2().regex(/^\d{4}(-(0[1-9]|1[0-2])(-(0[1-9]|[12]\d|3[01]))?)?$/, "expected YYYY, YYYY-MM or YYYY-MM-DD");
26052
- var animalIdsSchema = object({
26053
- chipNoMasked: string2().trim().min(1).max(40).optional(),
26054
- passportNoMasked: string2().trim().min(1).max(40).optional(),
26055
- ringNo: string2().trim().min(1).max(40).optional(),
26056
- ringYear: number2().int().min(1900).max(2200).optional(),
26057
- ringIssuer: string2().trim().min(1).max(80).optional(),
26058
- ringType: _enum2(["open", "closed"]).optional()
26059
- }).strict();
26060
- function isMaskedNumber(value) {
26061
- const shown = value.replace(/[\s*\u2022xX.-]/g, "");
26062
- return shown.length <= 4 && shown.length < value.replace(/\s/g, "").length;
26063
- }
26064
- var maskedIdsSchema = animalIdsSchema.superRefine((ids, ctx) => {
26065
- for (const key of ["chipNoMasked", "passportNoMasked"]) {
26066
- const v = ids[key];
26067
- if (v && !isMaskedNumber(v)) {
26068
- ctx.addIssue({
26069
- code: "custom",
26070
- path: [key],
26071
- message: "mask all but the last four characters (e.g. ***********1234)"
26072
- });
26073
- }
26074
- }
26075
- });
26076
- var animalScheduleStepSchema = object({
26077
- key: string2().trim().min(1).max(40),
26078
- label: string2().trim().min(1).max(120),
26079
- everyMonths: number2().int().min(1).max(120)
26080
- }).strict();
26081
- var animalSpeciesSchema = createSelectSchema(animalSpecies, {
26082
- incompatibleWith: array(string2()),
26083
- defaultSchedule: array(animalScheduleStepSchema),
26084
- createdAt: exports_coerce.date()
26085
- });
26086
- var speciesKeySchema = string2().regex(/^[a-z][a-z0-9_]{1,39}$/, "a lowercase slug, e.g. hermann_tortoise");
26087
- var createAnimalSpeciesInputSchema = object({
26088
- id: ulidSchema,
26089
- key: speciesKeySchema,
26090
- commonName: string2().trim().min(1).max(120),
26091
- commonNameNl: string2().trim().min(1).max(120).nullish(),
26092
- latin: string2().trim().min(1).max(120).nullish(),
26093
- class: animalClassSchema.optional(),
26094
- legal: animalLegalSchema.optional(),
26095
- hibernates: boolean3().optional(),
26096
- defaultForm: animalFormSchema.optional(),
26097
- minGroupSize: number2().int().min(1).max(1000).nullish(),
26098
- incompatibleWith: array(speciesKeySchema).max(20).optional(),
26099
- defaultSchedule: array(animalScheduleStepSchema).max(20).optional(),
26100
- careSheetMd: string2().trim().min(1).max(20000).nullish()
26101
- }).strict();
26102
- var updateAnimalSpeciesInputSchema = createAnimalSpeciesInputSchema.omit({ id: true, key: true }).partial().strict();
26103
- var DEWORM = {
26104
- key: "deworm",
26105
- label: "Deworm",
26106
- everyMonths: 3
26107
- };
26108
- var BOOSTER = { key: "booster", label: "Yearly booster", everyMonths: 12 };
26109
- var NATIVE_FINCH = {
26110
- class: "bird",
26111
- legal: "native_closed_ring"
26112
- };
26113
- var EXOTIC_FINCH = {
26114
- class: "bird",
26115
- legal: "none",
26116
- defaultForm: "group",
26117
- minGroupSize: 2
26118
- };
26119
- var ANIMAL_SPECIES_SEED = [
26120
- {
26121
- key: "dog",
26122
- commonName: "Dog",
26123
- commonNameNl: "Hond",
26124
- latin: "Canis familiaris",
26125
- class: "mammal",
26126
- legal: "dog_id",
26127
- defaultSchedule: [DEWORM, BOOSTER]
26128
- },
26129
- {
26130
- key: "cat",
26131
- commonName: "Cat",
26132
- commonNameNl: "Kat",
26133
- latin: "Felis catus",
26134
- class: "mammal",
26135
- legal: "cat_id",
26136
- defaultSchedule: [DEWORM, BOOSTER]
26137
- },
26138
- {
26139
- key: "chicken",
26140
- commonName: "Chicken",
26141
- commonNameNl: "Kip",
26142
- latin: "Gallus gallus domesticus",
26143
- class: "bird",
26144
- defaultForm: "group",
26145
- minGroupSize: 3,
26146
- defaultSchedule: [
26147
- { key: "mite_check", label: "Mite check", everyMonths: 1 },
26148
- { key: "deworm", label: "Deworm", everyMonths: 6 }
26149
- ]
26150
- },
26151
- {
26152
- key: "duck",
26153
- commonName: "Duck",
26154
- commonNameNl: "Eend",
26155
- latin: "Anas platyrhynchos domesticus",
26156
- class: "bird",
26157
- defaultForm: "group",
26158
- minGroupSize: 2
26159
- },
26160
- {
26161
- key: "quail",
26162
- commonName: "Quail",
26163
- commonNameNl: "Kwartel",
26164
- latin: "Coturnix japonica",
26165
- class: "bird",
26166
- defaultForm: "group",
26167
- minGroupSize: 3
26168
- },
26169
- {
26170
- key: "hermann_tortoise",
26171
- commonName: "Hermann's tortoise",
26172
- commonNameNl: "Griekse landschildpad",
26173
- latin: "Testudo hermanni",
26174
- class: "reptile",
26175
- legal: "cites_a",
26176
- hibernates: true,
26177
- defaultSchedule: [{ key: "health_check", label: "Health check", everyMonths: 12 }]
26178
- },
26179
- {
26180
- key: "zebra_finch",
26181
- commonName: "Zebra finch",
26182
- commonNameNl: "Zebravink",
26183
- latin: "Taeniopygia guttata",
26184
- ...EXOTIC_FINCH
26185
- },
26186
- {
26187
- key: "bengalese_finch",
26188
- commonName: "Bengalese finch",
26189
- commonNameNl: "Japans meeuwtje",
26190
- latin: "Lonchura striata domestica",
26191
- ...EXOTIC_FINCH
26192
- },
26193
- {
26194
- key: "star_finch",
26195
- commonName: "Star finch",
26196
- commonNameNl: "Binsenastrild",
26197
- latin: "Bathilda ruficauda",
26198
- ...EXOTIC_FINCH
26199
- },
26200
- {
26201
- key: "diamond_dove",
26202
- commonName: "Diamond dove",
26203
- commonNameNl: "Diamantduif",
26204
- latin: "Geopelia cuneata",
26205
- ...EXOTIC_FINCH
26206
- },
26207
- {
26208
- key: "bullfinch",
26209
- commonName: "Eurasian bullfinch",
26210
- commonNameNl: "Goudvink",
26211
- latin: "Pyrrhula pyrrhula",
26212
- ...NATIVE_FINCH
26213
- },
26214
- {
26215
- key: "bearded_reedling",
26216
- commonName: "Bearded reedling",
26217
- commonNameNl: "Baardmannetje",
26218
- latin: "Panurus biarmicus",
26219
- ...NATIVE_FINCH
26220
- },
26221
- {
26222
- key: "siskin",
26223
- commonName: "Eurasian siskin",
26224
- commonNameNl: "Sijs",
26225
- latin: "Spinus spinus",
26226
- ...NATIVE_FINCH
26227
- },
26228
- {
26229
- key: "goldfinch",
26230
- commonName: "European goldfinch",
26231
- commonNameNl: "Putter",
26232
- latin: "Carduelis carduelis",
26233
- ...NATIVE_FINCH
26234
- },
26235
- {
26236
- key: "linnet",
26237
- commonName: "Common linnet",
26238
- commonNameNl: "Kneu",
26239
- latin: "Linaria cannabina",
26240
- ...NATIVE_FINCH
26241
- },
26242
- {
26243
- key: "rabbit",
26244
- commonName: "Rabbit",
26245
- commonNameNl: "Konijn",
26246
- latin: "Oryctolagus cuniculus",
26247
- class: "mammal",
26248
- defaultForm: "group",
26249
- minGroupSize: 2,
26250
- incompatibleWith: ["guinea_pig"],
26251
- defaultSchedule: [{ key: "vaccine", label: "Myxo/RHD vaccine", everyMonths: 12 }]
26252
- },
26253
- {
26254
- key: "guinea_pig",
26255
- commonName: "Guinea pig",
26256
- commonNameNl: "Cavia",
26257
- latin: "Cavia porcellus",
26258
- class: "mammal",
26259
- defaultForm: "group",
26260
- minGroupSize: 2,
26261
- incompatibleWith: ["rabbit"]
26262
- }
26263
- ];
26264
- var animalSchema = createSelectSchema(animals, {
26265
- ids: animalIdsSchema
26266
- });
26267
- var animalSpeciesRefSchema = object({
26268
- id: ulidSchema,
26269
- key: string2(),
26270
- commonName: string2(),
26271
- latin: string2().nullable(),
26272
- class: animalClassSchema,
26273
- legal: animalLegalSchema,
26274
- hibernates: boolean3()
26275
- });
26276
- var animalViewSchema = animalSchema.extend({
26277
- title: string2(),
26278
- parentId: ulidSchema.nullable(),
26279
- species: animalSpeciesRefSchema.nullable(),
26280
- memberCount: number2().int(),
26281
- heads: number2().int(),
26282
- createdAt: exports_coerce.date(),
26283
- updatedAt: exports_coerce.date()
26284
- });
26285
- var nodeRefSchema = object({ id: ulidSchema, title: string2() });
26286
- var animalHabitSchema = nodeRefSchema.extend({ doneToday: boolean3() });
26287
- var animalSupplySchema = nodeRefSchema.extend({
26288
- quantity: number2(),
26289
- unit: string2().nullable(),
26290
- lowStock: boolean3(),
26291
- dailyUse: number2().nullable(),
26292
- perHead: boolean3(),
26293
- daysLeft: number2().int().nullable(),
26294
- full: number2().nullable(),
26295
- onList: string2().nullable()
26296
- });
26297
- var animalDayCountSchema = object({ day: string2(), count: number2().int() });
26298
- var animalWeightPointSchema = object({
26299
- day: string2(),
26300
- grams: number2(),
26301
- at: exports_coerce.date()
26302
- });
26303
- var animalFileSchema = object({
26304
- id: ulidSchema,
26305
- name: string2(),
26306
- mime: string2(),
26307
- size: number2().int(),
26308
- createdAt: exports_coerce.date()
26309
- });
26310
- var animalVetSchema = nodeRefSchema.extend({ role: string2().nullable() });
26311
- var animalPaperSchema = nodeRefSchema.extend({
26312
- status: _enum2(documentStatus.enumValues),
26313
- reference: string2().nullable()
26314
- });
26315
- var animalLinksSchema = object({
26316
- place: nodeRefSchema.nullable(),
26317
- vets: array(animalVetSchema),
26318
- cameFrom: nodeRefSchema.nullable(),
26319
- habits: array(animalHabitSchema),
26320
- supplies: array(animalSupplySchema),
26321
- papers: array(animalPaperSchema),
26322
- files: array(animalFileSchema),
26323
- healthVisits: object({ count: number2().int(), lastAt: exports_coerce.date().nullable() }),
26324
- assets: array(nodeRefSchema.extend({ location: string2().nullable() })),
26325
- companions: array(nodeRefSchema)
26326
- });
26327
- var animalPapersCheckSchema = object({
26328
- needed: string2(),
26329
- onFile: boolean3()
26330
- });
26331
- var animalMemberSchema = animalViewSchema.extend({
26332
- papersCheck: animalPapersCheckSchema.nullable()
26333
- });
26334
- var SHED_READING_TYPES = {
26335
- temp: "shed.temp",
26336
- heater: "shed.heater",
26337
- water: "shed.water_pct",
26338
- door: "shed.door",
26339
- feeder: "shed.feed_kg",
26340
- light: "shed.light"
26341
- };
26342
- var animalRoomReadingSchema = object({
26343
- kind: _enum2(Object.keys(SHED_READING_TYPES)),
26344
- value: number2().nullable(),
26345
- unit: string2().nullable(),
26346
- text: string2().nullable(),
26347
- detail: string2().nullish(),
26348
- device: string2().nullish(),
26349
- at: exports_coerce.date()
26350
- });
26351
- var animalRoomAlertSchema = object({
26352
- id: string2(),
26353
- at: exports_coerce.date(),
26354
- text: string2(),
26355
- detail: string2().nullable(),
26356
- source: _enum2(["camera", "power", "other"])
26357
- });
26358
- var animalRoomSchema = object({
26359
- place: nodeRefSchema,
26360
- readings: array(animalRoomReadingSchema),
26361
- temperature24h: array(object({ at: exports_coerce.date(), value: number2() })),
26362
- alerts: array(animalRoomAlertSchema)
26363
- });
26364
- var animalDetailSchema = animalViewSchema.extend({
26365
- group: nodeRefSchema.nullable(),
26366
- members: array(animalMemberSchema),
26367
- links: animalLinksSchema,
26368
- weights: array(animalWeightPointSchema),
26369
- latestLength: object({ mm: number2(), at: exports_coerce.date() }).nullable(),
26370
- eggs: array(animalDayCountSchema),
26371
- periods: array(periodViewSchema),
26372
- keyDates: array(keyDateViewSchema),
26373
- papersCheck: animalPapersCheckSchema.nullable(),
26374
- room: animalRoomSchema.nullable()
26375
- });
26376
- var titleSchema2 = string2().trim().min(1).max(120);
26377
- var shortText2 = (max) => string2().trim().min(1).max(max);
26378
- var idList = array(ulidSchema).max(20);
26379
- var animalFieldsSchema = object({
26380
- title: titleSchema2,
26381
- form: animalFormSchema,
26382
- speciesId: ulidSchema.nullish(),
26383
- speciesKey: speciesKeySchema,
26384
- breed: shortText2(120).nullish(),
26385
- sex: animalSexSchema.nullish(),
26386
- bornOn: animalBornOnSchema.nullish(),
26387
- bornApprox: boolean3(),
26388
- acquiredOn: keyDateDaySchema.nullish(),
26389
- acquiredHow: animalAcquiredHowSchema.nullish(),
26390
- status: animalStatusSchema,
26391
- endedOn: keyDateDaySchema.nullish(),
26392
- endNote: shortText2(500).nullish(),
26393
- headCount: number2().int().min(0).max(1e4).nullish(),
26394
- ids: maskedIdsSchema,
26395
- markings: shortText2(200).nullish(),
26396
- breeding: animalBreedingSchema,
26397
- groupId: ulidSchema.nullish(),
26398
- areaId: ulidSchema.nullish(),
26399
- placeId: ulidSchema.nullish(),
26400
- vetIds: idList,
26401
- cameFromId: ulidSchema.nullish(),
26402
- habitIds: idList,
26403
- supplyIds: idList,
26404
- paperIds: idList,
26405
- assetIds: idList
26406
- });
26407
- var createAnimalInputSchema = animalFieldsSchema.partial().required({ title: true }).extend({ id: ulidSchema }).strict();
26408
- var updateAnimalInputSchema = animalFieldsSchema.partial().strict();
26409
- var animalsQuerySchema = object({
26410
- status: animalStatusSchema.optional(),
26411
- form: animalFormSchema.optional(),
26412
- groupId: ulidSchema.optional(),
26413
- includeEnded: _enum2(["true", "false"]).transform((v) => v === "true").optional()
26414
- });
26415
- var occurredAtSchema = exports_coerce.date().optional();
26416
- var animalLogInputSchema = discriminatedUnion("kind", [
26417
- object({
26418
- kind: literal("weight"),
26419
- value: number2().positive().max(200000),
26420
- unit: _enum2(["g", "kg"]).default("g"),
26421
- occurredAt: occurredAtSchema
26422
- }).strict(),
26423
- object({
26424
- kind: literal("length"),
26425
- value: number2().positive().max(5000),
26426
- occurredAt: occurredAtSchema
26427
- }).strict(),
26428
- object({
26429
- kind: literal("eggs"),
26430
- count: number2().int().min(0).max(500),
26431
- occurredAt: occurredAtSchema
26432
- }).strict(),
26433
- object({
26434
- kind: literal("note"),
26435
- text: string2().trim().min(1).max(1000),
26436
- occurredAt: occurredAtSchema
26437
- }).strict()
26438
- ]);
26439
- var animalVetVisitSourceSchema = _enum2(["sticker", "photo", "said"]);
26440
- var visitTextSchema = string2().trim().min(1).max(120);
26441
- var visitCostSchema = object({
26442
- amount: number2().positive().max(1e5),
26443
- currency: string2().trim().length(3).default("EUR")
26444
- }).strict();
26445
- var animalVetVisitInputSchema = object({
26446
- id: ulidSchema,
26447
- at: exports_coerce.date().optional(),
26448
- vetContactId: ulidSchema.optional(),
26449
- clinician: visitTextSchema.optional(),
26450
- reason: visitTextSchema.optional(),
26451
- vaccine: object({ name: visitTextSchema, source: animalVetVisitSourceSchema.optional() }).strict().optional(),
26452
- dewormer: visitTextSchema.optional(),
26453
- weight: object({
26454
- value: number2().positive().max(200000),
26455
- unit: _enum2(["g", "kg"]).default("kg")
26456
- }).strict().optional(),
26457
- nextDates: array(object({
26458
- id: ulidSchema,
26459
- label: visitTextSchema,
26460
- date: string2().regex(/^\d{4}-\d{2}-\d{2}$/, "expected YYYY-MM-DD")
26461
- }).strict()).max(5).default([]),
26462
- files: array(object({ id: ulidSchema, name: visitTextSchema.optional() }).strict()).max(5).default([]),
26463
- cost: visitCostSchema.optional()
26464
- }).strict();
26465
- var animalVetVisitPatchSchema = object({
26466
- vetContactId: ulidSchema.nullable().optional(),
26467
- clinician: visitTextSchema.nullable().optional(),
26468
- reason: visitTextSchema.nullable().optional(),
26469
- vaccine: object({ name: visitTextSchema, source: animalVetVisitSourceSchema.optional() }).strict().nullable().optional(),
26470
- dewormer: visitTextSchema.nullable().optional(),
26471
- cost: visitCostSchema.nullable().optional()
26472
- }).strict().refine((v) => Object.keys(v).length > 0, { message: "Change at least one field." });
26473
- var animalVetVisitSchema = object({
26474
- id: ulidSchema,
26475
- animal: object({
26476
- id: ulidSchema,
26477
- title: string2(),
26478
- speciesKey: string2().nullable(),
26479
- speciesClass: animalClassSchema.nullable()
26480
- }),
26481
- at: exports_coerce.date(),
26482
- vet: nodeRefSchema.nullable(),
26483
- clinician: string2().nullable(),
26484
- reason: string2().nullable(),
26485
- vaccine: object({ name: string2(), source: animalVetVisitSourceSchema.nullable() }).nullable(),
26486
- dewormer: string2().nullable(),
26487
- weight: object({
26488
- grams: number2(),
26489
- deltaGrams: number2().nullable(),
26490
- since: string2().nullable()
26491
- }).nullable(),
26492
- keyDates: array(object({ id: string2(), label: string2(), date: string2() })),
26493
- files: array(object({ id: string2(), name: string2() })),
26494
- cost: object({ amount: number2(), currency: string2() }).nullable(),
26495
- byAgent: boolean3(),
26496
- undone: boolean3()
26497
- });
26498
- var animalTimelineEntrySchema = object({
26499
- id: string2(),
26500
- at: exports_coerce.date(),
26501
- kind: _enum2([
26502
- "weight",
26503
- "length",
26504
- "eggs",
26505
- "note",
26506
- "vet_visit",
26507
- "period_started",
26508
- "period_ended",
26509
- "key_date"
26510
- ]),
26511
- animalId: ulidSchema,
26512
- animalTitle: string2(),
26513
- value: number2().nullable(),
26514
- text: string2().nullable(),
26515
- byAgent: boolean3().default(false)
26516
- });
26517
- var animalTimelineQuerySchema = object({
26518
- days: exports_coerce.number().int().min(1).max(3650).default(90)
26519
- });
26520
- var animalEggsTodaySchema = object({
26521
- animalId: ulidSchema,
26522
- title: string2(),
26523
- today: number2().int(),
26524
- heads: number2().int(),
26525
- last7: array(animalDayCountSchema)
26526
- });
26527
- var animalsOverviewSchema = object({
26528
- animals: array(animalViewSchema),
26529
- today: object({
26530
- day: string2(),
26531
- eggs: array(animalEggsTodaySchema),
26532
- supplies: array(animalSupplySchema),
26533
- habits: array(animalHabitSchema)
26534
- }),
26535
- comingUp: array(keyDateViewSchema.extend({ vet: string2().nullable() })),
26536
- periods: array(periodViewSchema)
26537
- });
26538
- var animalHolidayModeSchema = object({
26539
- popHole: boolean3(),
26540
- heater: boolean3(),
26541
- alerts: boolean3(),
26542
- dailyPhoto: boolean3(),
26543
- feedReorder: boolean3()
26544
- });
26545
- var animalHandoverRuleSchema = object({
26546
- sitter: string2().trim().min(1).max(120).optional(),
26547
- houseNote: string2().trim().min(1).max(300).optional(),
26548
- holidayMode: animalHolidayModeSchema.partial().optional(),
26549
- share: object({ tokenHash: string2(), until: string2() }).optional(),
26550
- agentNote: string2().trim().min(1).max(500).optional()
26551
- }).passthrough();
26552
- var animalHandoverQuerySchema = object({ periodId: ulidSchema.optional() });
26553
- var animalHandoverTripSchema = object({
26554
- periodId: ulidSchema.nullable(),
26555
- title: string2(),
26556
- from: string2(),
26557
- to: string2(),
26558
- sitter: string2().nullable(),
26559
- houseNote: string2().nullable(),
26560
- holidayMode: animalHolidayModeSchema,
26561
- sharedUntil: string2().nullable(),
26562
- agentNote: string2().nullable(),
26563
- calendar: string2().nullable()
26564
- });
26565
- var animalHandoverAnimalSchema = object({
26566
- id: ulidSchema,
26567
- title: string2(),
26568
- form: animalFormSchema,
26569
- heads: number2().int(),
26570
- species: string2().nullable(),
26571
- speciesKey: string2().nullable(),
26572
- speciesClass: animalClassSchema.nullable(),
26573
- asleep: boolean3(),
26574
- steps: array(string2()),
26575
- aside: string2().nullable()
26576
- });
26577
- var animalHandoverContactSchema = object({
26578
- id: ulidSchema,
26579
- title: string2(),
26580
- kind: _enum2(["vet", "member"]),
26581
- label: string2().nullable(),
26582
- phone: string2().nullable()
26583
- });
26584
- var animalHandoverSupplySchema = animalSupplySchema.extend({
26585
- lastsTrip: boolean3().nullable()
26586
- });
26587
- var animalHandoverHabitSchema = nodeRefSchema.extend({ restsThroughTrip: boolean3() });
26588
- var animalHandoverSchema = object({
26589
- trip: animalHandoverTripSchema.nullable(),
26590
- areaId: ulidSchema.nullable(),
26591
- animals: array(animalHandoverAnimalSchema),
26592
- contacts: array(animalHandoverContactSchema),
26593
- supplies: array(animalHandoverSupplySchema),
26594
- habits: array(animalHandoverHabitSchema),
26595
- sensors: boolean3(),
26596
- generatedAt: exports_coerce.date()
26597
- });
26598
- var animalHolidayModeInputSchema = animalHolidayModeSchema.partial().extend({ periodId: ulidSchema }).strict().refine((v) => Object.keys(v).length > 1, { message: "Turn at least one switch." });
26599
- var animalHandoverShareInputSchema = object({ periodId: ulidSchema }).strict();
26600
- var animalHandoverShareSchema = object({
26601
- token: string2(),
26602
- path: string2(),
26603
- until: string2()
26604
- });
26605
-
26606
26909
  // ../../packages/schema/src/contracts/money-splits.ts
26607
26910
  var moneyPartySchema = union([
26608
26911
  object({ userId: ulidSchema }).strict(),
@@ -27235,6 +27538,10 @@ var mailFooterSchema = object({
27235
27538
  deleteBy: keyDateDaySchema.optional(),
27236
27539
  contact: email2().max(320).optional()
27237
27540
  }).strict();
27541
+ var mailLookShape = {
27542
+ couple: string2().trim().min(1).max(120).optional(),
27543
+ imagesUrl: url({ protocol: /^https$/ }).max(500).optional()
27544
+ };
27238
27545
  var lineSchema = string2().trim().min(1).max(2000);
27239
27546
  var mailMessageCopySchema = object({
27240
27547
  subject: string2().trim().min(1).max(200),
@@ -27245,6 +27552,7 @@ var mailMessageCopySchema = object({
27245
27552
  var mailMessageDataSchema = object({
27246
27553
  nl: mailMessageCopySchema,
27247
27554
  pt: mailMessageCopySchema.optional(),
27555
+ ...mailLookShape,
27248
27556
  footer: mailFooterSchema.optional()
27249
27557
  }).strict();
27250
27558
  var mailDaySchema = object({
@@ -27266,9 +27574,37 @@ var mailSaveTheDateDataSchema = object({
27266
27574
  pt: mailSaveTheDateCopySchema.optional(),
27267
27575
  days: array(mailDaySchema).min(1).max(5),
27268
27576
  calendarTitle: string2().trim().min(1).max(120).optional(),
27577
+ ...mailLookShape,
27269
27578
  footer: mailFooterSchema.optional()
27270
27579
  }).strict();
27271
27580
  var mailSaveTheDateDeliverySchema = object({ link: url().optional() }).strict();
27581
+ var mailProgrammeItemSchema = object({
27582
+ date: keyDateDaySchema.optional(),
27583
+ time: string2().regex(/^([01]\d|2[0-3]):[0-5]\d$/, "time is HH:MM"),
27584
+ label: mailDaySchema.shape.label,
27585
+ place: string2().trim().min(1).max(200).optional()
27586
+ }).strict();
27587
+ var laterMailShape = {
27588
+ nl: mailSaveTheDateCopySchema,
27589
+ pt: mailSaveTheDateCopySchema.optional(),
27590
+ days: array(mailDaySchema).min(1).max(5),
27591
+ ...mailLookShape,
27592
+ footer: mailFooterSchema.optional()
27593
+ };
27594
+ var mailInvitationDataSchema = object({
27595
+ ...laterMailShape,
27596
+ programme: array(mailProgrammeItemSchema).max(12).optional(),
27597
+ rsvpBy: keyDateDaySchema.optional(),
27598
+ calendarTitle: string2().trim().min(1).max(120).optional()
27599
+ }).strict();
27600
+ var mailReminderDataSchema = object({ ...laterMailShape, rsvpBy: keyDateDaySchema }).strict();
27601
+ var mailFinalInfoDataSchema = object({ ...laterMailShape, programme: array(mailProgrammeItemSchema).max(12).optional() }).strict();
27602
+ var mailHouseholdDeliverySchema = object({
27603
+ link: url().optional(),
27604
+ household: string2().trim().min(1).max(200).optional(),
27605
+ programme: array(mailProgrammeItemSchema).max(12).optional(),
27606
+ table: string2().trim().min(1).max(120).optional()
27607
+ }).strict();
27272
27608
  var mailProviderEventSchema = looseObject({
27273
27609
  type: string2().min(1),
27274
27610
  created_at: string2().optional(),
@@ -27283,11 +27619,20 @@ var mailProviderEventSchema = looseObject({
27283
27619
  });
27284
27620
  var MAIL_CAMPAIGN_KINDS = ["message", "save_the_date", "invitation"];
27285
27621
  var mailCampaignKindSchema = _enum2(MAIL_CAMPAIGN_KINDS);
27286
- var MAIL_TEMPLATES = ["message", "save_the_date"];
27622
+ var MAIL_TEMPLATES = [
27623
+ "message",
27624
+ "save_the_date",
27625
+ "invitation",
27626
+ "reminder",
27627
+ "final_info"
27628
+ ];
27287
27629
  var mailTemplateSchema = _enum2(MAIL_TEMPLATES);
27288
27630
  var mailTemplateDataSchemas = {
27289
27631
  message: mailMessageDataSchema,
27290
- save_the_date: mailSaveTheDateDataSchema
27632
+ save_the_date: mailSaveTheDateDataSchema,
27633
+ invitation: mailInvitationDataSchema,
27634
+ reminder: mailReminderDataSchema,
27635
+ final_info: mailFinalInfoDataSchema
27291
27636
  };
27292
27637
  function mailTemplateDataError(template, data) {
27293
27638
  const parsed = mailTemplateDataSchemas[template].safeParse(data);
@@ -27343,6 +27688,147 @@ var mailCampaignViewSchema = mailCampaignSchema.extend({
27343
27688
  readyToSend: boolean3()
27344
27689
  });
27345
27690
 
27691
+ // ../../packages/schema/src/contracts/rsvp-questions.ts
27692
+ var RSVP_QUESTION_KINDS = ["choice", "multi", "text", "number", "yes_no"];
27693
+ var rsvpQuestionKindSchema = _enum2(RSVP_QUESTION_KINDS);
27694
+ var rsvpQuestionScopeSchema = _enum2(["household", "guest"]);
27695
+ var RSVP_QUESTION_PRESETS = ["diet", "message"];
27696
+ var rsvpQuestionPresetSchema = _enum2(RSVP_QUESTION_PRESETS);
27697
+ var RSVP_SHOW_IF_MAX = 5;
27698
+ var rsvpTextSchema = (max) => object({
27699
+ nl: string2().trim().min(1).max(max).optional(),
27700
+ pt: string2().trim().min(1).max(max).optional()
27701
+ }).strict().refine((t) => t.nl !== undefined || t.pt !== undefined, "give it in NL or PT");
27702
+ var keySchema = string2().regex(/^[a-z][a-z0-9_]{0,31}$/, "expected a short lower-case word (vegan, civil)");
27703
+ var rsvpQuestionOptionSchema = object({ key: keySchema, label: rsvpTextSchema(120) }).strict();
27704
+ var rsvpShowIfConditionSchema = union([
27705
+ object({
27706
+ questionId: ulidSchema,
27707
+ equals: union([string2().max(200), number2(), boolean3()])
27708
+ }).strict(),
27709
+ object({ eventKey: keySchema.optional(), rsvp: literal("yes") }).strict()
27710
+ ]);
27711
+ var rsvpAnswerValueSchema = union([
27712
+ string2().max(2000),
27713
+ array(string2().max(32)).max(20),
27714
+ number2(),
27715
+ boolean3()
27716
+ ]);
27717
+ var rsvpQuestionSchema = createSelectSchema(rsvpQuestions, {
27718
+ label: object({ nl: string2().optional(), pt: string2().optional() }),
27719
+ options: array(object({
27720
+ key: string2(),
27721
+ label: object({ nl: string2().optional(), pt: string2().optional() })
27722
+ })),
27723
+ showIf: array(rsvpShowIfConditionSchema),
27724
+ preset: rsvpQuestionPresetSchema.nullable(),
27725
+ createdAt: exports_coerce.date(),
27726
+ updatedAt: exports_coerce.date()
27727
+ });
27728
+ var rsvpAnswerSchema = createSelectSchema(rsvpAnswers, {
27729
+ value: rsvpAnswerValueSchema,
27730
+ createdAt: exports_coerce.date(),
27731
+ updatedAt: exports_coerce.date()
27732
+ });
27733
+ function rsvpOptionsProblem(kind, options) {
27734
+ if (kind === "choice" || kind === "multi") {
27735
+ if (options.length < 2)
27736
+ return `a ${kind} question needs two options or more`;
27737
+ if (new Set(options.map((o) => o.key)).size !== options.length)
27738
+ return "each option needs its own key";
27739
+ return null;
27740
+ }
27741
+ return options.length > 0 ? `a ${kind} question has no options` : null;
27742
+ }
27743
+ var questionFields = {
27744
+ label: rsvpTextSchema(300),
27745
+ options: array(rsvpQuestionOptionSchema).max(30).optional(),
27746
+ scope: rsvpQuestionScopeSchema.optional(),
27747
+ eventKey: keySchema.nullish(),
27748
+ required: boolean3().optional(),
27749
+ sort: number2().int().min(0).max(1e4).optional(),
27750
+ showIf: array(rsvpShowIfConditionSchema).max(RSVP_SHOW_IF_MAX).optional()
27751
+ };
27752
+ var createRsvpQuestionInputSchema = object({
27753
+ id: ulidSchema,
27754
+ guestListId: ulidSchema,
27755
+ kind: rsvpQuestionKindSchema,
27756
+ ...questionFields
27757
+ }).strict().superRefine((q, ctx) => {
27758
+ const problem = rsvpOptionsProblem(q.kind, q.options ?? []);
27759
+ if (problem)
27760
+ ctx.addIssue({ code: "custom", message: problem, path: ["options"] });
27761
+ if (q.showIf?.some((c) => ("questionId" in c) && c.questionId === q.id))
27762
+ ctx.addIssue({
27763
+ code: "custom",
27764
+ message: "a question can't depend on itself",
27765
+ path: ["showIf"]
27766
+ });
27767
+ });
27768
+ var updateRsvpQuestionInputSchema = object(questionFields).partial().strict();
27769
+ var rsvpQuestionsQuerySchema = object({ guestListId: ulidSchema });
27770
+ var rsvpAnswerInputSchema = object({
27771
+ questionId: ulidSchema,
27772
+ guestId: ulidSchema.nullish(),
27773
+ value: rsvpAnswerValueSchema.nullable()
27774
+ }).strict();
27775
+ var setRsvpAnswersInputSchema = object({
27776
+ guestListId: ulidSchema,
27777
+ householdId: ulidSchema,
27778
+ answers: array(rsvpAnswerInputSchema).min(1).max(200)
27779
+ }).strict();
27780
+ var rsvpAnswersQuerySchema = object({
27781
+ guestListId: ulidSchema,
27782
+ householdId: ulidSchema.optional()
27783
+ });
27784
+
27785
+ // ../../packages/schema/src/contracts/google-contacts.ts
27786
+ var googleContactsModeSchema = _enum2(["off", "fake", "live"]);
27787
+ var googleContactsStatusSchema = object({
27788
+ available: boolean3(),
27789
+ mode: googleContactsModeSchema,
27790
+ connected: boolean3(),
27791
+ account: string2().nullable()
27792
+ });
27793
+ var googleContactsConnectResultSchema = object({
27794
+ connectionId: ulidSchema,
27795
+ authorizationUrl: string2()
27796
+ });
27797
+ var GOOGLE_CONTACT_FIELDS = ["email", "phone", "birthday"];
27798
+ var googleContactFieldSchema = _enum2(GOOGLE_CONTACT_FIELDS);
27799
+ var googleContactCandidateSchema = object({
27800
+ resourceName: string2(),
27801
+ name: string2(),
27802
+ emails: array(string2()),
27803
+ phones: array(string2()),
27804
+ birthday: object({ date: string2().regex(/^\d{4}-\d{2}-\d{2}$/), yearKnown: boolean3() }).nullable(),
27805
+ match: object({
27806
+ contactId: ulidSchema,
27807
+ title: string2(),
27808
+ by: _enum2(["email", "phone", "name"])
27809
+ }).nullable(),
27810
+ adds: array(googleContactFieldSchema)
27811
+ });
27812
+ var googleContactsQuerySchema = object({
27813
+ q: string2().trim().max(120).optional()
27814
+ });
27815
+ var googleContactsListSchema = object({
27816
+ status: googleContactsStatusSchema,
27817
+ candidates: array(googleContactCandidateSchema)
27818
+ });
27819
+ var importGoogleContactsInputSchema = object({
27820
+ resourceNames: array(string2().trim().regex(/^people\/[A-Za-z0-9_-]{1,120}$/, "a Google person id")).min(1).max(200)
27821
+ }).strict();
27822
+ var googleContactsImportResultSchema = object({
27823
+ created: array(object({ contactId: ulidSchema, title: string2() })),
27824
+ merged: array(object({
27825
+ contactId: ulidSchema,
27826
+ title: string2(),
27827
+ added: array(googleContactFieldSchema)
27828
+ })),
27829
+ missing: array(string2())
27830
+ });
27831
+
27346
27832
  // ../../packages/schema/src/contracts/calendar.ts
27347
27833
  var calendarEventLinkSchema = createSelectSchema(calendarEventLinks, {
27348
27834
  createdAt: exports_coerce.date(),
@@ -28935,7 +29421,7 @@ function parseCapture2(input, now) {
28935
29421
 
28936
29422
  // src/meta.ts
28937
29423
  var CLI_NAME = "do";
28938
- var VERSION = "1.295.0";
29424
+ var VERSION = "1.297.0";
28939
29425
  var API_PREFIX = "/api/v1";
28940
29426
  var DEFAULT_API_URL = "http://localhost:3001";
28941
29427
 
@@ -29686,6 +30172,24 @@ var ENTITIES = [
29686
30172
  canDelete: true
29687
30173
  }
29688
30174
  },
30175
+ {
30176
+ name: "rsvp-questions",
30177
+ path: "/rsvp-questions",
30178
+ readScope: "contacts:read",
30179
+ returns: "RsvpQuestion",
30180
+ canGet: true,
30181
+ listFlags: [
30182
+ { name: "list", description: "the guest list's id (required)", query: "guestListId" }
30183
+ ],
30184
+ write: {
30185
+ scope: "contacts:write",
30186
+ createSchema: createRsvpQuestionInputSchema,
30187
+ createInput: "CreateRsvpQuestionInput",
30188
+ updateSchema: updateRsvpQuestionInputSchema,
30189
+ updateInput: "UpdateRsvpQuestionInput",
30190
+ canDelete: true
30191
+ }
30192
+ },
29689
30193
  {
29690
30194
  name: "guests",
29691
30195
  path: "/guests",
@@ -30090,6 +30594,15 @@ var HEALTH_COMMAND_SPECS = [
30090
30594
  scopes: READ,
30091
30595
  returns: "HealthProfile"
30092
30596
  },
30597
+ {
30598
+ path: ["health", "medical-id"],
30599
+ summary: "Show your Medical ID: name, blood group, allergies, current medications, height, emergency contact.",
30600
+ args: [],
30601
+ flags: [],
30602
+ scopes: READ,
30603
+ returns: "HealthMedicalId",
30604
+ notes: "The few facts someone helping in an emergency needs. The emergency contact comes with their name and phone; a field not set is null. Each read by a key is logged for the member."
30605
+ },
30093
30606
  {
30094
30607
  path: ["health", "profile", "set"],
30095
30608
  summary: `Set profile fields (--data '{"bloodGroup":"A+"}', --notes "Kell negative").`,
@@ -30401,6 +30914,24 @@ var HEALTH_COMMAND_SPECS = [
30401
30914
  scopes: READ,
30402
30915
  returns: "HealthLabOverview"
30403
30916
  },
30917
+ {
30918
+ path: ["health", "google", "status"],
30919
+ summary: "Whether your Google Health is connected, the last sync, and what stops it.",
30920
+ args: [],
30921
+ flags: [],
30922
+ scopes: READ,
30923
+ returns: "GoogleHealthStatus",
30924
+ notes: "GET /api/v1/health/google-health. Connecting needs Google's consent in a browser: Settings \u2192 Health in do. `failure` (reauth, not_linked, unavailable, other) says what stops the sync, with a title and a hint."
30925
+ },
30926
+ {
30927
+ path: ["health", "google", "sync"],
30928
+ summary: "Sync your Google Health now (sleep, resting heart rate, HRV, steps, workouts), as the morning sync does.",
30929
+ args: [],
30930
+ flags: [],
30931
+ scopes: WRITE2,
30932
+ returns: "GoogleHealthSyncResult",
30933
+ notes: "POST /api/v1/health/google-health/sync. Written and skipped per resource, and the status after it; a sync that stops answers 200 with `status.failure`. 409 before Google Health is connected, 403 while the server has it switched off."
30934
+ },
30404
30935
  {
30405
30936
  path: ["health", "analyte"],
30406
30937
  summary: "One analyte's trend across draws (do health analyte vitamin_d).",
@@ -30787,6 +31318,33 @@ var COMMAND_SPECS = [
30787
31318
  returns: "JournalSearch",
30788
31319
  notes: "GET /api/v1/journal/search?q= \u2014 matches the one-liner, highlights, the summary and entries of your own days (at most 30). journal:read is a sensitive scope."
30789
31320
  },
31321
+ {
31322
+ path: ["journal", "recall"],
31323
+ summary: "Recall your Journal: the days that answer some words or a window (or the last 7 days), the milestones near them and the same date in earlier years.",
31324
+ args: [{ name: "words", required: false, description: "A topic to look for (2+ characters)." }],
31325
+ flags: [
31326
+ {
31327
+ name: "around",
31328
+ type: "string",
31329
+ description: "A day, YYYY-MM-DD: reads 3 days either side."
31330
+ },
31331
+ { name: "from", type: "string", description: "The window's first day, YYYY-MM-DD." },
31332
+ { name: "to", type: "string", description: "The window's last day, YYYY-MM-DD." },
31333
+ { name: "limit", type: "string", description: "At most this many days (1\u201330)." }
31334
+ ],
31335
+ scopes: ["journal:read"],
31336
+ returns: "JournalRecall",
31337
+ notes: "GET /api/v1/journal/recall (journal_recall) \u2014 your own days only, dated so an answer can cite them; another member's days never answer. --around can't be combined with --from/--to. journal:read is a sensitive scope."
31338
+ },
31339
+ {
31340
+ path: ["journal", "digest"],
31341
+ summary: "The last 7 days of your Journal as a short digest: each day's line and rating, and the milestones a week either side.",
31342
+ args: [],
31343
+ flags: [],
31344
+ scopes: ["journal:read"],
31345
+ returns: "JournalDigest",
31346
+ notes: "GET /api/v1/journal/digest \u2014 `text` is the few plain lines an agent keeps in its private session. journal:read is a sensitive scope."
31347
+ },
30790
31348
  {
30791
31349
  path: ["journal", "week"],
30792
31350
  summary: "One week of the Journal: its recap (prose, best moments, a pattern), its days, the usual rating and the numbers from Progress.",
@@ -31713,6 +32271,21 @@ var COMMAND_SPECS = [
31713
32271
  returns: "Metric",
31714
32272
  notes: "Logging again the same day replaces that day's point. A bedtime belongs to the night's wake day (logged at 23:30 or the next morning, it lands on the morning). The key must act for a member."
31715
32273
  },
32274
+ {
32275
+ path: ["metrics", "import"],
32276
+ summary: "Import a batch of weight, sleep and bedtime values read off Health Connect (what the Android app sends).",
32277
+ args: [],
32278
+ flags: [
32279
+ {
32280
+ name: "data",
32281
+ type: "string",
32282
+ description: 'The batch as JSON: {"points":[{"key":"sleep","value":7.5,"occurredAt":"2026-10-20T07:00:00Z","recordId":"\u2026"}]} (source defaults to health_connect).'
32283
+ }
32284
+ ],
32285
+ scopes: ["habits:write"],
32286
+ returns: "ImportMetricsResult",
32287
+ notes: "POST /api/v1/metrics/import. Each record lands once (its recordId); one already imported, out of range or in the future is skipped. At most 500 points."
32288
+ },
31716
32289
  {
31717
32290
  path: ["documents", "file"],
31718
32291
  summary: "File a paper in one call (doc_file): the provider, the document, its file and a receipt card.",
@@ -34085,6 +34658,39 @@ var COMMAND_SPECS = [
34085
34658
  returns: "AnimalVetVisit",
34086
34659
  notes: "POST /api/v1/animals/vet-visits/{visitId}/undo. The visit, its weight, its key dates and the filed photos all go back."
34087
34660
  },
34661
+ {
34662
+ path: ["animals", "lost-card"],
34663
+ summary: "An animal's lost-pet card: on or off, its link, and what it could show.",
34664
+ args: [{ name: "id", required: true, description: "Animal ULID." }],
34665
+ flags: [],
34666
+ scopes: ["animals:read"],
34667
+ returns: "AnimalLostCardState",
34668
+ notes: "GET /api/v1/animals/{id}/lost-card. `card` is null while it's off; else its `path` (`/lost/<token>`, the page a QR code opens), what it shows and `preview` (the finder's page). `photos` are the pictures on the animal it may show; `chipOnFile` says whether it can say chipped."
34669
+ },
34670
+ {
34671
+ path: ["animals", "lost-card-set"],
34672
+ summary: "Turn an animal's lost-pet card on, or change what it shows.",
34673
+ args: [{ name: "id", required: true, description: "Animal ULID." }],
34674
+ flags: [
34675
+ {
34676
+ name: "data",
34677
+ type: "string",
34678
+ description: 'JSON: `{ "phone": "+32 470 \u2026", "photoFileId": "\u2026", "showChipped": true, "note": "\u2026" }`; null takes a field off.'
34679
+ }
34680
+ ],
34681
+ scopes: ["animals:write"],
34682
+ returns: "AnimalLostCardState",
34683
+ notes: "PUT /api/v1/animals/{id}/lost-card. An individual still with the household (a lost one included). The name always shows; the photo must be a picture on the animal; `showChipped` needs its chip on file and never shows the number. The link stays the same while the card is on."
34684
+ },
34685
+ {
34686
+ path: ["animals", "lost-card-off"],
34687
+ summary: "Turn an animal's lost-pet card off (its link stops working).",
34688
+ args: [{ name: "id", required: true, description: "Animal ULID." }],
34689
+ flags: [],
34690
+ scopes: ["animals:write"],
34691
+ returns: "void",
34692
+ notes: "DELETE /api/v1/animals/{id}/lost-card. Destructive: a printed QR stops working, so it needs --allow-destructive. Turning it on again makes a new link."
34693
+ },
34088
34694
  {
34089
34695
  path: ["runs", "change"],
34090
34696
  summary: "Apply a chat update to a run: its changes, with a receipt and Undo.",
@@ -34179,6 +34785,74 @@ var COMMAND_SPECS = [
34179
34785
  returns: "SteamSyncResult",
34180
34786
  notes: "POST /api/v1/runs/steam/sync. Writes into each run whose achievements come from Steam or aren't kept yet; runs kept by hand are left alone. Per game: outcome, runs, unlocked, total and the error (unauthorized, private, no_stats, unavailable, bad_response). 409 before Steam is linked."
34181
34787
  },
34788
+ {
34789
+ path: ["sensors", "status"],
34790
+ summary: "Whether the Space has linked Home Assistant, how many entities are mapped, the newest reading.",
34791
+ args: [],
34792
+ flags: [],
34793
+ scopes: ["places:read"],
34794
+ returns: "HomeAssistantStatus",
34795
+ notes: "GET /api/v1/sensors/home-assistant. Home Assistant is linked in the app's Settings \u2192 Home; the token is never returned."
34796
+ },
34797
+ {
34798
+ path: ["sensors", "entities"],
34799
+ summary: "Every entity Home Assistant has, with its state, the reading it likely gives and what it's mapped to.",
34800
+ args: [],
34801
+ flags: [],
34802
+ scopes: ["places:read"],
34803
+ returns: "HomeAssistantEntity[]",
34804
+ notes: "GET /api/v1/sensors/home-assistant/entities. 409 before Home Assistant is linked; 503 when it doesn't answer."
34805
+ },
34806
+ {
34807
+ path: ["sensors", "sync"],
34808
+ summary: "Read every mapped entity now and put its state on the ledger, as the five-minute sync does.",
34809
+ args: [],
34810
+ flags: [],
34811
+ scopes: ["places:write"],
34812
+ returns: "SensorSyncResult",
34813
+ 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."
34814
+ },
34815
+ {
34816
+ path: ["sensors", "links"],
34817
+ summary: "The mapped entities, or the ones on one Place or asset.",
34818
+ args: [],
34819
+ flags: [{ name: "node", type: "string", description: "Only the mappings on this node ULID." }],
34820
+ scopes: ["places:read"],
34821
+ returns: "SensorLink[]",
34822
+ notes: "GET /api/v1/sensors/links."
34823
+ },
34824
+ {
34825
+ path: ["sensors", "map"],
34826
+ summary: "Map a Home Assistant entity to a Place, an asset or an animal's room.",
34827
+ args: [
34828
+ {
34829
+ name: "entity",
34830
+ required: true,
34831
+ description: "The entity id, e.g. sensor.shed_temperature."
34832
+ },
34833
+ { name: "node", required: true, description: "The Place, asset or animal ULID." }
34834
+ ],
34835
+ flags: [
34836
+ {
34837
+ name: "reading",
34838
+ type: "string",
34839
+ description: "A room's temp|humidity|heater|water|door|feeder|light, or an asset's state|power|energy."
34840
+ },
34841
+ { name: "label", type: "string", description: "A name for it (Home Assistant's own)." }
34842
+ ],
34843
+ scopes: ["places:write"],
34844
+ returns: "SensorLink",
34845
+ notes: "POST /api/v1/sensors/links. An animal maps to the Place it's housed in (409 when it has none). Mapping an entity again moves it."
34846
+ },
34847
+ {
34848
+ path: ["sensors", "unmap"],
34849
+ summary: "Unmap an entity; the readings it gave stay.",
34850
+ args: [{ name: "link", required: true, description: "The sensor link ULID." }],
34851
+ flags: [],
34852
+ scopes: ["places:write"],
34853
+ returns: "None",
34854
+ notes: "DELETE /api/v1/sensors/links/{id}."
34855
+ },
34182
34856
  {
34183
34857
  path: ["runs", "sessions", "list"],
34184
34858
  summary: "A run's sessions, newest first, with recaps and change batches.",
@@ -34326,6 +35000,30 @@ var COMMAND_SPECS = [
34326
35000
  returns: "PeopleOverview",
34327
35001
  notes: "The Sunday card is `--days 7`. Rhythm is a wish: niceToSee lists only who came round and isn't snoozed, longest first. Never say overdue."
34328
35002
  },
35003
+ {
35004
+ path: ["people", "google"],
35005
+ summary: "Your Google Contacts, to pick from: who they'd merge into and what importing adds.",
35006
+ args: [],
35007
+ flags: [{ name: "q", type: "string", description: "A name or email to narrow to." }],
35008
+ scopes: ["contacts:read"],
35009
+ returns: "GoogleContactsList",
35010
+ notes: "Connecting needs a browser (People \u2192 Import). Not connected: candidates is empty and status.connected false. A key with no member is forbidden."
35011
+ },
35012
+ {
35013
+ path: ["people", "google-import"],
35014
+ summary: "Import the people you picked from Google Contacts (merging, never duplicating).",
35015
+ args: [
35016
+ {
35017
+ name: "resourceNames",
35018
+ required: true,
35019
+ description: "Google person ids (people/c123), as `do people google` lists them."
35020
+ }
35021
+ ],
35022
+ flags: [],
35023
+ scopes: ["contacts:write"],
35024
+ returns: "GoogleContactsImportResult",
35025
+ notes: "Each merges into the contact it matches (email, then phone, then a unique name) and fills in only a missing email, phone or birthday; the rest become new contacts. Ids Google no longer has come back as missing. Not connected is a conflict."
35026
+ },
34329
35027
  {
34330
35028
  path: ["people", "brief"],
34331
35029
  summary: "Before you see them: last seen, life updates, follow-ups, gift ideas, dates.",
@@ -34420,6 +35118,31 @@ var COMMAND_SPECS = [
34420
35118
  scopes: ["contacts:write"],
34421
35119
  returns: "GuestView"
34422
35120
  },
35121
+ {
35122
+ path: ["rsvp-answers", "list"],
35123
+ summary: "A guest list's answers to its RSVP questions, or one household's.",
35124
+ args: [],
35125
+ flags: [
35126
+ { name: "list", type: "string", description: "The guest list's id (required)." },
35127
+ { name: "household", type: "string", description: "Only this household's answers." }
35128
+ ],
35129
+ scopes: ["contacts:read"],
35130
+ returns: "RsvpAnswer"
35131
+ },
35132
+ {
35133
+ path: ["rsvp-answers", "set"],
35134
+ summary: "Set a household's RSVP answers (null clears one); an answer to a hidden question is dropped.",
35135
+ args: [],
35136
+ flags: [
35137
+ {
35138
+ name: "data",
35139
+ type: "string",
35140
+ description: 'JSON SetRsvpAnswersInput, e.g. {"guestListId":"01\u2026","householdId":"01\u2026","answers":[{"questionId":"01\u2026","value":true},{"questionId":"01\u2026","guestId":"01\u2026","value":["vegan"]}]}'
35141
+ }
35142
+ ],
35143
+ scopes: ["contacts:write"],
35144
+ returns: "RsvpAnswer"
35145
+ },
34423
35146
  {
34424
35147
  path: ["seating-proposals", "list"],
34425
35148
  summary: "A guest list's proposed seating plans, newest first.",
@@ -36042,6 +36765,33 @@ function renderJournalSearch(data, mode) {
36042
36765
  return paint(mode, "dim", "(no journal days mention that)");
36043
36766
  return renderJournalDays({ days: d.days }, mode);
36044
36767
  }
36768
+ function renderJournalRecall(data, mode) {
36769
+ const d = data;
36770
+ const head = [
36771
+ d.q ? `\u201C${d.q}\u201D` : null,
36772
+ d.from && d.to ? `${d.from} \u2013 ${d.to}` : null,
36773
+ d.average != null ? `avg ${d.average} over ${d.rated} rated` : null
36774
+ ].filter(Boolean).join(" \xB7 ");
36775
+ const out = head ? [paint(mode, "dim", head)] : [];
36776
+ out.push((d.days ?? []).length === 0 ? paint(mode, "dim", "(no journal day answers that)") : renderJournalDays({ days: d.days }, mode));
36777
+ if ((d.milestones ?? []).length > 0) {
36778
+ out.push("", paint(mode, "dim", "Milestones near"));
36779
+ for (const m of d.milestones ?? [])
36780
+ out.push(` \u25C6 ${m.title}${paint(mode, "dim", ` \xB7 ${m.happenedOn}${m.planned ? " (planned)" : ""}`)}`);
36781
+ }
36782
+ if ((d.earlier ?? []).length > 0) {
36783
+ out.push("", paint(mode, "dim", "On this day"));
36784
+ for (const e of d.earlier ?? []) {
36785
+ const rating = e.rating == null ? "" : paint(mode, "dim", ` ${e.rating}/10`);
36786
+ out.push(` ${e.date} ${e.title ?? paint(mode, "dim", "(no entry)")}${rating}`);
36787
+ }
36788
+ }
36789
+ return out.join(`
36790
+ `);
36791
+ }
36792
+ function renderJournalDigest(data) {
36793
+ return data.text ?? "";
36794
+ }
36045
36795
  function renderJournalImportScan(data, mode) {
36046
36796
  const d = data;
36047
36797
  const items = d.items;
@@ -37170,6 +37920,27 @@ var HANDLERS = {
37170
37920
  render: renderJournalSearch
37171
37921
  };
37172
37922
  },
37923
+ "journal recall": async ({ args, flags, requireClient }) => {
37924
+ const q = args.join(" ").trim() || undefined;
37925
+ if (q !== undefined && q.length < 2)
37926
+ throw usageError("journal recall needs 2+ characters");
37927
+ const query = {
37928
+ q,
37929
+ around: flagString(flags, "around"),
37930
+ from: flagString(flags, "from"),
37931
+ to: flagString(flags, "to"),
37932
+ limit: flagString(flags, "limit")
37933
+ };
37934
+ parseInput(journalRecallQuerySchema, Object.fromEntries(Object.entries(query).filter(([, v]) => v !== undefined)));
37935
+ return {
37936
+ data: await requireClient().get("/journal/recall", { query }),
37937
+ render: renderJournalRecall
37938
+ };
37939
+ },
37940
+ "journal digest": async ({ requireClient }) => ({
37941
+ data: await requireClient().get("/journal/digest"),
37942
+ render: renderJournalDigest
37943
+ }),
37173
37944
  "journal week": async ({ args, requireClient }) => {
37174
37945
  const week = journalWeekArg(args, "week");
37175
37946
  return {
@@ -38262,6 +39033,13 @@ var HANDLERS = {
38262
39033
  });
38263
39034
  return { data: await requireClient().post(`/metrics/${key}`, input), render: renderRecord };
38264
39035
  },
39036
+ "metrics import": async ({ flags, requireClient }) => {
39037
+ const input = parseInput(importMetricsInputSchema, {
39038
+ source: "health_connect",
39039
+ ...readDataFlag(flags)
39040
+ });
39041
+ return { data: await requireClient().post("/metrics/import", input), render: renderRecord };
39042
+ },
38265
39043
  "agents list": async ({ requireClient }) => ({
38266
39044
  data: await requireClient().getPage("/agents"),
38267
39045
  render: renderList
@@ -39229,6 +40007,24 @@ var HANDLERS = {
39229
40007
  data: await requireClient().post(`/animals/vet-visits/${requireArg(args, 0, "visit id")}/undo`, {}),
39230
40008
  render: renderRecord
39231
40009
  }),
40010
+ "animals lost-card": async ({ args, requireClient }) => ({
40011
+ data: await requireClient().get(`/animals/${requireArg(args, 0, "animal id")}/lost-card`),
40012
+ render: renderRecord
40013
+ }),
40014
+ "animals lost-card-set": async ({ args, flags, requireClient }) => {
40015
+ const id = requireArg(args, 0, "animal id");
40016
+ const body = parseInput(animalLostCardInputSchema, readDataFlag(flags));
40017
+ return {
40018
+ data: await requireClient().put(`/animals/${id}/lost-card`, body),
40019
+ render: renderRecord
40020
+ };
40021
+ },
40022
+ "animals lost-card-off": async ({ args, flags, requireClient }) => {
40023
+ const id = requireArg(args, 0, "animal id");
40024
+ assertDestructiveAllowed(flags, `turn off the lost-pet card of ${id} (its printed QR stops working)`);
40025
+ await requireClient().delete(`/animals/${id}/lost-card`);
40026
+ return { data: { ok: true, animalId: id }, render: renderRecord };
40027
+ },
39232
40028
  "runs change": async ({ args, flags, requireClient }) => {
39233
40029
  const id = requireArg(args, 0, "run id");
39234
40030
  const body = { ...readDataFlag(flags) };
@@ -39316,6 +40112,38 @@ var HANDLERS = {
39316
40112
  });
39317
40113
  return { data: await requireClient().post("/runs/steam/sync", body), render: renderRecord };
39318
40114
  },
40115
+ "sensors status": async ({ requireClient }) => ({
40116
+ data: await requireClient().get("/sensors/home-assistant"),
40117
+ render: renderRecord
40118
+ }),
40119
+ "sensors entities": async ({ requireClient }) => ({
40120
+ data: await requireClient().get("/sensors/home-assistant/entities"),
40121
+ render: renderList
40122
+ }),
40123
+ "sensors sync": async ({ requireClient }) => ({
40124
+ data: await requireClient().post("/sensors/home-assistant/sync", {}),
40125
+ render: renderRecord
40126
+ }),
40127
+ "sensors links": async ({ flags, requireClient }) => ({
40128
+ data: await requireClient().get("/sensors/links", {
40129
+ query: { nodeId: flagString(flags, "node") }
40130
+ }),
40131
+ render: renderList
40132
+ }),
40133
+ "sensors map": async ({ args, flags, requireClient }) => {
40134
+ const body = parseInput(createSensorLinkInputSchema, {
40135
+ externalId: requireArg(args, 0, "entity id"),
40136
+ nodeId: requireArg(args, 1, "node id"),
40137
+ reading: flagString(flags, "reading"),
40138
+ ...flagString(flags, "label") ? { label: flagString(flags, "label") } : {}
40139
+ });
40140
+ return { data: await requireClient().post("/sensors/links", body), render: renderRecord };
40141
+ },
40142
+ "sensors unmap": async ({ args, requireClient }) => {
40143
+ const id = requireArg(args, 0, "sensor link id");
40144
+ await requireClient().delete(`/sensors/links/${id}`);
40145
+ return { data: { ok: true, unmapped: id }, render: renderRecord };
40146
+ },
39319
40147
  "runs sessions list": async ({ args, requireClient }) => {
39320
40148
  const id = requireArg(args, 0, "run id");
39321
40149
  return { data: await requireClient().get(`/runs/${id}/sessions`), render: renderList };
@@ -39393,6 +40221,10 @@ var HANDLERS = {
39393
40221
  render: renderRecord
39394
40222
  };
39395
40223
  },
40224
+ "health medical-id": async ({ requireClient }) => ({
40225
+ data: await requireClient().get("/health/medical-id"),
40226
+ render: renderRecord
40227
+ }),
39396
40228
  "health summary": async ({ flags, requireClient }) => ({
39397
40229
  data: await requireClient().get("/health/summary", {
39398
40230
  query: { episodeId: flagString(flags, "episode") }
@@ -39407,6 +40239,14 @@ var HANDLERS = {
39407
40239
  data: await requireClient().delete(`/health/shares/${requireArg(args, 0, "id")}`),
39408
40240
  render: renderRecord
39409
40241
  }),
40242
+ "health google status": async ({ requireClient }) => ({
40243
+ data: await requireClient().get("/health/google-health"),
40244
+ render: renderRecord
40245
+ }),
40246
+ "health google sync": async ({ requireClient }) => ({
40247
+ data: await requireClient().post("/health/google-health/sync", {}),
40248
+ render: renderRecord
40249
+ }),
39410
40250
  "health consent": async ({ requireClient }) => ({
39411
40251
  data: await requireClient().get("/health/consent"),
39412
40252
  render: renderRecord
@@ -39632,6 +40472,23 @@ var HANDLERS = {
39632
40472
  const query = days ? { days } : {};
39633
40473
  return { data: await requireClient().get("/people/overview", { query }), render: renderRecord };
39634
40474
  },
40475
+ "people google": async ({ flags, requireClient }) => {
40476
+ const q = flagString(flags, "q");
40477
+ return {
40478
+ data: await requireClient().get("/people/google-contacts", { query: q ? { q } : {} }),
40479
+ render: renderRecord
40480
+ };
40481
+ },
40482
+ "people google-import": async ({ args, requireClient }) => {
40483
+ if (args.length === 0) {
40484
+ throw usageError("people google-import needs Google person ids, e.g. people/c123");
40485
+ }
40486
+ const body = parseInput(importGoogleContactsInputSchema, { resourceNames: args });
40487
+ return {
40488
+ data: await requireClient().post("/people/google-contacts/import", body),
40489
+ render: renderRecord
40490
+ };
40491
+ },
39635
40492
  "people brief": async ({ args, requireClient }) => {
39636
40493
  const id = requireArg(args, 0, "contact id");
39637
40494
  return { data: await requireClient().get(`/people/${id}/brief`), render: renderRecord };
@@ -39746,6 +40603,21 @@ var HANDLERS = {
39746
40603
  const body = parseInput(markGuestsSentInputSchema, readDataFlag(flags));
39747
40604
  return { data: await requireClient().post("/guests/sent", body), render: renderRecord };
39748
40605
  },
40606
+ "rsvp-answers list": async ({ flags, requireClient }) => {
40607
+ const list = flagString(flags, "list");
40608
+ if (!list)
40609
+ throw usageError("rsvp-answers list needs --list <guest list id>");
40610
+ const household = flagString(flags, "household");
40611
+ const query = parseInput(rsvpAnswersQuerySchema, {
40612
+ guestListId: list,
40613
+ ...household ? { householdId: household } : {}
40614
+ });
40615
+ return { data: await requireClient().get("/rsvp-answers", { query }), render: renderRecord };
40616
+ },
40617
+ "rsvp-answers set": async ({ flags, requireClient }) => {
40618
+ const body = parseInput(setRsvpAnswersInputSchema, readDataFlag(flags));
40619
+ return { data: await requireClient().put("/rsvp-answers", body), render: renderRecord };
40620
+ },
39749
40621
  "seating-proposals list": async ({ flags, requireClient }) => {
39750
40622
  const list = flagString(flags, "list");
39751
40623
  if (!list)