@timothyw/pat-common 1.0.50 → 1.0.52

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.
@@ -1,7 +1,7 @@
1
1
  export declare enum ModuleType {
2
2
  AGENDA = "agenda",
3
- TASKS = "tasks",
4
3
  INBOX = "inbox",
4
+ TASKS = "tasks",
5
5
  HABITS = "habits",
6
6
  PEOPLE = "people",
7
7
  SETTINGS = "settings",
@@ -4,8 +4,8 @@ exports.ModuleType = void 0;
4
4
  var ModuleType;
5
5
  (function (ModuleType) {
6
6
  ModuleType["AGENDA"] = "agenda";
7
- ModuleType["TASKS"] = "tasks";
8
7
  ModuleType["INBOX"] = "inbox";
8
+ ModuleType["TASKS"] = "tasks";
9
9
  ModuleType["HABITS"] = "habits";
10
10
  ModuleType["PEOPLE"] = "people";
11
11
  ModuleType["SETTINGS"] = "settings";
@@ -2,6 +2,7 @@ export * from './account';
2
2
  export * from './auth';
3
3
  export * from './habits';
4
4
  export * from './items';
5
+ export * from './misc';
5
6
  export * from './people';
6
7
  export * from './tasks';
7
8
  export * from './thoughts';
@@ -18,6 +18,7 @@ __exportStar(require("./account"), exports);
18
18
  __exportStar(require("./auth"), exports);
19
19
  __exportStar(require("./habits"), exports);
20
20
  __exportStar(require("./items"), exports);
21
+ __exportStar(require("./misc"), exports);
21
22
  __exportStar(require("./people"), exports);
22
23
  __exportStar(require("./tasks"), exports);
23
24
  __exportStar(require("./thoughts"), exports);
@@ -0,0 +1 @@
1
+ export * from './version-types';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./version-types"), exports);
@@ -0,0 +1,8 @@
1
+ export interface VersionRequest {
2
+ clientVersion: string;
3
+ }
4
+ export interface VersionResponse {
5
+ serverVersion: string;
6
+ minClientVersion: string;
7
+ updateRequired: boolean;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { TaskId } from "../../id-types";
2
3
  export declare const completeTaskRequestSchema: z.ZodObject<{
3
4
  completed: z.ZodBoolean;
4
5
  }, "strip", z.ZodTypeAny, {
@@ -9,7 +10,7 @@ export declare const completeTaskRequestSchema: z.ZodObject<{
9
10
  export type CompleteTaskRequest = z.infer<typeof completeTaskRequestSchema>;
10
11
  export interface CompleteTaskResponse {
11
12
  task: {
12
- id: string;
13
+ id: TaskId;
13
14
  name: string;
14
15
  notes?: string;
15
16
  completed: boolean;
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { TaskListId } from "../../id-types";
2
3
  export declare const createTaskListRequestSchema: z.ZodObject<{
3
4
  name: z.ZodString;
4
5
  }, "strip", z.ZodTypeAny, {
@@ -9,7 +10,7 @@ export declare const createTaskListRequestSchema: z.ZodObject<{
9
10
  export type CreateTaskListRequest = z.infer<typeof createTaskListRequestSchema>;
10
11
  export interface CreateTaskListResponse {
11
12
  taskList: {
12
- id: string;
13
+ id: TaskListId;
13
14
  name: string;
14
15
  createdAt: string;
15
16
  updatedAt: string;
@@ -1,8 +1,9 @@
1
1
  import { z } from 'zod';
2
+ import { TaskId, TaskListId } from '../../id-types';
2
3
  export declare const createTaskRequestSchema: z.ZodObject<{
3
4
  name: z.ZodString;
4
5
  notes: z.ZodOptional<z.ZodString>;
5
- taskListId: z.ZodEffects<z.ZodString, import("../../id-types").TaskListId, string>;
6
+ taskListId: z.ZodEffects<z.ZodString, TaskListId, string>;
6
7
  }, "strip", z.ZodTypeAny, {
7
8
  name: string;
8
9
  taskListId: string & {
@@ -17,11 +18,11 @@ export declare const createTaskRequestSchema: z.ZodObject<{
17
18
  export type CreateTaskRequest = z.infer<typeof createTaskRequestSchema>;
18
19
  export interface CreateTaskResponse {
19
20
  task: {
20
- id: string;
21
+ id: TaskId;
21
22
  name: string;
22
23
  notes?: string;
23
24
  completed: boolean;
24
- taskListId: string;
25
+ taskListId: TaskListId;
25
26
  createdAt: string;
26
27
  updatedAt: string;
27
28
  };
@@ -1,6 +1,7 @@
1
+ import { TaskListId } from "../../id-types";
1
2
  export interface GetTaskListsResponse {
2
3
  taskLists: Array<{
3
- id: string;
4
+ id: TaskListId;
4
5
  name: string;
5
6
  createdAt: string;
6
7
  updatedAt: string;
@@ -1,10 +1,11 @@
1
+ import { TaskId, TaskListId } from "../../id-types";
1
2
  export interface GetTasksResponse {
2
3
  tasks: Array<{
3
- id: string;
4
+ id: TaskId;
4
5
  name: string;
5
6
  notes?: string;
6
7
  completed: boolean;
7
- taskListId: string;
8
+ taskListId: TaskListId;
8
9
  createdAt: string;
9
10
  updatedAt: string;
10
11
  }>;
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { TaskListId } from "../../id-types";
2
3
  export declare const updateTaskListRequestSchema: z.ZodObject<{
3
4
  name: z.ZodOptional<z.ZodString>;
4
5
  }, "strip", z.ZodTypeAny, {
@@ -9,7 +10,7 @@ export declare const updateTaskListRequestSchema: z.ZodObject<{
9
10
  export type UpdateTaskListRequest = z.infer<typeof updateTaskListRequestSchema>;
10
11
  export interface UpdateTaskListResponse {
11
12
  taskList: {
12
- id: string;
13
+ id: TaskListId;
13
14
  name: string;
14
15
  createdAt: string;
15
16
  updatedAt: string;
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { TaskListId } from '../../id-types';
2
+ import { TaskId, TaskListId } from '../../id-types';
3
3
  export declare const updateTaskRequestSchema: z.ZodObject<{
4
4
  name: z.ZodOptional<z.ZodString>;
5
5
  notes: z.ZodOptional<z.ZodString>;
@@ -19,7 +19,7 @@ export declare const updateTaskRequestSchema: z.ZodObject<{
19
19
  export type UpdateTaskRequest = z.infer<typeof updateTaskRequestSchema>;
20
20
  export interface UpdateTaskResponse {
21
21
  task: {
22
- id: string;
22
+ id: TaskId;
23
23
  name: string;
24
24
  notes?: string;
25
25
  completed: boolean;
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.50",
5
+ "version": "1.0.52",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
@@ -1,7 +1,7 @@
1
1
  export enum ModuleType {
2
2
  AGENDA = 'agenda',
3
- TASKS = 'tasks',
4
3
  INBOX = 'inbox',
4
+ TASKS = 'tasks',
5
5
  HABITS = 'habits',
6
6
  PEOPLE = 'people',
7
7
  SETTINGS = 'settings',
@@ -2,6 +2,7 @@ export * from './account'
2
2
  export * from './auth'
3
3
  export * from './habits'
4
4
  export * from './items'
5
+ export * from './misc'
5
6
  export * from './people'
6
7
  export * from './tasks'
7
8
  export * from './thoughts'
@@ -0,0 +1 @@
1
+ export * from './version-types'
@@ -0,0 +1,9 @@
1
+ export interface VersionRequest {
2
+ clientVersion: string;
3
+ }
4
+
5
+ export interface VersionResponse {
6
+ serverVersion: string;
7
+ minClientVersion: string;
8
+ updateRequired: boolean;
9
+ }
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { TaskId } from "../../id-types";
2
3
 
3
4
  export const completeTaskRequestSchema = z.object({
4
5
  completed: z.boolean()
@@ -8,7 +9,7 @@ export type CompleteTaskRequest = z.infer<typeof completeTaskRequestSchema>;
8
9
 
9
10
  export interface CompleteTaskResponse {
10
11
  task: {
11
- id: string;
12
+ id: TaskId;
12
13
  name: string;
13
14
  notes?: string;
14
15
  completed: boolean;
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { TaskListId } from "../../id-types";
2
3
 
3
4
  export const createTaskListRequestSchema = z.object({
4
5
  name: z.string().min(1)
@@ -8,7 +9,7 @@ export type CreateTaskListRequest = z.infer<typeof createTaskListRequestSchema>;
8
9
 
9
10
  export interface CreateTaskListResponse {
10
11
  taskList: {
11
- id: string;
12
+ id: TaskListId;
12
13
  name: string;
13
14
  createdAt: string;
14
15
  updatedAt: string;
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { taskListIdSchema } from '../../id-types';
2
+ import { TaskId, TaskListId, taskListIdSchema } from '../../id-types';
3
3
 
4
4
  export const createTaskRequestSchema = z.object({
5
5
  name: z.string().min(1),
@@ -11,11 +11,11 @@ export type CreateTaskRequest = z.infer<typeof createTaskRequestSchema>;
11
11
 
12
12
  export interface CreateTaskResponse {
13
13
  task: {
14
- id: string;
14
+ id: TaskId;
15
15
  name: string;
16
16
  notes?: string;
17
17
  completed: boolean;
18
- taskListId: string;
18
+ taskListId: TaskListId;
19
19
  createdAt: string;
20
20
  updatedAt: string;
21
21
  };
@@ -1,6 +1,8 @@
1
+ import { TaskListId } from "../../id-types";
2
+
1
3
  export interface GetTaskListsResponse {
2
4
  taskLists: Array<{
3
- id: string;
5
+ id: TaskListId;
4
6
  name: string;
5
7
  createdAt: string;
6
8
  updatedAt: string;
@@ -1,10 +1,12 @@
1
+ import { TaskId, TaskListId } from "../../id-types";
2
+
1
3
  export interface GetTasksResponse {
2
4
  tasks: Array<{
3
- id: string;
5
+ id: TaskId;
4
6
  name: string;
5
7
  notes?: string;
6
8
  completed: boolean;
7
- taskListId: string;
9
+ taskListId: TaskListId;
8
10
  createdAt: string;
9
11
  updatedAt: string;
10
12
  }>;
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { TaskListId } from "../../id-types";
2
3
 
3
4
  export const updateTaskListRequestSchema = z.object({
4
5
  name: z.string().min(1).optional()
@@ -8,7 +9,7 @@ export type UpdateTaskListRequest = z.infer<typeof updateTaskListRequestSchema>;
8
9
 
9
10
  export interface UpdateTaskListResponse {
10
11
  taskList: {
11
- id: string;
12
+ id: TaskListId;
12
13
  name: string;
13
14
  createdAt: string;
14
15
  updatedAt: string;
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { TaskListId, taskListIdSchema } from '../../id-types';
2
+ import { TaskId, TaskListId, taskListIdSchema } from '../../id-types';
3
3
 
4
4
  export const updateTaskRequestSchema = z.object({
5
5
  name: z.string().min(1).optional(),
@@ -12,7 +12,7 @@ export type UpdateTaskRequest = z.infer<typeof updateTaskRequestSchema>;
12
12
 
13
13
  export interface UpdateTaskResponse {
14
14
  task: {
15
- id: string;
15
+ id: TaskId;
16
16
  name: string;
17
17
  notes?: string;
18
18
  completed: boolean;