@timothyw/pat-common 1.0.113 → 1.0.115
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/id-types.d.ts +2 -2
- package/dist/types/index.d.ts +1 -3
- package/dist/types/index.js +4 -3
- package/dist/types/new/agenda-types.d.ts +116 -0
- package/dist/types/new/agenda-types.js +37 -0
- package/dist/types/new/auth-types.d.ts +153 -0
- package/dist/types/new/auth-types.js +48 -0
- package/dist/types/new/habits-types.d.ts +317 -0
- package/dist/types/new/habits-types.js +70 -0
- package/dist/types/new/index.d.ts +10 -0
- package/dist/types/new/index.js +26 -0
- package/dist/types/new/lists-types.d.ts +164 -0
- package/dist/types/new/lists-types.js +50 -0
- package/dist/types/new/misc/index.d.ts +1 -0
- package/dist/types/new/misc/index.js +17 -0
- package/dist/types/new/misc/version-types.d.ts +26 -0
- package/dist/types/new/misc/version-types.js +13 -0
- package/dist/types/new/notifications-types.d.ts +407 -0
- package/dist/types/new/notifications-types.js +91 -0
- package/dist/types/new/people-types.d.ts +285 -0
- package/dist/types/new/people-types.js +58 -0
- package/dist/types/new/program-config-types.d.ts +105 -0
- package/dist/types/new/program-config-types.js +29 -0
- package/dist/types/new/thoughts-types.d.ts +57 -0
- package/dist/types/new/thoughts-types.js +18 -0
- package/dist/types/new/user-types.d.ts +283 -0
- package/dist/types/new/user-types.js +46 -0
- package/dist/types/old/api/account/get-user-types.d.ts +5 -0
- package/dist/types/old/api/account/get-user-types.js +2 -0
- package/dist/types/old/api/account/index.d.ts +2 -0
- package/dist/types/old/api/account/index.js +18 -0
- package/dist/types/old/api/account/update-user-types.d.ts +128 -0
- package/dist/types/old/api/account/update-user-types.js +8 -0
- package/dist/types/old/api/auth/create-account-types.d.ts +24 -0
- package/dist/types/old/api/auth/create-account-types.js +10 -0
- package/dist/types/old/api/auth/index.d.ts +5 -0
- package/dist/types/old/api/auth/index.js +21 -0
- package/dist/types/old/api/auth/refresh-auth-types.d.ts +15 -0
- package/dist/types/old/api/auth/refresh-auth-types.js +7 -0
- package/dist/types/old/api/auth/resend-verification-types.d.ts +3 -0
- package/dist/types/old/api/auth/resend-verification-types.js +2 -0
- package/dist/types/old/api/auth/sign-in-types.d.ts +19 -0
- package/dist/types/old/api/auth/sign-in-types.js +8 -0
- package/dist/types/old/api/auth/verify-email-types.d.ts +3 -0
- package/dist/types/old/api/auth/verify-email-types.js +2 -0
- package/dist/types/old/api/habits/create-habit-entry-types.d.ts +19 -0
- package/dist/types/old/api/habits/create-habit-entry-types.js +10 -0
- package/dist/types/old/api/habits/create-habit-types.d.ts +26 -0
- package/dist/types/old/api/habits/create-habit-types.js +12 -0
- package/dist/types/old/api/habits/delete-habit-entry-types.d.ts +5 -0
- package/dist/types/old/api/habits/delete-habit-entry-types.js +2 -0
- package/dist/types/old/api/habits/delete-habit-types.d.ts +3 -0
- package/dist/types/old/api/habits/delete-habit-types.js +2 -0
- package/dist/types/old/api/habits/get-habits-types.d.ts +5 -0
- package/dist/types/old/api/habits/get-habits-types.js +2 -0
- package/dist/types/old/api/habits/index.d.ts +6 -0
- package/dist/types/old/api/habits/index.js +22 -0
- package/dist/types/old/api/habits/update-habit-types.d.ts +26 -0
- package/dist/types/old/api/habits/update-habit-types.js +12 -0
- package/dist/types/old/api/index.d.ts +9 -0
- package/dist/types/old/api/index.js +25 -0
- package/dist/types/old/api/items/complete-item-types.d.ts +14 -0
- package/dist/types/old/api/items/complete-item-types.js +7 -0
- package/dist/types/old/api/items/create-item-types.d.ts +29 -0
- package/dist/types/old/api/items/create-item-types.js +12 -0
- package/dist/types/old/api/items/delete-item-types.d.ts +3 -0
- package/dist/types/old/api/items/delete-item-types.js +2 -0
- package/dist/types/old/api/items/get-items-types.d.ts +5 -0
- package/dist/types/old/api/items/get-items-types.js +2 -0
- package/dist/types/old/api/items/index.d.ts +5 -0
- package/dist/types/old/api/items/index.js +21 -0
- package/dist/types/old/api/items/update-item-types.d.ts +29 -0
- package/dist/types/old/api/items/update-item-types.js +12 -0
- package/dist/types/old/api/lists/complete-list-item-types.d.ts +14 -0
- package/dist/types/old/api/lists/complete-list-item-types.js +7 -0
- package/dist/types/old/api/lists/create-list-item-types.d.ts +22 -0
- package/dist/types/old/api/lists/create-list-item-types.js +10 -0
- package/dist/types/old/api/lists/create-list-types.d.ts +17 -0
- package/dist/types/old/api/lists/create-list-types.js +9 -0
- package/dist/types/old/api/lists/get-list-item-types.d.ts +5 -0
- package/dist/types/old/api/lists/get-list-item-types.js +2 -0
- package/dist/types/old/api/lists/get-lists-types.d.ts +5 -0
- package/dist/types/old/api/lists/get-lists-types.js +2 -0
- package/dist/types/old/api/lists/index.d.ts +7 -0
- package/dist/types/old/api/lists/index.js +23 -0
- package/dist/types/old/api/lists/update-list-item-types.d.ts +23 -0
- package/dist/types/old/api/lists/update-list-item-types.js +11 -0
- package/dist/types/old/api/lists/update-list-types.d.ts +17 -0
- package/dist/types/old/api/lists/update-list-types.js +9 -0
- package/dist/types/old/api/misc/index.d.ts +1 -0
- package/dist/types/old/api/misc/index.js +17 -0
- package/dist/types/old/api/misc/version-types.d.ts +9 -0
- package/dist/types/old/api/misc/version-types.js +2 -0
- package/dist/types/old/api/notifications/create-notification-template-types.d.ts +78 -0
- package/dist/types/old/api/notifications/create-notification-template-types.js +25 -0
- package/dist/types/old/api/notifications/delete-notification-template-types.d.ts +5 -0
- package/dist/types/old/api/notifications/delete-notification-template-types.js +6 -0
- package/dist/types/old/api/notifications/get-notification-templates-types.d.ts +8 -0
- package/dist/types/old/api/notifications/get-notification-templates-types.js +6 -0
- package/dist/types/old/api/notifications/index.d.ts +6 -0
- package/dist/types/old/api/notifications/index.js +22 -0
- package/dist/types/old/api/notifications/preview-notification-template-types.d.ts +29 -0
- package/dist/types/old/api/notifications/preview-notification-template-types.js +12 -0
- package/dist/types/old/api/notifications/sync-notification-template-types.d.ts +14 -0
- package/dist/types/old/api/notifications/sync-notification-template-types.js +8 -0
- package/dist/types/old/api/notifications/update-notification-template-types.d.ts +69 -0
- package/dist/types/old/api/notifications/update-notification-template-types.js +22 -0
- package/dist/types/old/api/people/create-person-note-types.d.ts +19 -0
- package/dist/types/old/api/people/create-person-note-types.js +9 -0
- package/dist/types/old/api/people/create-person-types.d.ts +35 -0
- package/dist/types/old/api/people/create-person-types.js +13 -0
- package/dist/types/old/api/people/delete-person-notes-types.d.ts +3 -0
- package/dist/types/old/api/people/delete-person-notes-types.js +2 -0
- package/dist/types/old/api/people/delete-person-types.d.ts +3 -0
- package/dist/types/old/api/people/delete-person-types.js +2 -0
- package/dist/types/old/api/people/get-people-types.d.ts +5 -0
- package/dist/types/old/api/people/get-people-types.js +2 -0
- package/dist/types/old/api/people/get-person-notes-types.d.ts +5 -0
- package/dist/types/old/api/people/get-person-notes-types.js +2 -0
- package/dist/types/old/api/people/index.d.ts +8 -0
- package/dist/types/old/api/people/index.js +24 -0
- package/dist/types/old/api/people/update-person-note-types.d.ts +14 -0
- package/dist/types/old/api/people/update-person-note-types.js +7 -0
- package/dist/types/old/api/people/update-person-types.d.ts +35 -0
- package/dist/types/old/api/people/update-person-types.js +13 -0
- package/dist/types/old/api/thoughts/create-thought-types.d.ts +14 -0
- package/dist/types/old/api/thoughts/create-thought-types.js +7 -0
- package/dist/types/old/api/thoughts/delete-thought-types.d.ts +3 -0
- package/dist/types/old/api/thoughts/delete-thought-types.js +2 -0
- package/dist/types/old/api/thoughts/get-thoughts-types.d.ts +5 -0
- package/dist/types/old/api/thoughts/get-thoughts-types.js +2 -0
- package/dist/types/old/api/thoughts/index.d.ts +4 -0
- package/dist/types/old/api/thoughts/index.js +20 -0
- package/dist/types/old/api/thoughts/update-thought-types.d.ts +14 -0
- package/dist/types/old/api/thoughts/update-thought-types.js +7 -0
- package/dist/types/old/auth-tokens.d.ts +11 -0
- package/dist/types/old/auth-tokens.js +2 -0
- package/dist/types/old/models/auth-data.d.ts +14 -0
- package/dist/types/old/models/auth-data.js +9 -0
- package/dist/types/old/models/habit-data.d.ts +48 -0
- package/dist/types/old/models/habit-data.js +25 -0
- package/dist/types/old/models/index.d.ts +10 -0
- package/dist/types/old/models/index.js +26 -0
- package/dist/types/old/models/item-data.d.ts +14 -0
- package/dist/types/old/models/item-data.js +2 -0
- package/dist/types/old/models/list-data.d.ts +23 -0
- package/dist/types/old/models/list-data.js +8 -0
- package/dist/types/old/models/notifiable.d.ts +42 -0
- package/dist/types/old/models/notifiable.js +2 -0
- package/dist/types/old/models/notification-template-data.d.ts +224 -0
- package/dist/types/old/models/notification-template-data.js +52 -0
- package/dist/types/old/models/person-data.d.ts +31 -0
- package/dist/types/old/models/person-data.js +2 -0
- package/dist/types/old/models/program-config.d.ts +25 -0
- package/dist/types/old/models/program-config.js +2 -0
- package/dist/types/old/models/thought-data.d.ts +8 -0
- package/dist/types/old/models/thought-data.js +2 -0
- package/dist/types/old/models/user-data.d.ts +147 -0
- package/dist/types/old/models/user-data.js +42 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/type-helpers.d.ts +4 -0
- package/dist/utils/type-helpers.js +19 -0
- package/package.json +1 -1
- package/src/types/id-types.ts +2 -2
- package/src/types/index.ts +4 -3
- package/src/types/new/agenda-types.ts +69 -0
- package/src/types/new/auth-types.ts +92 -0
- package/src/types/new/habits-types.ts +112 -0
- package/src/types/new/index.ts +10 -0
- package/src/types/new/lists-types.ts +108 -0
- package/src/types/new/misc/index.ts +1 -0
- package/src/types/new/misc/version-types.ts +15 -0
- package/src/types/new/notifications-types.ts +144 -0
- package/src/types/new/people-types.ts +110 -0
- package/src/types/new/program-config-types.ts +29 -0
- package/src/types/new/thoughts-types.ts +44 -0
- package/src/types/new/user-types.ts +61 -0
- package/src/types/{api → old/api}/account/get-user-types.ts +1 -1
- package/src/types/{api → old/api}/account/update-user-types.ts +1 -1
- package/src/types/{api → old/api}/auth/create-account-types.ts +1 -1
- package/src/types/{api → old/api}/habits/create-habit-entry-types.ts +2 -2
- package/src/types/{api → old/api}/habits/create-habit-types.ts +1 -1
- package/src/types/{api → old/api}/habits/delete-habit-entry-types.ts +1 -1
- package/src/types/{api → old/api}/habits/get-habits-types.ts +1 -1
- package/src/types/{api → old/api}/habits/update-habit-types.ts +1 -1
- package/src/types/{api → old/api}/items/complete-item-types.ts +1 -1
- package/src/types/{api → old/api}/items/create-item-types.ts +1 -1
- package/src/types/{api → old/api}/items/get-items-types.ts +1 -1
- package/src/types/{api → old/api}/items/update-item-types.ts +1 -1
- package/src/types/{api → old/api}/lists/complete-list-item-types.ts +1 -1
- package/src/types/{api → old/api}/lists/create-list-item-types.ts +2 -2
- package/src/types/{api → old/api}/lists/create-list-types.ts +1 -1
- package/src/types/{api → old/api}/lists/get-list-item-types.ts +1 -1
- package/src/types/{api → old/api}/lists/get-lists-types.ts +1 -1
- package/src/types/{api → old/api}/lists/update-list-item-types.ts +2 -2
- package/src/types/{api → old/api}/lists/update-list-types.ts +1 -1
- package/src/types/{api → old/api}/notifications/create-notification-template-types.ts +1 -1
- package/src/types/{api → old/api}/notifications/get-notification-templates-types.ts +1 -1
- package/src/types/{api → old/api}/notifications/sync-notification-template-types.ts +1 -1
- package/src/types/{api → old/api}/notifications/update-notification-template-types.ts +1 -1
- package/src/types/{api → old/api}/people/create-person-note-types.ts +2 -2
- package/src/types/{api → old/api}/people/create-person-types.ts +2 -2
- package/src/types/{api → old/api}/people/get-people-types.ts +1 -1
- package/src/types/{api → old/api}/people/get-person-notes-types.ts +1 -1
- package/src/types/{api → old/api}/people/update-person-note-types.ts +1 -1
- package/src/types/{api → old/api}/people/update-person-types.ts +2 -2
- package/src/types/{api → old/api}/thoughts/create-thought-types.ts +1 -1
- package/src/types/{api → old/api}/thoughts/get-thoughts-types.ts +1 -1
- package/src/types/{api → old/api}/thoughts/update-thought-types.ts +1 -1
- package/src/types/{models → old/models}/auth-data.ts +1 -1
- package/src/types/{models → old/models}/habit-data.ts +2 -2
- package/src/types/{models → old/models}/item-data.ts +1 -1
- package/src/types/{models → old/models}/list-data.ts +1 -1
- package/src/types/{models → old/models}/notification-template-data.ts +1 -1
- package/src/types/{models → old/models}/person-data.ts +1 -1
- package/src/types/{models → old/models}/thought-data.ts +1 -1
- package/src/types/{models → old/models}/user-data.ts +2 -2
- package/src/utils/index.ts +2 -1
- package/src/utils/type-helpers.ts +19 -0
- /package/src/types/{api → old/api}/account/index.ts +0 -0
- /package/src/types/{api → old/api}/auth/index.ts +0 -0
- /package/src/types/{api → old/api}/auth/refresh-auth-types.ts +0 -0
- /package/src/types/{api → old/api}/auth/resend-verification-types.ts +0 -0
- /package/src/types/{api → old/api}/auth/sign-in-types.ts +0 -0
- /package/src/types/{api → old/api}/auth/verify-email-types.ts +0 -0
- /package/src/types/{api → old/api}/habits/delete-habit-types.ts +0 -0
- /package/src/types/{api → old/api}/habits/index.ts +0 -0
- /package/src/types/{api → old/api}/index.ts +0 -0
- /package/src/types/{api → old/api}/items/delete-item-types.ts +0 -0
- /package/src/types/{api → old/api}/items/index.ts +0 -0
- /package/src/types/{api → old/api}/lists/index.ts +0 -0
- /package/src/types/{api → old/api}/misc/index.ts +0 -0
- /package/src/types/{api → old/api}/misc/version-types.ts +0 -0
- /package/src/types/{api → old/api}/notifications/delete-notification-template-types.ts +0 -0
- /package/src/types/{api → old/api}/notifications/index.ts +0 -0
- /package/src/types/{api → old/api}/notifications/preview-notification-template-types.ts +0 -0
- /package/src/types/{api → old/api}/people/delete-person-notes-types.ts +0 -0
- /package/src/types/{api → old/api}/people/delete-person-types.ts +0 -0
- /package/src/types/{api → old/api}/people/index.ts +0 -0
- /package/src/types/{api → old/api}/thoughts/delete-thought-types.ts +0 -0
- /package/src/types/{api → old/api}/thoughts/index.ts +0 -0
- /package/src/types/{auth-tokens.ts → old/auth-tokens.ts} +0 -0
- /package/src/types/{models → old/models}/index.ts +0 -0
- /package/src/types/{models → old/models}/notifiable.ts +0 -0
- /package/src/types/{models → old/models}/program-config.ts +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { Habit, HabitFrequency } from "../../models";
|
|
3
|
+
import { Serialized } from "../../../../utils";
|
|
4
|
+
export declare const createHabitRequestSchema: z.ZodObject<{
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
description: z.ZodOptional<z.ZodString>;
|
|
7
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
8
|
+
frequency: z.ZodNativeEnum<typeof HabitFrequency>;
|
|
9
|
+
rolloverTime: z.ZodString;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
name: string;
|
|
12
|
+
frequency: HabitFrequency;
|
|
13
|
+
rolloverTime: string;
|
|
14
|
+
description?: string | undefined;
|
|
15
|
+
notes?: string | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
name: string;
|
|
18
|
+
frequency: HabitFrequency;
|
|
19
|
+
rolloverTime: string;
|
|
20
|
+
description?: string | undefined;
|
|
21
|
+
notes?: string | undefined;
|
|
22
|
+
}>;
|
|
23
|
+
export type CreateHabitRequest = z.infer<typeof createHabitRequestSchema>;
|
|
24
|
+
export interface CreateHabitResponse {
|
|
25
|
+
habit: Serialized<Habit>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createHabitRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
exports.createHabitRequestSchema = zod_1.z.object({
|
|
7
|
+
name: zod_1.z.string().min(1, 'Name is required').trim(),
|
|
8
|
+
description: zod_1.z.string().trim().optional(),
|
|
9
|
+
notes: zod_1.z.string().trim().optional(),
|
|
10
|
+
frequency: zod_1.z.nativeEnum(models_1.HabitFrequency),
|
|
11
|
+
rolloverTime: zod_1.z.string().regex(/^([01]?[0-9]|2[0-3]):[0-5][0-9]$/, 'rolloverTime must be in HH:MM format')
|
|
12
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
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-habit-entry-types"), exports);
|
|
18
|
+
__exportStar(require("./create-habit-types"), exports);
|
|
19
|
+
__exportStar(require("./delete-habit-entry-types"), exports);
|
|
20
|
+
__exportStar(require("./delete-habit-types"), exports);
|
|
21
|
+
__exportStar(require("./get-habits-types"), exports);
|
|
22
|
+
__exportStar(require("./update-habit-types"), exports);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { Habit, HabitFrequency } from "../../models";
|
|
3
|
+
import { Serialized } from "../../../../utils";
|
|
4
|
+
export declare const updateHabitRequestSchema: z.ZodObject<{
|
|
5
|
+
name: z.ZodOptional<z.ZodString>;
|
|
6
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8
|
+
frequency: z.ZodOptional<z.ZodNativeEnum<typeof HabitFrequency>>;
|
|
9
|
+
rolloverTime: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
name?: string | undefined;
|
|
12
|
+
description?: string | null | undefined;
|
|
13
|
+
notes?: string | null | undefined;
|
|
14
|
+
frequency?: HabitFrequency | undefined;
|
|
15
|
+
rolloverTime?: string | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
name?: string | undefined;
|
|
18
|
+
description?: string | null | undefined;
|
|
19
|
+
notes?: string | null | undefined;
|
|
20
|
+
frequency?: HabitFrequency | undefined;
|
|
21
|
+
rolloverTime?: string | undefined;
|
|
22
|
+
}>;
|
|
23
|
+
export type UpdateHabitRequest = z.infer<typeof updateHabitRequestSchema>;
|
|
24
|
+
export interface UpdateHabitResponse {
|
|
25
|
+
habit: Serialized<Habit>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateHabitRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
exports.updateHabitRequestSchema = zod_1.z.object({
|
|
7
|
+
name: zod_1.z.string().min(1, 'Name is required').trim().optional(),
|
|
8
|
+
description: zod_1.z.string().trim().nullish(),
|
|
9
|
+
notes: zod_1.z.string().trim().nullish(),
|
|
10
|
+
frequency: zod_1.z.nativeEnum(models_1.HabitFrequency).optional(),
|
|
11
|
+
rolloverTime: zod_1.z.string().regex(/^([01]?[0-9]|2[0-3]):[0-5][0-9]$/, 'rolloverTime must be in HH:MM format').optional()
|
|
12
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
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("./habits"), exports);
|
|
20
|
+
__exportStar(require("./items"), exports);
|
|
21
|
+
__exportStar(require("./misc"), exports);
|
|
22
|
+
__exportStar(require("./notifications"), exports);
|
|
23
|
+
__exportStar(require("./people"), exports);
|
|
24
|
+
__exportStar(require("./lists"), exports);
|
|
25
|
+
__exportStar(require("./thoughts"), exports);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ItemData } from "../../models";
|
|
3
|
+
import { Serialized } from "../../../../utils";
|
|
4
|
+
export declare const completeItemRequestSchema: z.ZodObject<{
|
|
5
|
+
completed: z.ZodBoolean;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
completed: boolean;
|
|
8
|
+
}, {
|
|
9
|
+
completed: boolean;
|
|
10
|
+
}>;
|
|
11
|
+
export type CompleteItemRequest = z.infer<typeof completeItemRequestSchema>;
|
|
12
|
+
export interface CompleteItemResponse {
|
|
13
|
+
item: Serialized<ItemData>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ItemData } from "../../models";
|
|
3
|
+
import { Serialized } from "../../../../utils";
|
|
4
|
+
export declare const createItemRequestSchema: z.ZodObject<{
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
dueDate: z.ZodOptional<z.ZodString>;
|
|
7
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
8
|
+
urgent: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
9
|
+
category: z.ZodOptional<z.ZodString>;
|
|
10
|
+
type: z.ZodOptional<z.ZodString>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
name: string;
|
|
13
|
+
urgent: boolean;
|
|
14
|
+
type?: string | undefined;
|
|
15
|
+
notes?: string | undefined;
|
|
16
|
+
dueDate?: string | undefined;
|
|
17
|
+
category?: string | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
name: string;
|
|
20
|
+
type?: string | undefined;
|
|
21
|
+
notes?: string | undefined;
|
|
22
|
+
dueDate?: string | undefined;
|
|
23
|
+
urgent?: boolean | undefined;
|
|
24
|
+
category?: string | undefined;
|
|
25
|
+
}>;
|
|
26
|
+
export type CreateItemRequest = z.infer<typeof createItemRequestSchema>;
|
|
27
|
+
export interface CreateItemResponse {
|
|
28
|
+
item: Serialized<ItemData>;
|
|
29
|
+
}
|
|
@@ -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().optional(),
|
|
8
|
+
notes: zod_1.z.string().optional(),
|
|
9
|
+
urgent: zod_1.z.boolean().optional().default(false),
|
|
10
|
+
category: zod_1.z.string().optional(),
|
|
11
|
+
type: zod_1.z.string().optional()
|
|
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,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ItemData } from "../../models";
|
|
3
|
+
import { Serialized } from "../../../../utils";
|
|
4
|
+
export declare const updateItemRequestSchema: z.ZodObject<{
|
|
5
|
+
name: z.ZodOptional<z.ZodString>;
|
|
6
|
+
dueDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8
|
+
urgent: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
+
category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10
|
+
type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
type?: string | null | undefined;
|
|
13
|
+
name?: string | undefined;
|
|
14
|
+
notes?: string | null | undefined;
|
|
15
|
+
dueDate?: string | null | undefined;
|
|
16
|
+
urgent?: boolean | undefined;
|
|
17
|
+
category?: string | null | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
type?: string | null | undefined;
|
|
20
|
+
name?: string | undefined;
|
|
21
|
+
notes?: string | null | undefined;
|
|
22
|
+
dueDate?: string | null | undefined;
|
|
23
|
+
urgent?: boolean | undefined;
|
|
24
|
+
category?: string | null | undefined;
|
|
25
|
+
}>;
|
|
26
|
+
export type UpdateItemRequest = z.infer<typeof updateItemRequestSchema>;
|
|
27
|
+
export interface UpdateItemResponse {
|
|
28
|
+
item: Serialized<ItemData>;
|
|
29
|
+
}
|
|
@@ -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().nullish(),
|
|
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,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Serialized } from "../../../../utils";
|
|
3
|
+
import { ListItemData } from "../../models";
|
|
4
|
+
export declare const completeListItemRequestSchema: z.ZodObject<{
|
|
5
|
+
completed: z.ZodBoolean;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
completed: boolean;
|
|
8
|
+
}, {
|
|
9
|
+
completed: boolean;
|
|
10
|
+
}>;
|
|
11
|
+
export type CompleteListItemRequest = z.infer<typeof completeListItemRequestSchema>;
|
|
12
|
+
export interface CompleteListItemResponse {
|
|
13
|
+
listItem: Serialized<ListItemData>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Serialized } from "../../../../utils";
|
|
3
|
+
import { ListItemData } from "../../models";
|
|
4
|
+
export declare const createListItemRequestSchema: z.ZodObject<{
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
7
|
+
listId: z.ZodEffects<z.ZodString, import("../../../id-types").ListId, string>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
name: string;
|
|
10
|
+
listId: string & {
|
|
11
|
+
readonly __brand: "ListId";
|
|
12
|
+
};
|
|
13
|
+
notes?: string | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
name: string;
|
|
16
|
+
listId: string;
|
|
17
|
+
notes?: string | undefined;
|
|
18
|
+
}>;
|
|
19
|
+
export type CreateListItemRequest = z.infer<typeof createListItemRequestSchema>;
|
|
20
|
+
export interface CreateListItemResponse {
|
|
21
|
+
listItem: Serialized<ListItemData>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createListItemRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const id_types_1 = require("../../../id-types");
|
|
6
|
+
exports.createListItemRequestSchema = zod_1.z.object({
|
|
7
|
+
name: zod_1.z.string().min(1),
|
|
8
|
+
notes: zod_1.z.string().optional(),
|
|
9
|
+
listId: id_types_1.listIdSchema
|
|
10
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Serialized } from "../../../../utils";
|
|
3
|
+
import { ListData, ListType } from "../../models";
|
|
4
|
+
export declare const createListRequestSchema: z.ZodObject<{
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
type: z.ZodNativeEnum<typeof ListType>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
type: ListType;
|
|
9
|
+
name: string;
|
|
10
|
+
}, {
|
|
11
|
+
type: ListType;
|
|
12
|
+
name: string;
|
|
13
|
+
}>;
|
|
14
|
+
export type CreateListRequest = z.infer<typeof createListRequestSchema>;
|
|
15
|
+
export interface CreateListResponse {
|
|
16
|
+
list: Serialized<ListData>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createListRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
exports.createListRequestSchema = zod_1.z.object({
|
|
7
|
+
name: zod_1.z.string().min(1),
|
|
8
|
+
type: zod_1.z.nativeEnum(models_1.ListType)
|
|
9
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './complete-list-item-types';
|
|
2
|
+
export * from './create-list-item-types';
|
|
3
|
+
export * from './get-list-item-types';
|
|
4
|
+
export * from './update-list-item-types';
|
|
5
|
+
export * from './create-list-types';
|
|
6
|
+
export * from './update-list-types';
|
|
7
|
+
export * from './get-lists-types';
|
|
@@ -0,0 +1,23 @@
|
|
|
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-list-item-types"), exports);
|
|
18
|
+
__exportStar(require("./create-list-item-types"), exports);
|
|
19
|
+
__exportStar(require("./get-list-item-types"), exports);
|
|
20
|
+
__exportStar(require("./update-list-item-types"), exports);
|
|
21
|
+
__exportStar(require("./create-list-types"), exports);
|
|
22
|
+
__exportStar(require("./update-list-types"), exports);
|
|
23
|
+
__exportStar(require("./get-lists-types"), exports);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Serialized } from "../../../../utils";
|
|
3
|
+
import { ListItemData } from "../../models";
|
|
4
|
+
export declare const updateListItemRequestSchema: z.ZodObject<{
|
|
5
|
+
name: z.ZodOptional<z.ZodString>;
|
|
6
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7
|
+
completed: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
listId: z.ZodOptional<z.ZodEffects<z.ZodString, import("../../../id-types").ListId, string>>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
name?: string | undefined;
|
|
11
|
+
notes?: string | null | undefined;
|
|
12
|
+
completed?: boolean | undefined;
|
|
13
|
+
listId?: import("../../../id-types").ListId | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
name?: string | undefined;
|
|
16
|
+
notes?: string | null | undefined;
|
|
17
|
+
completed?: boolean | undefined;
|
|
18
|
+
listId?: string | undefined;
|
|
19
|
+
}>;
|
|
20
|
+
export type UpdateListItemRequest = z.infer<typeof updateListItemRequestSchema>;
|
|
21
|
+
export interface UpdateListItemResponse {
|
|
22
|
+
listItem: Serialized<ListItemData>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateListItemRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const id_types_1 = require("../../../id-types");
|
|
6
|
+
exports.updateListItemRequestSchema = zod_1.z.object({
|
|
7
|
+
name: zod_1.z.string().min(1).optional(),
|
|
8
|
+
notes: zod_1.z.string().nullish(),
|
|
9
|
+
completed: zod_1.z.boolean().optional(),
|
|
10
|
+
listId: id_types_1.listIdSchema.optional()
|
|
11
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Serialized } from "../../../../utils";
|
|
3
|
+
import { ListData, ListType } from "../../models";
|
|
4
|
+
export declare const updateListRequestSchema: z.ZodObject<{
|
|
5
|
+
name: z.ZodOptional<z.ZodString>;
|
|
6
|
+
type: z.ZodOptional<z.ZodNativeEnum<typeof ListType>>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
type?: ListType | undefined;
|
|
9
|
+
name?: string | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
type?: ListType | undefined;
|
|
12
|
+
name?: string | undefined;
|
|
13
|
+
}>;
|
|
14
|
+
export type UpdateListRequest = z.infer<typeof updateListRequestSchema>;
|
|
15
|
+
export interface UpdateListResponse {
|
|
16
|
+
list: Serialized<ListData>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateListRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
exports.updateListRequestSchema = zod_1.z.object({
|
|
7
|
+
name: zod_1.z.string().min(1).optional(),
|
|
8
|
+
type: zod_1.z.nativeEnum(models_1.ListType).optional()
|
|
9
|
+
});
|
|
@@ -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);
|