@timothyw/pat-common 1.0.89 → 1.0.91

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.
@@ -2,14 +2,14 @@ import { z } from 'zod';
2
2
  import { ItemData, Serialized } from "../../models";
3
3
  export declare const updateItemRequestSchema: z.ZodObject<{
4
4
  name: z.ZodOptional<z.ZodString>;
5
- dueDate: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>>;
5
+ dueDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6
6
  notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7
7
  urgent: z.ZodOptional<z.ZodBoolean>;
8
8
  category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9
9
  type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
10
  }, "strip", z.ZodTypeAny, {
11
11
  name?: string | undefined;
12
- dueDate?: Date | null | undefined;
12
+ dueDate?: string | null | undefined;
13
13
  notes?: string | null | undefined;
14
14
  urgent?: boolean | undefined;
15
15
  category?: string | null | undefined;
@@ -4,7 +4,7 @@ exports.updateItemRequestSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  exports.updateItemRequestSchema = zod_1.z.object({
6
6
  name: zod_1.z.string().min(1).optional(),
7
- dueDate: zod_1.z.string().transform(val => new Date(val)).nullish(),
7
+ dueDate: zod_1.z.string().nullish(),
8
8
  notes: zod_1.z.string().nullish(),
9
9
  urgent: zod_1.z.boolean().optional(),
10
10
  category: zod_1.z.string().nullish(),
@@ -10,7 +10,7 @@ export declare enum HabitFrequency {
10
10
  export declare enum HabitEntryStatus {
11
11
  COMPLETED = "completed",
12
12
  EXCUSED = "excused",
13
- INCOMPLETE = "incomplete"
13
+ MISSED = "missed"
14
14
  }
15
15
  export interface HabitEntryData {
16
16
  _id: HabitEntryId;
@@ -13,7 +13,7 @@ var HabitEntryStatus;
13
13
  (function (HabitEntryStatus) {
14
14
  HabitEntryStatus["COMPLETED"] = "completed";
15
15
  HabitEntryStatus["EXCUSED"] = "excused";
16
- HabitEntryStatus["INCOMPLETE"] = "incomplete";
16
+ HabitEntryStatus["MISSED"] = "missed";
17
17
  })(HabitEntryStatus || (exports.HabitEntryStatus = HabitEntryStatus = {}));
18
18
  const toHabit = (data, entries, stats) => {
19
19
  return {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@timothyw/pat-common",
3
3
  "description": "",
4
4
  "author": "Timothy Washburn",
5
- "version": "1.0.89",
5
+ "version": "1.0.91",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
@@ -3,7 +3,7 @@ import { ItemData, Serialized } from "../../models";
3
3
 
4
4
  export const updateItemRequestSchema = z.object({
5
5
  name: z.string().min(1).optional(),
6
- dueDate: z.string().transform(val => new Date(val)).nullish(),
6
+ dueDate: z.string().nullish(),
7
7
  notes: z.string().nullish(),
8
8
  urgent: z.boolean().optional(),
9
9
  category: z.string().nullish(),
@@ -12,7 +12,7 @@ export enum HabitFrequency {
12
12
  export enum HabitEntryStatus {
13
13
  COMPLETED = 'completed',
14
14
  EXCUSED = 'excused',
15
- INCOMPLETE = 'incomplete'
15
+ MISSED = 'missed'
16
16
  }
17
17
 
18
18
  export interface HabitEntryData {