umami-api-js 0.0.4 → 0.1.0

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,14 +1,14 @@
1
1
  import { API, GenericRequestParameters, MinimalUser, Website } from "../index.js";
2
- /** For endpoints listed on: https://umami.is/docs/api/websites-api */
2
+ /** Operations around Website management and statistics: https://umami.is/docs/api/websites */
3
3
  export declare namespace Websites {
4
- /** Returns all user websites: https://umami.is/docs/api/websites-api#get-apiwebsites (TODO UNTESTED) */
5
- function getWebsites(this: API, parameters: GenericRequestParameters & {
4
+ /** Returns all user websites: https://umami.is/docs/api/websites#get-apiwebsites (TODO UNTESTED) */
5
+ function get(this: API, parameters: GenericRequestParameters & {
6
6
  includeTeams: boolean;
7
7
  }): Promise<(Website & {
8
8
  user: MinimalUser;
9
9
  })[]>;
10
- /** Creates a website: https://umami.is/docs/api/websites-api#post-apiwebsites (TODO UNTESTED) */
11
- function createWebsite(this: API, parameters: {
10
+ /** Creates a website: https://umami.is/docs/api/websites#post-apiwebsites (TODO UNTESTED) */
11
+ function post(this: API, parameters: {
12
12
  /** The name of the website in Umami */
13
13
  name: string;
14
14
  /** The full domain of the tracked website */
@@ -20,10 +20,10 @@ export declare namespace Websites {
20
20
  /** Force a UUID assignment to the website */
21
21
  id?: string;
22
22
  }): Promise<Website>;
23
- /** Gets a website by ID: https://umami.is/docs/api/websites-api#get-apiwebsiteswebsiteid (TODO UNTESTED) */
24
- function getWebsite(this: API, websiteId: string): Promise<Website>;
25
- /** Updates a website: https://umami.is/docs/api/websites-api#post-apiwebsiteswebsiteid (TODO UNTESTED) */
26
- function updateWebsite(this: API, websiteId: string, parameters: {
23
+ /** Gets a website by ID: https://umami.is/docs/api/websites#get-apiwebsiteswebsiteid (TODO UNTESTED) */
24
+ function get_WEBSITEID(this: API, websiteId: string): Promise<Website>;
25
+ /** Updates a website: https://umami.is/docs/api/websites#post-apiwebsiteswebsiteid (TODO UNTESTED) */
26
+ function post_WEBSITEID(this: API, websiteId: string, parameters: {
27
27
  /** The name of the website in Umami */
28
28
  name: string;
29
29
  /** The full domain of the tracked website */
@@ -31,12 +31,12 @@ export declare namespace Websites {
31
31
  /** A unique string to enable a share url. Set `null` to unshare */
32
32
  shareId?: string | null;
33
33
  }): Promise<Website>;
34
- /** Deletes a website: https://umami.is/docs/api/websites-api#delete-apiwebsiteswebsiteid (TODO UNTESTED) */
35
- function deleteWebsite(this: API, websiteId: string): Promise<{
34
+ /** Deletes a website: https://umami.is/docs/api/websites#delete-apiwebsiteswebsiteid (TODO UNTESTED) */
35
+ function delete_WEBSITEID(this: API, websiteId: string): Promise<{
36
36
  ok: boolean;
37
37
  }>;
38
- /** Resets a website by removing all data related to the website: https://umami.is/docs/api/websites-api#post-apiwebsiteswebsiteidreset (TODO UNTESTED) */
39
- function resetWebsite(this: API, websiteId: string): Promise<{
38
+ /** Resets a website by removing all data related to the website: https://umami.is/docs/api/websites#post-apiwebsiteswebsiteidreset (TODO UNTESTED) */
39
+ function post_WEBSITEID_Reset(this: API, websiteId: string): Promise<{
40
40
  ok: boolean;
41
41
  }>;
42
42
  }
@@ -1,35 +1,35 @@
1
- /** For endpoints listed on: https://umami.is/docs/api/websites-api */
1
+ /** Operations around Website management and statistics: https://umami.is/docs/api/websites */
2
2
  export var Websites;
3
3
  (function (Websites) {
4
- /** Returns all user websites: https://umami.is/docs/api/websites-api#get-apiwebsites (TODO UNTESTED) */
5
- async function getWebsites(parameters) {
4
+ /** Returns all user websites: https://umami.is/docs/api/websites#get-apiwebsites (TODO UNTESTED) */
5
+ async function get(parameters) {
6
6
  const response = await this.request("get", ["websites"], parameters);
7
7
  return response.data;
8
8
  }
9
- Websites.getWebsites = getWebsites;
10
- /** Creates a website: https://umami.is/docs/api/websites-api#post-apiwebsites (TODO UNTESTED) */
11
- async function createWebsite(parameters) {
9
+ Websites.get = get;
10
+ /** Creates a website: https://umami.is/docs/api/websites#post-apiwebsites (TODO UNTESTED) */
11
+ async function post(parameters) {
12
12
  return await this.request("post", ["websites"], parameters);
13
13
  }
14
- Websites.createWebsite = createWebsite;
15
- /** Gets a website by ID: https://umami.is/docs/api/websites-api#get-apiwebsiteswebsiteid (TODO UNTESTED) */
16
- async function getWebsite(websiteId) {
14
+ Websites.post = post;
15
+ /** Gets a website by ID: https://umami.is/docs/api/websites#get-apiwebsiteswebsiteid (TODO UNTESTED) */
16
+ async function get_WEBSITEID(websiteId) {
17
17
  return await this.request("get", ["websites", websiteId]);
18
18
  }
19
- Websites.getWebsite = getWebsite;
20
- /** Updates a website: https://umami.is/docs/api/websites-api#post-apiwebsiteswebsiteid (TODO UNTESTED) */
21
- async function updateWebsite(websiteId, parameters) {
19
+ Websites.get_WEBSITEID = get_WEBSITEID;
20
+ /** Updates a website: https://umami.is/docs/api/websites#post-apiwebsiteswebsiteid (TODO UNTESTED) */
21
+ async function post_WEBSITEID(websiteId, parameters) {
22
22
  return await this.request("post", ["websites", websiteId], parameters);
23
23
  }
24
- Websites.updateWebsite = updateWebsite;
25
- /** Deletes a website: https://umami.is/docs/api/websites-api#delete-apiwebsiteswebsiteid (TODO UNTESTED) */
26
- async function deleteWebsite(websiteId) {
24
+ Websites.post_WEBSITEID = post_WEBSITEID;
25
+ /** Deletes a website: https://umami.is/docs/api/websites#delete-apiwebsiteswebsiteid (TODO UNTESTED) */
26
+ async function delete_WEBSITEID(websiteId) {
27
27
  return await this.request("delete", ["websites", websiteId]);
28
28
  }
29
- Websites.deleteWebsite = deleteWebsite;
30
- /** Resets a website by removing all data related to the website: https://umami.is/docs/api/websites-api#post-apiwebsiteswebsiteidreset (TODO UNTESTED) */
31
- async function resetWebsite(websiteId) {
29
+ Websites.delete_WEBSITEID = delete_WEBSITEID;
30
+ /** Resets a website by removing all data related to the website: https://umami.is/docs/api/websites#post-apiwebsiteswebsiteidreset (TODO UNTESTED) */
31
+ async function post_WEBSITEID_Reset(websiteId) {
32
32
  return await this.request("post", ["websites", websiteId, "reset"]);
33
33
  }
34
- Websites.resetWebsite = resetWebsite;
34
+ Websites.post_WEBSITEID_Reset = post_WEBSITEID_Reset;
35
35
  })(Websites || (Websites = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umami-api-js",
3
- "version": "0.0.4",
3
+ "version": "0.1.0",
4
4
  "description": "Package to easily access the umami api!",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -19,7 +19,7 @@
19
19
  "type": "git",
20
20
  "url": "https://codeberg.org/Taevas/umami-api-js"
21
21
  },
22
- "homepage": "https://codeberg.org/Taevas/umami-api-js",
22
+ "homepage": "https://umami-api-js.taevas.xyz/",
23
23
  "keywords": [
24
24
  "umami",
25
25
  "api",
@@ -28,9 +28,11 @@
28
28
  ],
29
29
  "license": "Unlicense",
30
30
  "devDependencies": {
31
- "@types/node": "^24.3.1",
32
- "dotenv": "^17.2.2",
31
+ "@types/chai": "^5.2.3",
32
+ "@types/node": "^24.9.2",
33
+ "chai": "^6.2.0",
34
+ "dotenv": "^17.2.3",
33
35
  "typedoc": "^0.28.14",
34
- "typescript": "^5.9.2"
36
+ "typescript": "^5.9.3"
35
37
  }
36
38
  }