Compare commits
4 Commits
3.0.0-dev.
...
v3.0.0-dev
| Author | SHA1 | Date | |
|---|---|---|---|
| ad355fe15e | |||
| 4dd8bd1108 | |||
| e2f4433042 | |||
| 7775abbbca |
15
package-lock.json
generated
15
package-lock.json
generated
@@ -1,15 +1,17 @@
|
||||
{
|
||||
"name": "owlboard-ts",
|
||||
"name": "@owlboard/owlboard-ts",
|
||||
"version": "3.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "owlboard-ts",
|
||||
"name": "@owlboard/owlboard-ts",
|
||||
"version": "3.0.0",
|
||||
"license": "GPL-3.0",
|
||||
"dependencies": {
|
||||
"@owlboard/api-schema-types": "^3.0.2-alpha2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@owlboard/api-schema-types": "^3.0.1-alpha3",
|
||||
"@types/node": "^25.3.0",
|
||||
"ts-node": "^10.9.2",
|
||||
"tsx": "^4.21.0",
|
||||
@@ -500,10 +502,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@owlboard/api-schema-types": {
|
||||
"version": "3.0.1-alpha3",
|
||||
"resolved": "https://git.fjla.uk/api/packages/OwlBoard/npm/%40owlboard%2Fapi-schema-types/-/3.0.1-alpha3/api-schema-types-3.0.1-alpha3.tgz",
|
||||
"integrity": "sha512-5CVm1k/C++/VrtAw4NkvclDunH+RmYLnDZZMSWTM1mm+WlEVnmD+MVnTgC/FhcsAmsNHV8swm66RCqkCuhbOnA==",
|
||||
"dev": true,
|
||||
"version": "3.0.2-alpha2",
|
||||
"resolved": "https://git.fjla.uk/api/packages/OwlBoard/npm/%40owlboard%2Fapi-schema-types/-/3.0.2-alpha2/api-schema-types-3.0.2-alpha2.tgz",
|
||||
"integrity": "sha512-KyX4QcOCzVqYpiXY+WfhM1soXduMt2ldG6JSBK2WBxXWokS+keZshOHWHGTZvPLoZEWsuPznMAdzytI03/D3Ag==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@tsconfig/node10": {
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
"author": "Frederick Boniface",
|
||||
"license": "GPL-3.0",
|
||||
"dependencies": {
|
||||
"@owlboard/api-schema-types": "^3.0.1-alpha3"
|
||||
"@owlboard/api-schema-types": "^3.0.2-alpha2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^25.3.0",
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
export { OwlBoardClient } from './lib/client.js';
|
||||
export { ValidationError, ApiError } from './lib/errors.js';
|
||||
|
||||
// Re-export API Schema types
|
||||
export type * from '@owlboard/api-schema-types'
|
||||
|
||||
// Useful exports for Type Hinting
|
||||
export { PisModule } from './modules/pis.js';
|
||||
export { LocationFilterModule } from './modules/locationFilter.js';
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
import { BaseClient } from "./base.js";
|
||||
import { PisModule } from "../modules/pis.js";
|
||||
import { LocationFilterModule } from "../modules/locationFilter.js";
|
||||
|
||||
export class OwlBoardClient extends BaseClient {
|
||||
public readonly pis: PisModule;
|
||||
public readonly locationFilter: LocationFilterModule;
|
||||
|
||||
constructor(baseUrl: string, apiKey?: string) {
|
||||
super(baseUrl, apiKey);
|
||||
|
||||
this.pis = new PisModule(this);
|
||||
this.locationFilter = new LocationFilterModule(this);
|
||||
}
|
||||
}
|
||||
15
src/modules/locationFilter.ts
Normal file
15
src/modules/locationFilter.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { ApiLocationFilter } from "@owlboard/api-schema-types";
|
||||
import type { BaseClient, ApiResult } from '../lib/base.js';
|
||||
|
||||
export class LocationFilterModule {
|
||||
constructor(private client: BaseClient) {}
|
||||
|
||||
async getLocationFilterData(): Promise<ApiResult<ApiLocationFilter.LocationFilterObject[]>> {
|
||||
const path = '/locationFilter/data';
|
||||
|
||||
return this.client.request<ApiLocationFilter.LocationFilterObject[]>(
|
||||
path,
|
||||
{method: "GET"}
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -21,6 +21,7 @@
|
||||
"sourceMap": true,
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"composite": true,
|
||||
|
||||
// Stricter Typechecking Options
|
||||
"noUncheckedIndexedAccess": true,
|
||||
|
||||
Reference in New Issue
Block a user