@timothyw/pat-common 1.0.37 → 1.0.38
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/types/api/habits/create-habit-entry-types.d.ts +11 -0
- package/dist/types/api/habits/create-habit-entry-types.js +2 -1
- package/dist/types/api/habits/create-habit-types.d.ts +17 -0
- package/dist/types/api/habits/create-habit-types.js +2 -1
- package/dist/types/api/habits/update-habit-types.d.ts +17 -0
- package/dist/types/api/habits/update-habit-types.js +2 -1
- package/package.json +1 -1
- package/src/types/api/habits/create-habit-entry-types.ts +1 -1
- package/src/types/api/habits/create-habit-types.ts +1 -1
- package/src/types/api/habits/update-habit-types.ts +1 -1
|
@@ -1,4 +1,15 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
1
2
|
import { HabitWithEntries } from "../../models/habit-data";
|
|
3
|
+
export declare const createHabitEntryRequestSchema: z.ZodObject<{
|
|
4
|
+
date: z.ZodString;
|
|
5
|
+
status: z.ZodEnum<["completed", "excused", "missed"]>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
status: "completed" | "excused" | "missed";
|
|
8
|
+
date: string;
|
|
9
|
+
}, {
|
|
10
|
+
status: "completed" | "excused" | "missed";
|
|
11
|
+
date: string;
|
|
12
|
+
}>;
|
|
2
13
|
export interface CreateHabitEntryRequest {
|
|
3
14
|
date: string;
|
|
4
15
|
status: 'completed' | 'excused' | 'missed';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createHabitEntryRequestSchema = void 0;
|
|
3
4
|
const zod_1 = require("zod");
|
|
4
|
-
|
|
5
|
+
exports.createHabitEntryRequestSchema = zod_1.z.object({
|
|
5
6
|
date: zod_1.z.string().regex(/^\d{4}-\d{2}-\d{2}$/, 'date must be in YYYY-MM-DD format'),
|
|
6
7
|
status: zod_1.z.enum(['completed', 'excused', 'missed'])
|
|
7
8
|
});
|
|
@@ -1,4 +1,21 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
1
2
|
import { HabitWithEntries } from "../../models/habit-data";
|
|
3
|
+
export declare const createHabitRequestSchema: z.ZodObject<{
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
description: z.ZodOptional<z.ZodString>;
|
|
6
|
+
frequency: z.ZodLiteral<"daily">;
|
|
7
|
+
rolloverTime: z.ZodString;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
name: string;
|
|
10
|
+
frequency: "daily";
|
|
11
|
+
rolloverTime: string;
|
|
12
|
+
description?: string | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
name: string;
|
|
15
|
+
frequency: "daily";
|
|
16
|
+
rolloverTime: string;
|
|
17
|
+
description?: string | undefined;
|
|
18
|
+
}>;
|
|
2
19
|
export interface CreateHabitRequest {
|
|
3
20
|
name: string;
|
|
4
21
|
description?: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createHabitRequestSchema = void 0;
|
|
3
4
|
const zod_1 = require("zod");
|
|
4
|
-
|
|
5
|
+
exports.createHabitRequestSchema = zod_1.z.object({
|
|
5
6
|
name: zod_1.z.string().min(1, 'Name is required').trim(),
|
|
6
7
|
description: zod_1.z.string().trim().optional(),
|
|
7
8
|
frequency: zod_1.z.literal('daily'),
|
|
@@ -1,4 +1,21 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
1
2
|
import { HabitWithEntries } from "../../models/habit-data";
|
|
3
|
+
export declare const updateHabitRequestSchema: z.ZodObject<{
|
|
4
|
+
name: z.ZodOptional<z.ZodString>;
|
|
5
|
+
description: z.ZodOptional<z.ZodString>;
|
|
6
|
+
frequency: z.ZodOptional<z.ZodLiteral<"daily">>;
|
|
7
|
+
rolloverTime: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
name?: string | undefined;
|
|
10
|
+
description?: string | undefined;
|
|
11
|
+
frequency?: "daily" | undefined;
|
|
12
|
+
rolloverTime?: string | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
name?: string | undefined;
|
|
15
|
+
description?: string | undefined;
|
|
16
|
+
frequency?: "daily" | undefined;
|
|
17
|
+
rolloverTime?: string | undefined;
|
|
18
|
+
}>;
|
|
2
19
|
export interface UpdateHabitRequest {
|
|
3
20
|
name?: string;
|
|
4
21
|
description?: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateHabitRequestSchema = void 0;
|
|
3
4
|
const zod_1 = require("zod");
|
|
4
|
-
|
|
5
|
+
exports.updateHabitRequestSchema = zod_1.z.object({
|
|
5
6
|
name: zod_1.z.string().min(1, 'Name is required').trim().optional(),
|
|
6
7
|
description: zod_1.z.string().trim().optional(),
|
|
7
8
|
frequency: zod_1.z.literal('daily').optional(),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { HabitWithEntries } from "../../models/habit-data";
|
|
3
3
|
|
|
4
|
-
const createHabitEntryRequestSchema = z.object({
|
|
4
|
+
export const createHabitEntryRequestSchema = z.object({
|
|
5
5
|
date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/, 'date must be in YYYY-MM-DD format'),
|
|
6
6
|
status: z.enum(['completed', 'excused', 'missed'])
|
|
7
7
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { HabitWithEntries } from "../../models/habit-data";
|
|
3
3
|
|
|
4
|
-
const createHabitRequestSchema = z.object({
|
|
4
|
+
export const createHabitRequestSchema = z.object({
|
|
5
5
|
name: z.string().min(1, 'Name is required').trim(),
|
|
6
6
|
description: z.string().trim().optional(),
|
|
7
7
|
frequency: z.literal('daily'),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { HabitWithEntries } from "../../models/habit-data";
|
|
3
3
|
|
|
4
|
-
const updateHabitRequestSchema = z.object({
|
|
4
|
+
export const updateHabitRequestSchema = z.object({
|
|
5
5
|
name: z.string().min(1, 'Name is required').trim().optional(),
|
|
6
6
|
description: z.string().trim().optional(),
|
|
7
7
|
frequency: z.literal('daily').optional(),
|