@timothyw/pat-common 1.0.105 → 1.0.106
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/items/create-item-types.d.ts +2 -2
- package/dist/types/api/items/update-item-types.d.ts +2 -2
- package/dist/types/api/tasks/create-task-list-types.d.ts +4 -1
- package/dist/types/api/tasks/create-task-list-types.js +3 -1
- package/dist/types/api/tasks/update-task-list-types.d.ts +4 -1
- package/dist/types/api/tasks/update-task-list-types.js +3 -1
- package/dist/types/models/task-data.d.ts +5 -0
- package/dist/types/models/task-data.js +6 -0
- package/package.json +3 -3
- package/src/types/api/tasks/create-task-list-types.ts +3 -2
- package/src/types/api/tasks/update-task-list-types.ts +3 -2
- package/src/types/models/task-data.ts +6 -0
|
@@ -12,14 +12,14 @@ export declare const createItemRequestSchema: z.ZodObject<{
|
|
|
12
12
|
name: string;
|
|
13
13
|
urgent: boolean;
|
|
14
14
|
type?: string | undefined;
|
|
15
|
-
dueDate?: string | undefined;
|
|
16
15
|
notes?: string | undefined;
|
|
16
|
+
dueDate?: string | undefined;
|
|
17
17
|
category?: string | undefined;
|
|
18
18
|
}, {
|
|
19
19
|
name: string;
|
|
20
20
|
type?: string | undefined;
|
|
21
|
-
dueDate?: string | undefined;
|
|
22
21
|
notes?: string | undefined;
|
|
22
|
+
dueDate?: string | undefined;
|
|
23
23
|
urgent?: boolean | undefined;
|
|
24
24
|
category?: string | undefined;
|
|
25
25
|
}>;
|
|
@@ -11,15 +11,15 @@ export declare const updateItemRequestSchema: z.ZodObject<{
|
|
|
11
11
|
}, "strip", z.ZodTypeAny, {
|
|
12
12
|
type?: string | null | undefined;
|
|
13
13
|
name?: string | undefined;
|
|
14
|
-
dueDate?: string | null | undefined;
|
|
15
14
|
notes?: string | null | undefined;
|
|
15
|
+
dueDate?: string | null | undefined;
|
|
16
16
|
urgent?: boolean | undefined;
|
|
17
17
|
category?: string | null | undefined;
|
|
18
18
|
}, {
|
|
19
19
|
type?: string | null | undefined;
|
|
20
20
|
name?: string | undefined;
|
|
21
|
-
dueDate?: string | null | undefined;
|
|
22
21
|
notes?: string | null | undefined;
|
|
22
|
+
dueDate?: string | null | undefined;
|
|
23
23
|
urgent?: boolean | undefined;
|
|
24
24
|
category?: string | null | undefined;
|
|
25
25
|
}>;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { Serialized } from "../../../utils";
|
|
3
|
-
import { TaskListData } from "../../models";
|
|
3
|
+
import { TaskListData, TaskListType } from "../../models";
|
|
4
4
|
export declare const createTaskListRequestSchema: z.ZodObject<{
|
|
5
5
|
name: z.ZodString;
|
|
6
|
+
type: z.ZodNativeEnum<typeof TaskListType>;
|
|
6
7
|
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
type: TaskListType;
|
|
7
9
|
name: string;
|
|
8
10
|
}, {
|
|
11
|
+
type: TaskListType;
|
|
9
12
|
name: string;
|
|
10
13
|
}>;
|
|
11
14
|
export type CreateTaskListRequest = z.infer<typeof createTaskListRequestSchema>;
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createTaskListRequestSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
5
6
|
exports.createTaskListRequestSchema = zod_1.z.object({
|
|
6
|
-
name: zod_1.z.string().min(1)
|
|
7
|
+
name: zod_1.z.string().min(1),
|
|
8
|
+
type: zod_1.z.nativeEnum(models_1.TaskListType)
|
|
7
9
|
});
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { Serialized } from "../../../utils";
|
|
3
|
-
import { TaskListData } from "../../models";
|
|
3
|
+
import { TaskListData, TaskListType } from "../../models";
|
|
4
4
|
export declare const updateTaskListRequestSchema: z.ZodObject<{
|
|
5
5
|
name: z.ZodOptional<z.ZodString>;
|
|
6
|
+
type: z.ZodOptional<z.ZodNativeEnum<typeof TaskListType>>;
|
|
6
7
|
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
type?: TaskListType | undefined;
|
|
7
9
|
name?: string | undefined;
|
|
8
10
|
}, {
|
|
11
|
+
type?: TaskListType | undefined;
|
|
9
12
|
name?: string | undefined;
|
|
10
13
|
}>;
|
|
11
14
|
export type UpdateTaskListRequest = z.infer<typeof updateTaskListRequestSchema>;
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.updateTaskListRequestSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
5
6
|
exports.updateTaskListRequestSchema = zod_1.z.object({
|
|
6
|
-
name: zod_1.z.string().min(1).optional()
|
|
7
|
+
name: zod_1.z.string().min(1).optional(),
|
|
8
|
+
type: zod_1.z.nativeEnum(models_1.TaskListType).optional()
|
|
7
9
|
});
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { TaskId, TaskListId, UserId } from "../id-types";
|
|
2
|
+
export declare enum TaskListType {
|
|
3
|
+
TASKS = "tasks",
|
|
4
|
+
NOTES = "notes"
|
|
5
|
+
}
|
|
2
6
|
export interface TaskData {
|
|
3
7
|
_id: TaskId;
|
|
4
8
|
userId: UserId;
|
|
@@ -15,4 +19,5 @@ export interface TaskListData {
|
|
|
15
19
|
createdAt: Date;
|
|
16
20
|
updatedAt: Date;
|
|
17
21
|
name: string;
|
|
22
|
+
type: TaskListType;
|
|
18
23
|
}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TaskListType = void 0;
|
|
4
|
+
var TaskListType;
|
|
5
|
+
(function (TaskListType) {
|
|
6
|
+
TaskListType["TASKS"] = "tasks";
|
|
7
|
+
TaskListType["NOTES"] = "notes";
|
|
8
|
+
})(TaskListType || (exports.TaskListType = TaskListType = {}));
|
package/package.json
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
"name": "@timothyw/pat-common",
|
|
3
3
|
"description": "",
|
|
4
4
|
"author": "Timothy Washburn",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.106",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"build": "tsc",
|
|
10
10
|
"prepublishOnly": "npm run build",
|
|
11
|
-
"publish:patch": "npm version patch
|
|
12
|
-
"publish:minor": "npm version minor
|
|
11
|
+
"publish:patch": "npm version patch && npm publish",
|
|
12
|
+
"publish:minor": "npm version minor && npm publish"
|
|
13
13
|
},
|
|
14
14
|
"publishConfig": {
|
|
15
15
|
"access": "public"
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { Serialized } from "../../../utils";
|
|
3
|
-
import { TaskListData } from "../../models";
|
|
3
|
+
import { TaskListData, TaskListType } from "../../models";
|
|
4
4
|
|
|
5
5
|
export const createTaskListRequestSchema = z.object({
|
|
6
|
-
name: z.string().min(1)
|
|
6
|
+
name: z.string().min(1),
|
|
7
|
+
type: z.nativeEnum(TaskListType)
|
|
7
8
|
});
|
|
8
9
|
|
|
9
10
|
export type CreateTaskListRequest = z.infer<typeof createTaskListRequestSchema>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { Serialized } from "../../../utils";
|
|
3
|
-
import { TaskListData } from "../../models";
|
|
3
|
+
import { TaskListData, TaskListType } from "../../models";
|
|
4
4
|
|
|
5
5
|
export const updateTaskListRequestSchema = z.object({
|
|
6
|
-
name: z.string().min(1).optional()
|
|
6
|
+
name: z.string().min(1).optional(),
|
|
7
|
+
type: z.nativeEnum(TaskListType).optional()
|
|
7
8
|
});
|
|
8
9
|
|
|
9
10
|
export type UpdateTaskListRequest = z.infer<typeof updateTaskListRequestSchema>;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { TaskId, TaskListId, UserId } from "../id-types";
|
|
2
2
|
|
|
3
|
+
export enum TaskListType {
|
|
4
|
+
TASKS = 'tasks',
|
|
5
|
+
NOTES = 'notes'
|
|
6
|
+
}
|
|
7
|
+
|
|
3
8
|
export interface TaskData {
|
|
4
9
|
_id: TaskId;
|
|
5
10
|
userId: UserId;
|
|
@@ -17,4 +22,5 @@ export interface TaskListData {
|
|
|
17
22
|
createdAt: Date;
|
|
18
23
|
updatedAt: Date;
|
|
19
24
|
name: string;
|
|
25
|
+
type: TaskListType;
|
|
20
26
|
}
|