@voxendar/shared 0.2.0 → 0.3.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.
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Where a member's raw recording lives (Milestone 1.5).
3
+ *
4
+ * Shared because three places have to agree on the shape and only one of them can be
5
+ * checked at compile time: the app builds the path, `transcribeAndExtract` validates
6
+ * it (`^audio/[^/]+/.+$` and its own `audio/{uid}/` ownership prefix), and
7
+ * `storage.rules` grants clients write access to `audio/{uid}/**` and nothing else. A
8
+ * path that disagrees is a capture that fails after the audio has already been
9
+ * uploaded — the worst moment to find out. `tests/functions/update-capture.test.js`
10
+ * feeds this function's output through the callable's schema so the two cannot drift.
11
+ *
12
+ * The recording is deleted by the backend the moment it has been transcribed, so this
13
+ * is a short-lived object, not storage the member can browse.
14
+ */
15
+ export declare function rawAudioStoragePath(uid: string, fileName: string): string;
16
+ //# sourceMappingURL=audio.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audio.d.ts","sourceRoot":"","sources":["../../src/capture/audio.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEzE"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.rawAudioStoragePath = rawAudioStoragePath;
4
+ const constants_1 = require("../constants");
5
+ /**
6
+ * Where a member's raw recording lives (Milestone 1.5).
7
+ *
8
+ * Shared because three places have to agree on the shape and only one of them can be
9
+ * checked at compile time: the app builds the path, `transcribeAndExtract` validates
10
+ * it (`^audio/[^/]+/.+$` and its own `audio/{uid}/` ownership prefix), and
11
+ * `storage.rules` grants clients write access to `audio/{uid}/**` and nothing else. A
12
+ * path that disagrees is a capture that fails after the audio has already been
13
+ * uploaded — the worst moment to find out. `tests/functions/update-capture.test.js`
14
+ * feeds this function's output through the callable's schema so the two cannot drift.
15
+ *
16
+ * The recording is deleted by the backend the moment it has been transcribed, so this
17
+ * is a short-lived object, not storage the member can browse.
18
+ */
19
+ function rawAudioStoragePath(uid, fileName) {
20
+ return `${constants_1.STORAGE_PATHS.rawAudio}/${uid}/${fileName}`;
21
+ }
22
+ //# sourceMappingURL=audio.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audio.js","sourceRoot":"","sources":["../../src/capture/audio.ts"],"names":[],"mappings":";;AAgBA,kDAEC;AAlBD,4CAA6C;AAE7C;;;;;;;;;;;;;GAaG;AACH,SAAgB,mBAAmB,CAAC,GAAW,EAAE,QAAgB;IAC/D,OAAO,GAAG,yBAAa,CAAC,QAAQ,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAC;AACxD,CAAC"}
@@ -0,0 +1,87 @@
1
+ import { z } from "zod";
2
+ import type { EventDraft } from "../schemas/event";
3
+ /**
4
+ * The confirmation card's fields (Milestone 1.5), shared by the app and the backend.
5
+ *
6
+ * Why this lives in `shared` rather than in the app: the card edits a draft that the
7
+ * backend must store, and both sides have to agree on exactly two things — what may
8
+ * be edited, and what "edited" means. The `editedFields` list is the accuracy
9
+ * telemetry behind the confirmation-fatigue risk (README §8), so a field name that
10
+ * one side spells differently from the other silently produces a wrong metric, which
11
+ * is the kind of bug nobody notices until the numbers are used to make a decision.
12
+ *
13
+ * The conversion direction matters too. The draft stores absolute instants
14
+ * (`2026-09-27T15:00:00+08:00`), because that is what Google Calendar needs. A person
15
+ * editing a card thinks in wall clock ("3pm"). `fieldsFromEventDraft` converts one
16
+ * way — and deliberately does **no** timezone arithmetic: it reads the offset that is
17
+ * already in the string, since that offset is the one the backend resolved for that
18
+ * very instant. Rebuilding the instant from edited fields is the backend's job
19
+ * (`functions/src/capture/updateCapture.ts`), where the real IANA database lives.
20
+ */
21
+ /** Field names the confirmation card may change. Stable strings — they are logged. */
22
+ export declare const CAPTURE_EDITABLE_FIELDS: readonly ["title", "date", "startTime", "endTime", "allDay", "location", "notes"];
23
+ export type CaptureEditableField = (typeof CAPTURE_EDITABLE_FIELDS)[number];
24
+ export declare const EditableCaptureFieldsSchema: z.ZodObject<{
25
+ title: z.ZodString;
26
+ date: z.ZodString;
27
+ startTime: z.ZodNullable<z.ZodString>;
28
+ endTime: z.ZodNullable<z.ZodString>;
29
+ allDay: z.ZodBoolean;
30
+ location: z.ZodNullable<z.ZodString>;
31
+ notes: z.ZodNullable<z.ZodString>;
32
+ }, "strip", z.ZodTypeAny, {
33
+ title: string;
34
+ allDay: boolean;
35
+ location: string | null;
36
+ notes: string | null;
37
+ date: string;
38
+ startTime: string | null;
39
+ endTime: string | null;
40
+ }, {
41
+ title: string;
42
+ allDay: boolean;
43
+ location: string | null;
44
+ notes: string | null;
45
+ date: string;
46
+ startTime: string | null;
47
+ endTime: string | null;
48
+ }>;
49
+ export type EditableCaptureFields = z.infer<typeof EditableCaptureFieldsSchema>;
50
+ /**
51
+ * A draft as the card shows it. `endTime` is null for all-day events — the card has
52
+ * no use for the exclusive next-midnight end, and a person never typed it.
53
+ */
54
+ export declare function fieldsFromEventDraft(draft: EventDraft): EditableCaptureFields;
55
+ /**
56
+ * Which fields the member actually changed — the telemetry the whole card exists to
57
+ * produce (context.md §9's success signal). Only names from
58
+ * `CAPTURE_EDITABLE_FIELDS` can be returned, and only real differences: a card that
59
+ * was opened and confirmed untouched yields `[]`.
60
+ *
61
+ * The all-day toggle is reported as **one** edit: flipping it clears the start and
62
+ * end times as a consequence, and counting those clearings separately would turn a
63
+ * single tap into three "corrections" in the accuracy metric — the metric exists to
64
+ * measure how often the extractor is wrong, not how many fields a control happens to
65
+ * touch.
66
+ */
67
+ export declare function editedFieldsBetween(original: EditableCaptureFields, edited: EditableCaptureFields): CaptureEditableField[];
68
+ /** True when the draft carries anything the card should flag in amber. */
69
+ export declare function needsAttention(draft: Pick<EventDraft, "confidence" | "ambiguities">): boolean;
70
+ /**
71
+ * The card's time fields into `HH:MM`, or null when it is not a time at all.
72
+ *
73
+ * People type times the way they say them — "3", "3pm", "3:30 pm", "15.00" — and a
74
+ * card that answers "that is not a time" to "3pm" is a card that makes a member feel
75
+ * stupid for writing what they meant. The LLM's own output is always `HH:MM`; this is
76
+ * for the human editing afterwards.
77
+ *
78
+ * Deliberately narrow about what it will *infer*: a **bare** hour 1–11 becomes PM only
79
+ * when the hour has passed (a person editing a card at 16:00 who types "3" means
80
+ * 15:00, not 03:00), a clock reading ("9:05") is taken exactly as written, and
81
+ * anything else returns null so the card can say so instead of guessing.
82
+ *
83
+ * @param value the raw text from the field
84
+ * @param now used only to choose AM/PM for a bare hour; injectable for tests
85
+ */
86
+ export declare function normaliseTimeInput(value: string, now?: Date): string | null;
87
+ //# sourceMappingURL=fields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.d.ts","sourceRoot":"","sources":["../../src/capture/fields.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;;;;;;;;;;;;;;;;GAiBG;AAEH,sFAAsF;AACtF,eAAO,MAAM,uBAAuB,mFAQ1B,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAO5E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;EAQtC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAWhF;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,UAAU,GAAG,qBAAqB,CAY7E;AAOD;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,qBAAqB,EAC/B,MAAM,EAAE,qBAAqB,GAC5B,oBAAoB,EAAE,CAYxB;AAED,0EAA0E;AAC1E,wBAAgB,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,YAAY,GAAG,aAAa,CAAC,GAAG,OAAO,CAE7F;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,GAAE,IAAiB,GAAG,MAAM,GAAG,IAAI,CA+BvF"}
@@ -0,0 +1,171 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EditableCaptureFieldsSchema = exports.CAPTURE_EDITABLE_FIELDS = void 0;
4
+ exports.fieldsFromEventDraft = fieldsFromEventDraft;
5
+ exports.editedFieldsBetween = editedFieldsBetween;
6
+ exports.needsAttention = needsAttention;
7
+ exports.normaliseTimeInput = normaliseTimeInput;
8
+ const zod_1 = require("zod");
9
+ /**
10
+ * The confirmation card's fields (Milestone 1.5), shared by the app and the backend.
11
+ *
12
+ * Why this lives in `shared` rather than in the app: the card edits a draft that the
13
+ * backend must store, and both sides have to agree on exactly two things — what may
14
+ * be edited, and what "edited" means. The `editedFields` list is the accuracy
15
+ * telemetry behind the confirmation-fatigue risk (README §8), so a field name that
16
+ * one side spells differently from the other silently produces a wrong metric, which
17
+ * is the kind of bug nobody notices until the numbers are used to make a decision.
18
+ *
19
+ * The conversion direction matters too. The draft stores absolute instants
20
+ * (`2026-09-27T15:00:00+08:00`), because that is what Google Calendar needs. A person
21
+ * editing a card thinks in wall clock ("3pm"). `fieldsFromEventDraft` converts one
22
+ * way — and deliberately does **no** timezone arithmetic: it reads the offset that is
23
+ * already in the string, since that offset is the one the backend resolved for that
24
+ * very instant. Rebuilding the instant from edited fields is the backend's job
25
+ * (`functions/src/capture/updateCapture.ts`), where the real IANA database lives.
26
+ */
27
+ /** Field names the confirmation card may change. Stable strings — they are logged. */
28
+ exports.CAPTURE_EDITABLE_FIELDS = [
29
+ "title",
30
+ "date",
31
+ "startTime",
32
+ "endTime",
33
+ "allDay",
34
+ "location",
35
+ "notes",
36
+ ];
37
+ /** `YYYY-MM-DD`, the shape the card and the extractor both use. */
38
+ const localDate = zod_1.z.string().regex(/^\d{4}-\d{2}-\d{2}$/);
39
+ /** `HH:MM`, 24-hour, the shape the card and the extractor both use. */
40
+ const localTime = zod_1.z.string().regex(/^\d{1,2}:\d{2}$/);
41
+ exports.EditableCaptureFieldsSchema = zod_1.z.object({
42
+ title: zod_1.z.string().min(1).max(200),
43
+ date: localDate,
44
+ startTime: localTime.nullable(),
45
+ endTime: localTime.nullable(),
46
+ allDay: zod_1.z.boolean(),
47
+ location: zod_1.z.string().max(500).nullable(),
48
+ notes: zod_1.z.string().max(2000).nullable(),
49
+ });
50
+ /** One RFC3339 timestamp split into the offset it carries and the wall clock it reads. */
51
+ function wallClockFromRfc3339(value) {
52
+ const match = /^(\d{4}-\d{2}-\d{2})T(\d{2}):(\d{2})/.exec(value);
53
+ if (!match)
54
+ return null;
55
+ // The string is already expressed in the member's zone with the right offset (the
56
+ // backend produced it that way), so the wall clock is simply its local part.
57
+ return { date: match[1] ?? "", time: `${match[2]}:${match[3]}` };
58
+ }
59
+ /**
60
+ * A draft as the card shows it. `endTime` is null for all-day events — the card has
61
+ * no use for the exclusive next-midnight end, and a person never typed it.
62
+ */
63
+ function fieldsFromEventDraft(draft) {
64
+ const start = wallClockFromRfc3339(draft.start);
65
+ const end = draft.end ? wallClockFromRfc3339(draft.end) : null;
66
+ return {
67
+ title: draft.title,
68
+ date: start?.date ?? "",
69
+ startTime: draft.allDay ? null : (start?.time ?? null),
70
+ endTime: draft.allDay ? null : (end?.time ?? null),
71
+ allDay: draft.allDay,
72
+ location: draft.location ?? null,
73
+ notes: draft.notes ?? null,
74
+ };
75
+ }
76
+ /** Trimmed comparison, so whitespace is not reported as an edit the member made. */
77
+ function normalise(value) {
78
+ return (value ?? "").trim();
79
+ }
80
+ /**
81
+ * Which fields the member actually changed — the telemetry the whole card exists to
82
+ * produce (context.md §9's success signal). Only names from
83
+ * `CAPTURE_EDITABLE_FIELDS` can be returned, and only real differences: a card that
84
+ * was opened and confirmed untouched yields `[]`.
85
+ *
86
+ * The all-day toggle is reported as **one** edit: flipping it clears the start and
87
+ * end times as a consequence, and counting those clearings separately would turn a
88
+ * single tap into three "corrections" in the accuracy metric — the metric exists to
89
+ * measure how often the extractor is wrong, not how many fields a control happens to
90
+ * touch.
91
+ */
92
+ function editedFieldsBetween(original, edited) {
93
+ const changed = [];
94
+ const allDayToggled = original.allDay !== edited.allDay;
95
+ for (const field of exports.CAPTURE_EDITABLE_FIELDS) {
96
+ if (field === "allDay") {
97
+ if (allDayToggled)
98
+ changed.push(field);
99
+ continue;
100
+ }
101
+ if ((field === "startTime" || field === "endTime") && allDayToggled)
102
+ continue;
103
+ if (normalise(original[field]) !== normalise(edited[field]))
104
+ changed.push(field);
105
+ }
106
+ return changed;
107
+ }
108
+ /** True when the draft carries anything the card should flag in amber. */
109
+ function needsAttention(draft) {
110
+ return draft.confidence !== "high" || draft.ambiguities.length > 0;
111
+ }
112
+ /**
113
+ * The card's time fields into `HH:MM`, or null when it is not a time at all.
114
+ *
115
+ * People type times the way they say them — "3", "3pm", "3:30 pm", "15.00" — and a
116
+ * card that answers "that is not a time" to "3pm" is a card that makes a member feel
117
+ * stupid for writing what they meant. The LLM's own output is always `HH:MM`; this is
118
+ * for the human editing afterwards.
119
+ *
120
+ * Deliberately narrow about what it will *infer*: a **bare** hour 1–11 becomes PM only
121
+ * when the hour has passed (a person editing a card at 16:00 who types "3" means
122
+ * 15:00, not 03:00), a clock reading ("9:05") is taken exactly as written, and
123
+ * anything else returns null so the card can say so instead of guessing.
124
+ *
125
+ * @param value the raw text from the field
126
+ * @param now used only to choose AM/PM for a bare hour; injectable for tests
127
+ */
128
+ function normaliseTimeInput(value, now = new Date()) {
129
+ const text = value.trim().toLowerCase().replace(/\s+/g, "");
130
+ if (text.length === 0)
131
+ return null;
132
+ const match = /^(\d{1,2})(?:[:.](\d{2}))?(am|pm|a\.m\.|p\.m\.)?$/.exec(text);
133
+ if (!match)
134
+ return null;
135
+ const hour = Number(match[1]);
136
+ const minute = match[2] ? Number(match[2]) : 0;
137
+ if (!Number.isFinite(hour) || minute > 59)
138
+ return null;
139
+ const meridiem = match[3]?.[0];
140
+ if (meridiem === "a") {
141
+ // 12am is midnight, and the only 12 that does not keep its number.
142
+ if (hour < 1 || hour > 12)
143
+ return null;
144
+ return format(checked(hour === 12 ? 0 : hour), minute);
145
+ }
146
+ if (meridiem === "p") {
147
+ if (hour < 1 || hour > 12)
148
+ return null;
149
+ return format(checked(hour === 12 ? 12 : hour + 12), minute);
150
+ }
151
+ if (hour > 23)
152
+ return null;
153
+ // A *bare* hour (no minutes) of 1–11 with no meridiem is read as the next time that
154
+ // hour comes round — at 16:00, "3" means 15:00, because someone re-timing a dentist
155
+ // appointment does not mean 03:00. A clock reading ("9:05", "15:00") is read exactly
156
+ // as written, in the morning or not.
157
+ const bareHour = match[2] === undefined;
158
+ if (bareHour && hour >= 1 && hour <= 11 && now.getHours() >= 12) {
159
+ return format(checked(hour + 12), minute);
160
+ }
161
+ return format(checked(hour), minute);
162
+ }
163
+ function checked(hour) {
164
+ return hour >= 0 && hour <= 23 ? hour : null;
165
+ }
166
+ function format(hour, minute) {
167
+ if (hour === null)
168
+ return null;
169
+ return `${String(hour).padStart(2, "0")}:${String(minute).padStart(2, "0")}`;
170
+ }
171
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../src/capture/fields.ts"],"names":[],"mappings":";;;AAiEA,oDAYC;AAmBD,kDAeC;AAGD,wCAEC;AAkBD,gDA+BC;AArKD,6BAAwB;AAGxB;;;;;;;;;;;;;;;;;GAiBG;AAEH,sFAAsF;AACzE,QAAA,uBAAuB,GAAG;IACrC,OAAO;IACP,MAAM;IACN,WAAW;IACX,SAAS;IACT,QAAQ;IACR,UAAU;IACV,OAAO;CACC,CAAC;AAIX,mEAAmE;AACnE,MAAM,SAAS,GAAG,OAAC,CAAC,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C,EAAE,GAAG,CAAC,EAAE,CAAC;AAC/E,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/i18n/templates.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,qBAAqB;IACpC,mBAAmB;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqBT,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,IAAI,CAAC;AAE5C;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,CAUhE;AAED,+DAA+D;AAC/D,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,qBAAqB,GAAG,MAAM,CAI5F"}
1
+ {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/i18n/templates.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,qBAAqB;IACpC,mBAAmB;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkB2E,CAAC;AAEtF,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,IAAI,CAAC;AAE5C;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,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AAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC9F,CAAC"}
package/dist/index.d.ts CHANGED
@@ -6,6 +6,8 @@ export * from "./schemas/event";
6
6
  export * from "./schemas/circle";
7
7
  export * from "./schemas/member";
8
8
  export * from "./schemas/capture";
9
+ export * from "./capture/fields";
10
+ export * from "./capture/audio";
9
11
  export * from "./schemas/reminder";
10
12
  export * from "./reminders/math";
11
13
  export * from "./i18n/templates";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC"}
package/dist/index.js CHANGED
@@ -22,6 +22,8 @@ __exportStar(require("./schemas/event"), exports);
22
22
  __exportStar(require("./schemas/circle"), exports);
23
23
  __exportStar(require("./schemas/member"), exports);
24
24
  __exportStar(require("./schemas/capture"), exports);
25
+ __exportStar(require("./capture/fields"), exports);
26
+ __exportStar(require("./capture/audio"), exports);
25
27
  __exportStar(require("./schemas/reminder"), exports);
26
28
  __exportStar(require("./reminders/math"), exports);
27
29
  __exportStar(require("./i18n/templates"), exports);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,kDAAgC;AAChC,uDAAqC;AACrC,kDAAgC;AAChC,kDAAgC;AAChC,mDAAiC;AACjC,mDAAiC;AACjC,oDAAkC;AAClC,qDAAmC;AACnC,mDAAiC;AACjC,mDAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,kDAAgC;AAChC,uDAAqC;AACrC,kDAAgC;AAChC,kDAAgC;AAChC,mDAAiC;AACjC,mDAAiC;AACjC,oDAAkC;AAClC,mDAAiC;AACjC,kDAAgC;AAChC,qDAAmC;AACnC,mDAAiC;AACjC,mDAAiC"}
@@ -47,6 +47,12 @@ export declare const CaptureSchema: z.ZodObject<{
47
47
  editedFields: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
48
48
  googleEventId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
49
49
  createdAt: z.ZodAny;
50
+ /**
51
+ * When the member confirmed or discarded it (M1.5). Optional because captures
52
+ * written before this existed have no such instant, and because a capture sitting
53
+ * in `pending_confirmation` has not been decided at all.
54
+ */
55
+ decidedAt: z.ZodOptional<z.ZodAny>;
50
56
  }, "strip", z.ZodTypeAny, {
51
57
  status: "pending_confirmation" | "confirmed" | "discarded";
52
58
  memberId: string;
@@ -67,6 +73,7 @@ export declare const CaptureSchema: z.ZodObject<{
67
73
  editedFields: string[];
68
74
  createdAt?: any;
69
75
  googleEventId?: string | null | undefined;
76
+ decidedAt?: any;
70
77
  }, {
71
78
  status: "pending_confirmation" | "confirmed" | "discarded";
72
79
  memberId: string;
@@ -87,6 +94,7 @@ export declare const CaptureSchema: z.ZodObject<{
87
94
  createdAt?: any;
88
95
  editedFields?: string[] | undefined;
89
96
  googleEventId?: string | null | undefined;
97
+ decidedAt?: any;
90
98
  }>;
91
99
  export type Capture = z.infer<typeof CaptureSchema>;
92
100
  //# sourceMappingURL=capture.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"capture.d.ts","sourceRoot":"","sources":["../../src/schemas/capture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAMxB,0DAA0D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI1D,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
1
+ {"version":3,"file":"capture.d.ts","sourceRoot":"","sources":["../../src/schemas/capture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAMxB,0DAA0D;;;;IAI1D;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEH,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
@@ -20,5 +20,11 @@ exports.CaptureSchema = zod_1.z.object({
20
20
  editedFields: zod_1.z.array(zod_1.z.string()).default([]),
21
21
  googleEventId: zod_1.z.string().nullish(),
22
22
  createdAt: primitives_1.firestoreTimestamp,
23
+ /**
24
+ * When the member confirmed or discarded it (M1.5). Optional because captures
25
+ * written before this existed have no such instant, and because a capture sitting
26
+ * in `pending_confirmation` has not been decided at all.
27
+ */
28
+ decidedAt: primitives_1.firestoreTimestamp.optional(),
23
29
  });
24
30
  //# sourceMappingURL=capture.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"capture.js","sourceRoot":"","sources":["../../src/schemas/capture.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,mCAA4D;AAC5D,6CAAkD;AAClD,mCAA2C;AAE3C;;;;GAIG;AACU,QAAA,aAAa,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,uBAAe,CAAC;IAC/B,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,cAAc,EAAE,wBAAgB,CAAC,QAAQ,EAAE;IAC3C,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,wBAAgB,CAAC;IAChC,0DAA0D;IAC1D,YAAY,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7C,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IACnC,SAAS,EAAE,+BAAkB;CAC9B,CAAC,CAAC"}
1
+ {"version":3,"file":"capture.js","sourceRoot":"","sources":["../../src/schemas/capture.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,mCAA4D;AAC5D,6CAAkD;AAClD,mCAA2C;AAE3C;;;;GAIG;AACU,QAAA,aAAa,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,uBAAe,CAAC;IAC/B,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,cAAc,EAAE,wBAAgB,CAAC,QAAQ,EAAE;IAC3C,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,wBAAgB,CAAC;IAChC,0DAA0D;IAC1D,YAAY,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7C,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE;IACnC,SAAS,EAAE,+BAAkB;IAC7B;;;;OAIG;IACH,SAAS,EAAE,+BAAkB,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voxendar/shared",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "private": false,
5
5
  "description": "Shared contracts, schemas, constants and pure logic for Voxendar/Tellie (consumed by functions/ and app/)",
6
6
  "main": "dist/index.js",
@@ -11,7 +11,9 @@
11
11
  "scripts": {
12
12
  "build": "tsc -p tsconfig.json",
13
13
  "typecheck": "tsc --noEmit -p tsconfig.json",
14
- "test": "vitest run"
14
+ "test": "vitest run",
15
+ "prepare": "npm run build",
16
+ "prepublishOnly": "npm test"
15
17
  },
16
18
  "dependencies": {
17
19
  "zod": "^3.23.8"