classcharts-api
Advanced tools
Comparing version 2.1.1 to 2.1.2
@@ -1,2 +0,3 @@ | ||
export * from "./parentClient.js"; | ||
export * from "./studentClient.js"; | ||
export * from "./core/studentClient.js"; | ||
export * from "./core/parentClient.js"; | ||
export { Student, ActivityPoint, BehaviourTimelinePoint, Homework, Lesson, Badge, Announcement, Detention, AttendanceDate, } from "./types.js"; |
@@ -1,3 +0,3 @@ | ||
export * from "./parentClient.js"; | ||
export * from "./studentClient.js"; | ||
export * from "./core/studentClient.js"; | ||
export * from "./core/parentClient.js"; | ||
//# sourceMappingURL=index.js.map |
@@ -0,1 +1,5 @@ | ||
/** | ||
* Helper type to define response from classcharts | ||
* @internal | ||
*/ | ||
export type ClassChartsResponse<T, E> = { | ||
@@ -45,6 +49,6 @@ data: T; | ||
} | ||
interface GetStudentInfoData { | ||
export interface GetStudentInfoData { | ||
user: Student; | ||
} | ||
interface GetStudentInfoMeta { | ||
export interface GetStudentInfoMeta { | ||
version: string; | ||
@@ -70,3 +74,3 @@ } | ||
} | ||
interface BehaviourResponseData { | ||
export interface BehaviourResponseData { | ||
timeline: Array<BehaviourTimelinePoint>; | ||
@@ -80,3 +84,3 @@ positive_reasons: Record<string, number>; | ||
} | ||
interface BehaviourResponseMeta { | ||
export interface BehaviourResponseMeta { | ||
start_date: string; | ||
@@ -125,3 +129,3 @@ end_date: string; | ||
} | ||
type ActivityResponseData = Array<ActivityPoint>; | ||
export type ActivityResponseData = Array<ActivityPoint>; | ||
interface ActivityResponseMeta { | ||
@@ -139,2 +143,6 @@ start_date: string; | ||
* Way to sort homeworks | ||
* | ||
* Used to sort homeworks by when they are due or when they were issued | ||
* @default "issue_date" | ||
* | ||
*/ | ||
@@ -187,4 +195,4 @@ displayDate?: DisplayDate; | ||
} | ||
type HomeworksResponseData = Array<Homework>; | ||
interface HomeworksResponseMeta { | ||
export type HomeworksResponseData = Array<Homework>; | ||
export interface HomeworksResponseMeta { | ||
start_date: string; | ||
@@ -226,3 +234,3 @@ end_date: string; | ||
} | ||
type LessonsResponseData = Lesson[]; | ||
export type LessonsResponseData = Lesson[]; | ||
interface PeriodMeta { | ||
@@ -233,3 +241,3 @@ number: string; | ||
} | ||
interface LessonsResponseMeta { | ||
export interface LessonsResponseMeta { | ||
dates: string[]; | ||
@@ -270,4 +278,4 @@ timetable_dates: string[]; | ||
} | ||
type BadgesResponseData = Array<Badge>; | ||
type BadgesResponseMeta = []; | ||
export type BadgesResponseData = Array<Badge>; | ||
export type BadgesResponseMeta = []; | ||
export type BadgesResponse = ClassChartsResponse<BadgesResponseData, BadgesResponseMeta>; | ||
@@ -274,0 +282,0 @@ export interface Detention { |
@@ -0,2 +1,3 @@ | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
export {}; | ||
//# sourceMappingURL=types.js.map |
{ | ||
"name": "classcharts-api", | ||
"type": "module", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "A typescript wrapper for getting information from the Classcharts API", | ||
@@ -20,9 +20,2 @@ "keywords": [ | ||
"main": "./dist/index.js", | ||
"scripts": { | ||
"build": "tsc", | ||
"generateDocs": "typedoc --entryPointStrategy expand ./src", | ||
"test": "jest", | ||
"prepublishOnly": "pnpm run build", | ||
"publishNow": "pnpx np --no-publish && npm publish" | ||
}, | ||
"author": "James Cook", | ||
@@ -37,2 +30,3 @@ "license": "ISC", | ||
"devDependencies": { | ||
"@changesets/cli": "^2.26.1", | ||
"@types/jest": "^29.5.0", | ||
@@ -59,3 +53,9 @@ "@types/node": "^18.15.11", | ||
"./package.json": "./package.json" | ||
}, | ||
"scripts": { | ||
"build": "tsc", | ||
"generateDocs": "typedoc --options typedoc.config.cjs", | ||
"test": "jest", | ||
"release": "pnpm run build && changeset publish" | ||
} | ||
} | ||
} |
@@ -5,6 +5,8 @@ # Classcharts API | ||
* [Documentation](https://classchartsapi.github.io/classcharts-api-js/) | ||
* [API Documentation (with library examples)](https://classchartsapi.github.io/api-docs/#introduction) | ||
* [Discord](https://discord.gg/DTcwugcgZ2) | ||
- [Documentation](https://classchartsapi.github.io/classcharts-api-js/) | ||
- [API Documentation (with library examples)](https://classchartsapi.github.io/api-docs/#introduction) | ||
- [Discord](https://discord.gg/DTcwugcgZ2) | ||
# Examples | ||
Docs are very much a WIP, for any help with the library, please join the discord above | ||
@@ -11,0 +13,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46809
25
1007
32
13
1