@crimson-education/sdk 0.3.15 → 0.3.16
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/core/client.d.ts +2 -0
- package/dist/core/client.js +2 -0
- package/dist/core/gradeTemplates.d.ts +31 -11
- package/dist/core/gradeTemplates.js +13 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +3 -1
- package/dist/core/missionLibrary.d.ts +10 -0
- package/dist/core/missionLibrary.js +9 -1
- package/dist/core/tasks.d.ts +1 -1
- package/dist/core/types.d.ts +13 -0
- package/dist/react/hooks/index.d.ts +1 -0
- package/dist/react/hooks/index.js +1 -0
- package/dist/react/hooks/useGradeTemplates.d.ts +2 -1
- package/dist/react/hooks/useGradeTemplates.js +2 -2
- package/dist/react/hooks/useMissionLibrary.d.ts +2 -2
- package/dist/react/hooks/useMissions.d.ts +1 -1
- package/dist/react/hooks/useTasks.d.ts +1 -1
- package/package.json +1 -1
package/dist/core/client.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CrimsonClientConfig } from "./types";
|
|
2
2
|
import { MissionsApi } from "./missions";
|
|
3
3
|
import { TasksApi } from "./tasks";
|
|
4
|
+
import { ReflectionsApi } from "./reflections";
|
|
4
5
|
import { RoadmapApi } from "./roadmap";
|
|
5
6
|
import { MissionLibraryApi } from "./missionLibrary";
|
|
6
7
|
import { UsersApi } from "./users";
|
|
@@ -105,6 +106,7 @@ export declare class CrimsonClient {
|
|
|
105
106
|
destroy(): void;
|
|
106
107
|
missions: MissionsApi;
|
|
107
108
|
tasks: TasksApi;
|
|
109
|
+
reflections: ReflectionsApi;
|
|
108
110
|
roadmap: RoadmapApi;
|
|
109
111
|
library: MissionLibraryApi;
|
|
110
112
|
users: UsersApi;
|
package/dist/core/client.js
CHANGED
|
@@ -13,6 +13,7 @@ exports.CrimsonClient = void 0;
|
|
|
13
13
|
exports.createCrimsonClient = createCrimsonClient;
|
|
14
14
|
const missions_1 = require("./missions");
|
|
15
15
|
const tasks_1 = require("./tasks");
|
|
16
|
+
const reflections_1 = require("./reflections");
|
|
16
17
|
const roadmap_1 = require("./roadmap");
|
|
17
18
|
const missionLibrary_1 = require("./missionLibrary");
|
|
18
19
|
const users_1 = require("./users");
|
|
@@ -48,6 +49,7 @@ class CrimsonClient {
|
|
|
48
49
|
this.isResolvingDomain = false;
|
|
49
50
|
this.missions = new missions_1.MissionsApi(this);
|
|
50
51
|
this.tasks = new tasks_1.TasksApi(this);
|
|
52
|
+
this.reflections = new reflections_1.ReflectionsApi(this);
|
|
51
53
|
this.roadmap = new roadmap_1.RoadmapApi(this);
|
|
52
54
|
this.library = new missionLibrary_1.MissionLibraryApi(this);
|
|
53
55
|
this.users = new users_1.UsersApi(this);
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import type { CrimsonClient } from "./client";
|
|
2
|
+
export type GradeTemplateType = "grade" | "general";
|
|
3
|
+
export type GradeTemplateGroup = "shared" | "custom";
|
|
4
|
+
export type GradeTemplateDivision = "US" | "UK";
|
|
2
5
|
export interface GradeTemplateMission {
|
|
3
6
|
id: string;
|
|
4
7
|
gradeTemplateId: string;
|
|
5
8
|
templateMissionId: string;
|
|
6
9
|
startYearOffset?: number;
|
|
7
|
-
startMonth
|
|
10
|
+
startMonth?: number | null;
|
|
8
11
|
startDay?: number;
|
|
9
12
|
endYearOffset?: number;
|
|
10
|
-
endMonth
|
|
13
|
+
endMonth?: number | null;
|
|
11
14
|
endDay?: number;
|
|
15
|
+
orderIndex?: number;
|
|
12
16
|
createdAt: string;
|
|
13
17
|
updatedAt: string;
|
|
14
18
|
title?: string;
|
|
@@ -33,23 +37,30 @@ export interface GradeTemplateTask {
|
|
|
33
37
|
}
|
|
34
38
|
export interface CreateGradeTemplateMissionInput {
|
|
35
39
|
templateMissionId: string;
|
|
40
|
+
tenantId?: string;
|
|
36
41
|
startYearOffset?: number;
|
|
37
|
-
startMonth
|
|
42
|
+
startMonth?: number | null;
|
|
38
43
|
startDay?: number;
|
|
39
44
|
endYearOffset?: number;
|
|
40
|
-
endMonth
|
|
45
|
+
endMonth?: number | null;
|
|
41
46
|
endDay?: number;
|
|
47
|
+
orderIndex?: number;
|
|
42
48
|
}
|
|
43
49
|
export interface GradeTemplateBrief {
|
|
44
50
|
id: string;
|
|
45
51
|
title: string;
|
|
46
|
-
|
|
52
|
+
type?: GradeTemplateType;
|
|
53
|
+
division?: GradeTemplateDivision[] | null;
|
|
54
|
+
creatorId?: string;
|
|
55
|
+
group?: GradeTemplateGroup;
|
|
56
|
+
gradeLevel?: number | null;
|
|
47
57
|
startYearOffset?: number;
|
|
48
|
-
startMonth
|
|
58
|
+
startMonth?: number | null;
|
|
49
59
|
startDay?: number;
|
|
50
60
|
endYearOffset?: number;
|
|
51
|
-
endMonth
|
|
61
|
+
endMonth?: number | null;
|
|
52
62
|
endDay?: number;
|
|
63
|
+
numMissions?: number;
|
|
53
64
|
}
|
|
54
65
|
export interface GradeTemplate extends GradeTemplateBrief {
|
|
55
66
|
missions: GradeTemplateMission[];
|
|
@@ -58,18 +69,27 @@ export interface GradeTemplate extends GradeTemplateBrief {
|
|
|
58
69
|
}
|
|
59
70
|
export interface CreateGradeTemplateInput {
|
|
60
71
|
title: string;
|
|
61
|
-
|
|
72
|
+
tenantId?: string;
|
|
73
|
+
type?: GradeTemplateType;
|
|
74
|
+
division?: GradeTemplateDivision[] | null;
|
|
75
|
+
creatorId?: string;
|
|
76
|
+
group?: GradeTemplateGroup;
|
|
77
|
+
gradeLevel?: number | null;
|
|
62
78
|
startYearOffset?: number;
|
|
63
|
-
startMonth
|
|
79
|
+
startMonth?: number | null;
|
|
64
80
|
startDay?: number;
|
|
65
81
|
endYearOffset?: number;
|
|
66
|
-
endMonth
|
|
82
|
+
endMonth?: number | null;
|
|
67
83
|
endDay?: number;
|
|
68
84
|
}
|
|
69
85
|
export interface GradeTemplateFilters {
|
|
70
86
|
ids?: string[];
|
|
71
87
|
startGrade?: number;
|
|
72
88
|
endGrade?: number;
|
|
89
|
+
groups?: GradeTemplateGroup[];
|
|
90
|
+
type?: GradeTemplateType;
|
|
91
|
+
division?: GradeTemplateDivision[];
|
|
92
|
+
numMissions?: boolean;
|
|
73
93
|
}
|
|
74
94
|
export interface AddGradeTemplateToRoadmapInput {
|
|
75
95
|
studentId: string;
|
|
@@ -95,7 +115,7 @@ export declare class GradeTemplatesApi {
|
|
|
95
115
|
/**
|
|
96
116
|
* List grade templates
|
|
97
117
|
*/
|
|
98
|
-
listGradeTemplates(filters?: GradeTemplateFilters): Promise<
|
|
118
|
+
listGradeTemplates(filters?: GradeTemplateFilters): Promise<GradeTemplateBrief[]>;
|
|
99
119
|
/**
|
|
100
120
|
* Get grade template by ID
|
|
101
121
|
*/
|
|
@@ -19,6 +19,7 @@ class GradeTemplatesApi {
|
|
|
19
19
|
*/
|
|
20
20
|
listGradeTemplates(filters) {
|
|
21
21
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
var _a, _b;
|
|
22
23
|
const params = new URLSearchParams();
|
|
23
24
|
if ((filters === null || filters === void 0 ? void 0 : filters.startGrade) !== undefined) {
|
|
24
25
|
params.append("startgrade", String(filters.startGrade));
|
|
@@ -26,6 +27,18 @@ class GradeTemplatesApi {
|
|
|
26
27
|
if ((filters === null || filters === void 0 ? void 0 : filters.endGrade) !== undefined) {
|
|
27
28
|
params.append("endgrade", String(filters.endGrade));
|
|
28
29
|
}
|
|
30
|
+
if ((_a = filters === null || filters === void 0 ? void 0 : filters.groups) === null || _a === void 0 ? void 0 : _a.length) {
|
|
31
|
+
params.append("groups", filters.groups.join(","));
|
|
32
|
+
}
|
|
33
|
+
if (filters === null || filters === void 0 ? void 0 : filters.type) {
|
|
34
|
+
params.append("type", filters.type);
|
|
35
|
+
}
|
|
36
|
+
if ((_b = filters === null || filters === void 0 ? void 0 : filters.division) === null || _b === void 0 ? void 0 : _b.length) {
|
|
37
|
+
params.append("division", filters.division.join(","));
|
|
38
|
+
}
|
|
39
|
+
if ((filters === null || filters === void 0 ? void 0 : filters.numMissions) !== undefined) {
|
|
40
|
+
params.append("numMissions", String(filters.numMissions));
|
|
41
|
+
}
|
|
29
42
|
const query = params.toString();
|
|
30
43
|
const path = query
|
|
31
44
|
? `/roadmap/grade-templates?${query}`
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { CrimsonClient, createCrimsonClient } from "./client";
|
|
2
2
|
export { MissionsApi } from "./missions";
|
|
3
3
|
export { TasksApi, type TaskFilters, type TaskOrderBy } from "./tasks";
|
|
4
|
+
export { ReflectionsApi, type CreateReflectionInput, type UpdateReflectionInput, type BatchUpdateReflectionsInput, type ListReflectionsResponse, type GroupedMission, type ReflectionComment, type AddReflectionCommentInput } from "./reflections";
|
|
4
5
|
export { RoadmapApi } from "./roadmap";
|
|
5
6
|
export { MissionLibraryApi } from "./missionLibrary";
|
|
6
7
|
export { UsersApi } from "./users";
|
package/dist/core/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.generateState = exports.generateCodeChallenge = exports.generateCodeVerifier = exports.createDefaultTokenStorage = exports.MemoryTokenStorage = exports.SessionStorageTokenStorage = exports.LocalStorageTokenStorage = exports.TokenManager = exports.createCrimsonOAuthAdapter = exports.OAuthAdapter = exports.IndigoApi = exports.StudentProfileApi = exports.AccountApi = exports.UsersApi = exports.MissionLibraryApi = exports.RoadmapApi = exports.TasksApi = exports.MissionsApi = exports.createCrimsonClient = exports.CrimsonClient = void 0;
|
|
17
|
+
exports.generateState = exports.generateCodeChallenge = exports.generateCodeVerifier = exports.createDefaultTokenStorage = exports.MemoryTokenStorage = exports.SessionStorageTokenStorage = exports.LocalStorageTokenStorage = exports.TokenManager = exports.createCrimsonOAuthAdapter = exports.OAuthAdapter = exports.IndigoApi = exports.StudentProfileApi = exports.AccountApi = exports.UsersApi = exports.MissionLibraryApi = exports.RoadmapApi = exports.ReflectionsApi = exports.TasksApi = exports.MissionsApi = exports.createCrimsonClient = exports.CrimsonClient = void 0;
|
|
18
18
|
var client_1 = require("./client");
|
|
19
19
|
Object.defineProperty(exports, "CrimsonClient", { enumerable: true, get: function () { return client_1.CrimsonClient; } });
|
|
20
20
|
Object.defineProperty(exports, "createCrimsonClient", { enumerable: true, get: function () { return client_1.createCrimsonClient; } });
|
|
@@ -22,6 +22,8 @@ var missions_1 = require("./missions");
|
|
|
22
22
|
Object.defineProperty(exports, "MissionsApi", { enumerable: true, get: function () { return missions_1.MissionsApi; } });
|
|
23
23
|
var tasks_1 = require("./tasks");
|
|
24
24
|
Object.defineProperty(exports, "TasksApi", { enumerable: true, get: function () { return tasks_1.TasksApi; } });
|
|
25
|
+
var reflections_1 = require("./reflections");
|
|
26
|
+
Object.defineProperty(exports, "ReflectionsApi", { enumerable: true, get: function () { return reflections_1.ReflectionsApi; } });
|
|
25
27
|
var roadmap_1 = require("./roadmap");
|
|
26
28
|
Object.defineProperty(exports, "RoadmapApi", { enumerable: true, get: function () { return roadmap_1.RoadmapApi; } });
|
|
27
29
|
var missionLibrary_1 = require("./missionLibrary");
|
|
@@ -6,6 +6,8 @@ export interface TemplateMissionFilters extends PaginationParams {
|
|
|
6
6
|
groups?: string[];
|
|
7
7
|
keyword?: string;
|
|
8
8
|
userId?: string;
|
|
9
|
+
division?: string;
|
|
10
|
+
attr?: Record<string, any>;
|
|
9
11
|
}
|
|
10
12
|
export interface TemplateTaskFilters extends PaginationParams {
|
|
11
13
|
categories?: string[];
|
|
@@ -20,11 +22,15 @@ export interface TemplateTaskUpdateInput {
|
|
|
20
22
|
title?: string;
|
|
21
23
|
description?: string;
|
|
22
24
|
operation: string;
|
|
25
|
+
visibleSc?: boolean;
|
|
26
|
+
visibleRoadmap?: boolean;
|
|
23
27
|
}
|
|
24
28
|
export interface TemplateMissionUpdateInput {
|
|
25
29
|
title?: string;
|
|
26
30
|
description?: string;
|
|
27
31
|
tasks?: TemplateTaskUpdateInput[];
|
|
32
|
+
visibleSc?: boolean;
|
|
33
|
+
visibleRoadmap?: boolean;
|
|
28
34
|
}
|
|
29
35
|
export interface CopyTemplateMissionInput {
|
|
30
36
|
linkId: string;
|
|
@@ -44,10 +50,14 @@ export interface TemplateMissionCreateInput {
|
|
|
44
50
|
description: string;
|
|
45
51
|
category: string;
|
|
46
52
|
subcategory: string;
|
|
53
|
+
visibleSc?: boolean;
|
|
54
|
+
visibleRoadmap?: boolean;
|
|
47
55
|
tasks: {
|
|
48
56
|
id?: string | null;
|
|
49
57
|
description: string;
|
|
50
58
|
content: string;
|
|
59
|
+
visibleSc?: boolean;
|
|
60
|
+
visibleRoadmap?: boolean;
|
|
51
61
|
}[];
|
|
52
62
|
}
|
|
53
63
|
export interface AddTemplateMissionToRoadmapInput {
|
|
@@ -36,6 +36,12 @@ class MissionLibraryApi {
|
|
|
36
36
|
if (filters === null || filters === void 0 ? void 0 : filters.userId) {
|
|
37
37
|
params.append("userId", filters.userId);
|
|
38
38
|
}
|
|
39
|
+
if (filters === null || filters === void 0 ? void 0 : filters.division) {
|
|
40
|
+
params.append("division", filters.division);
|
|
41
|
+
}
|
|
42
|
+
if (filters === null || filters === void 0 ? void 0 : filters.attr) {
|
|
43
|
+
params.append("attr", JSON.stringify(filters.attr));
|
|
44
|
+
}
|
|
39
45
|
if ((filters === null || filters === void 0 ? void 0 : filters.start) !== undefined) {
|
|
40
46
|
params.append("start", String(filters.start));
|
|
41
47
|
}
|
|
@@ -167,11 +173,13 @@ class MissionLibraryApi {
|
|
|
167
173
|
*/
|
|
168
174
|
updateTemplateMission(id, raw, update) {
|
|
169
175
|
return __awaiter(this, void 0, void 0, function* () {
|
|
170
|
-
var _a, _b;
|
|
176
|
+
var _a, _b, _c, _d;
|
|
171
177
|
const data = {
|
|
172
178
|
title: (_a = update.title) !== null && _a !== void 0 ? _a : raw.title,
|
|
173
179
|
description: (_b = update.description) !== null && _b !== void 0 ? _b : raw.description,
|
|
174
180
|
tasks: update.tasks || [],
|
|
181
|
+
visibleSc: (_c = update.visibleSc) !== null && _c !== void 0 ? _c : raw.visibleSc,
|
|
182
|
+
visibleRoadmap: (_d = update.visibleRoadmap) !== null && _d !== void 0 ? _d : raw.visibleRoadmap,
|
|
175
183
|
// only allow updatecustom
|
|
176
184
|
type: 'custom',
|
|
177
185
|
category: raw.category,
|
package/dist/core/tasks.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export declare class TasksApi {
|
|
|
41
41
|
missionLinkIds?: string[];
|
|
42
42
|
roadmapId?: string;
|
|
43
43
|
userId?: string;
|
|
44
|
-
}, filters?: TaskFilters): Promise<
|
|
44
|
+
}, filters?: TaskFilters): Promise<Task[]> | Promise<PaginatedResult<Task>>;
|
|
45
45
|
/**
|
|
46
46
|
* List tasks with pagination (requires roadmapId, always returns paginated result)
|
|
47
47
|
*/
|
package/dist/core/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { OAuthConfig, TokenStorage } from "./auth/types";
|
|
2
|
+
import type { ReflectionComment } from "./reflections";
|
|
2
3
|
/**
|
|
3
4
|
* OAuth-specific configuration for CrimsonClient
|
|
4
5
|
*/
|
|
@@ -108,9 +109,15 @@ export interface Task {
|
|
|
108
109
|
mission?: {
|
|
109
110
|
id: string;
|
|
110
111
|
title: string;
|
|
112
|
+
status?: string;
|
|
111
113
|
linkId?: string;
|
|
112
114
|
};
|
|
113
115
|
createdAt?: string;
|
|
116
|
+
/** comment summary attached to reflection-type tasks */
|
|
117
|
+
comments?: {
|
|
118
|
+
total: number;
|
|
119
|
+
latest?: ReflectionComment;
|
|
120
|
+
};
|
|
114
121
|
}
|
|
115
122
|
export interface Mission {
|
|
116
123
|
id: string;
|
|
@@ -213,6 +220,8 @@ export interface TemplateMission {
|
|
|
213
220
|
actionItemCount?: number;
|
|
214
221
|
actionItems?: TemplateTask[];
|
|
215
222
|
resources?: TemplateMissionResource[];
|
|
223
|
+
visibleSc?: boolean;
|
|
224
|
+
visibleRoadmap?: boolean;
|
|
216
225
|
createdAt?: string;
|
|
217
226
|
updatedAt?: string;
|
|
218
227
|
}
|
|
@@ -236,6 +245,8 @@ export interface MissionDetail {
|
|
|
236
245
|
members?: string[];
|
|
237
246
|
integrationSource?: string;
|
|
238
247
|
attr?: string;
|
|
248
|
+
visibleSc?: boolean;
|
|
249
|
+
visibleRoadmap?: boolean;
|
|
239
250
|
actionItems?: Array<{
|
|
240
251
|
id: string;
|
|
241
252
|
description: string;
|
|
@@ -249,6 +260,8 @@ export interface MissionDetail {
|
|
|
249
260
|
taskGroup?: string;
|
|
250
261
|
attr?: string;
|
|
251
262
|
resources?: TemplateTaskResource[];
|
|
263
|
+
visibleSc?: boolean;
|
|
264
|
+
visibleRoadmap?: boolean;
|
|
252
265
|
}>;
|
|
253
266
|
resources?: TemplateMissionResource[];
|
|
254
267
|
}
|
|
@@ -11,3 +11,4 @@ export { useTemplateMissions, useTemplateMissionsInfinite, useTemplateTasks, use
|
|
|
11
11
|
export { useStudentProfile, useStudentPrefilledInfo, studentProfileKeys, } from "./useStudentProfile";
|
|
12
12
|
export { useIndigoMe, useStudentTutors, useTutorStudents, indigoKeys, } from "./useIndigo";
|
|
13
13
|
export * from "./useGradeTemplates";
|
|
14
|
+
export * from "./useReflections";
|
|
@@ -82,3 +82,4 @@ Object.defineProperty(exports, "useStudentTutors", { enumerable: true, get: func
|
|
|
82
82
|
Object.defineProperty(exports, "useTutorStudents", { enumerable: true, get: function () { return useIndigo_1.useTutorStudents; } });
|
|
83
83
|
Object.defineProperty(exports, "indigoKeys", { enumerable: true, get: function () { return useIndigo_1.indigoKeys; } });
|
|
84
84
|
__exportStar(require("./useGradeTemplates"), exports);
|
|
85
|
+
__exportStar(require("./useReflections"), exports);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { GradeTemplateFilters, CreateGradeTemplateInput, CreateGradeTemplateMissionInput, AddGradeTemplateToRoadmapInput } from "../../core/gradeTemplates";
|
|
2
|
+
export type { GradeTemplateFilters } from "../../core/gradeTemplates";
|
|
2
3
|
export declare const gradeTemplateKeys: {
|
|
3
4
|
all: readonly ["gradeTemplates"];
|
|
4
5
|
list: (filters?: GradeTemplateFilters) => readonly ["gradeTemplates", "list", GradeTemplateFilters | undefined];
|
|
5
6
|
detail: (id: string) => readonly ["gradeTemplates", "detail", string];
|
|
6
7
|
};
|
|
7
|
-
export declare function useGradeTemplates(filters?: GradeTemplateFilters, enabled?: boolean): import("@tanstack/react-query").UseQueryResult<import("../../core/gradeTemplates").
|
|
8
|
+
export declare function useGradeTemplates(filters?: GradeTemplateFilters, enabled?: boolean): import("@tanstack/react-query").UseQueryResult<import("../../core/gradeTemplates").GradeTemplateBrief[], Error>;
|
|
8
9
|
export declare function useGradeTemplate(id: string, enabled?: boolean): import("@tanstack/react-query").UseQueryResult<import("../../core/gradeTemplates").GradeTemplate, Error>;
|
|
9
10
|
export declare function useCreateGradeTemplate(): import("@tanstack/react-query").UseMutationResult<import("../../core/gradeTemplates").GradeTemplate, Error, CreateGradeTemplateInput, unknown>;
|
|
10
11
|
export declare function useDeleteGradeTemplate(): import("@tanstack/react-query").UseMutationResult<void, Error, string, unknown>;
|
|
@@ -43,7 +43,7 @@ function useCreateGradeTemplate() {
|
|
|
43
43
|
mutationFn: (input) => client.gradeTemplates.createGradeTemplate(input),
|
|
44
44
|
onSuccess: () => {
|
|
45
45
|
queryClient.invalidateQueries({
|
|
46
|
-
queryKey: exports.gradeTemplateKeys.
|
|
46
|
+
queryKey: exports.gradeTemplateKeys.all,
|
|
47
47
|
});
|
|
48
48
|
},
|
|
49
49
|
});
|
|
@@ -55,7 +55,7 @@ function useDeleteGradeTemplate() {
|
|
|
55
55
|
mutationFn: (id) => client.gradeTemplates.deleteGradeTemplate(id),
|
|
56
56
|
onSuccess: () => {
|
|
57
57
|
queryClient.invalidateQueries({
|
|
58
|
-
queryKey: exports.gradeTemplateKeys.
|
|
58
|
+
queryKey: exports.gradeTemplateKeys.all,
|
|
59
59
|
});
|
|
60
60
|
},
|
|
61
61
|
});
|
|
@@ -3,9 +3,9 @@ import type { TemplateMissionFilters, TemplateTaskFilters, CopyTemplateMissionIn
|
|
|
3
3
|
export declare const missionLibraryKeys: {
|
|
4
4
|
all: readonly ["missionLibrary"];
|
|
5
5
|
missions: (filters?: TemplateMissionFilters) => readonly ["missionLibrary", "missions", TemplateMissionFilters | undefined];
|
|
6
|
-
missionsInfinite: (filters?: Omit<TemplateMissionFilters, "start" | "limit">) => readonly ["missionLibrary", "missions", "infinite", Omit<TemplateMissionFilters, "
|
|
6
|
+
missionsInfinite: (filters?: Omit<TemplateMissionFilters, "start" | "limit">) => readonly ["missionLibrary", "missions", "infinite", Omit<TemplateMissionFilters, "limit" | "start"> | undefined];
|
|
7
7
|
tasks: (filters?: TemplateTaskFilters) => readonly ["missionLibrary", "tasks", TemplateTaskFilters | undefined];
|
|
8
|
-
tasksInfinite: (filters?: Omit<TemplateTaskFilters, "start" | "limit">) => readonly ["missionLibrary", "tasks", "infinite", Omit<TemplateTaskFilters, "
|
|
8
|
+
tasksInfinite: (filters?: Omit<TemplateTaskFilters, "start" | "limit">) => readonly ["missionLibrary", "tasks", "infinite", Omit<TemplateTaskFilters, "limit" | "start"> | undefined];
|
|
9
9
|
missionDetail: (id: string) => readonly ["missionLibrary", "mission", string];
|
|
10
10
|
};
|
|
11
11
|
export declare function useTemplateMissions(filters?: TemplateMissionFilters, enabled?: boolean): import("@tanstack/react-query").UseQueryResult<import("../../core/types").PaginatedResult<TemplateMission>, Error>;
|
|
@@ -5,7 +5,7 @@ export declare const missionKeys: {
|
|
|
5
5
|
all: readonly ["missions"];
|
|
6
6
|
lists: () => readonly ["missions", "list"];
|
|
7
7
|
list: (userId: string) => readonly ["missions", "list", string];
|
|
8
|
-
infinite: (userId: string, filters?: Omit<MissionFilters, "start" | "limit">) => readonly ["missions", "infinite", string, Omit<MissionFilters, "
|
|
8
|
+
infinite: (userId: string, filters?: Omit<MissionFilters, "start" | "limit">) => readonly ["missions", "infinite", string, Omit<MissionFilters, "limit" | "start"> | undefined];
|
|
9
9
|
details: () => readonly ["missions", "detail"];
|
|
10
10
|
detail: (id: string) => readonly ["missions", "detail", string];
|
|
11
11
|
};
|
|
@@ -5,7 +5,7 @@ export declare const taskKeys: {
|
|
|
5
5
|
all: readonly ["tasks"];
|
|
6
6
|
lists: () => readonly ["tasks", "list"];
|
|
7
7
|
list: (missionId: string) => readonly ["tasks", "list", string];
|
|
8
|
-
infinite: (roadmapId: string, userId: string, filters?: Omit<TaskFilters, "start" | "limit">) => readonly ["tasks", "infinite", string, string, Omit<TaskFilters, "
|
|
8
|
+
infinite: (roadmapId: string, userId: string, filters?: Omit<TaskFilters, "start" | "limit">) => readonly ["tasks", "infinite", string, string, Omit<TaskFilters, "limit" | "start"> | undefined];
|
|
9
9
|
details: () => readonly ["tasks", "detail"];
|
|
10
10
|
detail: (id: string) => readonly ["tasks", "detail", string];
|
|
11
11
|
creators: (roadmapId: string) => readonly ["tasks", "creators", string];
|