mirror of
https://github.com/classchartsapi/classcharts-api-js.git
synced 2026-05-14 11:58:13 +00:00
fix: remove @internal
Since it messes with emitted types
This commit is contained in:
parent
ecd1b9c434
commit
b34d972167
5 changed files with 1 additions and 10 deletions
|
|
@ -5,7 +5,7 @@ if (!Deno.args[0]) throw new Error("No version specified");
|
||||||
await emptyDir("./npm");
|
await emptyDir("./npm");
|
||||||
|
|
||||||
await build({
|
await build({
|
||||||
entryPoints: ["./mod.ts"],
|
entryPoints: ["./mod.ts", "./src/core/baseClient.ts"],
|
||||||
outDir: "./npm",
|
outDir: "./npm",
|
||||||
shims: {
|
shims: {
|
||||||
deno: true,
|
deno: true,
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ import { PING_INTERVAL } from "../utils/consts.ts";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shared client for both parent and student. This is not exported and should not be used directly
|
* Shared client for both parent and student. This is not exported and should not be used directly
|
||||||
* @internal
|
|
||||||
*/
|
*/
|
||||||
export class BaseClient {
|
export class BaseClient {
|
||||||
/**
|
/**
|
||||||
|
|
@ -28,7 +27,6 @@ export class BaseClient {
|
||||||
*/
|
*/
|
||||||
public studentId = 0;
|
public studentId = 0;
|
||||||
/**
|
/**
|
||||||
* @internal
|
|
||||||
* @property authCookies Cookies used for authentication (set during login and can be empty)
|
* @property authCookies Cookies used for authentication (set during login and can be empty)
|
||||||
*/
|
*/
|
||||||
public authCookies: Array<string>;
|
public authCookies: Array<string>;
|
||||||
|
|
@ -42,7 +40,6 @@ export class BaseClient {
|
||||||
public lastPing = 0;
|
public lastPing = 0;
|
||||||
/**
|
/**
|
||||||
* @property API_BASE Base API URL, this is different depending on if its called as a parent or student
|
* @property API_BASE Base API URL, this is different depending on if its called as a parent or student
|
||||||
* @internal
|
|
||||||
*/
|
*/
|
||||||
protected API_BASE = "";
|
protected API_BASE = "";
|
||||||
/**
|
/**
|
||||||
|
|
@ -56,7 +53,6 @@ export class BaseClient {
|
||||||
* Revalidates the session ID.
|
* Revalidates the session ID.
|
||||||
*
|
*
|
||||||
* This is called automatically when the session ID is older than 3 minutes or when initially using the .login() method
|
* This is called automatically when the session ID is older than 3 minutes or when initially using the .login() method
|
||||||
* @internal
|
|
||||||
*/
|
*/
|
||||||
public async getNewSessionId() {
|
public async getNewSessionId() {
|
||||||
const pingFormData = new URLSearchParams();
|
const pingFormData = new URLSearchParams();
|
||||||
|
|
@ -81,7 +77,6 @@ export class BaseClient {
|
||||||
* @param options.revalidateToken Whether to revalidate the session ID if it is older than 3 minutes
|
* @param options.revalidateToken Whether to revalidate the session ID if it is older than 3 minutes
|
||||||
*
|
*
|
||||||
* @returns Response
|
* @returns Response
|
||||||
* @internal
|
|
||||||
*/
|
*/
|
||||||
public async makeAuthedRequest(
|
public async makeAuthedRequest(
|
||||||
path: string,
|
path: string,
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,10 @@ import { parseCookies } from "../utils/utils.ts";
|
||||||
export class StudentClient extends BaseClient {
|
export class StudentClient extends BaseClient {
|
||||||
/**
|
/**
|
||||||
* @property studentCode ClassCharts student code
|
* @property studentCode ClassCharts student code
|
||||||
* @internal
|
|
||||||
*/
|
*/
|
||||||
private studentCode = "";
|
private studentCode = "";
|
||||||
/**
|
/**
|
||||||
* @property dateOfBirth Student's date of birth
|
* @property dateOfBirth Student's date of birth
|
||||||
* @internal
|
|
||||||
*/
|
*/
|
||||||
private dateOfBirth = "";
|
private dateOfBirth = "";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
/**
|
/**
|
||||||
* Helper type to define response from ClassCharts
|
* Helper type to define response from ClassCharts
|
||||||
* @internal
|
|
||||||
*/
|
*/
|
||||||
export type ClassChartsResponse<Data, Meta> = {
|
export type ClassChartsResponse<Data, Meta> = {
|
||||||
data: Data;
|
data: Data;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
* Parse cookies from string
|
* Parse cookies from string
|
||||||
* @param input Input string
|
* @param input Input string
|
||||||
* @returns Object of cookies
|
* @returns Object of cookies
|
||||||
* @internal
|
|
||||||
*/
|
*/
|
||||||
export function parseCookies(input: string) {
|
export function parseCookies(input: string) {
|
||||||
const output: Record<string, unknown> = {};
|
const output: Record<string, unknown> = {};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue