@demind-inc/core 1.8.4 → 1.9.0

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/constants.js CHANGED
@@ -69,6 +69,7 @@ exports.AVAILABLE_TODO_INTEGRATIONS_TYPE = [
69
69
  "trello",
70
70
  "todoist",
71
71
  "ticktick",
72
+ "clickup",
72
73
  "github",
73
74
  "notion",
74
75
  ];
@@ -76,6 +77,7 @@ exports.ALL_TODO_INTEGRATIONS_TYPE = [
76
77
  "trello",
77
78
  "todoist",
78
79
  "ticktick",
80
+ "clickup",
79
81
  "github",
80
82
  "notion",
81
83
  "apple-reminders",
@@ -105,7 +105,7 @@ export interface CalendarRoutineFrom {
105
105
  routineActivityId: string;
106
106
  completed?: boolean;
107
107
  }
108
- export type CalendarScheduleFrom = "todo" | "activity" | "calendar" | "energyBoost" | "aiScheduler" | "sleep" | "meal" | "routine";
108
+ export type CalendarScheduleFrom = "todo" | "activity" | "calendar" | "energyBoost" | "aiScheduler" | "sleep" | "meal" | "routine" | "workout";
109
109
  export type CalendarEventType = "default" | "outOfOffice" | "focusTime" | "workingLocation" | "other";
110
110
  export interface CalendarEventUser {
111
111
  email: string;
@@ -139,16 +139,59 @@ export interface MealSuggestionPayload {
139
139
  end_time?: string;
140
140
  }
141
141
  export type ContentType = "workout_plan" | "checklist" | "find_location" | "meal_suggestion" | "transit_route" | "journal_prompts" | "audio_player" | "energy_summary" | "sleep_summary" | "metric_bar" | "meal_plan_week" | (string & {});
142
- export type ContentPayload = {
143
- plan_title: string;
144
- difficulty: "beginner" | "intermediate" | "advanced";
145
- exercises: {
146
- name: string;
147
- sets: number;
148
- reps: number;
149
- note: string | null;
150
- }[];
151
- } | {
142
+ export type WorkoutType = "gym" | "running" | "walking" | "cycling" | "swimming" | "rowing" | "hiking" | "yoga" | "other";
143
+ export type DifficultyLevel = "beginner" | "intermediate" | "advanced";
144
+ export type ActivityType = "running" | "walking" | "cycling" | "swimming" | "rowing" | "hiking" | "gym" | "yoga" | "other";
145
+ export interface HeartRateZoneData {
146
+ zone?: string | null;
147
+ min_hr_bpm?: number | null;
148
+ max_hr_bpm?: number | null;
149
+ duration_seconds?: number | null;
150
+ }
151
+ export interface MovementData {
152
+ avg_speed_meters_per_second?: number | null;
153
+ max_speed_meters_per_second?: number | null;
154
+ avg_pace_minutes_per_kilometer?: number | null;
155
+ max_pace_minutes_per_kilometer?: number | null;
156
+ avg_cadence_rpm?: number | null;
157
+ max_cadence_rpm?: number | null;
158
+ }
159
+ export interface DistanceData {
160
+ distance_meters?: number | null;
161
+ steps?: number | null;
162
+ elevation_gain_meters?: number | null;
163
+ elevation_loss_meters?: number | null;
164
+ floors_climbed?: number | null;
165
+ }
166
+ export interface CaloriesData {
167
+ total_burned_calories?: number | null;
168
+ net_activity_calories?: number | null;
169
+ }
170
+ export interface HeartRateData {
171
+ avg_hr_bpm?: number | null;
172
+ max_hr_bpm?: number | null;
173
+ min_hr_bpm?: number | null;
174
+ avg_hrv_rmssd?: number | null;
175
+ hr_zone_data?: HeartRateZoneData[];
176
+ }
177
+ export interface ActiveDurationsData {
178
+ activity_seconds?: number | null;
179
+ low_intensity_seconds?: number | null;
180
+ moderate_intensity_seconds?: number | null;
181
+ vigorous_intensity_seconds?: number | null;
182
+ rest_seconds?: number | null;
183
+ }
184
+ export interface WorkoutActivityData {
185
+ activity_type?: ActivityType | null;
186
+ start_time: string;
187
+ end_time: string;
188
+ movement_data?: MovementData | null;
189
+ distance_data?: DistanceData | null;
190
+ calories_data?: CaloriesData | null;
191
+ heart_rate_data?: HeartRateData | null;
192
+ active_durations_data?: ActiveDurationsData | null;
193
+ }
194
+ export type ContentPayload = WorkoutActivityData | {
152
195
  label: string | null;
153
196
  items: {
154
197
  text: string;
@@ -1,5 +1,5 @@
1
1
  import { DocumentReference } from "@google-cloud/firestore";
2
- export type TodoIntegrationType = "trello" | "todoist" | "ticktick" | "notion" | "github" | "apple-reminders";
2
+ export type TodoIntegrationType = "trello" | "todoist" | "ticktick" | "clickup" | "notion" | "github" | "apple-reminders";
3
3
  export interface TodoIntegration {
4
4
  todoIntegrationId: string;
5
5
  source: TodoIntegrationType;
@@ -9,10 +9,17 @@ export interface TodoTasksBoardAdditionalParamsGithub {
9
9
  owner: string;
10
10
  repositories: string[];
11
11
  }
12
+ export interface TodoTasksBoardAdditionalParamsClickUp {
13
+ listId: string;
14
+ spaceId: string;
15
+ teamId: string;
16
+ folderId?: string;
17
+ }
12
18
  export interface TodoTasksBoardWebhook {
13
19
  resourceId: string;
14
20
  active: boolean;
15
21
  url?: string;
22
+ secret?: string;
16
23
  rawJson?: any;
17
24
  }
18
25
  export interface TodoTasksBoardAdditionalParamsTodoist {
@@ -35,6 +42,7 @@ export interface TodoTasksBoard {
35
42
  userPersona?: string;
36
43
  additionalParams?: {
37
44
  github?: TodoTasksBoardAdditionalParamsGithub;
45
+ clickup?: TodoTasksBoardAdditionalParamsClickUp;
38
46
  todoist?: TodoTasksBoardAdditionalParamsTodoist;
39
47
  [key: string]: any;
40
48
  };
@@ -79,6 +87,9 @@ export interface TaskItemAdditionalParamsGithub {
79
87
  total: number;
80
88
  };
81
89
  }
90
+ export interface TaskItemAdditionalParamsClickUp {
91
+ clickupId: string;
92
+ }
82
93
  export interface TaskItemAdditionalParamsTodoist {
83
94
  v2Id: string;
84
95
  }
@@ -123,6 +134,7 @@ export interface TaskItem {
123
134
  taskWebhookStatus?: WebhookStatusSet;
124
135
  additionalParams?: {
125
136
  github?: TaskItemAdditionalParamsGithub;
137
+ clickup?: TaskItemAdditionalParamsClickUp;
126
138
  todoist?: TaskItemAdditionalParamsTodoist;
127
139
  [key: string]: any;
128
140
  };
@@ -6,6 +6,7 @@ export interface Token {
6
6
  trello?: TokenInfo;
7
7
  todoist?: TokenInfo;
8
8
  ticktick?: TokenInfo;
9
+ clickup?: TokenInfo;
9
10
  github?: TokenInfo;
10
11
  google_calendars?: CalendarTokenInfo[];
11
12
  calendly?: TokenInfo;
package/lib/constants.ts CHANGED
@@ -77,6 +77,7 @@ export const AVAILABLE_TODO_INTEGRATIONS_TYPE: TodoIntegrationType[] = [
77
77
  "trello",
78
78
  "todoist",
79
79
  "ticktick",
80
+ "clickup",
80
81
  "github",
81
82
  "notion",
82
83
  ];
@@ -84,6 +85,7 @@ export const ALL_TODO_INTEGRATIONS_TYPE: TodoIntegrationType[] = [
84
85
  "trello",
85
86
  "todoist",
86
87
  "ticktick",
88
+ "clickup",
87
89
  "github",
88
90
  "notion",
89
91
  "apple-reminders",
@@ -122,7 +122,8 @@ export type CalendarScheduleFrom =
122
122
  | "aiScheduler"
123
123
  | "sleep"
124
124
  | "meal"
125
- | "routine";
125
+ | "routine"
126
+ | "workout";
126
127
 
127
128
  export type CalendarEventType =
128
129
  | "default"
@@ -217,18 +217,90 @@ export type ContentType =
217
217
  | "meal_plan_week"
218
218
  | (string & {});
219
219
 
220
+ export type WorkoutType =
221
+ | "gym"
222
+ | "running"
223
+ | "walking"
224
+ | "cycling"
225
+ | "swimming"
226
+ | "rowing"
227
+ | "hiking"
228
+ | "yoga"
229
+ | "other";
230
+
231
+ export type DifficultyLevel = "beginner" | "intermediate" | "advanced";
232
+
233
+ export type ActivityType =
234
+ | "running"
235
+ | "walking"
236
+ | "cycling"
237
+ | "swimming"
238
+ | "rowing"
239
+ | "hiking"
240
+ | "gym"
241
+ | "yoga"
242
+ | "other";
243
+
244
+ // ── Recorded activity ─────────────────────────────────────────────────────────
245
+
246
+ export interface HeartRateZoneData {
247
+ zone?: string | null;
248
+ min_hr_bpm?: number | null;
249
+ max_hr_bpm?: number | null;
250
+ duration_seconds?: number | null;
251
+ }
252
+
253
+ export interface MovementData {
254
+ avg_speed_meters_per_second?: number | null;
255
+ max_speed_meters_per_second?: number | null;
256
+ avg_pace_minutes_per_kilometer?: number | null;
257
+ max_pace_minutes_per_kilometer?: number | null;
258
+ avg_cadence_rpm?: number | null;
259
+ max_cadence_rpm?: number | null;
260
+ }
261
+
262
+ export interface DistanceData {
263
+ distance_meters?: number | null;
264
+ steps?: number | null;
265
+ elevation_gain_meters?: number | null;
266
+ elevation_loss_meters?: number | null;
267
+ floors_climbed?: number | null;
268
+ }
269
+
270
+ export interface CaloriesData {
271
+ total_burned_calories?: number | null;
272
+ net_activity_calories?: number | null;
273
+ }
274
+
275
+ export interface HeartRateData {
276
+ avg_hr_bpm?: number | null;
277
+ max_hr_bpm?: number | null;
278
+ min_hr_bpm?: number | null;
279
+ avg_hrv_rmssd?: number | null;
280
+ hr_zone_data?: HeartRateZoneData[];
281
+ }
282
+
283
+ export interface ActiveDurationsData {
284
+ activity_seconds?: number | null;
285
+ low_intensity_seconds?: number | null;
286
+ moderate_intensity_seconds?: number | null;
287
+ vigorous_intensity_seconds?: number | null;
288
+ rest_seconds?: number | null;
289
+ }
290
+
291
+ export interface WorkoutActivityData {
292
+ activity_type?: ActivityType | null;
293
+ start_time: string;
294
+ end_time: string;
295
+ movement_data?: MovementData | null;
296
+ distance_data?: DistanceData | null;
297
+ calories_data?: CaloriesData | null;
298
+ heart_rate_data?: HeartRateData | null;
299
+ active_durations_data?: ActiveDurationsData | null;
300
+ }
301
+
220
302
  export type ContentPayload =
221
- | {
222
- // workout_plan
223
- plan_title: string;
224
- difficulty: "beginner" | "intermediate" | "advanced";
225
- exercises: {
226
- name: string;
227
- sets: number;
228
- reps: number;
229
- note: string | null;
230
- }[];
231
- }
303
+ | WorkoutActivityData
232
304
  | {
233
305
  // checklist
234
306
  label: string | null;
@@ -4,6 +4,7 @@ export type TodoIntegrationType =
4
4
  | "trello"
5
5
  | "todoist"
6
6
  | "ticktick"
7
+ | "clickup"
7
8
  | "notion"
8
9
  | "github"
9
10
  | "apple-reminders";
@@ -12,10 +12,18 @@ export interface TodoTasksBoardAdditionalParamsGithub {
12
12
  repositories: string[];
13
13
  }
14
14
 
15
+ export interface TodoTasksBoardAdditionalParamsClickUp {
16
+ listId: string;
17
+ spaceId: string;
18
+ teamId: string;
19
+ folderId?: string;
20
+ }
21
+
15
22
  export interface TodoTasksBoardWebhook {
16
23
  resourceId: string;
17
24
  active: boolean;
18
25
  url?: string;
26
+ secret?: string;
19
27
  rawJson?: any;
20
28
  }
21
29
 
@@ -39,6 +47,7 @@ export interface TodoTasksBoard {
39
47
  userPersona?: string;
40
48
  additionalParams?: {
41
49
  github?: TodoTasksBoardAdditionalParamsGithub;
50
+ clickup?: TodoTasksBoardAdditionalParamsClickUp;
42
51
  todoist?: TodoTasksBoardAdditionalParamsTodoist;
43
52
  [key: string]: any;
44
53
  };
@@ -89,6 +98,10 @@ export interface TaskItemAdditionalParamsGithub {
89
98
  };
90
99
  }
91
100
 
101
+ export interface TaskItemAdditionalParamsClickUp {
102
+ clickupId: string;
103
+ }
104
+
92
105
  export interface TaskItemAdditionalParamsTodoist {
93
106
  v2Id: string;
94
107
  }
@@ -135,6 +148,7 @@ export interface TaskItem {
135
148
  taskWebhookStatus?: WebhookStatusSet;
136
149
  additionalParams?: {
137
150
  github?: TaskItemAdditionalParamsGithub;
151
+ clickup?: TaskItemAdditionalParamsClickUp;
138
152
  todoist?: TaskItemAdditionalParamsTodoist;
139
153
  [key: string]: any;
140
154
  };
@@ -6,6 +6,7 @@ export interface Token {
6
6
  trello?: TokenInfo;
7
7
  todoist?: TokenInfo;
8
8
  ticktick?: TokenInfo;
9
+ clickup?: TokenInfo;
9
10
  github?: TokenInfo;
10
11
  google_calendars?: CalendarTokenInfo[];
11
12
  calendly?: TokenInfo;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@demind-inc/core",
3
- "version": "1.8.4",
3
+ "version": "1.9.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {