@timothyw/pat-common 1.0.4 → 1.0.6
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/account/get-user-config-types.d.ts +4 -0
- package/dist/types/api/account/get-user-config-types.js +2 -0
- package/dist/types/api/account/index.d.ts +2 -0
- package/dist/types/api/account/index.js +18 -0
- package/dist/types/api/account/update-user-config-types.d.ts +87 -0
- package/dist/types/api/account/update-user-config-types.js +35 -0
- package/dist/types/api/auth/index.d.ts +5 -0
- package/dist/types/api/auth/index.js +21 -0
- package/dist/types/api/auth/login-types.d.ts +19 -0
- package/dist/types/api/auth/login-types.js +8 -0
- package/dist/types/api/auth/refresh-auth-types.d.ts +15 -0
- package/dist/types/api/auth/refresh-auth-types.js +7 -0
- package/dist/types/api/auth/register-types.d.ts +23 -0
- package/dist/types/api/auth/register-types.js +10 -0
- package/dist/types/api/auth/resend-verification-types.d.ts +3 -0
- package/dist/types/api/auth/resend-verification-types.js +2 -0
- package/dist/types/api/auth/verify-email-types.d.ts +3 -0
- package/dist/types/api/auth/verify-email-types.js +2 -0
- package/dist/types/api/index.d.ts +5 -0
- package/dist/types/api/index.js +21 -0
- package/dist/types/api/items/complete-item-types.d.ts +18 -0
- package/dist/types/api/items/complete-item-types.js +7 -0
- package/dist/types/api/items/create-item-types.d.ts +36 -0
- package/dist/types/api/items/create-item-types.js +12 -0
- package/dist/types/api/items/delete-item-types.d.ts +3 -0
- package/dist/types/api/items/delete-item-types.js +2 -0
- package/dist/types/api/items/get-items-types.d.ts +4 -0
- package/dist/types/api/items/get-items-types.js +2 -0
- package/dist/types/api/items/index.d.ts +5 -0
- package/dist/types/api/items/index.js +21 -0
- package/dist/types/api/items/update-item-types.d.ts +36 -0
- package/dist/types/api/items/update-item-types.js +12 -0
- package/dist/types/api/people/create-person-types.d.ts +55 -0
- package/dist/types/api/people/create-person-types.js +14 -0
- package/dist/types/api/people/delete-person-types.d.ts +3 -0
- package/dist/types/api/people/delete-person-types.js +2 -0
- package/dist/types/api/people/get-people-types.d.ts +15 -0
- package/dist/types/api/people/get-people-types.js +2 -0
- package/dist/types/api/people/index.d.ts +4 -0
- package/dist/types/api/people/index.js +20 -0
- package/dist/types/api/people/update-person-types.d.ts +55 -0
- package/dist/types/api/people/update-person-types.js +14 -0
- package/dist/types/api/thoguhts/create-thought-types.d.ts +15 -0
- package/dist/types/api/thoguhts/create-thought-types.js +7 -0
- package/dist/types/api/thoguhts/delete-thought-types.d.ts +3 -0
- package/dist/types/api/thoguhts/delete-thought-types.js +2 -0
- package/dist/types/api/thoguhts/get-thoughts-types.d.ts +6 -0
- package/dist/types/api/thoguhts/get-thoughts-types.js +2 -0
- package/dist/types/api/thoguhts/index.d.ts +4 -0
- package/dist/types/api/thoguhts/index.js +20 -0
- package/dist/types/api/thoguhts/update-thought-types.d.ts +15 -0
- package/dist/types/api/thoguhts/update-thought-types.js +7 -0
- package/dist/types/id-types.d.ts +15 -0
- package/dist/types/id-types.js +2 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.js +4 -0
- package/dist/types/models/auth-data.d.ts +14 -0
- package/dist/types/models/auth-data.js +9 -0
- package/dist/types/models/index.d.ts +6 -0
- package/dist/types/models/index.js +22 -0
- package/dist/types/models/item-data.d.ts +14 -0
- package/dist/types/models/item-data.js +2 -0
- package/dist/types/models/person-data.d.ts +19 -0
- package/dist/types/models/person-data.js +2 -0
- package/dist/types/models/program-config.d.ts +17 -0
- package/dist/types/models/program-config.js +2 -0
- package/dist/types/models/thought-data.d.ts +8 -0
- package/dist/types/models/thought-data.js +2 -0
- package/dist/types/models/user-config.d.ts +24 -0
- package/dist/types/models/user-config.js +2 -0
- package/dist/types/panels.d.ts +2 -0
- package/dist/types/panels.js +4 -0
- package/package.json +5 -2
- package/src/types/api/account/get-user-config-types.ts +5 -0
- package/src/types/api/account/index.ts +2 -0
- package/src/types/api/account/update-user-config-types.ts +40 -0
- package/src/types/api/auth/index.ts +5 -0
- package/src/types/api/auth/login-types.ts +16 -0
- package/src/types/api/auth/refresh-auth-types.ts +14 -0
- package/src/types/api/auth/register-types.ts +16 -0
- package/src/types/api/auth/resend-verification-types.ts +3 -0
- package/src/types/api/auth/verify-email-types.ts +3 -0
- package/src/types/api/index.ts +5 -0
- package/src/types/api/items/complete-item-types.ts +17 -0
- package/src/types/api/items/create-item-types.ts +25 -0
- package/src/types/api/items/delete-item-types.ts +3 -0
- package/src/types/api/items/get-items-types.ts +5 -0
- package/src/types/api/items/index.ts +5 -0
- package/src/types/api/items/update-item-types.ts +25 -0
- package/src/types/api/people/create-person-types.ts +30 -0
- package/src/types/api/people/delete-person-types.ts +3 -0
- package/src/types/api/people/get-people-types.ts +15 -0
- package/src/types/api/people/index.ts +4 -0
- package/src/types/api/people/update-person-types.ts +30 -0
- package/src/types/api/thoguhts/create-thought-types.ts +14 -0
- package/src/types/api/thoguhts/delete-thought-types.ts +3 -0
- package/src/types/api/thoguhts/get-thoughts-types.ts +6 -0
- package/src/types/api/thoguhts/index.ts +4 -0
- package/src/types/api/thoguhts/update-thought-types.ts +14 -0
- package/src/types/id-types.ts +6 -0
- package/src/types/index.ts +5 -1
- package/src/types/models/auth-data.ts +21 -0
- package/src/types/models/index.ts +6 -0
- package/src/types/models/item-data.ts +17 -0
- package/src/types/models/person-data.ts +22 -0
- package/src/types/models/program-config.ts +17 -0
- package/src/types/models/thought-data.ts +9 -0
- package/src/types/models/user-config.ts +27 -0
- package/src/types/panels.ts +3 -0
|
@@ -0,0 +1,18 @@
|
|
|
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("./get-user-config-types"), exports);
|
|
18
|
+
__exportStar(require("./update-user-config-types"), exports);
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const updateUserConfigRequestSchema: z.ZodObject<{
|
|
3
|
+
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4
|
+
timezone: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>;
|
|
5
|
+
discordID: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6
|
+
itemListTracking: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
7
|
+
channelId: z.ZodString;
|
|
8
|
+
messageId: z.ZodString;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
channelId: string;
|
|
11
|
+
messageId: string;
|
|
12
|
+
}, {
|
|
13
|
+
channelId: string;
|
|
14
|
+
messageId: string;
|
|
15
|
+
}>>>;
|
|
16
|
+
iosApp: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
17
|
+
panels: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
18
|
+
panel: z.ZodEnum<["agenda", "tasks", "inbox", "people", "settings"]>;
|
|
19
|
+
visible: z.ZodBoolean;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
panel: "agenda" | "tasks" | "inbox" | "people" | "settings";
|
|
22
|
+
visible: boolean;
|
|
23
|
+
}, {
|
|
24
|
+
panel: "agenda" | "tasks" | "inbox" | "people" | "settings";
|
|
25
|
+
visible: boolean;
|
|
26
|
+
}>, "many">>;
|
|
27
|
+
itemCategories: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
28
|
+
itemTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
29
|
+
propertyKeys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
panels?: {
|
|
32
|
+
panel: "agenda" | "tasks" | "inbox" | "people" | "settings";
|
|
33
|
+
visible: boolean;
|
|
34
|
+
}[] | undefined;
|
|
35
|
+
itemCategories?: string[] | undefined;
|
|
36
|
+
itemTypes?: string[] | undefined;
|
|
37
|
+
propertyKeys?: string[] | undefined;
|
|
38
|
+
}, {
|
|
39
|
+
panels?: {
|
|
40
|
+
panel: "agenda" | "tasks" | "inbox" | "people" | "settings";
|
|
41
|
+
visible: boolean;
|
|
42
|
+
}[] | undefined;
|
|
43
|
+
itemCategories?: string[] | undefined;
|
|
44
|
+
itemTypes?: string[] | undefined;
|
|
45
|
+
propertyKeys?: string[] | undefined;
|
|
46
|
+
}>>>;
|
|
47
|
+
}, "strict", z.ZodTypeAny, {
|
|
48
|
+
name?: string | null | undefined;
|
|
49
|
+
timezone?: string | null | undefined;
|
|
50
|
+
discordID?: string | null | undefined;
|
|
51
|
+
itemListTracking?: {
|
|
52
|
+
channelId: string;
|
|
53
|
+
messageId: string;
|
|
54
|
+
} | null | undefined;
|
|
55
|
+
iosApp?: {
|
|
56
|
+
panels?: {
|
|
57
|
+
panel: "agenda" | "tasks" | "inbox" | "people" | "settings";
|
|
58
|
+
visible: boolean;
|
|
59
|
+
}[] | undefined;
|
|
60
|
+
itemCategories?: string[] | undefined;
|
|
61
|
+
itemTypes?: string[] | undefined;
|
|
62
|
+
propertyKeys?: string[] | undefined;
|
|
63
|
+
} | null | undefined;
|
|
64
|
+
}, {
|
|
65
|
+
name?: string | null | undefined;
|
|
66
|
+
timezone?: string | null | undefined;
|
|
67
|
+
discordID?: string | null | undefined;
|
|
68
|
+
itemListTracking?: {
|
|
69
|
+
channelId: string;
|
|
70
|
+
messageId: string;
|
|
71
|
+
} | null | undefined;
|
|
72
|
+
iosApp?: {
|
|
73
|
+
panels?: {
|
|
74
|
+
panel: "agenda" | "tasks" | "inbox" | "people" | "settings";
|
|
75
|
+
visible: boolean;
|
|
76
|
+
}[] | undefined;
|
|
77
|
+
itemCategories?: string[] | undefined;
|
|
78
|
+
itemTypes?: string[] | undefined;
|
|
79
|
+
propertyKeys?: string[] | undefined;
|
|
80
|
+
} | null | undefined;
|
|
81
|
+
}>;
|
|
82
|
+
export type UpdateUserConfigRequest = z.infer<typeof updateUserConfigRequestSchema>;
|
|
83
|
+
export interface UpdateUserConfigResponse {
|
|
84
|
+
user: UpdateUserConfigRequest & {
|
|
85
|
+
id: string;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateUserConfigRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const panels_1 = require("../../panels");
|
|
6
|
+
exports.updateUserConfigRequestSchema = zod_1.z.object({
|
|
7
|
+
name: zod_1.z.string().min(1).nullish(),
|
|
8
|
+
timezone: zod_1.z.string()
|
|
9
|
+
.refine((tz) => {
|
|
10
|
+
try {
|
|
11
|
+
Intl.DateTimeFormat(undefined, { timeZone: tz });
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
catch (e) {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
}, {
|
|
18
|
+
message: "Invalid timezone"
|
|
19
|
+
})
|
|
20
|
+
.nullish(),
|
|
21
|
+
discordID: zod_1.z.string().nullish(),
|
|
22
|
+
itemListTracking: zod_1.z.object({
|
|
23
|
+
channelId: zod_1.z.string(),
|
|
24
|
+
messageId: zod_1.z.string()
|
|
25
|
+
}).nullish(),
|
|
26
|
+
iosApp: zod_1.z.object({
|
|
27
|
+
panels: zod_1.z.array(zod_1.z.object({
|
|
28
|
+
panel: zod_1.z.enum(panels_1.PANEL_TYPES),
|
|
29
|
+
visible: zod_1.z.boolean()
|
|
30
|
+
})).optional(),
|
|
31
|
+
itemCategories: zod_1.z.array(zod_1.z.string()).optional(),
|
|
32
|
+
itemTypes: zod_1.z.array(zod_1.z.string()).optional(),
|
|
33
|
+
propertyKeys: zod_1.z.array(zod_1.z.string()).optional()
|
|
34
|
+
}).nullish()
|
|
35
|
+
}).strict();
|
|
@@ -0,0 +1,21 @@
|
|
|
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("./login-types"), exports);
|
|
18
|
+
__exportStar(require("./refresh-auth-types"), exports);
|
|
19
|
+
__exportStar(require("./register-types"), exports);
|
|
20
|
+
__exportStar(require("./resend-verification-types"), exports);
|
|
21
|
+
__exportStar(require("./verify-email-types"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { AuthTokens } from "../../auth-tokens";
|
|
3
|
+
import { PublicAuthData, UserConfig } from "../../models";
|
|
4
|
+
export declare const loginRequestSchema: z.ZodObject<{
|
|
5
|
+
email: z.ZodString;
|
|
6
|
+
password: z.ZodString;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
email: string;
|
|
9
|
+
password: string;
|
|
10
|
+
}, {
|
|
11
|
+
email: string;
|
|
12
|
+
password: string;
|
|
13
|
+
}>;
|
|
14
|
+
export type LoginRequest = z.infer<typeof loginRequestSchema>;
|
|
15
|
+
export interface LoginResponse {
|
|
16
|
+
tokenData: AuthTokens;
|
|
17
|
+
authData: PublicAuthData;
|
|
18
|
+
user: UserConfig;
|
|
19
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loginRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.loginRequestSchema = zod_1.z.object({
|
|
6
|
+
email: zod_1.z.string().email(),
|
|
7
|
+
password: zod_1.z.string()
|
|
8
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { AuthTokens } from "../../auth-tokens";
|
|
3
|
+
import { PublicAuthData } from "../../models";
|
|
4
|
+
export declare const refreshAuthRequestSchema: z.ZodObject<{
|
|
5
|
+
refreshToken: z.ZodString;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
refreshToken: string;
|
|
8
|
+
}, {
|
|
9
|
+
refreshToken: string;
|
|
10
|
+
}>;
|
|
11
|
+
export type RefreshAuthRequest = z.infer<typeof refreshAuthRequestSchema>;
|
|
12
|
+
export interface RefreshAuthResponse {
|
|
13
|
+
tokenData: AuthTokens;
|
|
14
|
+
authData: PublicAuthData;
|
|
15
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const registerRequestSchema: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
email: z.ZodString;
|
|
5
|
+
password: z.ZodString;
|
|
6
|
+
skipVerificationEmail: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
email: string;
|
|
9
|
+
name: string;
|
|
10
|
+
password: string;
|
|
11
|
+
skipVerificationEmail?: boolean | undefined;
|
|
12
|
+
}, {
|
|
13
|
+
email: string;
|
|
14
|
+
name: string;
|
|
15
|
+
password: string;
|
|
16
|
+
skipVerificationEmail?: boolean | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
export type RegisterRequest = z.infer<typeof registerRequestSchema>;
|
|
19
|
+
export interface RegisterResponse {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
email: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.registerRequestSchema = zod_1.z.object({
|
|
6
|
+
name: zod_1.z.string().trim().min(1),
|
|
7
|
+
email: zod_1.z.string().trim().email(),
|
|
8
|
+
password: zod_1.z.string().min(4),
|
|
9
|
+
skipVerificationEmail: zod_1.z.boolean().optional()
|
|
10
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
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("./account"), exports);
|
|
18
|
+
__exportStar(require("./auth"), exports);
|
|
19
|
+
__exportStar(require("./items"), exports);
|
|
20
|
+
__exportStar(require("./people"), exports);
|
|
21
|
+
__exportStar(require("./thoguhts"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const completeItemRequestSchema: z.ZodObject<{
|
|
3
|
+
completed: z.ZodBoolean;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
completed: boolean;
|
|
6
|
+
}, {
|
|
7
|
+
completed: boolean;
|
|
8
|
+
}>;
|
|
9
|
+
export type CompleteItemRequest = z.infer<typeof completeItemRequestSchema>;
|
|
10
|
+
export interface CompleteItemResponse {
|
|
11
|
+
item: {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
completed: boolean;
|
|
15
|
+
dueDate?: string;
|
|
16
|
+
notes?: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const createItemRequestSchema: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
dueDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
6
|
+
urgent: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
7
|
+
category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8
|
+
type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
name: string;
|
|
11
|
+
urgent: boolean;
|
|
12
|
+
type?: string | null | undefined;
|
|
13
|
+
dueDate?: string | null | undefined;
|
|
14
|
+
notes?: string | undefined;
|
|
15
|
+
category?: string | null | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
name: string;
|
|
18
|
+
type?: string | null | undefined;
|
|
19
|
+
dueDate?: string | null | undefined;
|
|
20
|
+
notes?: string | undefined;
|
|
21
|
+
urgent?: boolean | undefined;
|
|
22
|
+
category?: string | null | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
export type CreateItemRequest = z.infer<typeof createItemRequestSchema>;
|
|
25
|
+
export interface CreateItemResponse {
|
|
26
|
+
item: {
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
dueDate?: string;
|
|
30
|
+
notes?: string;
|
|
31
|
+
completed: boolean;
|
|
32
|
+
urgent: boolean;
|
|
33
|
+
category?: string;
|
|
34
|
+
type?: string;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createItemRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.createItemRequestSchema = zod_1.z.object({
|
|
6
|
+
name: zod_1.z.string().min(1),
|
|
7
|
+
dueDate: zod_1.z.string().nullish(),
|
|
8
|
+
notes: zod_1.z.string().optional(),
|
|
9
|
+
urgent: zod_1.z.boolean().optional().default(false),
|
|
10
|
+
category: zod_1.z.string().nullish(),
|
|
11
|
+
type: zod_1.z.string().nullish()
|
|
12
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
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("./complete-item-types"), exports);
|
|
18
|
+
__exportStar(require("./create-item-types"), exports);
|
|
19
|
+
__exportStar(require("./delete-item-types"), exports);
|
|
20
|
+
__exportStar(require("./get-items-types"), exports);
|
|
21
|
+
__exportStar(require("./update-item-types"), exports);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const updateItemRequestSchema: z.ZodObject<{
|
|
3
|
+
name: z.ZodOptional<z.ZodString>;
|
|
4
|
+
dueDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
6
|
+
urgent: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
+
category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8
|
+
type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
name?: string | undefined;
|
|
11
|
+
type?: string | null | undefined;
|
|
12
|
+
dueDate?: string | null | undefined;
|
|
13
|
+
notes?: string | undefined;
|
|
14
|
+
urgent?: boolean | undefined;
|
|
15
|
+
category?: string | null | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
name?: string | undefined;
|
|
18
|
+
type?: string | null | undefined;
|
|
19
|
+
dueDate?: string | null | undefined;
|
|
20
|
+
notes?: string | undefined;
|
|
21
|
+
urgent?: boolean | undefined;
|
|
22
|
+
category?: string | null | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
export type UpdateItemRequest = z.infer<typeof updateItemRequestSchema>;
|
|
25
|
+
export interface UpdateItemResponse {
|
|
26
|
+
item: {
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
dueDate?: string;
|
|
30
|
+
notes?: string;
|
|
31
|
+
completed: boolean;
|
|
32
|
+
urgent: boolean;
|
|
33
|
+
category?: string;
|
|
34
|
+
type?: string;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateItemRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.updateItemRequestSchema = zod_1.z.object({
|
|
6
|
+
name: zod_1.z.string().min(1).optional(),
|
|
7
|
+
dueDate: zod_1.z.string().nullish(),
|
|
8
|
+
notes: zod_1.z.string().optional(),
|
|
9
|
+
urgent: zod_1.z.boolean().optional(),
|
|
10
|
+
category: zod_1.z.string().nullish(),
|
|
11
|
+
type: zod_1.z.string().nullish()
|
|
12
|
+
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const createPersonRequestSchema: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5
|
+
key: z.ZodString;
|
|
6
|
+
value: z.ZodString;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
value: string;
|
|
9
|
+
key: string;
|
|
10
|
+
}, {
|
|
11
|
+
value: string;
|
|
12
|
+
key: string;
|
|
13
|
+
}>, "many">>;
|
|
14
|
+
notes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
15
|
+
content: z.ZodString;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
content: string;
|
|
18
|
+
}, {
|
|
19
|
+
content: string;
|
|
20
|
+
}>, "many">>;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
name: string;
|
|
23
|
+
notes?: {
|
|
24
|
+
content: string;
|
|
25
|
+
}[] | undefined;
|
|
26
|
+
properties?: {
|
|
27
|
+
value: string;
|
|
28
|
+
key: string;
|
|
29
|
+
}[] | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
name: string;
|
|
32
|
+
notes?: {
|
|
33
|
+
content: string;
|
|
34
|
+
}[] | undefined;
|
|
35
|
+
properties?: {
|
|
36
|
+
value: string;
|
|
37
|
+
key: string;
|
|
38
|
+
}[] | undefined;
|
|
39
|
+
}>;
|
|
40
|
+
export type CreatePersonRequest = z.infer<typeof createPersonRequestSchema>;
|
|
41
|
+
export interface CreatePersonResponse {
|
|
42
|
+
person: {
|
|
43
|
+
id: string;
|
|
44
|
+
name: string;
|
|
45
|
+
properties: Array<{
|
|
46
|
+
key: string;
|
|
47
|
+
value: string;
|
|
48
|
+
}>;
|
|
49
|
+
notes: Array<{
|
|
50
|
+
content: string;
|
|
51
|
+
createdAt: string;
|
|
52
|
+
updatedAt: string;
|
|
53
|
+
}>;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createPersonRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.createPersonRequestSchema = zod_1.z.object({
|
|
6
|
+
name: zod_1.z.string().min(1),
|
|
7
|
+
properties: zod_1.z.array(zod_1.z.object({
|
|
8
|
+
key: zod_1.z.string().min(1),
|
|
9
|
+
value: zod_1.z.string().min(1)
|
|
10
|
+
})).optional(),
|
|
11
|
+
notes: zod_1.z.array(zod_1.z.object({
|
|
12
|
+
content: zod_1.z.string().min(1)
|
|
13
|
+
})).optional()
|
|
14
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
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("./create-person-types"), exports);
|
|
18
|
+
__exportStar(require("./delete-person-types"), exports);
|
|
19
|
+
__exportStar(require("./get-people-types"), exports);
|
|
20
|
+
__exportStar(require("./update-person-types"), exports);
|