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.
- package/README.md +3 -2
- package/dist/index.d.ts +183 -70
- package/dist/index.js +162 -68
- package/dist/namespaces/Admin.d.ts +5 -14
- package/dist/namespaces/Admin.js +4 -10
- package/dist/namespaces/Events.d.ts +15 -15
- package/dist/namespaces/Events.js +22 -22
- package/dist/namespaces/Links.d.ts +28 -0
- package/dist/namespaces/Links.js +25 -0
- package/dist/namespaces/Me.d.ts +44 -0
- package/dist/namespaces/Me.js +21 -0
- package/dist/namespaces/Pixels.d.ts +25 -0
- package/dist/namespaces/Pixels.js +25 -0
- package/dist/namespaces/Realtime.d.ts +3 -3
- package/dist/namespaces/Realtime.js +4 -4
- package/dist/namespaces/Reports.d.ts +27 -27
- package/dist/namespaces/Reports.js +40 -40
- package/dist/namespaces/Sessions.d.ts +17 -17
- package/dist/namespaces/Sessions.js +25 -25
- package/dist/namespaces/Teams.d.ts +25 -25
- package/dist/namespaces/Teams.js +37 -37
- package/dist/namespaces/Users.d.ts +15 -18
- package/dist/namespaces/Users.js +24 -24
- package/dist/namespaces/WebsiteStats.d.ts +18 -18
- package/dist/namespaces/WebsiteStats.js +19 -19
- package/dist/namespaces/Websites.d.ts +13 -13
- package/dist/namespaces/Websites.js +19 -19
- package/package.json +7 -5
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { API, GenericRequestParameters, MinimalUser, Website } from "../index.js";
|
|
2
|
-
/**
|
|
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
|
|
5
|
-
function
|
|
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
|
|
11
|
-
function
|
|
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
|
|
24
|
-
function
|
|
25
|
-
/** Updates a website: https://umami.is/docs/api/websites
|
|
26
|
-
function
|
|
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
|
|
35
|
-
function
|
|
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
|
|
39
|
-
function
|
|
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
|
-
/**
|
|
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
|
|
5
|
-
async function
|
|
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.
|
|
10
|
-
/** Creates a website: https://umami.is/docs/api/websites
|
|
11
|
-
async function
|
|
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.
|
|
15
|
-
/** Gets a website by ID: https://umami.is/docs/api/websites
|
|
16
|
-
async function
|
|
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.
|
|
20
|
-
/** Updates a website: https://umami.is/docs/api/websites
|
|
21
|
-
async function
|
|
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.
|
|
25
|
-
/** Deletes a website: https://umami.is/docs/api/websites
|
|
26
|
-
async function
|
|
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.
|
|
30
|
-
/** Resets a website by removing all data related to the website: https://umami.is/docs/api/websites
|
|
31
|
-
async function
|
|
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.
|
|
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
|
|
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://
|
|
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/
|
|
32
|
-
"
|
|
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.
|
|
36
|
+
"typescript": "^5.9.3"
|
|
35
37
|
}
|
|
36
38
|
}
|