@robbeverhelst/do 1.38.0 → 1.40.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 +230 -5
  2. package/package.json +1 -1
package/dist/do.js CHANGED
@@ -4503,9 +4503,15 @@ var pushSubscriptions = pgTable("push_subscriptions", {
4503
4503
  var shoppingLists = pgTable("shopping_lists", {
4504
4504
  id: text("id").primaryKey().references(() => nodes.id),
4505
4505
  tenantId: text("tenant_id").notNull().references(() => tenants.id),
4506
- notes: text("notes")
4506
+ notes: text("notes"),
4507
+ groupByStore: boolean("group_by_store").notNull().default(false),
4508
+ recurrenceUnit: text("recurrence_unit").$type(),
4509
+ recurrenceInterval: integer("recurrence_interval").notNull().default(1),
4510
+ nextRestockAt: timestamp("next_restock_at", { withTimezone: true }),
4511
+ lastRestockedAt: timestamp("last_restocked_at", { withTimezone: true })
4507
4512
  }, (t) => [
4508
- index("shopping_lists_tenant_idx").on(t.tenantId)
4513
+ index("shopping_lists_tenant_idx").on(t.tenantId),
4514
+ index("shopping_lists_next_restock_idx").on(t.nextRestockAt)
4509
4515
  ]);
4510
4516
  var shoppingItems = pgTable("shopping_items", {
4511
4517
  id: text("id").primaryKey(),
@@ -4517,6 +4523,7 @@ var shoppingItems = pgTable("shopping_items", {
4517
4523
  isChecked: boolean("is_checked").notNull().default(false),
4518
4524
  sortOrder: integer("sort_order").notNull().default(0),
4519
4525
  notes: text("notes"),
4526
+ store: text("store"),
4520
4527
  facet: jsonb("facet").$type(),
4521
4528
  createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow()
4522
4529
  }, (t) => [
@@ -19609,6 +19616,24 @@ var watchPosterResultSchema = exports_external.object({
19609
19616
  year: exports_external.number().int().nullable(),
19610
19617
  kind: exports_external.enum(["movie", "show"]).nullable()
19611
19618
  });
19619
+ // ../../packages/schema/src/contracts/games.ts
19620
+ var gameCoverQuerySchema = exports_external.object({
19621
+ title: exports_external.string().min(1).max(300)
19622
+ });
19623
+ var gameCoverResultSchema = exports_external.object({
19624
+ coverUrl: exports_external.string().url().nullable(),
19625
+ year: exports_external.number().int().nullable(),
19626
+ platform: exports_external.string().nullable()
19627
+ });
19628
+ // ../../packages/schema/src/contracts/music.ts
19629
+ var albumCoverQuerySchema = exports_external.object({
19630
+ title: exports_external.string().min(1).max(300)
19631
+ });
19632
+ var albumCoverResultSchema = exports_external.object({
19633
+ coverUrl: exports_external.string().url().nullable(),
19634
+ year: exports_external.number().int().nullable(),
19635
+ artist: exports_external.string().nullable()
19636
+ });
19612
19637
  // ../../packages/schema/src/contracts/tasks.ts
19613
19638
  var taskSchema = createSelectSchema(tasks, {
19614
19639
  scheduledAt: exports_external.coerce.date().nullable(),
@@ -20041,7 +20066,16 @@ var reviewDayStatSchema = exports_external.object({
20041
20066
  });
20042
20067
  var reviewStatsSchema = exports_external.array(reviewDayStatSchema);
20043
20068
  // ../../packages/schema/src/contracts/shopping.ts
20044
- var shoppingListSchema = createSelectSchema(shoppingLists);
20069
+ var shoppingRecurrenceUnitSchema = exports_external.enum(["day", "week", "month"]);
20070
+ var shoppingListSchema = createSelectSchema(shoppingLists, {
20071
+ recurrenceUnit: shoppingRecurrenceUnitSchema.nullable(),
20072
+ nextRestockAt: exports_external.coerce.date().nullable(),
20073
+ lastRestockedAt: exports_external.coerce.date().nullable()
20074
+ });
20075
+ var shoppingRecurrenceInputSchema = exports_external.object({
20076
+ unit: shoppingRecurrenceUnitSchema,
20077
+ interval: exports_external.number().int().positive().default(1)
20078
+ }).strict();
20045
20079
  var itemFacetSchema = exports_external.record(exports_external.string(), exports_external.unknown());
20046
20080
  var shoppingItemSchema = createSelectSchema(shoppingItems, {
20047
20081
  createdAt: exports_external.coerce.date(),
@@ -20055,6 +20089,7 @@ var shoppingItemInputSchema = exports_external.object({
20055
20089
  isChecked: exports_external.boolean().optional(),
20056
20090
  sortOrder: exports_external.number().int().min(0).optional(),
20057
20091
  notes: exports_external.string().nullish(),
20092
+ store: exports_external.string().nullish(),
20058
20093
  facet: itemFacetSchema.nullish()
20059
20094
  });
20060
20095
  var createShoppingListInputSchema = exports_external.object({
@@ -20063,12 +20098,16 @@ var createShoppingListInputSchema = exports_external.object({
20063
20098
  parentId: ulidSchema.nullish(),
20064
20099
  notes: exports_external.string().nullish(),
20065
20100
  displayKind: exports_external.string().min(1).optional(),
20101
+ groupByStore: exports_external.boolean().optional(),
20102
+ recurrence: shoppingRecurrenceInputSchema.nullish(),
20066
20103
  items: exports_external.array(shoppingItemInputSchema).optional()
20067
20104
  });
20068
20105
  var updateShoppingListInputSchema = exports_external.object({
20069
20106
  title: exports_external.string().min(1).optional(),
20070
20107
  parentId: ulidSchema.nullish(),
20071
20108
  notes: exports_external.string().nullish(),
20109
+ groupByStore: exports_external.boolean().optional(),
20110
+ recurrence: shoppingRecurrenceInputSchema.nullish(),
20072
20111
  items: exports_external.array(shoppingItemInputSchema).optional()
20073
20112
  }).strict();
20074
20113
  var shoppingListViewSchema = shoppingListSchema.extend({
@@ -20142,13 +20181,63 @@ var watchFacetSchema = exports_external.object({
20142
20181
  year: exports_external.number().int().min(1888).max(2200).nullish(),
20143
20182
  posterUrl: exports_external.string().url().max(2048).nullish()
20144
20183
  }).strict();
20184
+ var GAME_SHELF_DISPLAY_KIND = "game-shelf";
20185
+ var gameStatusValues = ["backlog", "playing", "beaten", "dropped"];
20186
+ var gameStatusSchema = exports_external.enum(gameStatusValues);
20187
+ var gameFacetSchema = exports_external.object({
20188
+ status: gameStatusSchema.default("backlog"),
20189
+ platform: exports_external.string().min(1).max(100).nullish(),
20190
+ rating: exports_external.number().int().min(1).max(5).nullish(),
20191
+ hoursPlayed: exports_external.number().min(0).max(1e5).nullish(),
20192
+ coverUrl: exports_external.string().url().max(2048).nullish()
20193
+ }).strict();
20194
+ var BOTTLE_SHELF_DISPLAY_KIND = "bottle-shelf";
20195
+ var bottleTypeValues = ["wine", "whisky", "other"];
20196
+ var bottleTypeSchema = exports_external.enum(bottleTypeValues);
20197
+ var bottleFacetSchema = exports_external.object({
20198
+ type: bottleTypeSchema.default("wine"),
20199
+ region: exports_external.string().min(1).max(200).nullish(),
20200
+ vintage: exports_external.number().int().min(1000).max(2200).nullish(),
20201
+ rating: exports_external.number().int().min(1).max(5).nullish(),
20202
+ drinkBy: isoDateString.nullish(),
20203
+ quantity: exports_external.number().int().min(0).max(1e5).nullish()
20204
+ }).strict();
20205
+ var PLACE_SHELF_DISPLAY_KIND = "place-shelf";
20206
+ var placeStatusValues = ["want", "visited"];
20207
+ var placeStatusSchema = exports_external.enum(placeStatusValues);
20208
+ var placeFacetSchema = exports_external.object({
20209
+ status: placeStatusSchema.default("want"),
20210
+ country: exports_external.string().min(1).max(120).nullish(),
20211
+ city: exports_external.string().min(1).max(120).nullish(),
20212
+ lat: exports_external.number().min(-90).max(90).nullish(),
20213
+ lng: exports_external.number().min(-180).max(180).nullish(),
20214
+ rating: exports_external.number().int().min(1).max(5).nullish(),
20215
+ tripLink: exports_external.string().min(1).max(2048).nullish()
20216
+ }).strict();
20217
+ var ALBUM_SHELF_DISPLAY_KIND = "album-shelf";
20218
+ var albumStatusValues = ["want", "owned", "listened"];
20219
+ var albumStatusSchema = exports_external.enum(albumStatusValues);
20220
+ var albumFormatValues = ["vinyl", "digital", "cd"];
20221
+ var albumFormatSchema = exports_external.enum(albumFormatValues);
20222
+ var albumFacetSchema = exports_external.object({
20223
+ status: albumStatusSchema.default("want"),
20224
+ artist: exports_external.string().min(1).max(200).nullish(),
20225
+ format: albumFormatSchema.nullish(),
20226
+ rating: exports_external.number().int().min(1).max(5).nullish(),
20227
+ year: exports_external.number().int().min(1860).max(2200).nullish(),
20228
+ coverUrl: exports_external.string().url().max(2048).nullish()
20229
+ }).strict();
20145
20230
  var facetSchemasByDisplayKind = {
20146
20231
  [MEDIA_SHELF_DISPLAY_KIND]: mediaShelfFacetSchema,
20147
20232
  [PANTRY_DISPLAY_KIND]: pantryFacetSchema,
20148
20233
  [WARDROBE_DISPLAY_KIND]: wardrobeFacetSchema,
20149
20234
  [TOOLS_DISPLAY_KIND]: toolsFacetSchema,
20150
20235
  [MEDS_DISPLAY_KIND]: medsFacetSchema,
20151
- [WATCH_SHELF_DISPLAY_KIND]: watchFacetSchema
20236
+ [WATCH_SHELF_DISPLAY_KIND]: watchFacetSchema,
20237
+ [GAME_SHELF_DISPLAY_KIND]: gameFacetSchema,
20238
+ [BOTTLE_SHELF_DISPLAY_KIND]: bottleFacetSchema,
20239
+ [PLACE_SHELF_DISPLAY_KIND]: placeFacetSchema,
20240
+ [ALBUM_SHELF_DISPLAY_KIND]: albumFacetSchema
20152
20241
  };
20153
20242
 
20154
20243
  // ../../packages/schema/src/contracts/inventory.ts
@@ -21198,6 +21287,10 @@ var presetEntitySchema = exports_external.enum([
21198
21287
  "inventory",
21199
21288
  "library",
21200
21289
  "watchlist",
21290
+ "games",
21291
+ "cellar",
21292
+ "places",
21293
+ "music",
21201
21294
  "routine",
21202
21295
  "area",
21203
21296
  "project",
@@ -21554,6 +21647,38 @@ var automationPresets = [
21554
21647
  }
21555
21648
  ];
21556
21649
 
21650
+ // ../../packages/schema/src/presets/features/cellar.ts
21651
+ var bottles = [
21652
+ { title: "Rioja Reserva", type: "wine", region: "Rioja", vintage: 2016 },
21653
+ { title: "Lagavulin 16", type: "whisky", region: "Islay", vintage: 2008 },
21654
+ { title: "Barolo", type: "wine", region: "Piedmont", vintage: 2018 }
21655
+ ];
21656
+ var cellarPreset = {
21657
+ key: "cellar",
21658
+ entity: "cellar",
21659
+ name: "Cellar",
21660
+ description: "Wine & whisky you keep \u2014 type, region, vintage and ratings.",
21661
+ icon: "\uD83C\uDF77",
21662
+ color: "#9f1239",
21663
+ category: "Collecting",
21664
+ displayKind: BOTTLE_SHELF_DISPLAY_KIND,
21665
+ recipe: {
21666
+ nodes: [
21667
+ {
21668
+ ref: "list",
21669
+ kind: "shopping_list",
21670
+ title: "Cellar",
21671
+ displayKind: BOTTLE_SHELF_DISPLAY_KIND,
21672
+ items: bottles.map((b) => ({
21673
+ title: b.title,
21674
+ facet: { type: b.type, region: b.region, vintage: b.vintage, quantity: 1 }
21675
+ }))
21676
+ }
21677
+ ]
21678
+ }
21679
+ };
21680
+ var cellarPresets = [cellarPreset];
21681
+
21557
21682
  // ../../packages/schema/src/presets/features/challenges.ts
21558
21683
  var challengePresetDefs = [
21559
21684
  {
@@ -21701,6 +21826,38 @@ var contactPresets = contactCircleDefs.map((def) => ({
21701
21826
  }
21702
21827
  }));
21703
21828
 
21829
+ // ../../packages/schema/src/presets/features/games.ts
21830
+ var games2 = [
21831
+ { title: "Hollow Knight: Silksong", platform: "PC" },
21832
+ { title: "Elden Ring", platform: "PS5" },
21833
+ { title: "Baldur's Gate 3", platform: "PC" }
21834
+ ];
21835
+ var gamesPreset = {
21836
+ key: "games",
21837
+ entity: "games",
21838
+ name: "Games to play",
21839
+ description: "A backlog of games \u2014 covers, status and ratings.",
21840
+ icon: "\uD83C\uDFAE",
21841
+ color: "#8b5cf6",
21842
+ category: "Playing",
21843
+ displayKind: GAME_SHELF_DISPLAY_KIND,
21844
+ recipe: {
21845
+ nodes: [
21846
+ {
21847
+ ref: "list",
21848
+ kind: "shopping_list",
21849
+ title: "Games to play",
21850
+ displayKind: GAME_SHELF_DISPLAY_KIND,
21851
+ items: games2.map((g) => ({
21852
+ title: g.title,
21853
+ facet: { platform: g.platform, status: "backlog" }
21854
+ }))
21855
+ }
21856
+ ]
21857
+ }
21858
+ };
21859
+ var gamesPresets = [gamesPreset];
21860
+
21704
21861
  // ../../packages/schema/src/presets/features/habits.ts
21705
21862
  var habitPresets = [
21706
21863
  {
@@ -22577,6 +22734,70 @@ var mealPresets = [
22577
22734
  }
22578
22735
  ];
22579
22736
 
22737
+ // ../../packages/schema/src/presets/features/music.ts
22738
+ var albums = [
22739
+ { title: "In Rainbows", artist: "Radiohead", year: 2007 },
22740
+ { title: "Blonde", artist: "Frank Ocean", year: 2016 },
22741
+ { title: "Random Access Memories", artist: "Daft Punk", year: 2013 }
22742
+ ];
22743
+ var musicPreset = {
22744
+ key: "music",
22745
+ entity: "music",
22746
+ name: "Albums",
22747
+ description: "Albums to hear and own \u2014 artist, format, status and ratings.",
22748
+ icon: "\uD83D\uDCBF",
22749
+ color: "#db2777",
22750
+ category: "Listening",
22751
+ displayKind: ALBUM_SHELF_DISPLAY_KIND,
22752
+ recipe: {
22753
+ nodes: [
22754
+ {
22755
+ ref: "list",
22756
+ kind: "shopping_list",
22757
+ title: "Albums",
22758
+ displayKind: ALBUM_SHELF_DISPLAY_KIND,
22759
+ items: albums.map((a) => ({
22760
+ title: a.title,
22761
+ facet: { artist: a.artist, year: a.year, status: "want" }
22762
+ }))
22763
+ }
22764
+ ]
22765
+ }
22766
+ };
22767
+ var musicPresets = [musicPreset];
22768
+
22769
+ // ../../packages/schema/src/presets/features/places.ts
22770
+ var places = [
22771
+ { title: "Kyoto temples", country: "Japan", city: "Kyoto" },
22772
+ { title: "Northern Lights", country: "Iceland", city: "Reykjav\xEDk" },
22773
+ { title: "Patagonia trek", country: "Argentina", city: "El Chalt\xE9n" }
22774
+ ];
22775
+ var placesPreset = {
22776
+ key: "places",
22777
+ entity: "places",
22778
+ name: "Places to go",
22779
+ description: "A bucket-list of places \u2014 want/visited, location and ratings.",
22780
+ icon: "\uD83D\uDCCD",
22781
+ color: "#0d9488",
22782
+ category: "Exploring",
22783
+ displayKind: PLACE_SHELF_DISPLAY_KIND,
22784
+ recipe: {
22785
+ nodes: [
22786
+ {
22787
+ ref: "list",
22788
+ kind: "shopping_list",
22789
+ title: "Places to go",
22790
+ displayKind: PLACE_SHELF_DISPLAY_KIND,
22791
+ items: places.map((p) => ({
22792
+ title: p.title,
22793
+ facet: { country: p.country, city: p.city, status: "want" }
22794
+ }))
22795
+ }
22796
+ ]
22797
+ }
22798
+ };
22799
+ var placesPresets = [placesPreset];
22800
+
22580
22801
  // ../../packages/schema/src/presets/features/projects.ts
22581
22802
  var projectPresetDefs = [
22582
22803
  {
@@ -22802,6 +23023,10 @@ var featurePresets = [
22802
23023
  ...habitPresets,
22803
23024
  ...shoppingListPresets,
22804
23025
  ...watchlistPresets,
23026
+ ...gamesPresets,
23027
+ ...cellarPresets,
23028
+ ...placesPresets,
23029
+ ...musicPresets,
22805
23030
  ...inventoryPresets,
22806
23031
  ...routinePresets,
22807
23032
  ...areaPresets,
@@ -23067,7 +23292,7 @@ function parseCapture2(input) {
23067
23292
 
23068
23293
  // src/meta.ts
23069
23294
  var CLI_NAME = "do";
23070
- var VERSION = "1.38.0";
23295
+ var VERSION = "1.40.0";
23071
23296
  var API_PREFIX = "/api/v1";
23072
23297
  var DEFAULT_API_URL = "http://localhost:3001";
23073
23298
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robbeverhelst/do",
3
- "version": "1.38.0",
3
+ "version": "1.40.0",
4
4
  "private": false,
5
5
  "description": "do — the agent-drivable CLI over the public /api/v1 surface",
6
6
  "type": "module",