@cuemath/leap 3.1.2-beta-0.1 → 3.1.2-beta-0.2
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.
@@ -1,13 +1,13 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
const {
|
4
|
-
getURL: (e) => {
|
5
|
-
const { milestone_state_group:
|
6
|
-
return `${n}/user-milestones/users/${
|
1
|
+
import { createGetAPI as r } from "@cuemath/rest-api";
|
2
|
+
import { BASE_URL_V3 as n } from "../../../../constants/api.js";
|
3
|
+
const { useGet: m, invalidate: c } = r({
|
4
|
+
getURL: (e, u, t) => {
|
5
|
+
const { milestone_state_group: s, course_stream: o } = t;
|
6
|
+
return `${n}/user-milestones/users/${e}/course-streams/${o}/${s}/count`;
|
7
7
|
}
|
8
8
|
});
|
9
9
|
export {
|
10
|
-
|
11
|
-
|
10
|
+
c as invalidatePastMilestoneCount,
|
11
|
+
m as useGetPastMilestoneCount
|
12
12
|
};
|
13
13
|
//# sourceMappingURL=get-past-milestone-count.js.map
|
package/dist/features/milestone/milestone-list-container/api/get-past-milestone-count.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"get-past-milestone-count.js","sources":["../../../../../src/features/milestone/milestone-list-container/api/get-past-milestone-count.ts"],"sourcesContent":["import type { TCourseStream } from '../../create/milestone-create-types';\nimport type { IMilestoneData } from '../milestone-list/milestone-list-types';\n\nimport {
|
1
|
+
{"version":3,"file":"get-past-milestone-count.js","sources":["../../../../../src/features/milestone/milestone-list-container/api/get-past-milestone-count.ts"],"sourcesContent":["import type { TCourseStream } from '../../create/milestone-create-types';\nimport type { IMilestoneData } from '../milestone-list/milestone-list-types';\n\nimport { createGetAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V3 } from '../../../../constants/api';\n\ntype TQuery = {\n milestone_state_group: 'ALL' | 'DRAFT' | 'STUDENT_ALL' | 'LIVE' | 'STUDENT_LIVE' | 'INACTIVE';\n student_id: string;\n course_stream: TCourseStream;\n};\n\nconst { useGet: useGetPastMilestoneCount, invalidate: invalidatePastMilestoneCount } = createGetAPI<\n IMilestoneData,\n void,\n TQuery\n>({\n getURL: (studentId, _, query) => {\n const { milestone_state_group, course_stream } = query;\n\n return `${BASE_URL_V3}/user-milestones/users/${studentId}/course-streams/${course_stream}/${milestone_state_group}/count`;\n },\n});\n\nexport { useGetPastMilestoneCount, invalidatePastMilestoneCount };\n"],"names":["useGetPastMilestoneCount","invalidatePastMilestoneCount","createGetAPI","studentId","_","query","milestone_state_group","course_stream","BASE_URL_V3"],"mappings":";;AAaA,MAAM,EAAE,QAAQA,GAA0B,YAAYC,EAAA,IAAiCC,EAIrF;AAAA,EACA,QAAQ,CAACC,GAAWC,GAAGC,MAAU;AACzB,UAAA,EAAE,uBAAAC,GAAuB,eAAAC,EAAkB,IAAAF;AAEjD,WAAO,GAAGG,CAAW,0BAA0BL,CAAS,mBAAmBI,CAAa,IAAID,CAAqB;AAAA,EACnH;AACF,CAAC;"}
|
package/dist/index.d.ts
CHANGED
@@ -2477,7 +2477,7 @@ export declare const invalidateMilestoneResources: (id: string, query?: void | u
|
|
2477
2477
|
|
2478
2478
|
export declare const invalidateMilestonesData: (query?: TQuery | undefined) => void;
|
2479
2479
|
|
2480
|
-
export declare const invalidatePastMilestoneCount: (query?:
|
2480
|
+
export declare const invalidatePastMilestoneCount: (id: string, query?: void | undefined, allIdsInvalid?: boolean) => void;
|
2481
2481
|
|
2482
2482
|
export declare const invalidateTestHelpData: (id: string, query?: void | undefined, allIdsInvalid?: boolean) => void;
|
2483
2483
|
|
@@ -5774,10 +5774,10 @@ export declare const useGetMilestoneResources: (initialId?: string, initialQuery
|
|
5774
5774
|
} & Record<string, unknown>) | undefined;
|
5775
5775
|
};
|
5776
5776
|
|
5777
|
-
export declare const useGetPastMilestoneCount: (initialQuery?:
|
5778
|
-
|
5779
|
-
resource: ResourceModel<IMilestoneData
|
5780
|
-
data: IMilestoneData
|
5777
|
+
export declare const useGetPastMilestoneCount: (initialId?: string, initialQuery?: void | undefined) => {
|
5778
|
+
get: (id: string, query: void, meta: TQuery_2) => Promise<void>;
|
5779
|
+
resource: ResourceModel<IMilestoneData> | undefined;
|
5780
|
+
data: IMilestoneData | undefined;
|
5781
5781
|
permissions: Record<string, unknown> | undefined;
|
5782
5782
|
isProcessing: boolean;
|
5783
5783
|
isProcessed: boolean;
|