@demind-inc/core 1.10.19 → 1.10.21
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/models/Preference.d.ts +15 -10
- package/dist/models/TodoTasks.d.ts +18 -17
- package/lib/models/Preference.ts +20 -24
- package/lib/models/TodoTasks.ts +18 -17
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SupportedLanguage } from
|
|
2
|
-
import { CalendarEventShowAs, CalendarType } from
|
|
3
|
-
import { RoutineActivityRecurring } from
|
|
1
|
+
import { SupportedLanguage } from '../languages';
|
|
2
|
+
import { CalendarEventShowAs, CalendarType } from './Calendar';
|
|
3
|
+
import { RoutineActivityRecurring } from './Routine';
|
|
4
4
|
export interface Preferences {
|
|
5
5
|
preferenceId: string;
|
|
6
6
|
energy?: EnergyPreference;
|
|
@@ -13,7 +13,7 @@ export interface Preferences {
|
|
|
13
13
|
task?: TaskPreference;
|
|
14
14
|
location?: LocationPreference;
|
|
15
15
|
}
|
|
16
|
-
export type AddressLabel =
|
|
16
|
+
export type AddressLabel = 'home' | 'work' | string;
|
|
17
17
|
export interface LocationPreference {
|
|
18
18
|
enabled?: boolean;
|
|
19
19
|
addresses?: Record<AddressLabel, AddressPreference>;
|
|
@@ -62,9 +62,9 @@ export interface CalendarPreference {
|
|
|
62
62
|
exercise?: boolean;
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
export type SchedulerItemPrefType = keyof Pick<SchedulerPreference,
|
|
66
|
-
export type AllPlanScheduleType =
|
|
67
|
-
export type AllPlanAutoAcceptScheduleType =
|
|
65
|
+
export type SchedulerItemPrefType = keyof Pick<SchedulerPreference, 'workTime' | 'deepWork' | 'lightWork' | 'lunch' | 'dinner' | 'workout'>;
|
|
66
|
+
export type AllPlanScheduleType = 'meal' | 'sleep' | 'workout' | 'todo' | 'routine';
|
|
67
|
+
export type AllPlanAutoAcceptScheduleType = 'meal' | 'sleep' | 'workout' | string;
|
|
68
68
|
export interface AllPlanSchedulerPref {
|
|
69
69
|
autoAcceptTypes?: {
|
|
70
70
|
[key in AllPlanAutoAcceptScheduleType]?: boolean;
|
|
@@ -85,11 +85,16 @@ export interface SchedulerPreference {
|
|
|
85
85
|
deepWork?: SchedulerItemPreference;
|
|
86
86
|
lightWork?: SchedulerItemPreference;
|
|
87
87
|
bufferMinutes?: number;
|
|
88
|
+
pomodoro?: PomodoroPreference;
|
|
88
89
|
allPlan?: AllPlanSchedulerPref;
|
|
89
90
|
lunch?: SchedulerItemPreference;
|
|
90
91
|
dinner?: SchedulerItemPreference;
|
|
91
92
|
workout?: SchedulerItemPreference;
|
|
92
93
|
}
|
|
94
|
+
export interface PomodoroPreference {
|
|
95
|
+
pomodoroDurationMin?: number;
|
|
96
|
+
breakDurationMin?: number;
|
|
97
|
+
}
|
|
93
98
|
export interface MealPreference {
|
|
94
99
|
breakfast?: MealPreferenceItem;
|
|
95
100
|
lunch?: MealPreferenceItem;
|
|
@@ -128,9 +133,9 @@ export interface EventCategoryEnergyPreference {
|
|
|
128
133
|
categoryName: string;
|
|
129
134
|
level: EventCategoryEnergyPreferenceLevel;
|
|
130
135
|
}
|
|
131
|
-
export type EventCategoryEnergyPreferenceLevel =
|
|
132
|
-
export type TimeFormatType =
|
|
133
|
-
export type ThemeMode =
|
|
136
|
+
export type EventCategoryEnergyPreferenceLevel = 'more_energized' | 'less_energized' | 'about_same' | 'not_sure';
|
|
137
|
+
export type TimeFormatType = '12h' | '24h';
|
|
138
|
+
export type ThemeMode = 'light' | 'dark' | 'auto';
|
|
134
139
|
export interface ExportToCalendars {
|
|
135
140
|
enabled: boolean;
|
|
136
141
|
targetUserId: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { DocumentReference } from
|
|
2
|
-
import { TodoIntegrationType } from
|
|
3
|
-
import { TaskLabel } from
|
|
4
|
-
import { CircadianPhase } from
|
|
5
|
-
import { AppleRecurrenceRuleFrequency } from
|
|
6
|
-
import { TeamRole } from
|
|
7
|
-
export type WebhookStatus =
|
|
1
|
+
import { DocumentReference } from '@google-cloud/firestore';
|
|
2
|
+
import { TodoIntegrationType } from './TodoIntegrations';
|
|
3
|
+
import { TaskLabel } from './TaskLabels';
|
|
4
|
+
import { CircadianPhase } from '../types';
|
|
5
|
+
import { AppleRecurrenceRuleFrequency } from './Calendar';
|
|
6
|
+
import { TeamRole } from './Team';
|
|
7
|
+
export type WebhookStatus = 'pending' | 'synced' | 'skipped' | 'failed';
|
|
8
8
|
export interface TodoTasksBoardAdditionalParamsGithub {
|
|
9
9
|
projectId: string;
|
|
10
10
|
owner: string;
|
|
@@ -61,7 +61,7 @@ export interface TodoTasksBoardList {
|
|
|
61
61
|
closed?: boolean;
|
|
62
62
|
rawJson?: any;
|
|
63
63
|
}
|
|
64
|
-
export type TodoAppFrom = TodoIntegrationType |
|
|
64
|
+
export type TodoAppFrom = TodoIntegrationType | 'lifestack';
|
|
65
65
|
export interface DateTimeSet {
|
|
66
66
|
datetime?: string;
|
|
67
67
|
date?: string;
|
|
@@ -76,7 +76,7 @@ export interface TaskRecurring {
|
|
|
76
76
|
timezone?: string;
|
|
77
77
|
recurrenceRule?: string;
|
|
78
78
|
}
|
|
79
|
-
export type TaskPriority =
|
|
79
|
+
export type TaskPriority = 'low' | 'medium' | 'high' | 'none';
|
|
80
80
|
export interface TaskItemAdditionalParamsGithub {
|
|
81
81
|
issueNumber: number;
|
|
82
82
|
repository: string;
|
|
@@ -150,6 +150,7 @@ export interface TaskItem {
|
|
|
150
150
|
priority?: TaskPriority;
|
|
151
151
|
linkedCalendarWebhookStatus?: WebhookStatusSet;
|
|
152
152
|
taskWebhookStatus?: WebhookStatusSet;
|
|
153
|
+
aiNote?: string;
|
|
153
154
|
additionalParams?: {
|
|
154
155
|
github?: TaskItemAdditionalParamsGithub;
|
|
155
156
|
clickup?: TaskItemAdditionalParamsClickUp;
|
|
@@ -158,8 +159,8 @@ export interface TaskItem {
|
|
|
158
159
|
[key: string]: any;
|
|
159
160
|
};
|
|
160
161
|
}
|
|
161
|
-
export type TeamTaskSource =
|
|
162
|
-
export type TeamTaskBucket =
|
|
162
|
+
export type TeamTaskSource = 'shared-personal-board' | 'team-board';
|
|
163
|
+
export type TeamTaskBucket = 'overdue' | 'today' | 'upcoming' | 'done';
|
|
163
164
|
export interface TeamTaskMemberSummary {
|
|
164
165
|
userId: string;
|
|
165
166
|
teamMemberId?: string;
|
|
@@ -199,7 +200,7 @@ export interface TeamTaskTeamSummary {
|
|
|
199
200
|
export interface TeamAssignedTaskItem extends TeamTaskItem {
|
|
200
201
|
team: TeamTaskTeamSummary;
|
|
201
202
|
}
|
|
202
|
-
export interface TaskRecurringInstance extends Omit<TaskItem,
|
|
203
|
+
export interface TaskRecurringInstance extends Omit<TaskItem, 'subTasks' | 'isRecurringChild' | 'parentTaskId'> {
|
|
203
204
|
/** Firestore doc id `${parentTaskId}_${yyyy-MM-dd}` */
|
|
204
205
|
taskId: string;
|
|
205
206
|
parentTaskId: string;
|
|
@@ -212,9 +213,9 @@ export interface TaskCategorySet {
|
|
|
212
213
|
}
|
|
213
214
|
export interface TaskItemDuration {
|
|
214
215
|
amount: number;
|
|
215
|
-
unit:
|
|
216
|
+
unit: 'day' | 'minute';
|
|
216
217
|
}
|
|
217
|
-
export type SuggestedTaskItem = Pick<TaskItem,
|
|
218
|
+
export type SuggestedTaskItem = Pick<TaskItem, 'taskId' | 'name' | 'duration' | 'labels' | 'boardId' | 'appFrom'> & {
|
|
218
219
|
energyAlignmentScore: number;
|
|
219
220
|
reasoning: string;
|
|
220
221
|
suggestedStartTime: string;
|
|
@@ -223,7 +224,7 @@ export type SuggestedTaskItem = Pick<TaskItem, "taskId" | "name" | "duration" |
|
|
|
223
224
|
suggestedEndDayOffset?: number;
|
|
224
225
|
priority?: string;
|
|
225
226
|
};
|
|
226
|
-
export type NativeAppleRemindersSource =
|
|
227
|
+
export type NativeAppleRemindersSource = 'Local' | 'iCloud';
|
|
227
228
|
export type NativeAppleRemindersList = {
|
|
228
229
|
id: string;
|
|
229
230
|
color: string;
|
|
@@ -239,8 +240,8 @@ export type NativeAppleRemindersListArray = NativeAppleRemindersList[];
|
|
|
239
240
|
*/
|
|
240
241
|
export type ISODateString = string;
|
|
241
242
|
export type TimeZoneId = string;
|
|
242
|
-
export type Weekday =
|
|
243
|
-
export type Proximity =
|
|
243
|
+
export type Weekday = 'SU' | 'MO' | 'TU' | 'WE' | 'TH' | 'FR' | 'SA';
|
|
244
|
+
export type Proximity = 'enter' | 'leave' | 'none';
|
|
244
245
|
export type Priority = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
245
246
|
/** Calendar container metadata for the reminder. */
|
|
246
247
|
export interface ReminderCalendar {
|
package/lib/models/Preference.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { TimePhase } from
|
|
2
|
-
import { SupportedLanguage } from
|
|
3
|
-
import { CalendarEventShowAs, CalendarType } from
|
|
4
|
-
import { RoutineActivityRecurring } from
|
|
1
|
+
import { TimePhase } from '../types';
|
|
2
|
+
import { SupportedLanguage } from '../languages';
|
|
3
|
+
import { CalendarEventShowAs, CalendarType } from './Calendar';
|
|
4
|
+
import { RoutineActivityRecurring } from './Routine';
|
|
5
5
|
|
|
6
6
|
export interface Preferences {
|
|
7
7
|
preferenceId: string;
|
|
@@ -15,7 +15,7 @@ export interface Preferences {
|
|
|
15
15
|
task?: TaskPreference;
|
|
16
16
|
location?: LocationPreference;
|
|
17
17
|
}
|
|
18
|
-
export type AddressLabel =
|
|
18
|
+
export type AddressLabel = 'home' | 'work' | string;
|
|
19
19
|
|
|
20
20
|
export interface LocationPreference {
|
|
21
21
|
enabled?: boolean;
|
|
@@ -73,21 +73,12 @@ export interface CalendarPreference {
|
|
|
73
73
|
|
|
74
74
|
export type SchedulerItemPrefType = keyof Pick<
|
|
75
75
|
SchedulerPreference,
|
|
76
|
-
|
|
76
|
+
'workTime' | 'deepWork' | 'lightWork' | 'lunch' | 'dinner' | 'workout'
|
|
77
77
|
>;
|
|
78
78
|
|
|
79
|
-
export type AllPlanScheduleType =
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
| "workout"
|
|
83
|
-
| "todo"
|
|
84
|
-
| "routine";
|
|
85
|
-
|
|
86
|
-
export type AllPlanAutoAcceptScheduleType =
|
|
87
|
-
| "meal"
|
|
88
|
-
| "sleep"
|
|
89
|
-
| "workout"
|
|
90
|
-
| string;
|
|
79
|
+
export type AllPlanScheduleType = 'meal' | 'sleep' | 'workout' | 'todo' | 'routine';
|
|
80
|
+
|
|
81
|
+
export type AllPlanAutoAcceptScheduleType = 'meal' | 'sleep' | 'workout' | string;
|
|
91
82
|
export interface AllPlanSchedulerPref {
|
|
92
83
|
autoAcceptTypes?: {
|
|
93
84
|
[key in AllPlanAutoAcceptScheduleType]?: boolean;
|
|
@@ -109,12 +100,17 @@ export interface SchedulerPreference {
|
|
|
109
100
|
deepWork?: SchedulerItemPreference;
|
|
110
101
|
lightWork?: SchedulerItemPreference;
|
|
111
102
|
bufferMinutes?: number;
|
|
103
|
+
pomodoro?: PomodoroPreference;
|
|
112
104
|
allPlan?: AllPlanSchedulerPref;
|
|
113
105
|
lunch?: SchedulerItemPreference; // @deprecated
|
|
114
106
|
dinner?: SchedulerItemPreference; // @deprecated
|
|
115
107
|
workout?: SchedulerItemPreference; // @deprecated
|
|
116
108
|
}
|
|
117
109
|
|
|
110
|
+
export interface PomodoroPreference {
|
|
111
|
+
pomodoroDurationMin?: number;
|
|
112
|
+
breakDurationMin?: number;
|
|
113
|
+
}
|
|
118
114
|
export interface MealPreference {
|
|
119
115
|
breakfast?: MealPreferenceItem;
|
|
120
116
|
lunch?: MealPreferenceItem;
|
|
@@ -160,13 +156,13 @@ export interface EventCategoryEnergyPreference {
|
|
|
160
156
|
}
|
|
161
157
|
|
|
162
158
|
export type EventCategoryEnergyPreferenceLevel =
|
|
163
|
-
|
|
|
164
|
-
|
|
|
165
|
-
|
|
|
166
|
-
|
|
|
159
|
+
| 'more_energized'
|
|
160
|
+
| 'less_energized'
|
|
161
|
+
| 'about_same'
|
|
162
|
+
| 'not_sure';
|
|
167
163
|
|
|
168
|
-
export type TimeFormatType =
|
|
169
|
-
export type ThemeMode =
|
|
164
|
+
export type TimeFormatType = '12h' | '24h';
|
|
165
|
+
export type ThemeMode = 'light' | 'dark' | 'auto';
|
|
170
166
|
|
|
171
167
|
export interface ExportToCalendars {
|
|
172
168
|
enabled: boolean;
|
package/lib/models/TodoTasks.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { DocumentReference } from
|
|
2
|
-
import { TodoIntegrationType } from
|
|
3
|
-
import { TaskLabel } from
|
|
4
|
-
import { CircadianPhase } from
|
|
5
|
-
import { AppleRecurrenceRuleFrequency } from
|
|
6
|
-
import { TeamRole } from
|
|
1
|
+
import { DocumentReference } from '@google-cloud/firestore';
|
|
2
|
+
import { TodoIntegrationType } from './TodoIntegrations';
|
|
3
|
+
import { TaskLabel } from './TaskLabels';
|
|
4
|
+
import { CircadianPhase } from '../types';
|
|
5
|
+
import { AppleRecurrenceRuleFrequency } from './Calendar';
|
|
6
|
+
import { TeamRole } from './Team';
|
|
7
7
|
|
|
8
|
-
export type WebhookStatus =
|
|
8
|
+
export type WebhookStatus = 'pending' | 'synced' | 'skipped' | 'failed';
|
|
9
9
|
|
|
10
10
|
export interface TodoTasksBoardAdditionalParamsGithub {
|
|
11
11
|
projectId: string;
|
|
@@ -69,7 +69,7 @@ export interface TodoTasksBoardList {
|
|
|
69
69
|
rawJson?: any;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
export type TodoAppFrom = TodoIntegrationType |
|
|
72
|
+
export type TodoAppFrom = TodoIntegrationType | 'lifestack';
|
|
73
73
|
|
|
74
74
|
export interface DateTimeSet {
|
|
75
75
|
datetime?: string;
|
|
@@ -87,7 +87,7 @@ export interface TaskRecurring {
|
|
|
87
87
|
recurrenceRule?: string;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
export type TaskPriority =
|
|
90
|
+
export type TaskPriority = 'low' | 'medium' | 'high' | 'none';
|
|
91
91
|
export interface TaskItemAdditionalParamsGithub {
|
|
92
92
|
issueNumber: number;
|
|
93
93
|
repository: string;
|
|
@@ -167,6 +167,7 @@ export interface TaskItem {
|
|
|
167
167
|
priority?: TaskPriority;
|
|
168
168
|
linkedCalendarWebhookStatus?: WebhookStatusSet;
|
|
169
169
|
taskWebhookStatus?: WebhookStatusSet;
|
|
170
|
+
aiNote?: string;
|
|
170
171
|
additionalParams?: {
|
|
171
172
|
github?: TaskItemAdditionalParamsGithub;
|
|
172
173
|
clickup?: TaskItemAdditionalParamsClickUp;
|
|
@@ -176,9 +177,9 @@ export interface TaskItem {
|
|
|
176
177
|
};
|
|
177
178
|
}
|
|
178
179
|
|
|
179
|
-
export type TeamTaskSource =
|
|
180
|
+
export type TeamTaskSource = 'shared-personal-board' | 'team-board';
|
|
180
181
|
|
|
181
|
-
export type TeamTaskBucket =
|
|
182
|
+
export type TeamTaskBucket = 'overdue' | 'today' | 'upcoming' | 'done';
|
|
182
183
|
|
|
183
184
|
export interface TeamTaskMemberSummary {
|
|
184
185
|
userId: string;
|
|
@@ -227,7 +228,7 @@ export interface TeamAssignedTaskItem extends TeamTaskItem {
|
|
|
227
228
|
}
|
|
228
229
|
|
|
229
230
|
export interface TaskRecurringInstance
|
|
230
|
-
extends Omit<TaskItem,
|
|
231
|
+
extends Omit<TaskItem, 'subTasks' | 'isRecurringChild' | 'parentTaskId'> {
|
|
231
232
|
/** Firestore doc id `${parentTaskId}_${yyyy-MM-dd}` */
|
|
232
233
|
taskId: string;
|
|
233
234
|
parentTaskId: string;
|
|
@@ -242,12 +243,12 @@ export interface TaskCategorySet {
|
|
|
242
243
|
|
|
243
244
|
export interface TaskItemDuration {
|
|
244
245
|
amount: number;
|
|
245
|
-
unit:
|
|
246
|
+
unit: 'day' | 'minute';
|
|
246
247
|
}
|
|
247
248
|
|
|
248
249
|
export type SuggestedTaskItem = Pick<
|
|
249
250
|
TaskItem,
|
|
250
|
-
|
|
251
|
+
'taskId' | 'name' | 'duration' | 'labels' | 'boardId' | 'appFrom'
|
|
251
252
|
> & {
|
|
252
253
|
energyAlignmentScore: number;
|
|
253
254
|
reasoning: string;
|
|
@@ -260,7 +261,7 @@ export type SuggestedTaskItem = Pick<
|
|
|
260
261
|
|
|
261
262
|
/////////////// Apple Reminders ///////////////
|
|
262
263
|
|
|
263
|
-
export type NativeAppleRemindersSource =
|
|
264
|
+
export type NativeAppleRemindersSource = 'Local' | 'iCloud';
|
|
264
265
|
|
|
265
266
|
export type NativeAppleRemindersList = {
|
|
266
267
|
id: string;
|
|
@@ -280,8 +281,8 @@ export type NativeAppleRemindersListArray = NativeAppleRemindersList[];
|
|
|
280
281
|
|
|
281
282
|
export type ISODateString = string;
|
|
282
283
|
export type TimeZoneId = string;
|
|
283
|
-
export type Weekday =
|
|
284
|
-
export type Proximity =
|
|
284
|
+
export type Weekday = 'SU' | 'MO' | 'TU' | 'WE' | 'TH' | 'FR' | 'SA';
|
|
285
|
+
export type Proximity = 'enter' | 'leave' | 'none';
|
|
285
286
|
export type Priority = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
286
287
|
|
|
287
288
|
/** Calendar container metadata for the reminder. */
|