@robbeverhelst/do 1.299.0 → 1.301.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 +321 -168
- package/package.json +1 -1
package/dist/do.js
CHANGED
|
@@ -4438,6 +4438,20 @@ var documents = pgTable("documents", {
|
|
|
4438
4438
|
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
4439
4439
|
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
4440
4440
|
}, (t) => [index("documents_tenant_kind_idx").on(t.tenantId, t.kind)]);
|
|
4441
|
+
var paperShares = pgTable("paper_shares", {
|
|
4442
|
+
id: text("id").primaryKey(),
|
|
4443
|
+
tenantId: text("tenant_id").notNull().references(() => tenants.id),
|
|
4444
|
+
userId: text("user_id").notNull().references(() => users.id),
|
|
4445
|
+
label: text("label").notNull(),
|
|
4446
|
+
nodeIds: text("node_ids").array().notNull().default(sql`'{}'::text[]`),
|
|
4447
|
+
snapshot: jsonb("snapshot").notNull(),
|
|
4448
|
+
tokenHash: text("token_hash").notNull().unique(),
|
|
4449
|
+
expiresAt: timestamp("expires_at", { withTimezone: true }).notNull(),
|
|
4450
|
+
revokedAt: timestamp("revoked_at", { withTimezone: true }),
|
|
4451
|
+
opens: integer("opens").notNull().default(0),
|
|
4452
|
+
lastOpenedAt: timestamp("last_opened_at", { withTimezone: true }),
|
|
4453
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow()
|
|
4454
|
+
}, (t) => [index("paper_shares_user_idx").on(t.tenantId, t.userId, t.createdAt)]);
|
|
4441
4455
|
|
|
4442
4456
|
// ../../packages/schema/src/db/incidents.ts
|
|
4443
4457
|
var incidentKind = pgEnum("incident_kind", [
|
|
@@ -6119,6 +6133,21 @@ var journalRecaps = pgTable("journal_recaps", {
|
|
|
6119
6133
|
moments: jsonb("moments").$type().notNull().default(sql`'[]'::jsonb`),
|
|
6120
6134
|
pattern: text("pattern")
|
|
6121
6135
|
}, (t) => [unique("journal_recaps_owner_period_uniq").on(t.tenantId, t.ownerUserId, t.periodKey)]);
|
|
6136
|
+
var journalDayShares = pgTable("journal_day_shares", {
|
|
6137
|
+
id: text("id").primaryKey(),
|
|
6138
|
+
tenantId: text("tenant_id").notNull().references(() => tenants.id),
|
|
6139
|
+
ownerUserId: text("owner_user_id").notNull().references(() => users.id),
|
|
6140
|
+
journalDayId: text("journal_day_id").notNull().references(() => journalDays.id, { onDelete: "cascade" }),
|
|
6141
|
+
day: date("day", { mode: "string" }).notNull(),
|
|
6142
|
+
recipientUserId: text("recipient_user_id").references(() => users.id),
|
|
6143
|
+
note: text("note"),
|
|
6144
|
+
snapshot: jsonb("snapshot").$type().notNull(),
|
|
6145
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
6146
|
+
revokedAt: timestamp("revoked_at", { withTimezone: true })
|
|
6147
|
+
}, (t) => [
|
|
6148
|
+
index("journal_day_shares_owner_idx").on(t.tenantId, t.ownerUserId, t.day),
|
|
6149
|
+
index("journal_day_shares_recipient_idx").on(t.tenantId, t.recipientUserId, t.createdAt)
|
|
6150
|
+
]);
|
|
6122
6151
|
|
|
6123
6152
|
// ../../node_modules/zod/v4/core/core.js
|
|
6124
6153
|
var _a;
|
|
@@ -22440,6 +22469,28 @@ var houseUpkeepYearSchema = object({
|
|
|
22440
22469
|
});
|
|
22441
22470
|
var houseUpkeepYearQuerySchema = object({ year: exports_coerce.number().int().min(2000).max(2100).optional() }).strict();
|
|
22442
22471
|
|
|
22472
|
+
// ../../packages/schema/src/receipt-kinds.ts
|
|
22473
|
+
var MONEY_RECEIPT_NODE_TYPE = "money_transaction";
|
|
22474
|
+
var RECEIPT_KINDS = {
|
|
22475
|
+
document: { about: [] },
|
|
22476
|
+
health_episode: { about: ["red_flags"] },
|
|
22477
|
+
journal_day: { about: ["saved"] },
|
|
22478
|
+
time_block: { about: [] },
|
|
22479
|
+
meal_log: { about: [] },
|
|
22480
|
+
collection_item: { about: [] },
|
|
22481
|
+
person_note: { about: [] },
|
|
22482
|
+
health_encounter: { about: [] },
|
|
22483
|
+
animal: { about: ["vet_visit"] },
|
|
22484
|
+
[MONEY_RECEIPT_NODE_TYPE]: { about: ["ask", "bill"] },
|
|
22485
|
+
planning_rule: { about: [] }
|
|
22486
|
+
};
|
|
22487
|
+
var NODE_RECEIPT_ABOUT_VALUES = [
|
|
22488
|
+
...RECEIPT_KINDS.health_episode.about,
|
|
22489
|
+
...RECEIPT_KINDS.journal_day.about,
|
|
22490
|
+
...RECEIPT_KINDS.animal.about
|
|
22491
|
+
];
|
|
22492
|
+
var MONEY_RECEIPT_ABOUT_VALUES = RECEIPT_KINDS[MONEY_RECEIPT_NODE_TYPE].about;
|
|
22493
|
+
|
|
22443
22494
|
// ../../packages/schema/src/contracts/agent-chat.ts
|
|
22444
22495
|
var agentConnectionSourceSchema = _enum2(["space", "env"]);
|
|
22445
22496
|
var agentGatewayStatusSchema = _enum2(["connected", "offline", "not_connected"]);
|
|
@@ -22676,7 +22727,7 @@ var postRunSchema = object({
|
|
|
22676
22727
|
status: runStatusSchema,
|
|
22677
22728
|
steps: array(runStepSchema).max(12).optional()
|
|
22678
22729
|
});
|
|
22679
|
-
var POST_RECEIPT_ABOUT_VALUES =
|
|
22730
|
+
var POST_RECEIPT_ABOUT_VALUES = NODE_RECEIPT_ABOUT_VALUES;
|
|
22680
22731
|
var POST_RECEIPT_SOURCE_MAX = 80;
|
|
22681
22732
|
var postNodeReceiptInputSchema = object({
|
|
22682
22733
|
nodeId: ulidSchema,
|
|
@@ -22685,7 +22736,7 @@ var postNodeReceiptInputSchema = object({
|
|
|
22685
22736
|
source: string2().trim().min(1).max(POST_RECEIPT_SOURCE_MAX).optional(),
|
|
22686
22737
|
personNotes: array(ulidSchema).min(1).max(10).optional()
|
|
22687
22738
|
}).strict();
|
|
22688
|
-
var POST_MONEY_RECEIPT_ABOUT_VALUES =
|
|
22739
|
+
var POST_MONEY_RECEIPT_ABOUT_VALUES = MONEY_RECEIPT_ABOUT_VALUES;
|
|
22689
22740
|
var webUrlSchema = string2().url().max(2000).refine((url) => /^https?:\/\//i.test(url), "must be an http(s) link");
|
|
22690
22741
|
var postMoneyReceiptInputSchema = object({
|
|
22691
22742
|
transactionId: ulidSchema,
|
|
@@ -23600,6 +23651,20 @@ var journalSearchSchema = object({
|
|
|
23600
23651
|
days: array(journalDayListItemSchema).max(JOURNAL_SEARCH_LIMIT),
|
|
23601
23652
|
understood: journalSearchUnderstoodSchema.nullable().default(null)
|
|
23602
23653
|
});
|
|
23654
|
+
var JOURNAL_LIKE_LIMIT = 10;
|
|
23655
|
+
var journalLikeQuerySchema = object({
|
|
23656
|
+
limit: exports_coerce.number().int().min(1).max(JOURNAL_LIKE_LIMIT).default(5)
|
|
23657
|
+
});
|
|
23658
|
+
var journalLikeDaySchema = journalDayListItemSchema.extend({
|
|
23659
|
+
shared: array(string2()),
|
|
23660
|
+
sharedTags: array(string2())
|
|
23661
|
+
});
|
|
23662
|
+
var journalLikeSchema = object({
|
|
23663
|
+
date: journalDateSchema,
|
|
23664
|
+
timezone: string2().min(1),
|
|
23665
|
+
words: array(string2()),
|
|
23666
|
+
days: array(journalLikeDaySchema).max(JOURNAL_LIKE_LIMIT)
|
|
23667
|
+
});
|
|
23603
23668
|
var journalLinkInputSchema = object({
|
|
23604
23669
|
kind: string2().trim().regex(/^[a-z][a-z_]{0,31}$/, "a link kind is a short lowercase word"),
|
|
23605
23670
|
nodeId: ulidSchema
|
|
@@ -27471,6 +27536,104 @@ var familyTreeMatchDecisionResultSchema = object({
|
|
|
27471
27536
|
matches: array(familyTreeMatchViewSchema)
|
|
27472
27537
|
});
|
|
27473
27538
|
|
|
27539
|
+
// ../../packages/schema/src/contracts/rsvp-questions.ts
|
|
27540
|
+
var RSVP_QUESTION_KINDS = ["choice", "multi", "text", "number", "yes_no"];
|
|
27541
|
+
var rsvpQuestionKindSchema = _enum2(RSVP_QUESTION_KINDS);
|
|
27542
|
+
var rsvpQuestionScopeSchema = _enum2(["household", "guest"]);
|
|
27543
|
+
var RSVP_QUESTION_PRESETS = ["diet", "diet_other", "message"];
|
|
27544
|
+
var rsvpQuestionPresetSchema = _enum2(RSVP_QUESTION_PRESETS);
|
|
27545
|
+
var RSVP_SHOW_IF_MAX = 5;
|
|
27546
|
+
var rsvpTextSchema = (max) => object({
|
|
27547
|
+
nl: string2().trim().min(1).max(max).optional(),
|
|
27548
|
+
pt: string2().trim().min(1).max(max).optional()
|
|
27549
|
+
}).strict().refine((t) => t.nl !== undefined || t.pt !== undefined, "give it in NL or PT");
|
|
27550
|
+
var keySchema = string2().regex(/^[a-z][a-z0-9_]{0,31}$/, "expected a short lower-case word (vegan, civil)");
|
|
27551
|
+
var rsvpQuestionOptionSchema = object({ key: keySchema, label: rsvpTextSchema(120) }).strict();
|
|
27552
|
+
var rsvpShowIfConditionSchema = union([
|
|
27553
|
+
object({
|
|
27554
|
+
questionId: ulidSchema,
|
|
27555
|
+
equals: union([string2().max(200), number2(), boolean3()])
|
|
27556
|
+
}).strict(),
|
|
27557
|
+
object({ eventKey: keySchema.optional(), rsvp: literal("yes") }).strict()
|
|
27558
|
+
]);
|
|
27559
|
+
var rsvpAnswerValueSchema = union([
|
|
27560
|
+
string2().max(2000),
|
|
27561
|
+
array(string2().max(32)).max(20),
|
|
27562
|
+
number2(),
|
|
27563
|
+
boolean3()
|
|
27564
|
+
]);
|
|
27565
|
+
var rsvpQuestionSchema = createSelectSchema(rsvpQuestions, {
|
|
27566
|
+
label: object({ nl: string2().optional(), pt: string2().optional() }),
|
|
27567
|
+
options: array(object({
|
|
27568
|
+
key: string2(),
|
|
27569
|
+
label: object({ nl: string2().optional(), pt: string2().optional() })
|
|
27570
|
+
})),
|
|
27571
|
+
showIf: array(rsvpShowIfConditionSchema),
|
|
27572
|
+
preset: rsvpQuestionPresetSchema.nullable(),
|
|
27573
|
+
createdAt: exports_coerce.date(),
|
|
27574
|
+
updatedAt: exports_coerce.date()
|
|
27575
|
+
});
|
|
27576
|
+
var rsvpAnswerSchema = createSelectSchema(rsvpAnswers, {
|
|
27577
|
+
value: rsvpAnswerValueSchema,
|
|
27578
|
+
createdAt: exports_coerce.date(),
|
|
27579
|
+
updatedAt: exports_coerce.date()
|
|
27580
|
+
});
|
|
27581
|
+
function rsvpOptionsProblem(kind, options) {
|
|
27582
|
+
if (kind === "choice" || kind === "multi") {
|
|
27583
|
+
if (options.length < 2)
|
|
27584
|
+
return `a ${kind} question needs two options or more`;
|
|
27585
|
+
if (new Set(options.map((o) => o.key)).size !== options.length)
|
|
27586
|
+
return "each option needs its own key";
|
|
27587
|
+
return null;
|
|
27588
|
+
}
|
|
27589
|
+
return options.length > 0 ? `a ${kind} question has no options` : null;
|
|
27590
|
+
}
|
|
27591
|
+
var questionFields = {
|
|
27592
|
+
label: rsvpTextSchema(300),
|
|
27593
|
+
options: array(rsvpQuestionOptionSchema).max(30).optional(),
|
|
27594
|
+
scope: rsvpQuestionScopeSchema.optional(),
|
|
27595
|
+
eventKey: keySchema.nullish(),
|
|
27596
|
+
required: boolean3().optional(),
|
|
27597
|
+
sort: number2().int().min(0).max(1e4).optional(),
|
|
27598
|
+
showIf: array(rsvpShowIfConditionSchema).max(RSVP_SHOW_IF_MAX).optional()
|
|
27599
|
+
};
|
|
27600
|
+
var createRsvpQuestionInputSchema = object({
|
|
27601
|
+
id: ulidSchema,
|
|
27602
|
+
guestListId: ulidSchema,
|
|
27603
|
+
kind: rsvpQuestionKindSchema,
|
|
27604
|
+
...questionFields
|
|
27605
|
+
}).strict().superRefine((q, ctx) => {
|
|
27606
|
+
const problem = rsvpOptionsProblem(q.kind, q.options ?? []);
|
|
27607
|
+
if (problem)
|
|
27608
|
+
ctx.addIssue({ code: "custom", message: problem, path: ["options"] });
|
|
27609
|
+
if (q.showIf?.some((c) => ("questionId" in c) && c.questionId === q.id))
|
|
27610
|
+
ctx.addIssue({
|
|
27611
|
+
code: "custom",
|
|
27612
|
+
message: "a question can't depend on itself",
|
|
27613
|
+
path: ["showIf"]
|
|
27614
|
+
});
|
|
27615
|
+
});
|
|
27616
|
+
var updateRsvpQuestionInputSchema = object(questionFields).partial().strict();
|
|
27617
|
+
var rsvpQuestionsQuerySchema = object({ guestListId: ulidSchema });
|
|
27618
|
+
var rsvpAnswerInputSchema = object({
|
|
27619
|
+
questionId: ulidSchema,
|
|
27620
|
+
guestId: ulidSchema.nullish(),
|
|
27621
|
+
value: rsvpAnswerValueSchema.nullable()
|
|
27622
|
+
}).strict();
|
|
27623
|
+
var setRsvpAnswersInputSchema = object({
|
|
27624
|
+
guestListId: ulidSchema,
|
|
27625
|
+
householdId: ulidSchema,
|
|
27626
|
+
answers: array(rsvpAnswerInputSchema).min(1).max(200)
|
|
27627
|
+
}).strict();
|
|
27628
|
+
var rsvpAnswersQuerySchema = object({
|
|
27629
|
+
guestListId: ulidSchema,
|
|
27630
|
+
householdId: ulidSchema.optional()
|
|
27631
|
+
});
|
|
27632
|
+
var addRsvpPresetsInputSchema = object({
|
|
27633
|
+
guestListId: ulidSchema,
|
|
27634
|
+
presets: array(_enum2(["diet", "message"])).min(1).max(2)
|
|
27635
|
+
}).strict();
|
|
27636
|
+
|
|
27474
27637
|
// ../../packages/schema/src/contracts/guests.ts
|
|
27475
27638
|
var guestAnswerSchema = _enum2(["yes", "no", "maybe"]);
|
|
27476
27639
|
var guestStateSchema = _enum2(["yes", "no", "maybe", "waiting"]);
|
|
@@ -27696,10 +27859,10 @@ var submitRsvpInputSchema = object({
|
|
|
27696
27859
|
email: string2().trim().email().max(254).nullish()
|
|
27697
27860
|
}).strict()).max(30).default([]),
|
|
27698
27861
|
address: householdAddressSchema.nullish(),
|
|
27699
|
-
language: rsvpLanguageSchema.optional()
|
|
27700
|
-
|
|
27701
|
-
|
|
27702
|
-
});
|
|
27862
|
+
language: rsvpLanguageSchema.optional(),
|
|
27863
|
+
answers: array(rsvpAnswerInputSchema).max(200).optional(),
|
|
27864
|
+
dietConsent: boolean3().optional()
|
|
27865
|
+
}).strict().refine((i) => i.guests.length > 0 || (i.answers?.length ?? 0) > 0 || !!i.address || !!i.language, { message: "nothing to send: answers, an address or a language" });
|
|
27703
27866
|
var eventTextSchema = (max) => object({
|
|
27704
27867
|
nl: string2().trim().min(1).max(max).optional(),
|
|
27705
27868
|
pt: string2().trim().min(1).max(max).optional()
|
|
@@ -27968,100 +28131,6 @@ var mailCampaignViewSchema = mailCampaignSchema.extend({
|
|
|
27968
28131
|
readyToSend: boolean3()
|
|
27969
28132
|
});
|
|
27970
28133
|
|
|
27971
|
-
// ../../packages/schema/src/contracts/rsvp-questions.ts
|
|
27972
|
-
var RSVP_QUESTION_KINDS = ["choice", "multi", "text", "number", "yes_no"];
|
|
27973
|
-
var rsvpQuestionKindSchema = _enum2(RSVP_QUESTION_KINDS);
|
|
27974
|
-
var rsvpQuestionScopeSchema = _enum2(["household", "guest"]);
|
|
27975
|
-
var RSVP_QUESTION_PRESETS = ["diet", "message"];
|
|
27976
|
-
var rsvpQuestionPresetSchema = _enum2(RSVP_QUESTION_PRESETS);
|
|
27977
|
-
var RSVP_SHOW_IF_MAX = 5;
|
|
27978
|
-
var rsvpTextSchema = (max) => object({
|
|
27979
|
-
nl: string2().trim().min(1).max(max).optional(),
|
|
27980
|
-
pt: string2().trim().min(1).max(max).optional()
|
|
27981
|
-
}).strict().refine((t) => t.nl !== undefined || t.pt !== undefined, "give it in NL or PT");
|
|
27982
|
-
var keySchema = string2().regex(/^[a-z][a-z0-9_]{0,31}$/, "expected a short lower-case word (vegan, civil)");
|
|
27983
|
-
var rsvpQuestionOptionSchema = object({ key: keySchema, label: rsvpTextSchema(120) }).strict();
|
|
27984
|
-
var rsvpShowIfConditionSchema = union([
|
|
27985
|
-
object({
|
|
27986
|
-
questionId: ulidSchema,
|
|
27987
|
-
equals: union([string2().max(200), number2(), boolean3()])
|
|
27988
|
-
}).strict(),
|
|
27989
|
-
object({ eventKey: keySchema.optional(), rsvp: literal("yes") }).strict()
|
|
27990
|
-
]);
|
|
27991
|
-
var rsvpAnswerValueSchema = union([
|
|
27992
|
-
string2().max(2000),
|
|
27993
|
-
array(string2().max(32)).max(20),
|
|
27994
|
-
number2(),
|
|
27995
|
-
boolean3()
|
|
27996
|
-
]);
|
|
27997
|
-
var rsvpQuestionSchema = createSelectSchema(rsvpQuestions, {
|
|
27998
|
-
label: object({ nl: string2().optional(), pt: string2().optional() }),
|
|
27999
|
-
options: array(object({
|
|
28000
|
-
key: string2(),
|
|
28001
|
-
label: object({ nl: string2().optional(), pt: string2().optional() })
|
|
28002
|
-
})),
|
|
28003
|
-
showIf: array(rsvpShowIfConditionSchema),
|
|
28004
|
-
preset: rsvpQuestionPresetSchema.nullable(),
|
|
28005
|
-
createdAt: exports_coerce.date(),
|
|
28006
|
-
updatedAt: exports_coerce.date()
|
|
28007
|
-
});
|
|
28008
|
-
var rsvpAnswerSchema = createSelectSchema(rsvpAnswers, {
|
|
28009
|
-
value: rsvpAnswerValueSchema,
|
|
28010
|
-
createdAt: exports_coerce.date(),
|
|
28011
|
-
updatedAt: exports_coerce.date()
|
|
28012
|
-
});
|
|
28013
|
-
function rsvpOptionsProblem(kind, options) {
|
|
28014
|
-
if (kind === "choice" || kind === "multi") {
|
|
28015
|
-
if (options.length < 2)
|
|
28016
|
-
return `a ${kind} question needs two options or more`;
|
|
28017
|
-
if (new Set(options.map((o) => o.key)).size !== options.length)
|
|
28018
|
-
return "each option needs its own key";
|
|
28019
|
-
return null;
|
|
28020
|
-
}
|
|
28021
|
-
return options.length > 0 ? `a ${kind} question has no options` : null;
|
|
28022
|
-
}
|
|
28023
|
-
var questionFields = {
|
|
28024
|
-
label: rsvpTextSchema(300),
|
|
28025
|
-
options: array(rsvpQuestionOptionSchema).max(30).optional(),
|
|
28026
|
-
scope: rsvpQuestionScopeSchema.optional(),
|
|
28027
|
-
eventKey: keySchema.nullish(),
|
|
28028
|
-
required: boolean3().optional(),
|
|
28029
|
-
sort: number2().int().min(0).max(1e4).optional(),
|
|
28030
|
-
showIf: array(rsvpShowIfConditionSchema).max(RSVP_SHOW_IF_MAX).optional()
|
|
28031
|
-
};
|
|
28032
|
-
var createRsvpQuestionInputSchema = object({
|
|
28033
|
-
id: ulidSchema,
|
|
28034
|
-
guestListId: ulidSchema,
|
|
28035
|
-
kind: rsvpQuestionKindSchema,
|
|
28036
|
-
...questionFields
|
|
28037
|
-
}).strict().superRefine((q, ctx) => {
|
|
28038
|
-
const problem = rsvpOptionsProblem(q.kind, q.options ?? []);
|
|
28039
|
-
if (problem)
|
|
28040
|
-
ctx.addIssue({ code: "custom", message: problem, path: ["options"] });
|
|
28041
|
-
if (q.showIf?.some((c) => ("questionId" in c) && c.questionId === q.id))
|
|
28042
|
-
ctx.addIssue({
|
|
28043
|
-
code: "custom",
|
|
28044
|
-
message: "a question can't depend on itself",
|
|
28045
|
-
path: ["showIf"]
|
|
28046
|
-
});
|
|
28047
|
-
});
|
|
28048
|
-
var updateRsvpQuestionInputSchema = object(questionFields).partial().strict();
|
|
28049
|
-
var rsvpQuestionsQuerySchema = object({ guestListId: ulidSchema });
|
|
28050
|
-
var rsvpAnswerInputSchema = object({
|
|
28051
|
-
questionId: ulidSchema,
|
|
28052
|
-
guestId: ulidSchema.nullish(),
|
|
28053
|
-
value: rsvpAnswerValueSchema.nullable()
|
|
28054
|
-
}).strict();
|
|
28055
|
-
var setRsvpAnswersInputSchema = object({
|
|
28056
|
-
guestListId: ulidSchema,
|
|
28057
|
-
householdId: ulidSchema,
|
|
28058
|
-
answers: array(rsvpAnswerInputSchema).min(1).max(200)
|
|
28059
|
-
}).strict();
|
|
28060
|
-
var rsvpAnswersQuerySchema = object({
|
|
28061
|
-
guestListId: ulidSchema,
|
|
28062
|
-
householdId: ulidSchema.optional()
|
|
28063
|
-
});
|
|
28064
|
-
|
|
28065
28134
|
// ../../packages/schema/src/contracts/google-contacts.ts
|
|
28066
28135
|
var googleContactsModeSchema = _enum2(["off", "fake", "live"]);
|
|
28067
28136
|
var googleContactsStatusSchema = object({
|
|
@@ -29747,7 +29816,7 @@ function parseCapture2(input, now) {
|
|
|
29747
29816
|
|
|
29748
29817
|
// src/meta.ts
|
|
29749
29818
|
var CLI_NAME = "do";
|
|
29750
|
-
var VERSION = "1.
|
|
29819
|
+
var VERSION = "1.301.0";
|
|
29751
29820
|
var API_PREFIX = "/api/v1";
|
|
29752
29821
|
var DEFAULT_API_URL = "http://localhost:3001";
|
|
29753
29822
|
|
|
@@ -30137,7 +30206,7 @@ var ENTITIES = [
|
|
|
30137
30206
|
{
|
|
30138
30207
|
name: "tasks",
|
|
30139
30208
|
path: "/tasks",
|
|
30140
|
-
|
|
30209
|
+
readScopes: ["tasks:read"],
|
|
30141
30210
|
returns: "Task",
|
|
30142
30211
|
canGet: true,
|
|
30143
30212
|
listFlags: [
|
|
@@ -30182,7 +30251,7 @@ var ENTITIES = [
|
|
|
30182
30251
|
}
|
|
30183
30252
|
],
|
|
30184
30253
|
write: {
|
|
30185
|
-
|
|
30254
|
+
scopes: ["tasks:write"],
|
|
30186
30255
|
createSchema: createTaskInputSchema,
|
|
30187
30256
|
createInput: "CreateTaskInput",
|
|
30188
30257
|
updateSchema: updateTaskInputSchema,
|
|
@@ -30193,7 +30262,7 @@ var ENTITIES = [
|
|
|
30193
30262
|
{
|
|
30194
30263
|
name: "habits",
|
|
30195
30264
|
path: "/habits",
|
|
30196
|
-
|
|
30265
|
+
readScopes: ["habits:read"],
|
|
30197
30266
|
returns: "HabitSummary",
|
|
30198
30267
|
canGet: true,
|
|
30199
30268
|
listFlags: [
|
|
@@ -30205,7 +30274,7 @@ var ENTITIES = [
|
|
|
30205
30274
|
}
|
|
30206
30275
|
],
|
|
30207
30276
|
write: {
|
|
30208
|
-
|
|
30277
|
+
scopes: ["habits:write"],
|
|
30209
30278
|
createSchema: createHabitInputSchema,
|
|
30210
30279
|
createInput: "CreateHabitInput",
|
|
30211
30280
|
updateSchema: updateHabitInputSchema,
|
|
@@ -30216,7 +30285,7 @@ var ENTITIES = [
|
|
|
30216
30285
|
{
|
|
30217
30286
|
name: "projects",
|
|
30218
30287
|
path: "/projects",
|
|
30219
|
-
|
|
30288
|
+
readScopes: ["projects:read"],
|
|
30220
30289
|
returns: "ProjectView",
|
|
30221
30290
|
canGet: true,
|
|
30222
30291
|
listFlags: [
|
|
@@ -30229,7 +30298,7 @@ var ENTITIES = [
|
|
|
30229
30298
|
DUE_BEFORE_FLAG
|
|
30230
30299
|
],
|
|
30231
30300
|
write: {
|
|
30232
|
-
|
|
30301
|
+
scopes: ["projects:write"],
|
|
30233
30302
|
createSchema: createProjectInputSchema,
|
|
30234
30303
|
createInput: "CreateProjectInput",
|
|
30235
30304
|
updateSchema: updateProjectInputSchema,
|
|
@@ -30240,7 +30309,7 @@ var ENTITIES = [
|
|
|
30240
30309
|
{
|
|
30241
30310
|
name: "areas",
|
|
30242
30311
|
path: "/areas",
|
|
30243
|
-
|
|
30312
|
+
readScopes: ["areas:read"],
|
|
30244
30313
|
returns: "AreaView",
|
|
30245
30314
|
canGet: true,
|
|
30246
30315
|
listFlags: [
|
|
@@ -30253,7 +30322,7 @@ var ENTITIES = [
|
|
|
30253
30322
|
{ name: "archived", description: "only archived areas", query: "archived", sends: "true" }
|
|
30254
30323
|
],
|
|
30255
30324
|
write: {
|
|
30256
|
-
|
|
30325
|
+
scopes: ["areas:write"],
|
|
30257
30326
|
createSchema: createAreaInputSchema,
|
|
30258
30327
|
createInput: "CreateAreaInput",
|
|
30259
30328
|
updateSchema: updateAreaInputSchema,
|
|
@@ -30264,12 +30333,12 @@ var ENTITIES = [
|
|
|
30264
30333
|
{
|
|
30265
30334
|
name: "places",
|
|
30266
30335
|
path: "/places",
|
|
30267
|
-
|
|
30336
|
+
readScopes: ["places:read"],
|
|
30268
30337
|
returns: "PlaceView",
|
|
30269
30338
|
canGet: true,
|
|
30270
30339
|
listFlags: [],
|
|
30271
30340
|
write: {
|
|
30272
|
-
|
|
30341
|
+
scopes: ["places:write"],
|
|
30273
30342
|
createSchema: createPlaceInputSchema,
|
|
30274
30343
|
createInput: "CreatePlaceInput",
|
|
30275
30344
|
updateSchema: updatePlaceInputSchema,
|
|
@@ -30280,12 +30349,12 @@ var ENTITIES = [
|
|
|
30280
30349
|
{
|
|
30281
30350
|
name: "routines",
|
|
30282
30351
|
path: "/routines",
|
|
30283
|
-
|
|
30352
|
+
readScopes: ["routines:read"],
|
|
30284
30353
|
returns: "RoutineView",
|
|
30285
30354
|
canGet: true,
|
|
30286
30355
|
listFlags: [],
|
|
30287
30356
|
write: {
|
|
30288
|
-
|
|
30357
|
+
scopes: ["routines:write"],
|
|
30289
30358
|
createSchema: createRoutineInputSchema,
|
|
30290
30359
|
createInput: "CreateRoutineInput",
|
|
30291
30360
|
updateSchema: updateRoutineInputSchema,
|
|
@@ -30296,7 +30365,7 @@ var ENTITIES = [
|
|
|
30296
30365
|
{
|
|
30297
30366
|
name: "notes",
|
|
30298
30367
|
path: "/notes",
|
|
30299
|
-
|
|
30368
|
+
readScopes: ["notes:read"],
|
|
30300
30369
|
returns: "Note",
|
|
30301
30370
|
canGet: true,
|
|
30302
30371
|
listFlags: [
|
|
@@ -30305,7 +30374,7 @@ var ENTITIES = [
|
|
|
30305
30374
|
{ name: "tag", description: "filter to notes carrying this tag", query: "tag" }
|
|
30306
30375
|
],
|
|
30307
30376
|
write: {
|
|
30308
|
-
|
|
30377
|
+
scopes: ["notes:write"],
|
|
30309
30378
|
createSchema: createNoteInputSchema,
|
|
30310
30379
|
createInput: "CreateNoteInput",
|
|
30311
30380
|
updateSchema: updateNoteInputSchema,
|
|
@@ -30316,7 +30385,7 @@ var ENTITIES = [
|
|
|
30316
30385
|
{
|
|
30317
30386
|
name: "contacts",
|
|
30318
30387
|
path: "/contacts",
|
|
30319
|
-
|
|
30388
|
+
readScopes: ["contacts:read"],
|
|
30320
30389
|
returns: "Contact",
|
|
30321
30390
|
canGet: true,
|
|
30322
30391
|
listFlags: [
|
|
@@ -30334,7 +30403,7 @@ var ENTITIES = [
|
|
|
30334
30403
|
}
|
|
30335
30404
|
],
|
|
30336
30405
|
write: {
|
|
30337
|
-
|
|
30406
|
+
scopes: ["contacts:write"],
|
|
30338
30407
|
createSchema: createContactInputSchema,
|
|
30339
30408
|
createInput: "CreateContactInput",
|
|
30340
30409
|
updateSchema: updateContactInputSchema,
|
|
@@ -30345,7 +30414,7 @@ var ENTITIES = [
|
|
|
30345
30414
|
{
|
|
30346
30415
|
name: "contact-moments",
|
|
30347
30416
|
path: "/contact-moments",
|
|
30348
|
-
|
|
30417
|
+
readScopes: ["contacts:read"],
|
|
30349
30418
|
returns: "ContactMomentView",
|
|
30350
30419
|
canGet: true,
|
|
30351
30420
|
listFlags: [
|
|
@@ -30356,7 +30425,7 @@ var ENTITIES = [
|
|
|
30356
30425
|
{ name: "limit", description: "at most this many, newest first", query: "limit" }
|
|
30357
30426
|
],
|
|
30358
30427
|
write: {
|
|
30359
|
-
|
|
30428
|
+
scopes: ["contacts:write"],
|
|
30360
30429
|
createSchema: createContactMomentInputSchema,
|
|
30361
30430
|
createInput: "CreateContactMomentInput",
|
|
30362
30431
|
updateSchema: updateContactMomentInputSchema,
|
|
@@ -30367,7 +30436,7 @@ var ENTITIES = [
|
|
|
30367
30436
|
{
|
|
30368
30437
|
name: "gift-ideas",
|
|
30369
30438
|
path: "/gift-ideas",
|
|
30370
|
-
|
|
30439
|
+
readScopes: ["contacts:read"],
|
|
30371
30440
|
returns: "GiftIdeaView",
|
|
30372
30441
|
canGet: true,
|
|
30373
30442
|
listFlags: [
|
|
@@ -30384,7 +30453,7 @@ var ENTITIES = [
|
|
|
30384
30453
|
}
|
|
30385
30454
|
],
|
|
30386
30455
|
write: {
|
|
30387
|
-
|
|
30456
|
+
scopes: ["contacts:write"],
|
|
30388
30457
|
createSchema: createGiftIdeaInputSchema,
|
|
30389
30458
|
createInput: "CreateGiftIdeaInput",
|
|
30390
30459
|
updateSchema: updateGiftIdeaInputSchema,
|
|
@@ -30395,12 +30464,12 @@ var ENTITIES = [
|
|
|
30395
30464
|
{
|
|
30396
30465
|
name: "circles",
|
|
30397
30466
|
path: "/circles",
|
|
30398
|
-
|
|
30467
|
+
readScopes: ["contacts:read"],
|
|
30399
30468
|
returns: "CircleView",
|
|
30400
30469
|
canGet: true,
|
|
30401
30470
|
listFlags: [],
|
|
30402
30471
|
write: {
|
|
30403
|
-
|
|
30472
|
+
scopes: ["contacts:write"],
|
|
30404
30473
|
createSchema: createCircleInputSchema,
|
|
30405
30474
|
createInput: "CreateCircleInput",
|
|
30406
30475
|
updateSchema: updateCircleInputSchema,
|
|
@@ -30411,12 +30480,12 @@ var ENTITIES = [
|
|
|
30411
30480
|
{
|
|
30412
30481
|
name: "contact-relations",
|
|
30413
30482
|
path: "/contact-relations",
|
|
30414
|
-
|
|
30483
|
+
readScopes: ["contacts:read"],
|
|
30415
30484
|
returns: "ContactRelation",
|
|
30416
30485
|
canGet: true,
|
|
30417
30486
|
listFlags: [{ name: "contact", description: "only this contact id", query: "contactId" }],
|
|
30418
30487
|
write: {
|
|
30419
|
-
|
|
30488
|
+
scopes: ["contacts:write"],
|
|
30420
30489
|
createSchema: createContactRelationInputSchema,
|
|
30421
30490
|
createInput: "CreateContactRelationInput",
|
|
30422
30491
|
updateSchema: updateContactRelationInputSchema,
|
|
@@ -30427,7 +30496,7 @@ var ENTITIES = [
|
|
|
30427
30496
|
{
|
|
30428
30497
|
name: "households",
|
|
30429
30498
|
path: "/households",
|
|
30430
|
-
|
|
30499
|
+
readScopes: ["contacts:read"],
|
|
30431
30500
|
returns: "HouseholdView",
|
|
30432
30501
|
canGet: true,
|
|
30433
30502
|
listFlags: [
|
|
@@ -30438,7 +30507,7 @@ var ENTITIES = [
|
|
|
30438
30507
|
}
|
|
30439
30508
|
],
|
|
30440
30509
|
write: {
|
|
30441
|
-
|
|
30510
|
+
scopes: ["contacts:write"],
|
|
30442
30511
|
createSchema: createHouseholdInputSchema,
|
|
30443
30512
|
createInput: "CreateHouseholdInput",
|
|
30444
30513
|
updateSchema: updateHouseholdInputSchema,
|
|
@@ -30449,12 +30518,12 @@ var ENTITIES = [
|
|
|
30449
30518
|
{
|
|
30450
30519
|
name: "guest-lists",
|
|
30451
30520
|
path: "/guest-lists",
|
|
30452
|
-
|
|
30521
|
+
readScopes: ["contacts:read"],
|
|
30453
30522
|
returns: "GuestListView",
|
|
30454
30523
|
canGet: true,
|
|
30455
30524
|
listFlags: [{ name: "project", description: "only this project's list", query: "projectId" }],
|
|
30456
30525
|
write: {
|
|
30457
|
-
|
|
30526
|
+
scopes: ["contacts:write"],
|
|
30458
30527
|
createSchema: createGuestListInputSchema,
|
|
30459
30528
|
createInput: "CreateGuestListInput",
|
|
30460
30529
|
updateSchema: updateGuestListInputSchema,
|
|
@@ -30465,14 +30534,14 @@ var ENTITIES = [
|
|
|
30465
30534
|
{
|
|
30466
30535
|
name: "guest-list-events",
|
|
30467
30536
|
path: "/guest-list-events",
|
|
30468
|
-
|
|
30537
|
+
readScopes: ["contacts:read"],
|
|
30469
30538
|
returns: "GuestListEvent",
|
|
30470
30539
|
canGet: true,
|
|
30471
30540
|
listFlags: [
|
|
30472
30541
|
{ name: "list", description: "the guest list's id (required)", query: "guestListId" }
|
|
30473
30542
|
],
|
|
30474
30543
|
write: {
|
|
30475
|
-
|
|
30544
|
+
scopes: ["contacts:write"],
|
|
30476
30545
|
createSchema: createGuestListEventInputSchema,
|
|
30477
30546
|
createInput: "CreateGuestListEventInput",
|
|
30478
30547
|
updateSchema: updateGuestListEventInputSchema,
|
|
@@ -30483,14 +30552,14 @@ var ENTITIES = [
|
|
|
30483
30552
|
{
|
|
30484
30553
|
name: "guest-tables",
|
|
30485
30554
|
path: "/guest-tables",
|
|
30486
|
-
|
|
30555
|
+
readScopes: ["contacts:read"],
|
|
30487
30556
|
returns: "GuestTableView",
|
|
30488
30557
|
canGet: true,
|
|
30489
30558
|
listFlags: [
|
|
30490
30559
|
{ name: "list", description: "the guest list's id (required)", query: "guestListId" }
|
|
30491
30560
|
],
|
|
30492
30561
|
write: {
|
|
30493
|
-
|
|
30562
|
+
scopes: ["contacts:write"],
|
|
30494
30563
|
createSchema: createGuestTableInputSchema,
|
|
30495
30564
|
createInput: "CreateGuestTableInput",
|
|
30496
30565
|
updateSchema: updateGuestTableInputSchema,
|
|
@@ -30501,14 +30570,14 @@ var ENTITIES = [
|
|
|
30501
30570
|
{
|
|
30502
30571
|
name: "rsvp-questions",
|
|
30503
30572
|
path: "/rsvp-questions",
|
|
30504
|
-
|
|
30573
|
+
readScopes: ["contacts:read"],
|
|
30505
30574
|
returns: "RsvpQuestion",
|
|
30506
30575
|
canGet: true,
|
|
30507
30576
|
listFlags: [
|
|
30508
30577
|
{ name: "list", description: "the guest list's id (required)", query: "guestListId" }
|
|
30509
30578
|
],
|
|
30510
30579
|
write: {
|
|
30511
|
-
|
|
30580
|
+
scopes: ["contacts:write"],
|
|
30512
30581
|
createSchema: createRsvpQuestionInputSchema,
|
|
30513
30582
|
createInput: "CreateRsvpQuestionInput",
|
|
30514
30583
|
updateSchema: updateRsvpQuestionInputSchema,
|
|
@@ -30519,7 +30588,7 @@ var ENTITIES = [
|
|
|
30519
30588
|
{
|
|
30520
30589
|
name: "guests",
|
|
30521
30590
|
path: "/guests",
|
|
30522
|
-
|
|
30591
|
+
readScopes: ["contacts:read"],
|
|
30523
30592
|
returns: "GuestView",
|
|
30524
30593
|
canGet: true,
|
|
30525
30594
|
listFlags: [
|
|
@@ -30528,7 +30597,7 @@ var ENTITIES = [
|
|
|
30528
30597
|
{ name: "state", description: "yes, no, maybe or waiting (overall)", query: "state" }
|
|
30529
30598
|
],
|
|
30530
30599
|
write: {
|
|
30531
|
-
|
|
30600
|
+
scopes: ["contacts:write"],
|
|
30532
30601
|
createSchema: createGuestInputSchema,
|
|
30533
30602
|
createInput: "CreateGuestInput",
|
|
30534
30603
|
updateSchema: updateGuestInputSchema,
|
|
@@ -30539,7 +30608,7 @@ var ENTITIES = [
|
|
|
30539
30608
|
{
|
|
30540
30609
|
name: "key-dates",
|
|
30541
30610
|
path: "/key-dates",
|
|
30542
|
-
|
|
30611
|
+
readScopes: ["key-dates:read"],
|
|
30543
30612
|
returns: "KeyDateView",
|
|
30544
30613
|
canGet: true,
|
|
30545
30614
|
listFlags: [
|
|
@@ -30561,7 +30630,7 @@ var ENTITIES = [
|
|
|
30561
30630
|
}
|
|
30562
30631
|
],
|
|
30563
30632
|
write: {
|
|
30564
|
-
|
|
30633
|
+
scopes: ["key-dates:write"],
|
|
30565
30634
|
createSchema: createKeyDateInputSchema,
|
|
30566
30635
|
createInput: "CreateKeyDateInput",
|
|
30567
30636
|
updateSchema: updateKeyDateInputSchema,
|
|
@@ -30572,7 +30641,7 @@ var ENTITIES = [
|
|
|
30572
30641
|
{
|
|
30573
30642
|
name: "documents",
|
|
30574
30643
|
path: "/documents",
|
|
30575
|
-
|
|
30644
|
+
readScopes: ["documents:read"],
|
|
30576
30645
|
returns: "DocumentView",
|
|
30577
30646
|
canGet: true,
|
|
30578
30647
|
listFlags: [
|
|
@@ -30593,7 +30662,7 @@ var ENTITIES = [
|
|
|
30593
30662
|
}
|
|
30594
30663
|
],
|
|
30595
30664
|
write: {
|
|
30596
|
-
|
|
30665
|
+
scopes: ["documents:write"],
|
|
30597
30666
|
createSchema: createDocumentInputSchema,
|
|
30598
30667
|
createInput: "CreateDocumentInput",
|
|
30599
30668
|
updateSchema: updateDocumentInputSchema,
|
|
@@ -30604,7 +30673,7 @@ var ENTITIES = [
|
|
|
30604
30673
|
{
|
|
30605
30674
|
name: "incidents",
|
|
30606
30675
|
path: "/incidents",
|
|
30607
|
-
|
|
30676
|
+
readScopes: ["documents:read"],
|
|
30608
30677
|
returns: "IncidentView",
|
|
30609
30678
|
canGet: true,
|
|
30610
30679
|
listFlags: [
|
|
@@ -30616,7 +30685,7 @@ var ENTITIES = [
|
|
|
30616
30685
|
}
|
|
30617
30686
|
],
|
|
30618
30687
|
write: {
|
|
30619
|
-
|
|
30688
|
+
scopes: ["documents:write"],
|
|
30620
30689
|
createSchema: createIncidentInputSchema,
|
|
30621
30690
|
createInput: "CreateIncidentInput",
|
|
30622
30691
|
updateSchema: updateIncidentInputSchema,
|
|
@@ -30627,7 +30696,7 @@ var ENTITIES = [
|
|
|
30627
30696
|
{
|
|
30628
30697
|
name: "periods",
|
|
30629
30698
|
path: "/periods",
|
|
30630
|
-
|
|
30699
|
+
readScopes: ["periods:read"],
|
|
30631
30700
|
returns: "PeriodView",
|
|
30632
30701
|
canGet: true,
|
|
30633
30702
|
listFlags: [
|
|
@@ -30644,7 +30713,7 @@ var ENTITIES = [
|
|
|
30644
30713
|
}
|
|
30645
30714
|
],
|
|
30646
30715
|
write: {
|
|
30647
|
-
|
|
30716
|
+
scopes: ["periods:write"],
|
|
30648
30717
|
createSchema: createPeriodInputSchema,
|
|
30649
30718
|
createInput: "CreatePeriodInput",
|
|
30650
30719
|
updateSchema: updatePeriodInputSchema,
|
|
@@ -30655,12 +30724,12 @@ var ENTITIES = [
|
|
|
30655
30724
|
{
|
|
30656
30725
|
name: "tap-tags",
|
|
30657
30726
|
path: "/tap-tags",
|
|
30658
|
-
|
|
30727
|
+
readScopes: ["habits:read", "routines:read"],
|
|
30659
30728
|
returns: "TapTagView",
|
|
30660
30729
|
canGet: true,
|
|
30661
30730
|
listFlags: [],
|
|
30662
30731
|
write: {
|
|
30663
|
-
|
|
30732
|
+
scopes: ["habits:write", "routines:write"],
|
|
30664
30733
|
createSchema: createTapTagInputSchema,
|
|
30665
30734
|
createInput: "CreateTapTagInput",
|
|
30666
30735
|
updateSchema: updateTapTagInputSchema,
|
|
@@ -30671,7 +30740,7 @@ var ENTITIES = [
|
|
|
30671
30740
|
{
|
|
30672
30741
|
name: "animals",
|
|
30673
30742
|
path: "/animals",
|
|
30674
|
-
|
|
30743
|
+
readScopes: ["animals:read"],
|
|
30675
30744
|
returns: "AnimalView",
|
|
30676
30745
|
canGet: true,
|
|
30677
30746
|
listFlags: [
|
|
@@ -30690,7 +30759,7 @@ var ENTITIES = [
|
|
|
30690
30759
|
}
|
|
30691
30760
|
],
|
|
30692
30761
|
write: {
|
|
30693
|
-
|
|
30762
|
+
scopes: ["animals:write"],
|
|
30694
30763
|
createSchema: createAnimalInputSchema,
|
|
30695
30764
|
createInput: "CreateAnimalInput",
|
|
30696
30765
|
updateSchema: updateAnimalInputSchema,
|
|
@@ -30701,7 +30770,7 @@ var ENTITIES = [
|
|
|
30701
30770
|
{
|
|
30702
30771
|
name: "runs",
|
|
30703
30772
|
path: "/runs",
|
|
30704
|
-
|
|
30773
|
+
readScopes: ["collections:read"],
|
|
30705
30774
|
returns: "RunView",
|
|
30706
30775
|
canGet: true,
|
|
30707
30776
|
listFlags: [
|
|
@@ -30714,7 +30783,7 @@ var ENTITIES = [
|
|
|
30714
30783
|
{ name: "theme", description: "only this theme pack (skyrim, pokemon, \u2026)", query: "theme" }
|
|
30715
30784
|
],
|
|
30716
30785
|
write: {
|
|
30717
|
-
|
|
30786
|
+
scopes: ["collections:write"],
|
|
30718
30787
|
createSchema: createRunInputSchema,
|
|
30719
30788
|
createInput: "CreateRunInput",
|
|
30720
30789
|
updateSchema: updateRunInputSchema,
|
|
@@ -30725,12 +30794,12 @@ var ENTITIES = [
|
|
|
30725
30794
|
{
|
|
30726
30795
|
name: "shopping-lists",
|
|
30727
30796
|
path: "/shopping-lists",
|
|
30728
|
-
|
|
30797
|
+
readScopes: ["shopping:read"],
|
|
30729
30798
|
returns: "ShoppingList",
|
|
30730
30799
|
canGet: true,
|
|
30731
30800
|
listFlags: [],
|
|
30732
30801
|
write: {
|
|
30733
|
-
|
|
30802
|
+
scopes: ["shopping:write"],
|
|
30734
30803
|
createSchema: createShoppingListInputSchema,
|
|
30735
30804
|
createInput: "CreateShoppingListInput",
|
|
30736
30805
|
updateSchema: updateShoppingListInputSchema,
|
|
@@ -30741,12 +30810,12 @@ var ENTITIES = [
|
|
|
30741
30810
|
{
|
|
30742
30811
|
name: "inventory-items",
|
|
30743
30812
|
path: "/inventory-items",
|
|
30744
|
-
|
|
30813
|
+
readScopes: ["inventory:read"],
|
|
30745
30814
|
returns: "InventoryItem",
|
|
30746
30815
|
canGet: true,
|
|
30747
30816
|
listFlags: [],
|
|
30748
30817
|
write: {
|
|
30749
|
-
|
|
30818
|
+
scopes: ["inventory:write"],
|
|
30750
30819
|
createSchema: createInventoryItemInputSchema,
|
|
30751
30820
|
createInput: "CreateInventoryItemInput",
|
|
30752
30821
|
updateSchema: updateInventoryItemInputSchema,
|
|
@@ -30757,12 +30826,12 @@ var ENTITIES = [
|
|
|
30757
30826
|
{
|
|
30758
30827
|
name: "recipes",
|
|
30759
30828
|
path: "/recipes",
|
|
30760
|
-
|
|
30829
|
+
readScopes: ["meals:read"],
|
|
30761
30830
|
returns: "Recipe",
|
|
30762
30831
|
canGet: true,
|
|
30763
30832
|
listFlags: [],
|
|
30764
30833
|
write: {
|
|
30765
|
-
|
|
30834
|
+
scopes: ["meals:write"],
|
|
30766
30835
|
createSchema: createRecipeInputSchema,
|
|
30767
30836
|
createInput: "CreateRecipeInput",
|
|
30768
30837
|
updateSchema: updateRecipeInputSchema,
|
|
@@ -30773,12 +30842,12 @@ var ENTITIES = [
|
|
|
30773
30842
|
{
|
|
30774
30843
|
name: "meal-plans",
|
|
30775
30844
|
path: "/meal-plans",
|
|
30776
|
-
|
|
30845
|
+
readScopes: ["meals:read"],
|
|
30777
30846
|
returns: "MealPlan",
|
|
30778
30847
|
canGet: true,
|
|
30779
30848
|
listFlags: [],
|
|
30780
30849
|
write: {
|
|
30781
|
-
|
|
30850
|
+
scopes: ["meals:write"],
|
|
30782
30851
|
createSchema: createMealPlanInputSchema,
|
|
30783
30852
|
createInput: "CreateMealPlanInput",
|
|
30784
30853
|
updateSchema: updateMealPlanInputSchema,
|
|
@@ -30789,7 +30858,7 @@ var ENTITIES = [
|
|
|
30789
30858
|
{
|
|
30790
30859
|
name: "occurrences",
|
|
30791
30860
|
path: "/occurrences",
|
|
30792
|
-
|
|
30861
|
+
readScopes: ["occurrences:read"],
|
|
30793
30862
|
returns: "Occurrence",
|
|
30794
30863
|
canGet: false,
|
|
30795
30864
|
listFlags: [
|
|
@@ -30804,7 +30873,7 @@ var ENTITIES = [
|
|
|
30804
30873
|
{
|
|
30805
30874
|
name: "time-blocks",
|
|
30806
30875
|
path: "/time-blocks",
|
|
30807
|
-
|
|
30876
|
+
readScopes: ["calendar:read"],
|
|
30808
30877
|
returns: "TimeBlockView",
|
|
30809
30878
|
canGet: true,
|
|
30810
30879
|
listFlags: [
|
|
@@ -30816,7 +30885,7 @@ var ENTITIES = [
|
|
|
30816
30885
|
{ name: "kind", description: "only blocks of this kind: task, focus or life" }
|
|
30817
30886
|
],
|
|
30818
30887
|
write: {
|
|
30819
|
-
|
|
30888
|
+
scopes: ["calendar:write"],
|
|
30820
30889
|
createSchema: createTimeBlockInputSchema,
|
|
30821
30890
|
createInput: "CreateTimeBlockInput",
|
|
30822
30891
|
updateSchema: updateTimeBlockInputSchema,
|
|
@@ -30827,12 +30896,12 @@ var ENTITIES = [
|
|
|
30827
30896
|
{
|
|
30828
30897
|
name: "block-templates",
|
|
30829
30898
|
path: "/block-templates",
|
|
30830
|
-
|
|
30899
|
+
readScopes: ["calendar:read"],
|
|
30831
30900
|
returns: "BlockTemplateView",
|
|
30832
30901
|
canGet: true,
|
|
30833
30902
|
listFlags: [],
|
|
30834
30903
|
write: {
|
|
30835
|
-
|
|
30904
|
+
scopes: ["calendar:write"],
|
|
30836
30905
|
createSchema: createBlockTemplateInputSchema,
|
|
30837
30906
|
createInput: "CreateBlockTemplateInput",
|
|
30838
30907
|
updateSchema: updateBlockTemplateInputSchema,
|
|
@@ -30843,7 +30912,7 @@ var ENTITIES = [
|
|
|
30843
30912
|
{
|
|
30844
30913
|
name: "webhooks",
|
|
30845
30914
|
path: "/webhooks",
|
|
30846
|
-
|
|
30915
|
+
readScopes: ["webhooks:read"],
|
|
30847
30916
|
returns: "WebhookSubscription",
|
|
30848
30917
|
canGet: true,
|
|
30849
30918
|
listFlags: []
|
|
@@ -31279,7 +31348,7 @@ var HEALTH_COMMAND_SPECS = [
|
|
|
31279
31348
|
flags: [],
|
|
31280
31349
|
scopes: READ,
|
|
31281
31350
|
returns: "GoogleHealthStatus",
|
|
31282
|
-
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."
|
|
31351
|
+
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. `nutrition` says whether your food is written back to Google Health (turned on in do; each settled day once, one entry per meal type) and the last day written."
|
|
31283
31352
|
},
|
|
31284
31353
|
{
|
|
31285
31354
|
path: ["health", "google", "sync"],
|
|
@@ -31694,6 +31763,21 @@ var COMMAND_SPECS = [
|
|
|
31694
31763
|
returns: "JournalRecall",
|
|
31695
31764
|
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."
|
|
31696
31765
|
},
|
|
31766
|
+
{
|
|
31767
|
+
path: ["journal", "like"],
|
|
31768
|
+
summary: 'Days like this one: your other days that share the most with a day (its words, tags and rating), for "when did I feel like this before?".',
|
|
31769
|
+
args: [{ name: "date", required: true, description: "The day, YYYY-MM-DD." }],
|
|
31770
|
+
flags: [
|
|
31771
|
+
{
|
|
31772
|
+
name: "limit",
|
|
31773
|
+
type: "string",
|
|
31774
|
+
description: "At most this many days (1\u201310, 5 by default)."
|
|
31775
|
+
}
|
|
31776
|
+
],
|
|
31777
|
+
scopes: ["journal:read"],
|
|
31778
|
+
returns: "JournalLike",
|
|
31779
|
+
notes: "GET /api/v1/journal/days/{date}/like (journal_like) \u2014 your own days only, by Postgres full text over the one-liner, highlights, tags, summary and entries (the day's own words, with a few that mean the same), then shared tags and a close rating. Words, not meanings: no embeddings. A day hidden from memories is never offered. journal:read is a sensitive scope."
|
|
31780
|
+
},
|
|
31697
31781
|
{
|
|
31698
31782
|
path: ["journal", "digest"],
|
|
31699
31783
|
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.",
|
|
@@ -34787,6 +34871,18 @@ var COMMAND_SPECS = [
|
|
|
34787
34871
|
returns: "{ copied, kept }",
|
|
34788
34872
|
notes: "POST /api/v1/money/budget/copy."
|
|
34789
34873
|
},
|
|
34874
|
+
{
|
|
34875
|
+
path: ["money", "year"],
|
|
34876
|
+
summary: "The year in money: in and out per month and category, the streams' year, the goals.",
|
|
34877
|
+
args: [],
|
|
34878
|
+
flags: [
|
|
34879
|
+
{ name: "year", type: "string", description: "The calendar year (default this one)." },
|
|
34880
|
+
{ name: "scope", type: "string", description: "all (default) | space | owner." }
|
|
34881
|
+
],
|
|
34882
|
+
scopes: ["finance:read"],
|
|
34883
|
+
returns: "MoneyYear",
|
|
34884
|
+
notes: "GET /api/v1/money/year. totals (income, spent, saved) and lastYear (the same months a year earlier, null with nothing booked then); months Jan\u2013Dec; spending and income by category, biggest first, each with lastYear; recurring streams with thisYear, lastYear and change (new \xB7 stopped \xB7 up \xB7 down \xB7 same); goals with what went toward them this year. A year under way counts to this month (through)."
|
|
34885
|
+
},
|
|
34790
34886
|
{
|
|
34791
34887
|
path: ["money", "goals"],
|
|
34792
34888
|
summary: "List money goals: what's saved toward each, soonest first.",
|
|
@@ -35649,6 +35745,20 @@ var COMMAND_SPECS = [
|
|
|
35649
35745
|
scopes: ["contacts:write"],
|
|
35650
35746
|
returns: "GuestView"
|
|
35651
35747
|
},
|
|
35748
|
+
{
|
|
35749
|
+
path: ["rsvp-questions", "presets"],
|
|
35750
|
+
summary: "Add the built-in diet (per guest who comes, with a line for other) and/or message questions.",
|
|
35751
|
+
args: [],
|
|
35752
|
+
flags: [
|
|
35753
|
+
{
|
|
35754
|
+
name: "data",
|
|
35755
|
+
type: "string",
|
|
35756
|
+
description: 'JSON AddRsvpPresetsInput, e.g. {"guestListId":"01\u2026","presets":["diet","message"]}'
|
|
35757
|
+
}
|
|
35758
|
+
],
|
|
35759
|
+
scopes: ["contacts:write"],
|
|
35760
|
+
returns: "RsvpQuestion"
|
|
35761
|
+
},
|
|
35652
35762
|
{
|
|
35653
35763
|
path: ["rsvp-answers", "list"],
|
|
35654
35764
|
summary: "A guest list's answers to its RSVP questions, or one household's.",
|
|
@@ -36204,8 +36314,8 @@ function buildManifest() {
|
|
|
36204
36314
|
name: e.name,
|
|
36205
36315
|
operations: entityOperations(e),
|
|
36206
36316
|
path: `${API_PREFIX}${e.path}`,
|
|
36207
|
-
|
|
36208
|
-
...e.write ? {
|
|
36317
|
+
readScopes: e.readScopes,
|
|
36318
|
+
...e.write ? { writeScopes: e.write.scopes } : {},
|
|
36209
36319
|
...e.write?.createInput || e.write?.updateInput ? {
|
|
36210
36320
|
inputs: {
|
|
36211
36321
|
...e.write.createInput ? { create: e.write.createInput } : {},
|
|
@@ -37343,6 +37453,24 @@ function renderJournalRecall(data, mode) {
|
|
|
37343
37453
|
return out.join(`
|
|
37344
37454
|
`);
|
|
37345
37455
|
}
|
|
37456
|
+
function renderJournalLike(data, mode) {
|
|
37457
|
+
const d = data;
|
|
37458
|
+
const out = [paint(mode, "dim", `Like ${d.date ?? "this day"}: ${(d.words ?? []).join(" \xB7 ")}`)];
|
|
37459
|
+
const days = d.days ?? [];
|
|
37460
|
+
if (days.length === 0) {
|
|
37461
|
+
out.push(paint(mode, "dim", "(no other day shares enough with it)"));
|
|
37462
|
+
return out.join(`
|
|
37463
|
+
`);
|
|
37464
|
+
}
|
|
37465
|
+
for (const day of days) {
|
|
37466
|
+
const rating = day.metrics?.rating;
|
|
37467
|
+
const meta = rating === undefined ? "" : paint(mode, "dim", ` ${rating}/10`);
|
|
37468
|
+
const shared = [...day.shared ?? [], ...(day.sharedTags ?? []).map((t) => `#${t}`)];
|
|
37469
|
+
out.push(`${day.date} ${day.title ?? paint(mode, "dim", "(no entry)")}${meta}${shared.length ? paint(mode, "dim", ` \xB7 ${shared.join(", ")}`) : ""}`);
|
|
37470
|
+
}
|
|
37471
|
+
return out.join(`
|
|
37472
|
+
`);
|
|
37473
|
+
}
|
|
37346
37474
|
function renderJournalDigest(data) {
|
|
37347
37475
|
return data.text ?? "";
|
|
37348
37476
|
}
|
|
@@ -38524,6 +38652,18 @@ var HANDLERS = {
|
|
|
38524
38652
|
render: renderJournalRecall
|
|
38525
38653
|
};
|
|
38526
38654
|
},
|
|
38655
|
+
"journal like": async ({ args, flags, requireClient }) => {
|
|
38656
|
+
const [date] = args;
|
|
38657
|
+
if (!date)
|
|
38658
|
+
throw usageError("journal like needs the day, YYYY-MM-DD");
|
|
38659
|
+
parseInput(journalDateSchema, date);
|
|
38660
|
+
const limit = flagString(flags, "limit");
|
|
38661
|
+
parseInput(journalLikeQuerySchema, limit === undefined ? {} : { limit });
|
|
38662
|
+
return {
|
|
38663
|
+
data: await requireClient().get(`/journal/days/${date}/like`, { query: { limit } }),
|
|
38664
|
+
render: renderJournalLike
|
|
38665
|
+
};
|
|
38666
|
+
},
|
|
38527
38667
|
"journal digest": async ({ requireClient }) => ({
|
|
38528
38668
|
data: await requireClient().get("/journal/digest"),
|
|
38529
38669
|
render: renderJournalDigest
|
|
@@ -40411,6 +40551,12 @@ var HANDLERS = {
|
|
|
40411
40551
|
const route = flagBool(flags, "commit") ? "/money/imports" : "/money/imports/preview";
|
|
40412
40552
|
return { data: await requireClient().upload(route, form), render: renderRecord };
|
|
40413
40553
|
},
|
|
40554
|
+
"money year": async ({ flags, requireClient }) => ({
|
|
40555
|
+
data: await requireClient().get("/money/year", {
|
|
40556
|
+
query: { year: flagString(flags, "year"), scope: flagString(flags, "scope") }
|
|
40557
|
+
}),
|
|
40558
|
+
render: renderRecord
|
|
40559
|
+
}),
|
|
40414
40560
|
"money budget": async ({ flags, io, requireClient }) => ({
|
|
40415
40561
|
data: await requireClient().get("/money/budget", {
|
|
40416
40562
|
query: {
|
|
@@ -41296,6 +41442,13 @@ var HANDLERS = {
|
|
|
41296
41442
|
const body = parseInput(markGuestsSentInputSchema, readDataFlag(flags));
|
|
41297
41443
|
return { data: await requireClient().post("/guests/sent", body), render: renderRecord };
|
|
41298
41444
|
},
|
|
41445
|
+
"rsvp-questions presets": async ({ flags, requireClient }) => {
|
|
41446
|
+
const body = parseInput(addRsvpPresetsInputSchema, readDataFlag(flags));
|
|
41447
|
+
return {
|
|
41448
|
+
data: await requireClient().post("/rsvp-questions/presets", body),
|
|
41449
|
+
render: renderRecord
|
|
41450
|
+
};
|
|
41451
|
+
},
|
|
41299
41452
|
"rsvp-answers list": async ({ flags, requireClient }) => {
|
|
41300
41453
|
const list = flagString(flags, "list");
|
|
41301
41454
|
if (!list)
|
package/package.json
CHANGED