@rimori/client 2.3.0-next.4 → 2.3.0-next.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.
|
@@ -18,8 +18,8 @@ export class AccomplishmentController {
|
|
|
18
18
|
throw new Error(`Invalid skill category: ${payload.skillCategory}`);
|
|
19
19
|
}
|
|
20
20
|
//regex validate accomplishmentKeyword
|
|
21
|
-
if (!/^[
|
|
22
|
-
throw new Error(`The accomplishment keyword: ${payload.accomplishmentKeyword} is invalid. Only lowercase letters, minuses and
|
|
21
|
+
if (!/^[0-9a-z_.-]+$/.test(payload.accomplishmentKeyword)) {
|
|
22
|
+
throw new Error(`The accomplishment keyword: ${payload.accomplishmentKeyword} is invalid. Only lowercase letters, minuses, underscores and periods are allowed`);
|
|
23
23
|
}
|
|
24
24
|
//description is required
|
|
25
25
|
if (payload.description.length < 10) {
|
|
@@ -11,7 +11,7 @@ export interface CreateExerciseParams {
|
|
|
11
11
|
name: string;
|
|
12
12
|
description: string;
|
|
13
13
|
estimated_duration: number;
|
|
14
|
-
|
|
14
|
+
achievement_topic: string;
|
|
15
15
|
}
|
|
16
16
|
export interface Exercise {
|
|
17
17
|
id: string;
|
|
@@ -19,6 +19,7 @@ export interface Exercise {
|
|
|
19
19
|
start_date: string;
|
|
20
20
|
end_date: string;
|
|
21
21
|
trigger_action: TriggerAction;
|
|
22
|
+
achievement_topic: string;
|
|
22
23
|
name: string;
|
|
23
24
|
description: string;
|
|
24
25
|
estimated_duration: number;
|
package/package.json
CHANGED
|
@@ -66,9 +66,9 @@ export class AccomplishmentController {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
//regex validate accomplishmentKeyword
|
|
69
|
-
if (!/^[
|
|
69
|
+
if (!/^[0-9a-z_.-]+$/.test(payload.accomplishmentKeyword)) {
|
|
70
70
|
throw new Error(
|
|
71
|
-
`The accomplishment keyword: ${payload.accomplishmentKeyword} is invalid. Only lowercase letters, minuses and
|
|
71
|
+
`The accomplishment keyword: ${payload.accomplishmentKeyword} is invalid. Only lowercase letters, minuses, underscores and periods are allowed`,
|
|
72
72
|
);
|
|
73
73
|
}
|
|
74
74
|
|
|
@@ -11,7 +11,7 @@ export interface CreateExerciseParams {
|
|
|
11
11
|
name: string;
|
|
12
12
|
description: string;
|
|
13
13
|
estimated_duration: number;
|
|
14
|
-
|
|
14
|
+
achievement_topic: string; // Required: Topic in format "skillCategory.accomplishmentKeyword" for matching accomplishments
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export interface Exercise {
|
|
@@ -20,6 +20,8 @@ export interface Exercise {
|
|
|
20
20
|
start_date: string;
|
|
21
21
|
end_date: string;
|
|
22
22
|
trigger_action: TriggerAction;
|
|
23
|
+
// topic that identifies the accomplishment that the exercise is related to
|
|
24
|
+
achievement_topic: string;
|
|
23
25
|
name: string;
|
|
24
26
|
description: string;
|
|
25
27
|
estimated_duration: number;
|