@robbeverhelst/do 1.94.0 → 1.96.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/do.js +284 -186
- package/package.json +1 -1
package/dist/do.js
CHANGED
|
@@ -4753,8 +4753,8 @@ var connectionSyncState = pgTable("connection_sync_state", {
|
|
|
4753
4753
|
var calendarEventLinks = pgTable("calendar_event_links", {
|
|
4754
4754
|
id: text("id").primaryKey(),
|
|
4755
4755
|
tenantId: text("tenant_id").notNull().references(() => tenants.id),
|
|
4756
|
-
connectionId: text("connection_id").notNull().references(() => connections.id),
|
|
4757
|
-
nodeId: text("node_id").notNull().references(() => nodes.id),
|
|
4756
|
+
connectionId: text("connection_id").notNull().references(() => connections.id, { onDelete: "cascade" }),
|
|
4757
|
+
nodeId: text("node_id").notNull().references(() => nodes.id, { onDelete: "cascade" }),
|
|
4758
4758
|
externalCalendarId: text("external_calendar_id").notNull(),
|
|
4759
4759
|
externalEventId: text("external_event_id").notNull(),
|
|
4760
4760
|
etag: text("etag"),
|
|
@@ -4767,6 +4767,25 @@ var calendarEventLinks = pgTable("calendar_event_links", {
|
|
|
4767
4767
|
unique("calendar_event_links_connection_event_uniq").on(t.connectionId, t.externalEventId),
|
|
4768
4768
|
index("calendar_event_links_tenant_connection_idx").on(t.tenantId, t.connectionId)
|
|
4769
4769
|
]);
|
|
4770
|
+
// ../../packages/schema/src/db/media.ts
|
|
4771
|
+
var bytea = customType({
|
|
4772
|
+
dataType() {
|
|
4773
|
+
return "bytea";
|
|
4774
|
+
}
|
|
4775
|
+
});
|
|
4776
|
+
var mediaAssets = pgTable("media_assets", {
|
|
4777
|
+
id: text("id").primaryKey(),
|
|
4778
|
+
tenantId: text("tenant_id").notNull().references(() => tenants.id),
|
|
4779
|
+
contentHash: text("content_hash").notNull(),
|
|
4780
|
+
contentType: text("content_type").notNull(),
|
|
4781
|
+
byteSize: integer("byte_size").notNull(),
|
|
4782
|
+
data: bytea("data").notNull(),
|
|
4783
|
+
sourceUrl: text("source_url"),
|
|
4784
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow()
|
|
4785
|
+
}, (t) => [
|
|
4786
|
+
unique("media_assets_tenant_hash_uniq").on(t.tenantId, t.contentHash),
|
|
4787
|
+
index("media_assets_tenant_idx").on(t.tenantId)
|
|
4788
|
+
]);
|
|
4770
4789
|
// ../../packages/schema/src/db/api-keys.ts
|
|
4771
4790
|
var apiKeys = pgTable("api_keys", {
|
|
4772
4791
|
id: text("id").primaryKey(),
|
|
@@ -5037,6 +5056,26 @@ var challengeParticipants = pgTable("challenge_participants", {
|
|
|
5037
5056
|
index("challenge_participants_tenant_idx").on(t.tenantId),
|
|
5038
5057
|
index("challenge_participants_user_idx").on(t.tenantId, t.userId)
|
|
5039
5058
|
]);
|
|
5059
|
+
// ../../packages/schema/src/db/user-presets.ts
|
|
5060
|
+
var userPresets = pgTable("user_presets", {
|
|
5061
|
+
id: text("id").primaryKey(),
|
|
5062
|
+
tenantId: text("tenant_id").notNull().references(() => tenants.id, { onDelete: "cascade" }),
|
|
5063
|
+
authorUserId: text("author_user_id").notNull().references(() => users.id),
|
|
5064
|
+
entity: text("entity").notNull(),
|
|
5065
|
+
name: text("name").notNull(),
|
|
5066
|
+
description: text("description").notNull(),
|
|
5067
|
+
icon: text("icon").notNull(),
|
|
5068
|
+
color: text("color").notNull(),
|
|
5069
|
+
category: text("category").notNull(),
|
|
5070
|
+
displayKind: text("display_kind"),
|
|
5071
|
+
recipe: jsonb("recipe").$type().notNull(),
|
|
5072
|
+
visibility: text("visibility").notNull().default("private"),
|
|
5073
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
5074
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
5075
|
+
}, (t) => [
|
|
5076
|
+
index("user_presets_tenant_idx").on(t.tenantId),
|
|
5077
|
+
index("user_presets_visibility_idx").on(t.visibility)
|
|
5078
|
+
]);
|
|
5040
5079
|
// ../../packages/schema/src/db/gamification.ts
|
|
5041
5080
|
var gamificationProfiles = pgTable("gamification_profiles", {
|
|
5042
5081
|
id: text("id").primaryKey(),
|
|
@@ -20481,35 +20520,14 @@ var shoppingListDetailSchema = shoppingListViewSchema.extend({
|
|
|
20481
20520
|
var setShoppingItemCheckedInputSchema = exports_external.object({ isChecked: exports_external.boolean() }).strict();
|
|
20482
20521
|
// ../../packages/schema/src/presets/facets.ts
|
|
20483
20522
|
var PANTRY_DISPLAY_KIND = "pantry";
|
|
20484
|
-
var WARDROBE_DISPLAY_KIND = "wardrobe";
|
|
20485
|
-
var TOOLS_DISPLAY_KIND = "tools";
|
|
20486
20523
|
var MEDS_DISPLAY_KIND = "meds";
|
|
20487
|
-
var INVENTORY_AREA_KINDS = [
|
|
20488
|
-
PANTRY_DISPLAY_KIND,
|
|
20489
|
-
WARDROBE_DISPLAY_KIND,
|
|
20490
|
-
TOOLS_DISPLAY_KIND,
|
|
20491
|
-
MEDS_DISPLAY_KIND
|
|
20492
|
-
];
|
|
20524
|
+
var INVENTORY_AREA_KINDS = [PANTRY_DISPLAY_KIND, MEDS_DISPLAY_KIND];
|
|
20493
20525
|
var INVENTORY_DISPLAY_KINDS = ["default", ...INVENTORY_AREA_KINDS];
|
|
20494
20526
|
var isoDateString = exports_external.string().regex(/^\d{4}-\d{2}-\d{2}$/, "must be an ISO date (YYYY-MM-DD)");
|
|
20495
|
-
var wardrobeSeasonValues = ["spring", "summer", "autumn", "winter", "all-season"];
|
|
20496
|
-
var wardrobeSeasonSchema = exports_external.enum(wardrobeSeasonValues);
|
|
20497
|
-
var toolConditionValues = ["new", "good", "worn", "broken"];
|
|
20498
|
-
var toolConditionSchema = exports_external.enum(toolConditionValues);
|
|
20499
20527
|
var pantryFacetSchema = exports_external.object({
|
|
20500
20528
|
brand: exports_external.string().min(1).max(200).nullish(),
|
|
20501
20529
|
openedAt: isoDateString.nullish()
|
|
20502
20530
|
}).strict();
|
|
20503
|
-
var wardrobeFacetSchema = exports_external.object({
|
|
20504
|
-
size: exports_external.string().min(1).max(50).nullish(),
|
|
20505
|
-
season: wardrobeSeasonSchema.nullish(),
|
|
20506
|
-
color: exports_external.string().min(1).max(50).nullish()
|
|
20507
|
-
}).strict();
|
|
20508
|
-
var toolsFacetSchema = exports_external.object({
|
|
20509
|
-
brand: exports_external.string().min(1).max(200).nullish(),
|
|
20510
|
-
condition: toolConditionSchema.nullish(),
|
|
20511
|
-
lastServicedAt: isoDateString.nullish()
|
|
20512
|
-
}).strict();
|
|
20513
20531
|
var medsFacetSchema = exports_external.object({
|
|
20514
20532
|
dose: exports_external.string().min(1).max(100).nullish(),
|
|
20515
20533
|
refillBy: isoDateString.nullish(),
|
|
@@ -20517,8 +20535,6 @@ var medsFacetSchema = exports_external.object({
|
|
|
20517
20535
|
}).strict();
|
|
20518
20536
|
var facetSchemasByDisplayKind = {
|
|
20519
20537
|
[PANTRY_DISPLAY_KIND]: pantryFacetSchema,
|
|
20520
|
-
[WARDROBE_DISPLAY_KIND]: wardrobeFacetSchema,
|
|
20521
|
-
[TOOLS_DISPLAY_KIND]: toolsFacetSchema,
|
|
20522
20538
|
[MEDS_DISPLAY_KIND]: medsFacetSchema
|
|
20523
20539
|
};
|
|
20524
20540
|
|
|
@@ -20575,7 +20591,16 @@ var restockInputSchema = exports_external.object({
|
|
|
20575
20591
|
// ../../packages/schema/src/contracts/collection.ts
|
|
20576
20592
|
var collectionStatusValues = ["want", "have", "doing", "done", "dropped"];
|
|
20577
20593
|
var collectionStatusSchema = exports_external.enum(collectionStatusValues);
|
|
20578
|
-
var collectionTypeValues = [
|
|
20594
|
+
var collectionTypeValues = [
|
|
20595
|
+
"book",
|
|
20596
|
+
"film",
|
|
20597
|
+
"game",
|
|
20598
|
+
"music",
|
|
20599
|
+
"place",
|
|
20600
|
+
"wine",
|
|
20601
|
+
"wardrobe",
|
|
20602
|
+
"tools"
|
|
20603
|
+
];
|
|
20579
20604
|
var collectionTypeSchema = exports_external.enum(collectionTypeValues);
|
|
20580
20605
|
var collectionViewValues = ["grid", "shelf", "map"];
|
|
20581
20606
|
var collectionViewSchema = exports_external.enum(collectionViewValues);
|
|
@@ -21729,6 +21754,197 @@ var selfComparisonSchema = exports_external.object({
|
|
|
21729
21754
|
weekStart: exports_external.coerce.date(),
|
|
21730
21755
|
metrics: exports_external.array(selfComparisonMetricSchema)
|
|
21731
21756
|
});
|
|
21757
|
+
// ../../packages/schema/src/presets/recipe.ts
|
|
21758
|
+
var presetEntitySchema = exports_external.enum([
|
|
21759
|
+
"habit",
|
|
21760
|
+
"list",
|
|
21761
|
+
"inventory",
|
|
21762
|
+
"routine",
|
|
21763
|
+
"area",
|
|
21764
|
+
"project",
|
|
21765
|
+
"recipe",
|
|
21766
|
+
"contact",
|
|
21767
|
+
"challenge",
|
|
21768
|
+
"automation"
|
|
21769
|
+
]);
|
|
21770
|
+
var recipeNodeBase = {
|
|
21771
|
+
ref: exports_external.string().min(1),
|
|
21772
|
+
parentRef: exports_external.string().min(1).nullish()
|
|
21773
|
+
};
|
|
21774
|
+
var recipeHabitNodeSchema = exports_external.object({
|
|
21775
|
+
...recipeNodeBase,
|
|
21776
|
+
kind: exports_external.literal("habit"),
|
|
21777
|
+
title: exports_external.string().min(1),
|
|
21778
|
+
measurementType: habitMeasurementTypeSchema,
|
|
21779
|
+
targetValue: exports_external.number().nonnegative().nullish(),
|
|
21780
|
+
targetUnit: exports_external.string().min(1).nullish(),
|
|
21781
|
+
period: habitPeriodSchema.optional(),
|
|
21782
|
+
frequencyCount: exports_external.number().int().positive().optional()
|
|
21783
|
+
});
|
|
21784
|
+
var recipeShoppingItemSchema = exports_external.object({
|
|
21785
|
+
title: exports_external.string().min(1),
|
|
21786
|
+
quantity: exports_external.number().positive().nullish(),
|
|
21787
|
+
unit: exports_external.string().min(1).nullish(),
|
|
21788
|
+
notes: exports_external.string().min(1).nullish(),
|
|
21789
|
+
facet: itemFacetSchema.nullish()
|
|
21790
|
+
});
|
|
21791
|
+
var recipeShoppingListNodeSchema = exports_external.object({
|
|
21792
|
+
...recipeNodeBase,
|
|
21793
|
+
kind: exports_external.literal("shopping_list"),
|
|
21794
|
+
title: exports_external.string().min(1),
|
|
21795
|
+
notes: exports_external.string().min(1).nullish(),
|
|
21796
|
+
displayKind: exports_external.string().min(1).optional(),
|
|
21797
|
+
items: exports_external.array(recipeShoppingItemSchema).optional()
|
|
21798
|
+
});
|
|
21799
|
+
var recipeInventoryNodeSchema = exports_external.object({
|
|
21800
|
+
...recipeNodeBase,
|
|
21801
|
+
kind: exports_external.literal("inventory_item"),
|
|
21802
|
+
title: exports_external.string().min(1),
|
|
21803
|
+
quantity: exports_external.number().min(0).optional(),
|
|
21804
|
+
unit: exports_external.string().min(1).nullish(),
|
|
21805
|
+
category: exports_external.string().min(1).nullish(),
|
|
21806
|
+
location: exports_external.string().min(1).nullish(),
|
|
21807
|
+
lowStockThreshold: exports_external.number().min(0).nullish()
|
|
21808
|
+
});
|
|
21809
|
+
var recipeRoutineStepSchema = exports_external.object({
|
|
21810
|
+
title: exports_external.string().min(1),
|
|
21811
|
+
durationMinutes: exports_external.number().int().positive().nullish(),
|
|
21812
|
+
notes: exports_external.string().min(1).nullish()
|
|
21813
|
+
});
|
|
21814
|
+
var recipeRoutineNodeSchema = exports_external.object({
|
|
21815
|
+
...recipeNodeBase,
|
|
21816
|
+
kind: exports_external.literal("routine"),
|
|
21817
|
+
title: exports_external.string().min(1),
|
|
21818
|
+
routineKind: routineKindSchema.optional(),
|
|
21819
|
+
notes: exports_external.string().min(1).nullish(),
|
|
21820
|
+
steps: exports_external.array(recipeRoutineStepSchema).optional()
|
|
21821
|
+
});
|
|
21822
|
+
var recipeAreaNodeSchema = exports_external.object({
|
|
21823
|
+
...recipeNodeBase,
|
|
21824
|
+
kind: exports_external.literal("area"),
|
|
21825
|
+
title: exports_external.string().min(1),
|
|
21826
|
+
color: areaColorSchema.optional(),
|
|
21827
|
+
icon: exports_external.string().min(1).nullish(),
|
|
21828
|
+
reviewCadence: reviewCadenceSchema.nullish()
|
|
21829
|
+
});
|
|
21830
|
+
var recipeProjectNodeSchema = exports_external.object({
|
|
21831
|
+
...recipeNodeBase,
|
|
21832
|
+
kind: exports_external.literal("project"),
|
|
21833
|
+
title: exports_external.string().min(1),
|
|
21834
|
+
status: projectStatusSchema.optional(),
|
|
21835
|
+
notes: exports_external.string().min(1).nullish(),
|
|
21836
|
+
milestones: exports_external.array(exports_external.object({ title: exports_external.string().min(1) })).optional()
|
|
21837
|
+
});
|
|
21838
|
+
var recipeIngredientItemSchema = exports_external.object({
|
|
21839
|
+
name: exports_external.string().min(1),
|
|
21840
|
+
quantity: exports_external.number().positive().nullish(),
|
|
21841
|
+
unit: exports_external.string().min(1).nullish()
|
|
21842
|
+
});
|
|
21843
|
+
var recipeRecipeNodeSchema = exports_external.object({
|
|
21844
|
+
...recipeNodeBase,
|
|
21845
|
+
kind: exports_external.literal("recipe"),
|
|
21846
|
+
title: exports_external.string().min(1),
|
|
21847
|
+
description: exports_external.string().min(1).nullish(),
|
|
21848
|
+
instructions: exports_external.string().min(1).nullish(),
|
|
21849
|
+
servings: exports_external.number().int().positive().nullish(),
|
|
21850
|
+
prepMinutes: exports_external.number().int().min(0).nullish(),
|
|
21851
|
+
cookMinutes: exports_external.number().int().min(0).nullish(),
|
|
21852
|
+
tags: exports_external.array(exports_external.string().min(1)).optional(),
|
|
21853
|
+
ingredients: exports_external.array(recipeIngredientItemSchema).optional()
|
|
21854
|
+
});
|
|
21855
|
+
var recipeContactNodeSchema = exports_external.object({
|
|
21856
|
+
...recipeNodeBase,
|
|
21857
|
+
kind: exports_external.literal("contact"),
|
|
21858
|
+
title: exports_external.string().min(1),
|
|
21859
|
+
company: exports_external.string().min(1).nullish(),
|
|
21860
|
+
notes: exports_external.string().min(1).nullish(),
|
|
21861
|
+
tags: exports_external.array(exports_external.string().min(1)).optional()
|
|
21862
|
+
});
|
|
21863
|
+
var recipeChallengeNodeSchema = exports_external.object({
|
|
21864
|
+
...recipeNodeBase,
|
|
21865
|
+
kind: exports_external.literal("challenge"),
|
|
21866
|
+
title: exports_external.string().min(1),
|
|
21867
|
+
description: exports_external.string().min(1).nullish(),
|
|
21868
|
+
metric: exports_external.string().min(1),
|
|
21869
|
+
target: exports_external.number().int().positive(),
|
|
21870
|
+
durationDays: exports_external.number().int().positive()
|
|
21871
|
+
});
|
|
21872
|
+
var recipeAutomationNodeSchema = exports_external.object({
|
|
21873
|
+
...recipeNodeBase,
|
|
21874
|
+
kind: exports_external.literal("automation"),
|
|
21875
|
+
name: exports_external.string().min(1),
|
|
21876
|
+
enabled: exports_external.boolean().optional(),
|
|
21877
|
+
trigger: automationTriggerSchema,
|
|
21878
|
+
condition: automationConditionSchema.nullish(),
|
|
21879
|
+
action: automationActionSchema
|
|
21880
|
+
});
|
|
21881
|
+
var recipeNodeSchema = exports_external.discriminatedUnion("kind", [
|
|
21882
|
+
recipeHabitNodeSchema,
|
|
21883
|
+
recipeShoppingListNodeSchema,
|
|
21884
|
+
recipeInventoryNodeSchema,
|
|
21885
|
+
recipeRoutineNodeSchema,
|
|
21886
|
+
recipeAreaNodeSchema,
|
|
21887
|
+
recipeProjectNodeSchema,
|
|
21888
|
+
recipeRecipeNodeSchema,
|
|
21889
|
+
recipeContactNodeSchema,
|
|
21890
|
+
recipeChallengeNodeSchema,
|
|
21891
|
+
recipeAutomationNodeSchema
|
|
21892
|
+
]);
|
|
21893
|
+
var presetRecipeSchema = exports_external.object({
|
|
21894
|
+
nodes: exports_external.array(recipeNodeSchema).min(1)
|
|
21895
|
+
});
|
|
21896
|
+
var presetSchema = exports_external.object({
|
|
21897
|
+
key: exports_external.string().min(1),
|
|
21898
|
+
entity: presetEntitySchema,
|
|
21899
|
+
name: exports_external.string().min(1),
|
|
21900
|
+
description: exports_external.string().min(1),
|
|
21901
|
+
icon: exports_external.string().min(1),
|
|
21902
|
+
color: exports_external.string().regex(/^#[0-9a-fA-F]{6}$/),
|
|
21903
|
+
category: exports_external.string().min(1),
|
|
21904
|
+
displayKind: exports_external.string().min(1).optional(),
|
|
21905
|
+
featured: exports_external.boolean().optional(),
|
|
21906
|
+
recipe: presetRecipeSchema
|
|
21907
|
+
});
|
|
21908
|
+
var presetInstallResultSchema = exports_external.object({
|
|
21909
|
+
key: exports_external.string().min(1),
|
|
21910
|
+
entity: presetEntitySchema,
|
|
21911
|
+
nodeIds: exports_external.array(exports_external.string()),
|
|
21912
|
+
nodeCount: exports_external.number().int().nonnegative()
|
|
21913
|
+
});
|
|
21914
|
+
var MS_PER_DAY = 24 * 60 * 60 * 1000;
|
|
21915
|
+
|
|
21916
|
+
// ../../packages/schema/src/contracts/user-presets.ts
|
|
21917
|
+
var userPresetVisibilitySchema = exports_external.enum(["private", "shared"]);
|
|
21918
|
+
var hexColor = exports_external.string().regex(/^#[0-9a-fA-F]{6}$/, "color must be a #rrggbb hex string");
|
|
21919
|
+
var userPresetSchema = createSelectSchema(userPresets, {
|
|
21920
|
+
entity: presetEntitySchema,
|
|
21921
|
+
color: hexColor,
|
|
21922
|
+
recipe: presetRecipeSchema,
|
|
21923
|
+
visibility: userPresetVisibilitySchema,
|
|
21924
|
+
createdAt: exports_external.coerce.date(),
|
|
21925
|
+
updatedAt: exports_external.coerce.date()
|
|
21926
|
+
});
|
|
21927
|
+
var sharedUserPresetSchema = userPresetSchema.omit({
|
|
21928
|
+
tenantId: true,
|
|
21929
|
+
authorUserId: true
|
|
21930
|
+
});
|
|
21931
|
+
var createUserPresetInputSchema = createInsertSchema(userPresets, {
|
|
21932
|
+
name: exports_external.string().min(1).max(120),
|
|
21933
|
+
description: exports_external.string().min(1).max(500),
|
|
21934
|
+
icon: exports_external.string().min(1).max(16),
|
|
21935
|
+
color: hexColor,
|
|
21936
|
+
category: exports_external.string().min(1).max(80),
|
|
21937
|
+
entity: presetEntitySchema,
|
|
21938
|
+
displayKind: exports_external.string().min(1).max(80).nullish(),
|
|
21939
|
+
recipe: presetRecipeSchema,
|
|
21940
|
+
visibility: userPresetVisibilitySchema.optional()
|
|
21941
|
+
}).omit({
|
|
21942
|
+
id: true,
|
|
21943
|
+
tenantId: true,
|
|
21944
|
+
authorUserId: true,
|
|
21945
|
+
createdAt: true,
|
|
21946
|
+
updatedAt: true
|
|
21947
|
+
}).strict();
|
|
21732
21948
|
// ../../packages/schema/src/contracts/gamification.ts
|
|
21733
21949
|
var gamificationProfileSchema = createSelectSchema(gamificationProfiles, {
|
|
21734
21950
|
createdAt: exports_external.coerce.date(),
|
|
@@ -22152,6 +22368,26 @@ var wineFacetSchema = exports_external.object({
|
|
|
22152
22368
|
region: exports_external.string().min(1).max(200).nullish(),
|
|
22153
22369
|
vintage: exports_external.number().int().min(1800).max(2100).nullish()
|
|
22154
22370
|
}).strict();
|
|
22371
|
+
var isoDateString2 = exports_external.string().regex(/^\d{4}-\d{2}-\d{2}$/, "must be an ISO date (YYYY-MM-DD)");
|
|
22372
|
+
var wardrobeSeasonValues = ["spring", "summer", "autumn", "winter", "all-season"];
|
|
22373
|
+
var wardrobeSeasonSchema = exports_external.enum(wardrobeSeasonValues);
|
|
22374
|
+
var toolConditionValues = ["new", "good", "worn", "broken"];
|
|
22375
|
+
var toolConditionSchema = exports_external.enum(toolConditionValues);
|
|
22376
|
+
var wardrobeFacetSchema = exports_external.object({
|
|
22377
|
+
brand: exports_external.string().min(1).max(200).nullish(),
|
|
22378
|
+
size: exports_external.string().min(1).max(50).nullish(),
|
|
22379
|
+
color: exports_external.string().min(1).max(50).nullish(),
|
|
22380
|
+
season: wardrobeSeasonSchema.nullish(),
|
|
22381
|
+
location: exports_external.string().min(1).max(200).nullish(),
|
|
22382
|
+
coverUrl
|
|
22383
|
+
}).strict();
|
|
22384
|
+
var toolsFacetSchema = exports_external.object({
|
|
22385
|
+
brand: exports_external.string().min(1).max(200).nullish(),
|
|
22386
|
+
condition: toolConditionSchema.nullish(),
|
|
22387
|
+
location: exports_external.string().min(1).max(200).nullish(),
|
|
22388
|
+
lastServicedAt: isoDateString2.nullish(),
|
|
22389
|
+
coverUrl
|
|
22390
|
+
}).strict();
|
|
22155
22391
|
var COLLECTION_TYPES = {
|
|
22156
22392
|
book: {
|
|
22157
22393
|
key: "book",
|
|
@@ -22239,6 +22475,26 @@ var COLLECTION_TYPES = {
|
|
|
22239
22475
|
view: "grid",
|
|
22240
22476
|
subtitleKey: "region",
|
|
22241
22477
|
depletesOnLog: true
|
|
22478
|
+
},
|
|
22479
|
+
wardrobe: {
|
|
22480
|
+
key: "wardrobe",
|
|
22481
|
+
label: "Wardrobe",
|
|
22482
|
+
itemNoun: "item",
|
|
22483
|
+
statuses: ["want", "have"],
|
|
22484
|
+
statusLabels: { want: "Want", have: "Owned" },
|
|
22485
|
+
facetSchema: wardrobeFacetSchema,
|
|
22486
|
+
view: "grid",
|
|
22487
|
+
subtitleKey: "brand"
|
|
22488
|
+
},
|
|
22489
|
+
tools: {
|
|
22490
|
+
key: "tools",
|
|
22491
|
+
label: "Tools",
|
|
22492
|
+
itemNoun: "tool",
|
|
22493
|
+
statuses: ["want", "have"],
|
|
22494
|
+
statusLabels: { want: "Want", have: "Owned" },
|
|
22495
|
+
facetSchema: toolsFacetSchema,
|
|
22496
|
+
view: "grid",
|
|
22497
|
+
subtitleKey: "brand"
|
|
22242
22498
|
}
|
|
22243
22499
|
};
|
|
22244
22500
|
var COLLECTION_TYPE_LIST = collectionTypeValues.map((k) => COLLECTION_TYPES[k]);
|
|
@@ -22327,164 +22583,6 @@ var TRACKING_TYPES = {
|
|
|
22327
22583
|
}
|
|
22328
22584
|
};
|
|
22329
22585
|
var TRACKING_TYPE_LIST = trackingTypeValues.map((k) => TRACKING_TYPES[k]);
|
|
22330
|
-
// ../../packages/schema/src/presets/recipe.ts
|
|
22331
|
-
var presetEntitySchema = exports_external.enum([
|
|
22332
|
-
"habit",
|
|
22333
|
-
"list",
|
|
22334
|
-
"inventory",
|
|
22335
|
-
"routine",
|
|
22336
|
-
"area",
|
|
22337
|
-
"project",
|
|
22338
|
-
"recipe",
|
|
22339
|
-
"contact",
|
|
22340
|
-
"challenge",
|
|
22341
|
-
"automation"
|
|
22342
|
-
]);
|
|
22343
|
-
var recipeNodeBase = {
|
|
22344
|
-
ref: exports_external.string().min(1),
|
|
22345
|
-
parentRef: exports_external.string().min(1).nullish()
|
|
22346
|
-
};
|
|
22347
|
-
var recipeHabitNodeSchema = exports_external.object({
|
|
22348
|
-
...recipeNodeBase,
|
|
22349
|
-
kind: exports_external.literal("habit"),
|
|
22350
|
-
title: exports_external.string().min(1),
|
|
22351
|
-
measurementType: habitMeasurementTypeSchema,
|
|
22352
|
-
targetValue: exports_external.number().nonnegative().nullish(),
|
|
22353
|
-
targetUnit: exports_external.string().min(1).nullish(),
|
|
22354
|
-
period: habitPeriodSchema.optional(),
|
|
22355
|
-
frequencyCount: exports_external.number().int().positive().optional()
|
|
22356
|
-
});
|
|
22357
|
-
var recipeShoppingItemSchema = exports_external.object({
|
|
22358
|
-
title: exports_external.string().min(1),
|
|
22359
|
-
quantity: exports_external.number().positive().nullish(),
|
|
22360
|
-
unit: exports_external.string().min(1).nullish(),
|
|
22361
|
-
notes: exports_external.string().min(1).nullish(),
|
|
22362
|
-
facet: itemFacetSchema.nullish()
|
|
22363
|
-
});
|
|
22364
|
-
var recipeShoppingListNodeSchema = exports_external.object({
|
|
22365
|
-
...recipeNodeBase,
|
|
22366
|
-
kind: exports_external.literal("shopping_list"),
|
|
22367
|
-
title: exports_external.string().min(1),
|
|
22368
|
-
notes: exports_external.string().min(1).nullish(),
|
|
22369
|
-
displayKind: exports_external.string().min(1).optional(),
|
|
22370
|
-
items: exports_external.array(recipeShoppingItemSchema).optional()
|
|
22371
|
-
});
|
|
22372
|
-
var recipeInventoryNodeSchema = exports_external.object({
|
|
22373
|
-
...recipeNodeBase,
|
|
22374
|
-
kind: exports_external.literal("inventory_item"),
|
|
22375
|
-
title: exports_external.string().min(1),
|
|
22376
|
-
quantity: exports_external.number().min(0).optional(),
|
|
22377
|
-
unit: exports_external.string().min(1).nullish(),
|
|
22378
|
-
category: exports_external.string().min(1).nullish(),
|
|
22379
|
-
location: exports_external.string().min(1).nullish(),
|
|
22380
|
-
lowStockThreshold: exports_external.number().min(0).nullish()
|
|
22381
|
-
});
|
|
22382
|
-
var recipeRoutineStepSchema = exports_external.object({
|
|
22383
|
-
title: exports_external.string().min(1),
|
|
22384
|
-
durationMinutes: exports_external.number().int().positive().nullish(),
|
|
22385
|
-
notes: exports_external.string().min(1).nullish()
|
|
22386
|
-
});
|
|
22387
|
-
var recipeRoutineNodeSchema = exports_external.object({
|
|
22388
|
-
...recipeNodeBase,
|
|
22389
|
-
kind: exports_external.literal("routine"),
|
|
22390
|
-
title: exports_external.string().min(1),
|
|
22391
|
-
routineKind: routineKindSchema.optional(),
|
|
22392
|
-
notes: exports_external.string().min(1).nullish(),
|
|
22393
|
-
steps: exports_external.array(recipeRoutineStepSchema).optional()
|
|
22394
|
-
});
|
|
22395
|
-
var recipeAreaNodeSchema = exports_external.object({
|
|
22396
|
-
...recipeNodeBase,
|
|
22397
|
-
kind: exports_external.literal("area"),
|
|
22398
|
-
title: exports_external.string().min(1),
|
|
22399
|
-
color: areaColorSchema.optional(),
|
|
22400
|
-
icon: exports_external.string().min(1).nullish(),
|
|
22401
|
-
reviewCadence: reviewCadenceSchema.nullish()
|
|
22402
|
-
});
|
|
22403
|
-
var recipeProjectNodeSchema = exports_external.object({
|
|
22404
|
-
...recipeNodeBase,
|
|
22405
|
-
kind: exports_external.literal("project"),
|
|
22406
|
-
title: exports_external.string().min(1),
|
|
22407
|
-
status: projectStatusSchema.optional(),
|
|
22408
|
-
notes: exports_external.string().min(1).nullish(),
|
|
22409
|
-
milestones: exports_external.array(exports_external.object({ title: exports_external.string().min(1) })).optional()
|
|
22410
|
-
});
|
|
22411
|
-
var recipeIngredientItemSchema = exports_external.object({
|
|
22412
|
-
name: exports_external.string().min(1),
|
|
22413
|
-
quantity: exports_external.number().positive().nullish(),
|
|
22414
|
-
unit: exports_external.string().min(1).nullish()
|
|
22415
|
-
});
|
|
22416
|
-
var recipeRecipeNodeSchema = exports_external.object({
|
|
22417
|
-
...recipeNodeBase,
|
|
22418
|
-
kind: exports_external.literal("recipe"),
|
|
22419
|
-
title: exports_external.string().min(1),
|
|
22420
|
-
description: exports_external.string().min(1).nullish(),
|
|
22421
|
-
instructions: exports_external.string().min(1).nullish(),
|
|
22422
|
-
servings: exports_external.number().int().positive().nullish(),
|
|
22423
|
-
prepMinutes: exports_external.number().int().min(0).nullish(),
|
|
22424
|
-
cookMinutes: exports_external.number().int().min(0).nullish(),
|
|
22425
|
-
tags: exports_external.array(exports_external.string().min(1)).optional(),
|
|
22426
|
-
ingredients: exports_external.array(recipeIngredientItemSchema).optional()
|
|
22427
|
-
});
|
|
22428
|
-
var recipeContactNodeSchema = exports_external.object({
|
|
22429
|
-
...recipeNodeBase,
|
|
22430
|
-
kind: exports_external.literal("contact"),
|
|
22431
|
-
title: exports_external.string().min(1),
|
|
22432
|
-
company: exports_external.string().min(1).nullish(),
|
|
22433
|
-
notes: exports_external.string().min(1).nullish(),
|
|
22434
|
-
tags: exports_external.array(exports_external.string().min(1)).optional()
|
|
22435
|
-
});
|
|
22436
|
-
var recipeChallengeNodeSchema = exports_external.object({
|
|
22437
|
-
...recipeNodeBase,
|
|
22438
|
-
kind: exports_external.literal("challenge"),
|
|
22439
|
-
title: exports_external.string().min(1),
|
|
22440
|
-
description: exports_external.string().min(1).nullish(),
|
|
22441
|
-
metric: exports_external.string().min(1),
|
|
22442
|
-
target: exports_external.number().int().positive(),
|
|
22443
|
-
durationDays: exports_external.number().int().positive()
|
|
22444
|
-
});
|
|
22445
|
-
var recipeAutomationNodeSchema = exports_external.object({
|
|
22446
|
-
...recipeNodeBase,
|
|
22447
|
-
kind: exports_external.literal("automation"),
|
|
22448
|
-
name: exports_external.string().min(1),
|
|
22449
|
-
enabled: exports_external.boolean().optional(),
|
|
22450
|
-
trigger: automationTriggerSchema,
|
|
22451
|
-
condition: automationConditionSchema.nullish(),
|
|
22452
|
-
action: automationActionSchema
|
|
22453
|
-
});
|
|
22454
|
-
var recipeNodeSchema = exports_external.discriminatedUnion("kind", [
|
|
22455
|
-
recipeHabitNodeSchema,
|
|
22456
|
-
recipeShoppingListNodeSchema,
|
|
22457
|
-
recipeInventoryNodeSchema,
|
|
22458
|
-
recipeRoutineNodeSchema,
|
|
22459
|
-
recipeAreaNodeSchema,
|
|
22460
|
-
recipeProjectNodeSchema,
|
|
22461
|
-
recipeRecipeNodeSchema,
|
|
22462
|
-
recipeContactNodeSchema,
|
|
22463
|
-
recipeChallengeNodeSchema,
|
|
22464
|
-
recipeAutomationNodeSchema
|
|
22465
|
-
]);
|
|
22466
|
-
var presetRecipeSchema = exports_external.object({
|
|
22467
|
-
nodes: exports_external.array(recipeNodeSchema).min(1)
|
|
22468
|
-
});
|
|
22469
|
-
var presetSchema = exports_external.object({
|
|
22470
|
-
key: exports_external.string().min(1),
|
|
22471
|
-
entity: presetEntitySchema,
|
|
22472
|
-
name: exports_external.string().min(1),
|
|
22473
|
-
description: exports_external.string().min(1),
|
|
22474
|
-
icon: exports_external.string().min(1),
|
|
22475
|
-
color: exports_external.string().regex(/^#[0-9a-fA-F]{6}$/),
|
|
22476
|
-
category: exports_external.string().min(1),
|
|
22477
|
-
displayKind: exports_external.string().min(1).optional(),
|
|
22478
|
-
featured: exports_external.boolean().optional(),
|
|
22479
|
-
recipe: presetRecipeSchema
|
|
22480
|
-
});
|
|
22481
|
-
var presetInstallResultSchema = exports_external.object({
|
|
22482
|
-
key: exports_external.string().min(1),
|
|
22483
|
-
entity: presetEntitySchema,
|
|
22484
|
-
nodeIds: exports_external.array(exports_external.string()),
|
|
22485
|
-
nodeCount: exports_external.number().int().nonnegative()
|
|
22486
|
-
});
|
|
22487
|
-
var MS_PER_DAY = 24 * 60 * 60 * 1000;
|
|
22488
22586
|
// ../../packages/schema/src/presets/features/areas.ts
|
|
22489
22587
|
var areaBundleDefs = [
|
|
22490
22588
|
{
|
|
@@ -24143,7 +24241,7 @@ function parseCapture2(input, now) {
|
|
|
24143
24241
|
|
|
24144
24242
|
// src/meta.ts
|
|
24145
24243
|
var CLI_NAME = "do";
|
|
24146
|
-
var VERSION = "1.
|
|
24244
|
+
var VERSION = "1.96.0";
|
|
24147
24245
|
var API_PREFIX = "/api/v1";
|
|
24148
24246
|
var DEFAULT_API_URL = "http://localhost:3001";
|
|
24149
24247
|
|