@robbeverhelst/do 1.286.0 → 1.287.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 +93 -13
- package/package.json +1 -1
package/dist/do.js
CHANGED
|
@@ -3974,7 +3974,8 @@ var notificationType = pgEnum("notification_type", [
|
|
|
3974
3974
|
"echo",
|
|
3975
3975
|
"card",
|
|
3976
3976
|
"bank_link",
|
|
3977
|
-
"import_failed"
|
|
3977
|
+
"import_failed",
|
|
3978
|
+
"animal_ask"
|
|
3978
3979
|
]);
|
|
3979
3980
|
var notificationDomain = pgEnum("notification_domain", [
|
|
3980
3981
|
"task",
|
|
@@ -21288,8 +21289,10 @@ var houseAssetSchema = object({
|
|
|
21288
21289
|
trail: array(houseTrailStepSchema),
|
|
21289
21290
|
parts: array(houseAssetPartSchema),
|
|
21290
21291
|
linked: array(houseAssetLinkSchema),
|
|
21291
|
-
warrantyUntil: day.nullable()
|
|
21292
|
+
warrantyUntil: day.nullable(),
|
|
21293
|
+
visibility: _enum2(NODE_VISIBILITY_VALUES).default("space")
|
|
21292
21294
|
});
|
|
21295
|
+
var setAssetVisibilityInputSchema = object({ visibility: _enum2(NODE_VISIBILITY_VALUES) }).strict();
|
|
21293
21296
|
var linkAssetPartInputSchema = object({ inventoryItemId: ulidSchema }).strict();
|
|
21294
21297
|
var lendAssetInputSchema = object({
|
|
21295
21298
|
direction: _enum2(["lent", "borrowed"]),
|
|
@@ -21594,10 +21597,12 @@ var postRunSchema = object({
|
|
|
21594
21597
|
steps: array(runStepSchema).max(12).optional()
|
|
21595
21598
|
});
|
|
21596
21599
|
var POST_RECEIPT_ABOUT_VALUES = ["red_flags", "saved"];
|
|
21600
|
+
var POST_RECEIPT_SOURCE_MAX = 80;
|
|
21597
21601
|
var postReceiptInputSchema = object({
|
|
21598
21602
|
nodeId: ulidSchema,
|
|
21599
21603
|
parts: array(ulidSchema).min(1).max(10).optional(),
|
|
21600
|
-
about: _enum2(POST_RECEIPT_ABOUT_VALUES).optional()
|
|
21604
|
+
about: _enum2(POST_RECEIPT_ABOUT_VALUES).optional(),
|
|
21605
|
+
source: string2().trim().min(1).max(POST_RECEIPT_SOURCE_MAX).optional()
|
|
21601
21606
|
}).strict();
|
|
21602
21607
|
var postReceiptPartSchema = object({
|
|
21603
21608
|
id: string2(),
|
|
@@ -21609,7 +21614,8 @@ var postReceiptSchema = object({
|
|
|
21609
21614
|
nodeType: string2(),
|
|
21610
21615
|
parts: array(string2()).optional(),
|
|
21611
21616
|
partNodes: array(postReceiptPartSchema).optional(),
|
|
21612
|
-
about: _enum2(POST_RECEIPT_ABOUT_VALUES).optional()
|
|
21617
|
+
about: _enum2(POST_RECEIPT_ABOUT_VALUES).optional(),
|
|
21618
|
+
source: string2().optional()
|
|
21613
21619
|
});
|
|
21614
21620
|
var POST_TITLE_MAX = 200;
|
|
21615
21621
|
var postTitleSchema = string2().trim().min(1).max(POST_TITLE_MAX);
|
|
@@ -23810,15 +23816,30 @@ var recipeUsedInSchema = object({
|
|
|
23810
23816
|
eatenAt: exports_coerce.date(),
|
|
23811
23817
|
mealType: mealLogTypeSchema,
|
|
23812
23818
|
servings: number2().nullable(),
|
|
23813
|
-
alongside: array(string2())
|
|
23819
|
+
alongside: array(string2()),
|
|
23820
|
+
sides: array(object({
|
|
23821
|
+
label: string2(),
|
|
23822
|
+
grams: number2(),
|
|
23823
|
+
kcal: number2(),
|
|
23824
|
+
source: mealItemSourceSchema
|
|
23825
|
+
})).default([]),
|
|
23826
|
+
after: array(object({ kind: _enum2(["tired", "symptom"]), label: string2() })).default([])
|
|
23814
23827
|
})),
|
|
23828
|
+
eatenCount: number2().int().nonnegative().default(0),
|
|
23815
23829
|
plans: array(object({
|
|
23816
23830
|
id: ulidSchema,
|
|
23817
23831
|
plannedFor: exports_coerce.date(),
|
|
23818
23832
|
mealType: mealTypeSchema,
|
|
23819
23833
|
servings: number2().int().nullable()
|
|
23820
|
-
}))
|
|
23834
|
+
})),
|
|
23835
|
+
shopping: array(object({
|
|
23836
|
+
listId: ulidSchema,
|
|
23837
|
+
title: string2(),
|
|
23838
|
+
items: number2().int().positive(),
|
|
23839
|
+
addedAt: exports_coerce.date()
|
|
23840
|
+
})).default([])
|
|
23821
23841
|
});
|
|
23842
|
+
var recipeIngredientMatchInputSchema = object({ foodId: string2().min(1) }).strict();
|
|
23822
23843
|
|
|
23823
23844
|
// ../../packages/schema/src/contracts/meal-plans.ts
|
|
23824
23845
|
var mealPlanSchema = createSelectSchema(mealPlans, {
|
|
@@ -24826,6 +24847,9 @@ var insuranceFieldsSchema = object({
|
|
|
24826
24847
|
deductible: amount4,
|
|
24827
24848
|
extras: array(text4).max(30),
|
|
24828
24849
|
claimPhone: phone,
|
|
24850
|
+
claimHours: text4,
|
|
24851
|
+
reportWithinDays: number2().int().min(1).max(365),
|
|
24852
|
+
leakSearchLimit: amount4,
|
|
24829
24853
|
brokerContactId: ulidSchema,
|
|
24830
24854
|
renewalDate: keyDateDaySchema,
|
|
24831
24855
|
exclusionsSummary: longText
|
|
@@ -25070,14 +25094,20 @@ var incidentPolicySchema = refSchema.extend({
|
|
|
25070
25094
|
broker: refSchema.nullable(),
|
|
25071
25095
|
claimPhone: string2().nullable(),
|
|
25072
25096
|
policyNo: string2().nullable(),
|
|
25073
|
-
deductible: number2().nullable()
|
|
25097
|
+
deductible: number2().nullable(),
|
|
25098
|
+
claimHours: string2().nullable().default(null),
|
|
25099
|
+
reportWithinDays: number2().nullable().default(null),
|
|
25100
|
+
leakSearchLimit: number2().nullable().default(null),
|
|
25101
|
+
covers: boolean3().default(false),
|
|
25102
|
+
readByAgent: boolean3().default(false)
|
|
25074
25103
|
});
|
|
25075
25104
|
var incidentViewSchema = incidentSchema.extend({
|
|
25076
25105
|
title: string2(),
|
|
25077
25106
|
visibility: _enum2(NODE_VISIBILITY_VALUES),
|
|
25078
25107
|
policy: incidentPolicySchema.nullable(),
|
|
25079
25108
|
place: refSchema.nullable(),
|
|
25080
|
-
fileCount: number2().int().nonnegative()
|
|
25109
|
+
fileCount: number2().int().nonnegative(),
|
|
25110
|
+
stepNotes: record(string2(), string2()).default({})
|
|
25081
25111
|
});
|
|
25082
25112
|
var createIncidentInputSchema = object({
|
|
25083
25113
|
id: ulidSchema,
|
|
@@ -25690,7 +25720,8 @@ var animalIdsSchema = object({
|
|
|
25690
25720
|
passportNoMasked: string2().trim().min(1).max(40).optional(),
|
|
25691
25721
|
ringNo: string2().trim().min(1).max(40).optional(),
|
|
25692
25722
|
ringYear: number2().int().min(1900).max(2200).optional(),
|
|
25693
|
-
ringIssuer: string2().trim().min(1).max(80).optional()
|
|
25723
|
+
ringIssuer: string2().trim().min(1).max(80).optional(),
|
|
25724
|
+
ringType: _enum2(["open", "closed"]).optional()
|
|
25694
25725
|
}).strict();
|
|
25695
25726
|
function isMaskedNumber(value) {
|
|
25696
25727
|
const shown = value.replace(/[\s*\u2022xX.-]/g, "");
|
|
@@ -25980,6 +26011,7 @@ var animalRoomReadingSchema = object({
|
|
|
25980
26011
|
unit: string2().nullable(),
|
|
25981
26012
|
text: string2().nullable(),
|
|
25982
26013
|
detail: string2().nullish(),
|
|
26014
|
+
device: string2().nullish(),
|
|
25983
26015
|
at: exports_coerce.date()
|
|
25984
26016
|
});
|
|
25985
26017
|
var animalRoomAlertSchema = object({
|
|
@@ -26846,6 +26878,28 @@ var mailMessageDataSchema = object({
|
|
|
26846
26878
|
pt: mailMessageCopySchema.optional(),
|
|
26847
26879
|
footer: mailFooterSchema.optional()
|
|
26848
26880
|
}).strict();
|
|
26881
|
+
var mailDaySchema = object({
|
|
26882
|
+
date: keyDateDaySchema,
|
|
26883
|
+
label: object({
|
|
26884
|
+
nl: string2().trim().min(1).max(120),
|
|
26885
|
+
pt: string2().trim().min(1).max(120).optional()
|
|
26886
|
+
}).strict(),
|
|
26887
|
+
place: string2().trim().min(1).max(200).optional()
|
|
26888
|
+
}).strict();
|
|
26889
|
+
var mailSaveTheDateCopySchema = object({
|
|
26890
|
+
subject: string2().trim().min(1).max(200),
|
|
26891
|
+
heading: string2().trim().min(1).max(200),
|
|
26892
|
+
paragraphs: array(lineSchema).max(20).default([]),
|
|
26893
|
+
button: string2().trim().min(1).max(80)
|
|
26894
|
+
}).strict();
|
|
26895
|
+
var mailSaveTheDateDataSchema = object({
|
|
26896
|
+
nl: mailSaveTheDateCopySchema,
|
|
26897
|
+
pt: mailSaveTheDateCopySchema.optional(),
|
|
26898
|
+
days: array(mailDaySchema).min(1).max(5),
|
|
26899
|
+
calendarTitle: string2().trim().min(1).max(120).optional(),
|
|
26900
|
+
footer: mailFooterSchema.optional()
|
|
26901
|
+
}).strict();
|
|
26902
|
+
var mailSaveTheDateDeliverySchema = object({ link: url().optional() }).strict();
|
|
26849
26903
|
var mailProviderEventSchema = looseObject({
|
|
26850
26904
|
type: string2().min(1),
|
|
26851
26905
|
created_at: string2().optional(),
|
|
@@ -26860,10 +26914,11 @@ var mailProviderEventSchema = looseObject({
|
|
|
26860
26914
|
});
|
|
26861
26915
|
var MAIL_CAMPAIGN_KINDS = ["message", "save_the_date", "invitation"];
|
|
26862
26916
|
var mailCampaignKindSchema = _enum2(MAIL_CAMPAIGN_KINDS);
|
|
26863
|
-
var MAIL_TEMPLATES = ["message"];
|
|
26917
|
+
var MAIL_TEMPLATES = ["message", "save_the_date"];
|
|
26864
26918
|
var mailTemplateSchema = _enum2(MAIL_TEMPLATES);
|
|
26865
26919
|
var mailTemplateDataSchemas = {
|
|
26866
|
-
message: mailMessageDataSchema
|
|
26920
|
+
message: mailMessageDataSchema,
|
|
26921
|
+
save_the_date: mailSaveTheDateDataSchema
|
|
26867
26922
|
};
|
|
26868
26923
|
function mailTemplateDataError(template, data) {
|
|
26869
26924
|
const parsed = mailTemplateDataSchemas[template].safeParse(data);
|
|
@@ -26893,7 +26948,8 @@ var mailPreviewSchema = object({
|
|
|
26893
26948
|
language: mailLanguageSchema,
|
|
26894
26949
|
subject: string2(),
|
|
26895
26950
|
html: string2(),
|
|
26896
|
-
text: string2()
|
|
26951
|
+
text: string2(),
|
|
26952
|
+
attachments: array(string2()).default([])
|
|
26897
26953
|
});
|
|
26898
26954
|
var mailTestResultSchema = object({ to: array(string2()) });
|
|
26899
26955
|
var sendMailCampaignInputSchema = object({ households: number2().int().positive() }).strict();
|
|
@@ -28618,7 +28674,7 @@ function parseCapture2(input, now) {
|
|
|
28618
28674
|
|
|
28619
28675
|
// src/meta.ts
|
|
28620
28676
|
var CLI_NAME = "do";
|
|
28621
|
-
var VERSION = "1.
|
|
28677
|
+
var VERSION = "1.287.0";
|
|
28622
28678
|
var API_PREFIX = "/api/v1";
|
|
28623
28679
|
var DEFAULT_API_URL = "http://localhost:3001";
|
|
28624
28680
|
|
|
@@ -32076,6 +32132,19 @@ var COMMAND_SPECS = [
|
|
|
32076
32132
|
returns: "RecipeUsedIn",
|
|
32077
32133
|
notes: "GET /api/v1/recipes/{id}/used-in. At most five of each; meals need health:read too (without it, plans only)."
|
|
32078
32134
|
},
|
|
32135
|
+
{
|
|
32136
|
+
path: ["recipes", "match"],
|
|
32137
|
+
summary: "Confirm or swap what a recipe ingredient matched: the reference food it is.",
|
|
32138
|
+
args: [
|
|
32139
|
+
{ name: "id", required: true, description: "Recipe ULID." },
|
|
32140
|
+
{ name: "ingredient", required: true, description: "The ingredient's id." },
|
|
32141
|
+
{ name: "food", required: true, description: "A food id from `do foods search`." }
|
|
32142
|
+
],
|
|
32143
|
+
flags: [],
|
|
32144
|
+
scopes: ["meals:write"],
|
|
32145
|
+
returns: "RecipeDetail",
|
|
32146
|
+
notes: "PUT /api/v1/recipes/{id}/ingredients/{ingredientId}/match. The ingredient's product becomes that food and the nutrition is worked out again."
|
|
32147
|
+
},
|
|
32079
32148
|
{
|
|
32080
32149
|
path: ["agents", "list"],
|
|
32081
32150
|
summary: "List the Space's Agents (id + name).",
|
|
@@ -37354,6 +37423,17 @@ var HANDLERS = {
|
|
|
37354
37423
|
const id = requireArg(args, 0, "recipe id");
|
|
37355
37424
|
return { data: await requireClient().get(`/recipes/${id}/used-in`), render: renderRecord };
|
|
37356
37425
|
},
|
|
37426
|
+
"recipes match": async ({ args, requireClient }) => {
|
|
37427
|
+
const id = requireArg(args, 0, "recipe id");
|
|
37428
|
+
const ingredient = requireArg(args, 1, "ingredient id");
|
|
37429
|
+
const foodId = requireArg(args, 2, "food id");
|
|
37430
|
+
return {
|
|
37431
|
+
data: await requireClient().put(`/recipes/${id}/ingredients/${ingredient}/match`, {
|
|
37432
|
+
foodId
|
|
37433
|
+
}),
|
|
37434
|
+
render: renderRecord
|
|
37435
|
+
};
|
|
37436
|
+
},
|
|
37357
37437
|
"notes backlinks": async ({ args, requireClient }) => {
|
|
37358
37438
|
const id = requireArg(args, 0, "note id");
|
|
37359
37439
|
return {
|
package/package.json
CHANGED