diff --git a/@types/index.d.ts b/@types/index.d.ts new file mode 100644 index 00000000..df935370 --- /dev/null +++ b/@types/index.d.ts @@ -0,0 +1,17 @@ +interface DigitalHubApiConstructorOptions { + username: string; + password: string; + tenant: string; +} + +interface DigitalHubApiCallOptions { + path: string; + method?: 'GET' | 'POST' | 'PUT' | 'DELETE'; + body?: any; + json?: boolean; +} + +export default class DigitalHubApi { + constructor(options: DigitalHubApiConstructorOptions); + api(options: DigitalHubApiCallOptions): Promise; +} diff --git a/package.json b/package.json index 5bac61d0..12b14343 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "engines": { "node": ">=14.17.0" }, + "types": "./@types/index.d.ts", "scripts": { "lint": "eslint ./", "lint-fix": "eslint --fix ./",