umami-api-js 0.1.0 → 0.1.2
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 -3
- package/dist/index.d.ts +22 -51
- package/dist/index.js +8 -6
- package/dist/namespaces/Admin.d.ts +4 -14
- package/dist/namespaces/Events.d.ts +36 -35
- package/dist/namespaces/Events.js +7 -7
- package/dist/namespaces/Links.d.ts +6 -8
- package/dist/namespaces/Me.d.ts +8 -28
- package/dist/namespaces/Me.js +3 -3
- package/dist/namespaces/Pixels.d.ts +5 -7
- package/dist/namespaces/Realtime.d.ts +2 -2
- package/dist/namespaces/Reports.d.ts +13 -15
- package/dist/namespaces/Sessions.d.ts +11 -11
- package/dist/namespaces/Teams.d.ts +36 -42
- package/dist/namespaces/Users.d.ts +23 -32
- package/dist/namespaces/WebsiteStats.d.ts +6 -6
- package/dist/namespaces/Websites.d.ts +43 -28
- package/dist/namespaces/Websites.js +6 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
A package to interact with [the API of self-hosted instances of Umami v3.0.
|
|
1
|
+
A package to interact with [the API of self-hosted instances of Umami v3.0.1](https://umami.is/docs/api). It is a lightweight alternative to [@umami/api-client](https://github.com/umami-software/api-client), forked from [osu-api-v2-js](https://github.com/TTTaevas/osu-api-v2-js).
|
|
2
2
|
|
|
3
|
-
If you are reading this from the [package's documentation](https://umami-api-js.taevas.xyz/), please be aware that the documentation is for **umami-api-js@0.1.
|
|
3
|
+
If you are reading this from the [package's documentation](https://umami-api-js.taevas.xyz/), please be aware that the documentation is for **umami-api-js@0.1.2**, so make sure your package is up to date! Report any bug on [Codeberg](https://codeberg.org/Taevas/umami-api-js/issues).
|
|
4
4
|
|
|
5
|
-
Please note that this package is expected to work with self-hosted instances of **Umami v3.0.
|
|
5
|
+
Please note that this package is expected to work with self-hosted instances of **Umami v3.0.1**, and is *not* expected to work with [Umami Cloud](https://umami.is/docs/cloud), the instance of Umami hosted by its creators.
|
package/dist/index.d.ts
CHANGED
|
@@ -11,34 +11,18 @@ import { Users } from "./namespaces/Users.js";
|
|
|
11
11
|
import { Websites } from "./namespaces/Websites.js";
|
|
12
12
|
import { WebsiteStats } from "./namespaces/WebsiteStats.js";
|
|
13
13
|
export { Admin, Events, Links, Me, Pixels, Websites, WebsiteStats, Realtime, Reports, Sessions, Teams, Users };
|
|
14
|
-
export interface ValueAndPrev {
|
|
15
|
-
/** The actual value for the given time period */
|
|
16
|
-
value: number;
|
|
17
|
-
/** The value for the same *timespan* for the time period that ends where the time period for value starts */
|
|
18
|
-
prev: number;
|
|
19
|
-
}
|
|
20
|
-
export interface MinimalUser {
|
|
21
|
-
id: string;
|
|
22
|
-
username: string;
|
|
23
|
-
}
|
|
24
14
|
export interface GenericObject {
|
|
25
15
|
id: string;
|
|
26
16
|
createdAt: Date;
|
|
27
17
|
updatedAt: Date | null;
|
|
28
18
|
deletedAt: Date | null;
|
|
29
19
|
}
|
|
30
|
-
export interface
|
|
31
|
-
|
|
32
|
-
domain: string;
|
|
33
|
-
shareId: string | null;
|
|
34
|
-
resetAt: Date | null;
|
|
35
|
-
userId: string;
|
|
36
|
-
teamId: string | null;
|
|
37
|
-
createdBy: string;
|
|
20
|
+
export interface DeletionResult {
|
|
21
|
+
ok: boolean;
|
|
38
22
|
}
|
|
39
23
|
export interface Report extends Omit<GenericObject, "deletedAt"> {
|
|
40
|
-
userId:
|
|
41
|
-
websiteId:
|
|
24
|
+
userId: Users.User["id"];
|
|
25
|
+
websiteId: Websites.Website["id"];
|
|
42
26
|
type: string;
|
|
43
27
|
name: string;
|
|
44
28
|
description: string;
|
|
@@ -65,6 +49,7 @@ export interface Timestamps {
|
|
|
65
49
|
/** Timestamp of end date */
|
|
66
50
|
endAt: Date | number;
|
|
67
51
|
}
|
|
52
|
+
/** An object with the properties `x`, `t`, and `y`, where they're respectively a name, a date, and an amount */
|
|
68
53
|
export interface XTY {
|
|
69
54
|
/** Event name */
|
|
70
55
|
x: string;
|
|
@@ -107,8 +92,6 @@ export interface Filters {
|
|
|
107
92
|
/** UUID of cohort */
|
|
108
93
|
cohort?: string;
|
|
109
94
|
}
|
|
110
|
-
export type Role = "admin" | "user" | "view-only";
|
|
111
|
-
export type TeamRole = "team-manager" | "team-member" | "team-view-only";
|
|
112
95
|
/** If the {@link API} throws an error, it should always be an {@link APIError}! */
|
|
113
96
|
export declare class APIError extends Error {
|
|
114
97
|
message: string;
|
|
@@ -160,7 +143,10 @@ export declare class API {
|
|
|
160
143
|
get server(): string;
|
|
161
144
|
set server(server: string);
|
|
162
145
|
private _headers;
|
|
163
|
-
/**
|
|
146
|
+
/**
|
|
147
|
+
* Used in practically all requests, those are all the headers the package uses excluding `Authorization`, the one with the token
|
|
148
|
+
* @remarks If the User-Agent is not liked by https://isbot.js.org/, Umami might give responses akin to `{beep: "boop"}`
|
|
149
|
+
*/
|
|
164
150
|
get headers(): {
|
|
165
151
|
[key: string]: any;
|
|
166
152
|
};
|
|
@@ -169,20 +155,8 @@ export declare class API {
|
|
|
169
155
|
});
|
|
170
156
|
private _user;
|
|
171
157
|
/** Information about the account that has been used to log in */
|
|
172
|
-
get user():
|
|
173
|
-
|
|
174
|
-
username: string;
|
|
175
|
-
role: Role;
|
|
176
|
-
createdAt: Date;
|
|
177
|
-
isAdmin: boolean;
|
|
178
|
-
};
|
|
179
|
-
set user(user: {
|
|
180
|
-
id: string;
|
|
181
|
-
username: string;
|
|
182
|
-
role: Role;
|
|
183
|
-
createdAt: Date;
|
|
184
|
-
isAdmin: boolean;
|
|
185
|
-
});
|
|
158
|
+
get user(): Users.User;
|
|
159
|
+
set user(user: Users.User);
|
|
186
160
|
private number_of_requests;
|
|
187
161
|
/** Has {@link API.setNewToken} been called and not yet returned anything? */
|
|
188
162
|
private is_setting_token;
|
|
@@ -276,37 +250,34 @@ export declare class API {
|
|
|
276
250
|
}): Promise<any>;
|
|
277
251
|
/**
|
|
278
252
|
* To register an event
|
|
279
|
-
* (TODO UNTESTED)
|
|
280
253
|
* @group Sending stats
|
|
281
254
|
*/
|
|
282
|
-
sendStats(
|
|
255
|
+
sendStats(websiteId: Websites.Website["id"], payload?: {
|
|
283
256
|
/** Name of host */
|
|
284
|
-
hostname
|
|
257
|
+
hostname?: Events.Event["hostname"];
|
|
285
258
|
/** Screen resolution (ex. "1920x1080") */
|
|
286
|
-
screen
|
|
259
|
+
screen?: string;
|
|
287
260
|
/** Language of visitor (ex. "en-US") */
|
|
288
|
-
language
|
|
261
|
+
language?: string;
|
|
289
262
|
/** Page URL */
|
|
290
|
-
url
|
|
263
|
+
url?: string;
|
|
291
264
|
/** Referrer URL */
|
|
292
|
-
referrer
|
|
265
|
+
referrer?: string;
|
|
293
266
|
/** Page title */
|
|
294
|
-
title
|
|
267
|
+
title?: string;
|
|
295
268
|
/** Additional tag description */
|
|
296
|
-
tag
|
|
269
|
+
tag?: string;
|
|
297
270
|
/** Session identifier */
|
|
298
|
-
id
|
|
299
|
-
/** Website ID */
|
|
300
|
-
website: string;
|
|
271
|
+
id?: Events.Event["sessionId"];
|
|
301
272
|
/** Name of the event */
|
|
302
|
-
name
|
|
273
|
+
name?: Events.Event["eventName"];
|
|
303
274
|
/** Additional data for the event */
|
|
304
275
|
data?: {
|
|
305
276
|
[k: string]: any;
|
|
306
277
|
};
|
|
307
278
|
}): Promise<{
|
|
308
279
|
cache: string;
|
|
309
|
-
|
|
280
|
+
sessionId: Events.Event["sessionId"];
|
|
310
281
|
visitId: string;
|
|
311
282
|
}>;
|
|
312
283
|
/** @group Admin endpoints */
|
package/dist/index.js
CHANGED
|
@@ -94,15 +94,18 @@ export class API {
|
|
|
94
94
|
"Accept": "application/json",
|
|
95
95
|
"Accept-Encoding": "gzip",
|
|
96
96
|
"Content-Type": "application/json",
|
|
97
|
-
"User-Agent": "umami-api-js (
|
|
97
|
+
"User-Agent": "umami-api-js (codeberg.org/Taevas/umami-api-js)",
|
|
98
98
|
};
|
|
99
|
-
/**
|
|
99
|
+
/**
|
|
100
|
+
* Used in practically all requests, those are all the headers the package uses excluding `Authorization`, the one with the token
|
|
101
|
+
* @remarks If the User-Agent is not liked by https://isbot.js.org/, Umami might give responses akin to `{beep: "boop"}`
|
|
102
|
+
*/
|
|
100
103
|
get headers() { return this._headers; }
|
|
101
104
|
set headers(headers) { this._headers = headers; }
|
|
102
105
|
_user = {
|
|
103
106
|
id: "",
|
|
104
107
|
username: "",
|
|
105
|
-
role: "",
|
|
108
|
+
role: "view-only",
|
|
106
109
|
createdAt: new Date(),
|
|
107
110
|
isAdmin: false,
|
|
108
111
|
};
|
|
@@ -384,11 +387,10 @@ export class API {
|
|
|
384
387
|
// UNCATEGORIZED
|
|
385
388
|
/**
|
|
386
389
|
* To register an event
|
|
387
|
-
* (TODO UNTESTED)
|
|
388
390
|
* @group Sending stats
|
|
389
391
|
*/
|
|
390
|
-
async sendStats(payload) {
|
|
391
|
-
return await this.request("post", ["send"], { payload, type: "event" });
|
|
392
|
+
async sendStats(websiteId, payload) {
|
|
393
|
+
return await this.request("post", ["send"], { payload: { website: websiteId, ...payload }, type: "event" });
|
|
392
394
|
}
|
|
393
395
|
// ADMIN
|
|
394
396
|
/** @group Admin endpoints */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { API, GenericObject, GenericRequestParameters,
|
|
1
|
+
import { API, GenericObject, GenericRequestParameters, Teams, Users, Websites } from "../index.js";
|
|
2
2
|
/** Operations around admin management: https://umami.is/docs/api/admin */
|
|
3
3
|
export declare namespace Admin {
|
|
4
4
|
/** Returns all users: https://umami.is/docs/api/admin#get-apiadminusers */
|
|
5
5
|
function getUsers(this: API, parameters?: GenericRequestParameters): Promise<(GenericObject & {
|
|
6
6
|
username: string;
|
|
7
|
-
role: Role;
|
|
7
|
+
role: Users.Role;
|
|
8
8
|
logoUrl: string | null;
|
|
9
9
|
displayName: string | null;
|
|
10
10
|
_count: {
|
|
@@ -12,20 +12,10 @@ export declare namespace Admin {
|
|
|
12
12
|
};
|
|
13
13
|
})[]>;
|
|
14
14
|
/** Returns all websites: https://umami.is/docs/api/admin#get-apiadminwebsites */
|
|
15
|
-
function getWebsites(this: API, parameters?: GenericRequestParameters): Promise<(
|
|
16
|
-
user: MinimalUser;
|
|
15
|
+
function getWebsites(this: API, parameters?: GenericRequestParameters): Promise<(Websites.WebsiteWithUser & {
|
|
17
16
|
/** @remarks TODO Documentation says it can be null but doesn't actually say what else it can be, ***presumed* to be string**, check */
|
|
18
17
|
team: string | null;
|
|
19
18
|
})[]>;
|
|
20
19
|
/** Returns all teams: https://umami.is/docs/api/admin#get-apiadminteams */
|
|
21
|
-
function getTeams(this: API, parameters?: GenericRequestParameters): Promise<
|
|
22
|
-
name: string;
|
|
23
|
-
accessCode: string;
|
|
24
|
-
logoUrl: string | null;
|
|
25
|
-
members: Teams.TeamMember[];
|
|
26
|
-
_count: {
|
|
27
|
-
websites: number;
|
|
28
|
-
members: number;
|
|
29
|
-
};
|
|
30
|
-
})[]>;
|
|
20
|
+
function getTeams(this: API, parameters?: GenericRequestParameters): Promise<Teams.TeamWithMembersCount[]>;
|
|
31
21
|
}
|
|
@@ -1,35 +1,36 @@
|
|
|
1
|
-
import { API, Filters, GenericRequestParameters, Timestamps } from "../index.js";
|
|
1
|
+
import { API, Filters, GenericRequestParameters, Timestamps, Websites } from "../index.js";
|
|
2
2
|
/** Operations around Events and Event data: https://umami.is/docs/api/events */
|
|
3
3
|
export declare namespace Events {
|
|
4
|
-
|
|
5
|
-
function get_WEBSITEID_Events(this: API, websiteId: string, parameters: Filters & Timestamps & GenericRequestParameters): Promise<{
|
|
4
|
+
interface Event {
|
|
6
5
|
id: string;
|
|
7
|
-
websiteId:
|
|
6
|
+
websiteId: Websites.Website["id"];
|
|
8
7
|
sessionId: string;
|
|
9
8
|
createdAt: Date;
|
|
10
9
|
hostname: string;
|
|
11
10
|
urlPath: string;
|
|
12
11
|
urlQuery: string;
|
|
13
|
-
referrerPath: string;
|
|
14
|
-
referrerQuery: string;
|
|
15
|
-
referrerDomain: string;
|
|
12
|
+
referrerPath: string | null;
|
|
13
|
+
referrerQuery: string | null;
|
|
14
|
+
referrerDomain: string | null;
|
|
16
15
|
country: string;
|
|
17
16
|
city: string;
|
|
18
17
|
device: string;
|
|
19
|
-
os: string;
|
|
20
|
-
browser: string;
|
|
21
|
-
pageTitle: string;
|
|
18
|
+
os: string | null;
|
|
19
|
+
browser: string | null;
|
|
20
|
+
pageTitle: string | null;
|
|
22
21
|
eventType: number;
|
|
23
22
|
eventName: string;
|
|
24
|
-
hasData
|
|
25
|
-
}
|
|
26
|
-
/** Gets event
|
|
27
|
-
function
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
hasData?: number;
|
|
24
|
+
}
|
|
25
|
+
/** Gets website event details within a given time range: https://umami.is/docs/api/events#get-apiwebsiteswebsiteidevents */
|
|
26
|
+
function get_WEBSITEID_Events(this: API, websiteId: Websites.Website["id"], parameters: Filters & Timestamps & GenericRequestParameters): Promise<Event[]>;
|
|
27
|
+
/** Gets event-data for a individual event: https://umami.is/docs/api/events#get-apiwebsiteswebsiteidevent-dataeventid */
|
|
28
|
+
function get_WEBSITEID_Eventdata_EVENTID(this: API, websiteId: Websites.Website["id"], eventId: Event["id"]): Promise<{
|
|
29
|
+
websiteId: Websites.Website["id"];
|
|
30
|
+
sessionId?: string;
|
|
31
|
+
eventId: Event["id"];
|
|
32
|
+
urlPath?: string;
|
|
33
|
+
eventName: Event["eventName"];
|
|
33
34
|
dataKey: string;
|
|
34
35
|
stringValue: string;
|
|
35
36
|
numberValue: number | null;
|
|
@@ -37,43 +38,43 @@ export declare namespace Events {
|
|
|
37
38
|
dataType: number;
|
|
38
39
|
createdAt: Date;
|
|
39
40
|
}[]>;
|
|
40
|
-
/** Gets event data names, properties, and counts: https://umami.is/docs/api/events#get-apiwebsiteswebsiteidevent-dataevents (TODO
|
|
41
|
-
function get_WEBSITEID_EventdataEvents(this: API, websiteId:
|
|
41
|
+
/** Gets event data names, properties, and counts: https://umami.is/docs/api/events#get-apiwebsiteswebsiteidevent-dataevents (TODO Server returns a 500) */
|
|
42
|
+
function get_WEBSITEID_EventdataEvents(this: API, websiteId: Websites.Website["id"], parameters: Filters & Timestamps & {
|
|
42
43
|
/** Event name filter */
|
|
43
|
-
event?:
|
|
44
|
+
event?: Event["eventName"];
|
|
44
45
|
}): Promise<{
|
|
45
|
-
eventName:
|
|
46
|
+
eventName: Event["eventName"];
|
|
46
47
|
propertyName: string;
|
|
47
48
|
dataType: number;
|
|
48
49
|
total: number;
|
|
49
50
|
}[]>;
|
|
50
|
-
/** Gets event data property and value counts within a given time range: https://umami.is/docs/api/events#get-apiwebsiteswebsiteidevent-datafields
|
|
51
|
-
function get_WEBSITEID_EventdataFields(this: API, websiteId:
|
|
51
|
+
/** Gets event data property and value counts within a given time range: https://umami.is/docs/api/events#get-apiwebsiteswebsiteidevent-datafields */
|
|
52
|
+
function get_WEBSITEID_EventdataFields(this: API, websiteId: Websites.Website["id"], parameters: Filters & Timestamps): Promise<{
|
|
52
53
|
propertyName: string;
|
|
53
54
|
dataType: number;
|
|
54
55
|
value: string;
|
|
55
56
|
total: number;
|
|
56
57
|
}[]>;
|
|
57
|
-
/** Gets event name and property counts for a website: https://umami.is/docs/api/events#get-apiwebsiteswebsiteidevent-dataproperties
|
|
58
|
-
function get_WEBSITEID_EventdataProperties(this: API, websiteId:
|
|
59
|
-
eventName:
|
|
58
|
+
/** Gets event name and property counts for a website: https://umami.is/docs/api/events#get-apiwebsiteswebsiteidevent-dataproperties */
|
|
59
|
+
function get_WEBSITEID_EventdataProperties(this: API, websiteId: Websites.Website["id"], parameters: Filters & Timestamps): Promise<{
|
|
60
|
+
eventName: Event["eventName"] | null;
|
|
60
61
|
propertyName: string;
|
|
61
62
|
total: number;
|
|
62
63
|
}[]>;
|
|
63
|
-
/** Gets event data counts for a given event and property: https://umami.is/docs/api/events#get-apiwebsiteswebsiteidevent-datavalues
|
|
64
|
-
function get_WEBSITEID_EventdataValues(this: API, websiteId:
|
|
64
|
+
/** Gets event data counts for a given event and property: https://umami.is/docs/api/events#get-apiwebsiteswebsiteidevent-datavalues */
|
|
65
|
+
function get_WEBSITEID_EventdataValues(this: API, websiteId: Websites.Website["id"], parameters: Filters & Timestamps & {
|
|
65
66
|
/** Event name filter */
|
|
66
|
-
event:
|
|
67
|
+
event: Event["eventName"];
|
|
67
68
|
/** Property name */
|
|
68
69
|
propertyName: string;
|
|
69
70
|
}): Promise<{
|
|
70
71
|
value: string;
|
|
71
72
|
total: number;
|
|
72
|
-
}>;
|
|
73
|
-
/** Gets aggregated website events, properties, and records within a given time range: https://umami.is/docs/api/events#get-apiwebsiteswebsiteidevent-datastats
|
|
74
|
-
function get_WEBSITEID_EventdataStats(this: API, websiteId:
|
|
73
|
+
}[]>;
|
|
74
|
+
/** Gets aggregated website events, properties, and records within a given time range: https://umami.is/docs/api/events#get-apiwebsiteswebsiteidevent-datastats */
|
|
75
|
+
function get_WEBSITEID_EventdataStats(this: API, websiteId: Websites.Website["id"], parameters: Filters & Timestamps): Promise<{
|
|
75
76
|
events: number;
|
|
76
77
|
properties: number;
|
|
77
78
|
records: number;
|
|
78
|
-
}
|
|
79
|
+
}>;
|
|
79
80
|
}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
/** Operations around Events and Event data: https://umami.is/docs/api/events */
|
|
2
2
|
export var Events;
|
|
3
3
|
(function (Events) {
|
|
4
|
-
/** Gets website event details within a given time range: https://umami.is/docs/api/events#get-apiwebsiteswebsiteidevents
|
|
4
|
+
/** Gets website event details within a given time range: https://umami.is/docs/api/events#get-apiwebsiteswebsiteidevents */
|
|
5
5
|
async function get_WEBSITEID_Events(websiteId, parameters) {
|
|
6
6
|
const response = await this.request("get", ["websites", websiteId, "events"], parameters);
|
|
7
7
|
return response.data;
|
|
8
8
|
}
|
|
9
9
|
Events.get_WEBSITEID_Events = get_WEBSITEID_Events;
|
|
10
|
-
/** Gets event-data for a individual event: https://umami.is/docs/api/events#get-apiwebsiteswebsiteidevent-dataeventid
|
|
10
|
+
/** Gets event-data for a individual event: https://umami.is/docs/api/events#get-apiwebsiteswebsiteidevent-dataeventid */
|
|
11
11
|
async function get_WEBSITEID_Eventdata_EVENTID(websiteId, eventId) {
|
|
12
12
|
return await this.request("get", ["websites", websiteId, "event-data", eventId]);
|
|
13
13
|
}
|
|
14
14
|
Events.get_WEBSITEID_Eventdata_EVENTID = get_WEBSITEID_Eventdata_EVENTID;
|
|
15
|
-
/** Gets event data names, properties, and counts: https://umami.is/docs/api/events#get-apiwebsiteswebsiteidevent-dataevents (TODO
|
|
15
|
+
/** Gets event data names, properties, and counts: https://umami.is/docs/api/events#get-apiwebsiteswebsiteidevent-dataevents (TODO Server returns a 500) */
|
|
16
16
|
async function get_WEBSITEID_EventdataEvents(websiteId, parameters) {
|
|
17
17
|
return await this.request("get", ["websites", websiteId, "event-data", "events"], parameters);
|
|
18
18
|
}
|
|
19
19
|
Events.get_WEBSITEID_EventdataEvents = get_WEBSITEID_EventdataEvents;
|
|
20
|
-
/** Gets event data property and value counts within a given time range: https://umami.is/docs/api/events#get-apiwebsiteswebsiteidevent-datafields
|
|
20
|
+
/** Gets event data property and value counts within a given time range: https://umami.is/docs/api/events#get-apiwebsiteswebsiteidevent-datafields */
|
|
21
21
|
async function get_WEBSITEID_EventdataFields(websiteId, parameters) {
|
|
22
22
|
return await this.request("get", ["websites", websiteId, "event-data", "fields"], parameters);
|
|
23
23
|
}
|
|
24
24
|
Events.get_WEBSITEID_EventdataFields = get_WEBSITEID_EventdataFields;
|
|
25
|
-
/** Gets event name and property counts for a website: https://umami.is/docs/api/events#get-apiwebsiteswebsiteidevent-dataproperties
|
|
25
|
+
/** Gets event name and property counts for a website: https://umami.is/docs/api/events#get-apiwebsiteswebsiteidevent-dataproperties */
|
|
26
26
|
async function get_WEBSITEID_EventdataProperties(websiteId, parameters) {
|
|
27
27
|
return await this.request("get", ["websites", websiteId, "event-data", "properties"], parameters);
|
|
28
28
|
}
|
|
29
29
|
Events.get_WEBSITEID_EventdataProperties = get_WEBSITEID_EventdataProperties;
|
|
30
|
-
/** Gets event data counts for a given event and property: https://umami.is/docs/api/events#get-apiwebsiteswebsiteidevent-datavalues
|
|
30
|
+
/** Gets event data counts for a given event and property: https://umami.is/docs/api/events#get-apiwebsiteswebsiteidevent-datavalues */
|
|
31
31
|
async function get_WEBSITEID_EventdataValues(websiteId, parameters) {
|
|
32
32
|
return await this.request("get", ["websites", websiteId, "event-data", "values"], parameters);
|
|
33
33
|
}
|
|
34
34
|
Events.get_WEBSITEID_EventdataValues = get_WEBSITEID_EventdataValues;
|
|
35
|
-
/** Gets aggregated website events, properties, and records within a given time range: https://umami.is/docs/api/events#get-apiwebsiteswebsiteidevent-datastats
|
|
35
|
+
/** Gets aggregated website events, properties, and records within a given time range: https://umami.is/docs/api/events#get-apiwebsiteswebsiteidevent-datastats */
|
|
36
36
|
async function get_WEBSITEID_EventdataStats(websiteId, parameters) {
|
|
37
37
|
return await this.request("get", ["websites", websiteId, "event-data", "stats"], parameters);
|
|
38
38
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { API, GenericObject, GenericRequestParameters } from "../index.js";
|
|
1
|
+
import { API, DeletionResult, GenericObject, GenericRequestParameters, Users } from "../index.js";
|
|
2
2
|
/** Operations around Links management: https://umami.is/docs/api/links */
|
|
3
3
|
export declare namespace Links {
|
|
4
4
|
interface Link extends GenericObject {
|
|
5
5
|
name: string;
|
|
6
6
|
url: string;
|
|
7
7
|
slug: string;
|
|
8
|
-
userId:
|
|
8
|
+
userId: Users.User["id"];
|
|
9
9
|
teamid: string | null;
|
|
10
10
|
}
|
|
11
11
|
/** Returns all user links: https://umami.is/docs/api/links#get-apilinks (TODO UNTESTED) */
|
|
@@ -15,14 +15,12 @@ export declare namespace Links {
|
|
|
15
15
|
/** Updates a link: https://umami.is/docs/api/links#post-apilinkslinkid (TODO UNTESTED) */
|
|
16
16
|
function post_LINKID(this: API, linkId: Link["id"], parameters: {
|
|
17
17
|
/** The link's name */
|
|
18
|
-
name?:
|
|
18
|
+
name?: Link["name"];
|
|
19
19
|
/** The link's destination URL */
|
|
20
|
-
url?:
|
|
20
|
+
url?: Link["url"];
|
|
21
21
|
/** The link's URL slug, **with a minimum of 8 characters** */
|
|
22
|
-
slug?:
|
|
22
|
+
slug?: Link["slug"];
|
|
23
23
|
}): Promise<Link>;
|
|
24
24
|
/** Deletes a link: https://umami.is/docs/api/links#delete-apilinkslinkid (TODO UNTESTED) */
|
|
25
|
-
function delete_LINKID(this: API, linkId: Link["id"]): Promise<
|
|
26
|
-
ok: boolean;
|
|
27
|
-
}>;
|
|
25
|
+
function delete_LINKID(this: API, linkId: Link["id"]): Promise<DeletionResult>;
|
|
28
26
|
}
|
package/dist/namespaces/Me.d.ts
CHANGED
|
@@ -1,44 +1,24 @@
|
|
|
1
|
-
import { API, GenericObject,
|
|
1
|
+
import { API, GenericObject, Teams, Users } from "../index.js";
|
|
2
2
|
/** All information about your session: https://umami.is/docs/api/me */
|
|
3
3
|
export declare namespace Me {
|
|
4
|
-
/** Get information based on your auth token: https://umami.is/docs/api/me#get-apime
|
|
4
|
+
/** Get information based on your auth token: https://umami.is/docs/api/me#get-apime */
|
|
5
5
|
function get(this: API): Promise<{
|
|
6
6
|
token: string;
|
|
7
7
|
authKey: string;
|
|
8
8
|
shareToken: string | null;
|
|
9
|
-
user:
|
|
10
|
-
id: string;
|
|
11
|
-
username: string;
|
|
12
|
-
role: Role;
|
|
13
|
-
createdAt: Date;
|
|
14
|
-
isAdmin: boolean;
|
|
15
|
-
};
|
|
9
|
+
user: Users.User;
|
|
16
10
|
}>;
|
|
17
|
-
/** Get all your teams: https://umami.is/docs/api/me#get-apimeteams
|
|
18
|
-
function getTeams(this: API): Promise<
|
|
19
|
-
|
|
20
|
-
accessCode: string;
|
|
21
|
-
logoUrl: string | null;
|
|
22
|
-
members: (Omit<GenericObject, "deletedAt"> & {
|
|
23
|
-
teamId: string;
|
|
24
|
-
userId: string;
|
|
25
|
-
role: TeamRole;
|
|
26
|
-
user: MinimalUser;
|
|
27
|
-
})[];
|
|
28
|
-
_count: {
|
|
29
|
-
websites: number;
|
|
30
|
-
members: number;
|
|
31
|
-
};
|
|
32
|
-
})[]>;
|
|
33
|
-
/** Get all your websites: https://umami.is/docs/api/me#get-apimeteams (TODO UNTESTED) */
|
|
11
|
+
/** Get all your teams: https://umami.is/docs/api/me#get-apimeteams */
|
|
12
|
+
function getTeams(this: API): Promise<Teams.TeamWithMembersCount[]>;
|
|
13
|
+
/** Get all your websites: https://umami.is/docs/api/me#get-apimeteams */
|
|
34
14
|
function getWebsites(this: API): Promise<(GenericObject & {
|
|
35
15
|
name: string;
|
|
36
16
|
domain: string;
|
|
37
17
|
shareId: string | null;
|
|
38
18
|
resetAt: Date | null;
|
|
39
|
-
userId:
|
|
19
|
+
userId: Users.User["id"];
|
|
40
20
|
teamId: string | null;
|
|
41
21
|
createdBy: string;
|
|
42
|
-
user: MinimalUser;
|
|
22
|
+
user: Users.MinimalUser;
|
|
43
23
|
})[]>;
|
|
44
24
|
}
|
package/dist/namespaces/Me.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/** All information about your session: https://umami.is/docs/api/me */
|
|
2
2
|
export var Me;
|
|
3
3
|
(function (Me) {
|
|
4
|
-
/** Get information based on your auth token: https://umami.is/docs/api/me#get-apime
|
|
4
|
+
/** Get information based on your auth token: https://umami.is/docs/api/me#get-apime */
|
|
5
5
|
async function get() {
|
|
6
6
|
return await this.request("get", ["me"]);
|
|
7
7
|
}
|
|
8
8
|
Me.get = get;
|
|
9
|
-
/** Get all your teams: https://umami.is/docs/api/me#get-apimeteams
|
|
9
|
+
/** Get all your teams: https://umami.is/docs/api/me#get-apimeteams */
|
|
10
10
|
async function getTeams() {
|
|
11
11
|
const response = await this.request("get", ["me", "teams"]);
|
|
12
12
|
return response.data;
|
|
13
13
|
}
|
|
14
14
|
Me.getTeams = getTeams;
|
|
15
|
-
/** Get all your websites: https://umami.is/docs/api/me#get-apimeteams
|
|
15
|
+
/** Get all your websites: https://umami.is/docs/api/me#get-apimeteams */
|
|
16
16
|
async function getWebsites() {
|
|
17
17
|
const response = await this.request("get", ["me", "websites"]);
|
|
18
18
|
return response.data;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { API, GenericObject, GenericRequestParameters } from "../index.js";
|
|
1
|
+
import { API, DeletionResult, GenericObject, GenericRequestParameters, Users } from "../index.js";
|
|
2
2
|
/** Operations around Pixels management: https://umami.is/docs/api/pixels */
|
|
3
3
|
export declare namespace Pixels {
|
|
4
4
|
interface Pixel extends GenericObject {
|
|
5
5
|
name: string;
|
|
6
6
|
slug: string;
|
|
7
|
-
userId:
|
|
7
|
+
userId: Users.User["id"];
|
|
8
8
|
teamid: string | null;
|
|
9
9
|
}
|
|
10
10
|
/** Returns all user pixels: https://umami.is/docs/api/pixels#get-apipixels (TODO UNTESTED) */
|
|
@@ -14,12 +14,10 @@ export declare namespace Pixels {
|
|
|
14
14
|
/** Updates a pixel: https://umami.is/docs/api/pixels#post-apipixelspixelid (TODO UNTESTED) */
|
|
15
15
|
function post_PIXELID(this: API, pixelId: Pixel["id"], parameters: {
|
|
16
16
|
/** The pixel's name */
|
|
17
|
-
name?:
|
|
17
|
+
name?: Pixel["name"];
|
|
18
18
|
/** The pixel's URL slug, **with a minimum of 8 characters** */
|
|
19
|
-
slug?:
|
|
19
|
+
slug?: Pixel["slug"];
|
|
20
20
|
}): Promise<Pixel>;
|
|
21
21
|
/** Deletes a pixel: https://umami.is/docs/api/pixels#delete-apipixelspixelid (TODO UNTESTED) */
|
|
22
|
-
function delete_PIXELID(this: API, pixelId: Pixel["id"]): Promise<
|
|
23
|
-
ok: boolean;
|
|
24
|
-
}>;
|
|
22
|
+
function delete_PIXELID(this: API, pixelId: Pixel["id"]): Promise<DeletionResult>;
|
|
25
23
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { API } from "../index.js";
|
|
1
|
+
import { API, Websites } from "../index.js";
|
|
2
2
|
/** Realtime data for your website: https://umami.is/docs/api/realtime */
|
|
3
3
|
export declare namespace Realtime {
|
|
4
4
|
/** Realtime stats within the last 30 minutes: https://umami.is/docs/api/realtime#get-apirealtimewebsiteid (TODO UNTESTED) */
|
|
5
|
-
function get_WEBSITEID(this: API, websiteId:
|
|
5
|
+
function get_WEBSITEID(this: API, websiteId: Websites.Website["id"]): Promise<{
|
|
6
6
|
countries: {
|
|
7
7
|
[k: string]: number;
|
|
8
8
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { API, Filters, GenericRequestParameters, NameValue, Report, Timestamps, XTY } from "../index.js";
|
|
1
|
+
import { API, DeletionResult, Filters, GenericRequestParameters, NameValue, Report, Timestamps, Websites, XTY } from "../index.js";
|
|
2
2
|
/** Using reports throught the api: https://umami.is/docs/api/reports */
|
|
3
3
|
export declare namespace Reports {
|
|
4
4
|
type ReportType = {
|
|
@@ -9,9 +9,9 @@ export declare namespace Reports {
|
|
|
9
9
|
views: number;
|
|
10
10
|
}
|
|
11
11
|
/** Get all reports by website ID: https://umami.is/docs/api/reports#get-apireports (TODO UNTESTED) */
|
|
12
|
-
function get(this: API, websiteId:
|
|
12
|
+
function get(this: API, websiteId: Websites.Website["id"], parameters: ReportType & Omit<GenericRequestParameters, "search">): Promise<Report[]>;
|
|
13
13
|
/** Creates a report: https://umami.is/docs/api/reports#post-apireports (TODO UNTESTED) */
|
|
14
|
-
function post(this: API, websiteId:
|
|
14
|
+
function post(this: API, websiteId: Websites.Website["id"], parameters: ReportType & {
|
|
15
15
|
/** Name of report */
|
|
16
16
|
name: string;
|
|
17
17
|
/** Description of report */
|
|
@@ -22,7 +22,7 @@ export declare namespace Reports {
|
|
|
22
22
|
/** Gets a report by ID: https://umami.is/docs/api/reports#get-apireportsreportid (TODO UNTESTED) */
|
|
23
23
|
function get_REPORTID(this: API, reportId: string): Promise<Report>;
|
|
24
24
|
/** Updates a report: https://umami.is/docs/api/reports#post-apireportsreportid (TODO UNTESTED) */
|
|
25
|
-
function post_REPORTID(this: API, reportId: string, websiteId:
|
|
25
|
+
function post_REPORTID(this: API, reportId: string, websiteId: Websites.Website["id"], parameters: ReportType & {
|
|
26
26
|
/** Name of report */
|
|
27
27
|
name: string;
|
|
28
28
|
/** Description of report */
|
|
@@ -31,11 +31,9 @@ export declare namespace Reports {
|
|
|
31
31
|
parameters?: any;
|
|
32
32
|
}): Promise<Report>;
|
|
33
33
|
/** Deletes a report: https://umami.is/docs/api/reports#delete-apireportsreportid (TODO UNTESTED) */
|
|
34
|
-
function delete_REPORTID(this: API, reportId: string): Promise<
|
|
35
|
-
ok: boolean;
|
|
36
|
-
}>;
|
|
34
|
+
function delete_REPORTID(this: API, reportId: string): Promise<DeletionResult>;
|
|
37
35
|
/** See how users engage with your marketing and what drives conversions: https://umami.is/docs/api/reports#post-apireportsattribution (TODO UNTESTED) */
|
|
38
|
-
function postAttribution(this: API, websiteId:
|
|
36
|
+
function postAttribution(this: API, websiteId: Websites.Website["id"], parameters: ReportType & Filters & Timestamps & {
|
|
39
37
|
/** Attribution model */
|
|
40
38
|
model: "firstClick" | "lastClick";
|
|
41
39
|
/** Conversion type */
|
|
@@ -57,7 +55,7 @@ export declare namespace Reports {
|
|
|
57
55
|
};
|
|
58
56
|
}>;
|
|
59
57
|
/** Dive deeper into your data by using segments and filters: https://umami.is/docs/api/reports#post-apireportsbreakdown (TODO UNTESTED) */
|
|
60
|
-
function postBreakdown(this: API, websiteId:
|
|
58
|
+
function postBreakdown(this: API, websiteId: Websites.Website["id"], parameters: ReportType & Filters & Timestamps & {
|
|
61
59
|
fields: ("path" | "title" | "query" | "referrer" | "browser" | "os" | "device" | "country" | "region" | "city" | "hostname" | "tag" | "event")[];
|
|
62
60
|
}): Promise<{
|
|
63
61
|
views: number;
|
|
@@ -69,7 +67,7 @@ export declare namespace Reports {
|
|
|
69
67
|
country: string;
|
|
70
68
|
}[]>;
|
|
71
69
|
/** Understand the conversion and drop-off rate of users: https://umami.is/docs/api/reports#post-apireportsfunnel (TODO UNTESTED) */
|
|
72
|
-
function postFunnel(this: API, websiteId:
|
|
70
|
+
function postFunnel(this: API, websiteId: Websites.Website["id"], parameters: ReportType & Filters & Timestamps & {
|
|
73
71
|
/** Type of event and conversion step */
|
|
74
72
|
steps: {
|
|
75
73
|
type: "path" | "event";
|
|
@@ -87,7 +85,7 @@ export declare namespace Reports {
|
|
|
87
85
|
remaining: number;
|
|
88
86
|
}[]>;
|
|
89
87
|
/** Track your goals for pageviews and events: https://umami.is/docs/api/reports#post-apireportsgoals (TODO UNTESTED) */
|
|
90
|
-
function postGoals(this: API, websiteId:
|
|
88
|
+
function postGoals(this: API, websiteId: Websites.Website["id"], parameters: ReportType & Filters & Timestamps & {
|
|
91
89
|
/** Conversion type */
|
|
92
90
|
type: ("path" | "event")[];
|
|
93
91
|
/** Conversion step value */
|
|
@@ -97,7 +95,7 @@ export declare namespace Reports {
|
|
|
97
95
|
total: number;
|
|
98
96
|
}>;
|
|
99
97
|
/** Understand how users nagivate through your website: https://umami.is/docs/api/reports#post-apireportsjourney (TODO UNTESTED) */
|
|
100
|
-
function postJourney(this: API, websiteId:
|
|
98
|
+
function postJourney(this: API, websiteId: Websites.Website["id"], parameters: ReportType & Filters & Timestamps & {
|
|
101
99
|
/** Number of steps from 3 to 7 */
|
|
102
100
|
steps: number;
|
|
103
101
|
/** Starting step URL or event name */
|
|
@@ -109,7 +107,7 @@ export declare namespace Reports {
|
|
|
109
107
|
count: number;
|
|
110
108
|
}[]>;
|
|
111
109
|
/** Measure your website stickiness by tracking how often users return: https://umami.is/docs/api/reports#post-apireportsretention (TODO UNTESTED) */
|
|
112
|
-
function postRetention(this: API, websiteId:
|
|
110
|
+
function postRetention(this: API, websiteId: Websites.Website["id"], parameters: ReportType & Filters & Timestamps & {
|
|
113
111
|
/** Timezone (ex. America/Los_Angeles) */
|
|
114
112
|
timezone: string;
|
|
115
113
|
}): Promise<{
|
|
@@ -120,7 +118,7 @@ export declare namespace Reports {
|
|
|
120
118
|
percentage: number;
|
|
121
119
|
}[]>;
|
|
122
120
|
/** Get currency for given range. Needed for Revenue and optional in Attribution reports: https://umami.is/docs/api/reports#post-apireportsrevenue (TODO UNTESTED) */
|
|
123
|
-
function postRevenue(this: API, websiteId:
|
|
121
|
+
function postRevenue(this: API, websiteId: Websites.Website["id"], parameters: ReportType & Filters & Timestamps & {
|
|
124
122
|
/** Timezone (ex. America/Los_Angeles) */
|
|
125
123
|
timezone: string;
|
|
126
124
|
/** Currency code (ISO 4217) */
|
|
@@ -136,7 +134,7 @@ export declare namespace Reports {
|
|
|
136
134
|
};
|
|
137
135
|
}>;
|
|
138
136
|
/** Track your campaigns through UTM parameters: https://umami.is/docs/api/reports#post-apireportsutm (TODO UNTESTED) */
|
|
139
|
-
function postUTM(this: API, websiteId:
|
|
137
|
+
function postUTM(this: API, websiteId: Websites.Website["id"], parameters: ReportType & Filters & Timestamps): Promise<{
|
|
140
138
|
utm_source: UTM[];
|
|
141
139
|
utm_medium: UTM[];
|
|
142
140
|
utm_campaign: UTM[];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { API, Filters, GenericRequestParameters, Timestamps } from "../index.js";
|
|
1
|
+
import { API, Filters, GenericRequestParameters, Timestamps, Websites } from "../index.js";
|
|
2
2
|
/** Operations around Sessions and Session data: https://umami.is/docs/api/sessions */
|
|
3
3
|
export declare namespace Sessions {
|
|
4
4
|
interface GenericSession {
|
|
5
5
|
id: string;
|
|
6
|
-
websiteId:
|
|
6
|
+
websiteId: Websites.Website["id"];
|
|
7
7
|
browser: string;
|
|
8
8
|
os: string;
|
|
9
9
|
device: string;
|
|
@@ -18,12 +18,12 @@ export declare namespace Sessions {
|
|
|
18
18
|
views: number;
|
|
19
19
|
}
|
|
20
20
|
/** Gets website session details within a given time range: https://umami.is/docs/api/sessions#get-apiwebsiteswebsiteidsessions (TODO UNTESTED) */
|
|
21
|
-
function get_WEBSITEID_Sessions(this: API, websiteId:
|
|
21
|
+
function get_WEBSITEID_Sessions(this: API, websiteId: Websites.Website["id"], parameters: Filters & Timestamps & GenericRequestParameters): Promise<(GenericSession & {
|
|
22
22
|
hostname: string;
|
|
23
23
|
createdAt: Date;
|
|
24
24
|
})[]>;
|
|
25
25
|
/** Gets summarized website session statistics: https://umami.is/docs/api/sessions#get-apiwebsiteswebsiteidsessionsstats (TODO UNTESTED) */
|
|
26
|
-
function get_WEBSITEID_SessionsStats(this: API, websiteId:
|
|
26
|
+
function get_WEBSITEID_SessionsStats(this: API, websiteId: Websites.Website["id"], parameters: Filters & Timestamps): Promise<{
|
|
27
27
|
/** Pages hits */
|
|
28
28
|
pageviews: {
|
|
29
29
|
value: number;
|
|
@@ -46,17 +46,17 @@ export declare namespace Sessions {
|
|
|
46
46
|
};
|
|
47
47
|
}>;
|
|
48
48
|
/** Get collected count of sessions by hour of weekday: https://umami.is/docs/api/sessions#get-apiwebsiteswebsiteidsessionsweekly (TODO UNTESTED) */
|
|
49
|
-
function get_WEBSITEID_SessionsWeekly(this: API, websiteId:
|
|
49
|
+
function get_WEBSITEID_SessionsWeekly(this: API, websiteId: Websites.Website["id"], parameters: Filters & Timestamps & {
|
|
50
50
|
timezone: string;
|
|
51
51
|
}): Promise<number[][]>;
|
|
52
52
|
/** Gets session details for a individual session: https://umami.is/docs/api/sessions#get-apiwebsiteswebsiteidsessionssessionid (TODO UNTESTED) */
|
|
53
|
-
function get_WEBSITEID_Sessions_SESSIONID(this: API, websiteId:
|
|
53
|
+
function get_WEBSITEID_Sessions_SESSIONID(this: API, websiteId: Websites.Website["id"], sessionId: string): Promise<GenericSession & {
|
|
54
54
|
distinctId: string;
|
|
55
55
|
events: number;
|
|
56
56
|
totaltime: number;
|
|
57
57
|
}>;
|
|
58
58
|
/** Gets session activity for a individual session: https://umami.is/docs/api/sessions#get-apiwebsiteswebsiteidsessionssessionidactivity (TODO UNTESTED) */
|
|
59
|
-
function get_WEBSITEID_Sessions_SESSIONID_Activity(this: API, websiteId:
|
|
59
|
+
function get_WEBSITEID_Sessions_SESSIONID_Activity(this: API, websiteId: Websites.Website["id"], sessionId: string, parameters: Timestamps): Promise<{
|
|
60
60
|
createdAt: Date;
|
|
61
61
|
urlPath: string;
|
|
62
62
|
urlQuery: string;
|
|
@@ -68,8 +68,8 @@ export declare namespace Sessions {
|
|
|
68
68
|
hasData: number;
|
|
69
69
|
}[]>;
|
|
70
70
|
/** Gets session properties for a individual session: https://umami.is/docs/api/sessions#get-apiwebsiteswebsiteidsessionssessionidproperties (TODO UNTESTED) */
|
|
71
|
-
function get_WEBSITEID_Sessions_SESSIONID_Properties(this: API, websiteId:
|
|
72
|
-
websiteId:
|
|
71
|
+
function get_WEBSITEID_Sessions_SESSIONID_Properties(this: API, websiteId: Websites.Website["id"], sessionId: string): Promise<{
|
|
72
|
+
websiteId: Websites.Website["id"];
|
|
73
73
|
sessionid: string;
|
|
74
74
|
dataKey: string;
|
|
75
75
|
dataType: number;
|
|
@@ -79,12 +79,12 @@ export declare namespace Sessions {
|
|
|
79
79
|
createdAt: Date;
|
|
80
80
|
}[]>;
|
|
81
81
|
/** Gets session data counts by property name: https://umami.is/docs/api/sessions#get-apiwebsiteswebsiteidsession-dataproperties (TODO UNTESTED) */
|
|
82
|
-
function get_WEBSITEID_SessiondataProperties(this: API, websiteId:
|
|
82
|
+
function get_WEBSITEID_SessiondataProperties(this: API, websiteId: Websites.Website["id"], parameters: Filters & Timestamps): Promise<{
|
|
83
83
|
propertyName: string;
|
|
84
84
|
total: number;
|
|
85
85
|
}[]>;
|
|
86
86
|
/** Gets session data counts for a given property: https://umami.is/docs/api/sessions#get-apiwebsiteswebsiteidsession-datavalues (TODO UNTESTED) */
|
|
87
|
-
function get_WEBSITEID_SessiondataValues(this: API, websiteId:
|
|
87
|
+
function get_WEBSITEID_SessiondataValues(this: API, websiteId: Websites.Website["id"], parameters: Filters & Timestamps & {
|
|
88
88
|
propertyName: string;
|
|
89
89
|
}): Promise<{
|
|
90
90
|
value: string;
|
|
@@ -1,35 +1,45 @@
|
|
|
1
|
-
import { API,
|
|
1
|
+
import { API, DeletionResult, GenericRequestParameters, Users, Websites } from "../index.js";
|
|
2
2
|
/** Operations around Team management: https://umami.is/docs/api/teams */
|
|
3
3
|
export declare namespace Teams {
|
|
4
|
-
interface
|
|
4
|
+
interface Team {
|
|
5
|
+
id: string;
|
|
5
6
|
name: string;
|
|
6
7
|
accessCode: string;
|
|
7
8
|
logoUrl: string | null;
|
|
9
|
+
createdAt: Date;
|
|
10
|
+
updatedAt: Date | null;
|
|
11
|
+
deletedAt: Date | null;
|
|
8
12
|
}
|
|
9
|
-
interface TeamMember
|
|
10
|
-
|
|
11
|
-
|
|
13
|
+
interface TeamMember {
|
|
14
|
+
id: string;
|
|
15
|
+
teamId: Team["id"];
|
|
16
|
+
userId: Users.User["id"];
|
|
12
17
|
role: TeamRole;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
username: string;
|
|
16
|
-
};
|
|
18
|
+
createdAt: Date;
|
|
19
|
+
updatedAt: Date;
|
|
17
20
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
interface TeamMemberWithUser extends TeamMember {
|
|
22
|
+
user: Users.MinimalUser;
|
|
23
|
+
}
|
|
24
|
+
interface TeamWithMembers extends Team {
|
|
25
|
+
members: TeamMemberWithUser[];
|
|
26
|
+
}
|
|
27
|
+
interface TeamWithMembersCount extends TeamWithMembers {
|
|
21
28
|
_count: {
|
|
22
29
|
websites: number;
|
|
23
30
|
members: number;
|
|
24
31
|
};
|
|
25
|
-
}
|
|
32
|
+
}
|
|
33
|
+
type TeamRole = "team-manager" | "team-member" | "team-view-only";
|
|
34
|
+
/** Returns all teams: https://umami.is/docs/api/teams#get-apiteams (TODO UNTESTED) */
|
|
35
|
+
function get(this: API, parameters?: Omit<GenericRequestParameters, "search">): Promise<TeamWithMembersCount[]>;
|
|
26
36
|
/** Creates a team: https://umami.is/docs/api/teams#post-apiteams (TODO UNTESTED) */
|
|
27
|
-
function post(this: API, name: string): Promise<[
|
|
37
|
+
function post(this: API, name: string): Promise<[Team, TeamMember]>;
|
|
28
38
|
/** Join a team: https://umami.is/docs/api/teams#post-apiteamsjoin (TODO UNTESTED) */
|
|
29
|
-
function postJoin(this: API, accessCode: string): Promise<
|
|
39
|
+
function postJoin(this: API, accessCode: string): Promise<TeamMember>;
|
|
30
40
|
/** Get a team: https://umami.is/docs/api/teams#get-apiteamsteamid (TODO UNTESTED) */
|
|
31
|
-
function get_TEAMID(this: API, teamId: string): Promise<
|
|
32
|
-
members:
|
|
41
|
+
function get_TEAMID(this: API, teamId: string): Promise<Team & {
|
|
42
|
+
members: TeamMember[];
|
|
33
43
|
}>;
|
|
34
44
|
/** Update a team: https://umami.is/docs/api/teams#post-apiteamsteamid (TODO UNTESTED) */
|
|
35
45
|
function post_TEAMID(this: API, teamId: string, parameters: {
|
|
@@ -37,40 +47,24 @@ export declare namespace Teams {
|
|
|
37
47
|
name?: string;
|
|
38
48
|
/** The team's access code */
|
|
39
49
|
accessCode?: string;
|
|
40
|
-
}): Promise<
|
|
50
|
+
}): Promise<Team>;
|
|
41
51
|
/** Delete a team: https://umami.is/docs/api/teams#delete-apiteamsteamid (TODO UNTESTED) */
|
|
42
|
-
function delete_TEAMID(this: API, teamId: string): Promise<
|
|
43
|
-
ok: boolean;
|
|
44
|
-
}>;
|
|
52
|
+
function delete_TEAMID(this: API, teamId: string): Promise<DeletionResult>;
|
|
45
53
|
/** Get all users that belong to a team: https://umami.is/docs/api/teams#get-apiteamsteamidusers (TODO UNTESTED) */
|
|
46
|
-
function get_TEAMID_Users(this: API, teamId: string, parameters: GenericRequestParameters): Promise<
|
|
54
|
+
function get_TEAMID_Users(this: API, teamId: string, parameters: GenericRequestParameters): Promise<TeamMemberWithUser[]>;
|
|
47
55
|
/** Add a user to a team: https://umami.is/docs/api/teams#post-apiteamsteamidusers (TODO UNTESTED) */
|
|
48
56
|
function post_TEAMID_Users(this: API, teamId: string, parameters: {
|
|
49
57
|
/** ID of user to be added */
|
|
50
|
-
userId:
|
|
58
|
+
userId: Users.User["id"];
|
|
51
59
|
/** Team role for user */
|
|
52
60
|
role: TeamRole;
|
|
53
|
-
}): Promise<
|
|
61
|
+
}): Promise<TeamMember>;
|
|
54
62
|
/** Get a user belonging to a team: https://umami.is/docs/api/teams#get-apiteamsteamidusersuserid (TODO UNTESTED) */
|
|
55
|
-
function get_TEAMID_Users_USERID(this: API, teamId: string, userId:
|
|
63
|
+
function get_TEAMID_Users_USERID(this: API, teamId: string, userId: Users.User["id"]): Promise<TeamMember>;
|
|
56
64
|
/** Update a user's role on a team: https://umami.is/docs/api/teams#post-apiteamsteamidusersuserid (TODO UNTESTED) */
|
|
57
|
-
function post_TEAMID_Users_USERID(this: API, teamId: string, userId:
|
|
65
|
+
function post_TEAMID_Users_USERID(this: API, teamId: string, userId: Users.User["id"], role: TeamRole): Promise<TeamMember>;
|
|
58
66
|
/** Remove a user from a team: https://umami.is/docs/api/teams#delete-apiteamsteamidusersuserid (TODO UNTESTED) */
|
|
59
|
-
function delete_TEAMID_Users_USERID(this: API, teamId: string, userId:
|
|
60
|
-
ok: boolean;
|
|
61
|
-
}>;
|
|
67
|
+
function delete_TEAMID_Users_USERID(this: API, teamId: string, userId: Users.User["id"]): Promise<DeletionResult>;
|
|
62
68
|
/** Get all websites that belong to a team: https://umami.is/docs/api/teams#get-apiteamsteamidwebsites (TODO UNTESTED) */
|
|
63
|
-
function get_TEAMID_Websites(this: API, teamId: string, parameters: GenericRequestParameters): Promise<
|
|
64
|
-
name: string;
|
|
65
|
-
domain: string;
|
|
66
|
-
shareId: string;
|
|
67
|
-
resetAt: Date | null;
|
|
68
|
-
userId: string | null;
|
|
69
|
-
teamId: string | null;
|
|
70
|
-
createdBy: string;
|
|
71
|
-
createUser: {
|
|
72
|
-
id: string;
|
|
73
|
-
username: string;
|
|
74
|
-
};
|
|
75
|
-
})[]>;
|
|
69
|
+
function get_TEAMID_Websites(this: API, teamId: string, parameters: GenericRequestParameters): Promise<Websites.WebsiteWithCreateuser[]>;
|
|
76
70
|
}
|
|
@@ -1,9 +1,22 @@
|
|
|
1
|
-
import { API,
|
|
1
|
+
import { API, DeletionResult, GenericRequestParameters, Teams, Websites } from "../index.js";
|
|
2
2
|
/** Operations around User management: https://umami.is/docs/api/users */
|
|
3
3
|
export declare namespace Users {
|
|
4
|
-
|
|
4
|
+
type Role = "admin" | "user" | "view-only";
|
|
5
|
+
interface MinimalUser {
|
|
6
|
+
id: string;
|
|
7
|
+
username: string;
|
|
8
|
+
}
|
|
9
|
+
interface MinimalUserWithRole extends MinimalUser {
|
|
5
10
|
role: Role;
|
|
6
11
|
}
|
|
12
|
+
interface MinimalUserWithCreatedAt extends MinimalUserWithRole {
|
|
13
|
+
createdAt: Date;
|
|
14
|
+
}
|
|
15
|
+
interface MinimalUserWithRoleCreatedAt extends MinimalUserWithRole, MinimalUserWithCreatedAt {
|
|
16
|
+
}
|
|
17
|
+
interface User extends MinimalUserWithCreatedAt {
|
|
18
|
+
isAdmin: boolean;
|
|
19
|
+
}
|
|
7
20
|
/** Creates a user: https://umami.is/docs/api/users#post-apiusers */
|
|
8
21
|
function post(this: API, parameters: {
|
|
9
22
|
/** The user's username */
|
|
@@ -14,46 +27,24 @@ export declare namespace Users {
|
|
|
14
27
|
role: Role;
|
|
15
28
|
/** Force a UUID assignment to the user */
|
|
16
29
|
id?: string;
|
|
17
|
-
}): Promise<
|
|
30
|
+
}): Promise<MinimalUserWithRole>;
|
|
18
31
|
/** Gets a user by ID: https://umami.is/docs/api/users#get-apiusersuserid */
|
|
19
|
-
function get_USERID(this: API, userId:
|
|
20
|
-
createdAt: Date;
|
|
21
|
-
}>;
|
|
32
|
+
function get_USERID(this: API, userId: User["id"]): Promise<MinimalUserWithRoleCreatedAt>;
|
|
22
33
|
/** Updates a user: https://umami.is/docs/api/users#post-apiusersuserid */
|
|
23
|
-
function post_USERID(this: API, userId:
|
|
34
|
+
function post_USERID(this: API, userId: User["id"], parameters?: {
|
|
24
35
|
/** The user's username */
|
|
25
36
|
username?: string;
|
|
26
37
|
/** The user's password */
|
|
27
38
|
password?: string;
|
|
28
39
|
/** The user's role */
|
|
29
40
|
role?: Role;
|
|
30
|
-
}): Promise<
|
|
31
|
-
createdAt: Date;
|
|
32
|
-
}>;
|
|
41
|
+
}): Promise<MinimalUserWithRoleCreatedAt>;
|
|
33
42
|
/** Deletes a user: https://umami.is/docs/api/users#delete-apiusersuserid */
|
|
34
|
-
function delete_USERID(this: API, userId:
|
|
35
|
-
ok: boolean;
|
|
36
|
-
}>;
|
|
43
|
+
function delete_USERID(this: API, userId: User["id"]): Promise<DeletionResult>;
|
|
37
44
|
/** Gets all websites that belong to a user: https://umami.is/docs/api/users#get-apiusersuseridwebsites */
|
|
38
|
-
function get_USERID_Websites(this: API, userId:
|
|
45
|
+
function get_USERID_Websites(this: API, userId: User["id"], parameters?: GenericRequestParameters & {
|
|
39
46
|
includeTeams?: boolean;
|
|
40
|
-
}): Promise<
|
|
41
|
-
user: MinimalUser;
|
|
42
|
-
})[]>;
|
|
47
|
+
}): Promise<Websites.WebsiteWithUser[]>;
|
|
43
48
|
/** Gets all teams that belong to a user: https://umami.is/docs/api/users#get-apiusersuseridteams */
|
|
44
|
-
function get_USERID_Teams(this: API, userId:
|
|
45
|
-
name: string;
|
|
46
|
-
accessCode: string;
|
|
47
|
-
logoUrl: string | null;
|
|
48
|
-
members: Omit<GenericObject, "deletedAt"> & {
|
|
49
|
-
teamId: string;
|
|
50
|
-
userId: string;
|
|
51
|
-
role: TeamRole;
|
|
52
|
-
user: MinimalUser;
|
|
53
|
-
}[];
|
|
54
|
-
_count: {
|
|
55
|
-
websites: number;
|
|
56
|
-
members: number;
|
|
57
|
-
};
|
|
58
|
-
})[]>;
|
|
49
|
+
function get_USERID_Teams(this: API, userId: User["id"], parameters?: Omit<GenericRequestParameters, "search">): Promise<Teams.TeamWithMembersCount[]>;
|
|
59
50
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { API, Filters, Timestamps, XTY } from "../index.js";
|
|
1
|
+
import { API, Filters, Timestamps, Websites, XTY } from "../index.js";
|
|
2
2
|
/** Operations around Website statistics: https://umami.is/docs/api/website-stats */
|
|
3
3
|
export declare namespace WebsiteStats {
|
|
4
4
|
/**
|
|
@@ -31,16 +31,16 @@ export declare namespace WebsiteStats {
|
|
|
31
31
|
}
|
|
32
32
|
type MetricsTypes = "path" | "entry" | "exit" | "title" | "query" | "referrer" | "channel" | "domain" | "country" | "region" | "city" | "browser" | "os" | "device" | "language" | "screen" | "event" | "hostname" | "tag";
|
|
33
33
|
/** Gets the number of active users on a website: https://umami.is/docs/api/website-stats#get-apiwebsiteswebsiteidactive (TODO UNTESTED) */
|
|
34
|
-
function get_WEBSITEID_Active(this: API, websiteId:
|
|
34
|
+
function get_WEBSITEID_Active(this: API, websiteId: Websites.Website["id"]): Promise<{
|
|
35
35
|
visitors: number;
|
|
36
36
|
}>;
|
|
37
37
|
/** Gets events within a given time range: https://umami.is/docs/api/website-stats#get-apiwebsiteswebsiteideventsseries (TODO UNTESTED) */
|
|
38
|
-
function get_WEBSITEID_EventsSeries(this: API, websiteId:
|
|
38
|
+
function get_WEBSITEID_EventsSeries(this: API, websiteId: Websites.Website["id"], parameters: Timestamps & Units & Filters & {
|
|
39
39
|
/** Timezone (ex. America/Los_Angeles) */
|
|
40
40
|
timezone: string;
|
|
41
41
|
}): Promise<XTY[]>;
|
|
42
42
|
/** Gets metrics for a given time range: https://umami.is/docs/api/website-stats#get-apiwebsiteswebsiteidmetrics (TODO UNTESTED) */
|
|
43
|
-
function get_WEBSITEID_Metrics(this: API, websiteId:
|
|
43
|
+
function get_WEBSITEID_Metrics(this: API, websiteId: Websites.Website["id"], parameters: Timestamps & Units & Filters & {
|
|
44
44
|
/** Timezone (ex. America/Los_Angeles) */
|
|
45
45
|
timezone: string;
|
|
46
46
|
/** Metrics type */
|
|
@@ -61,7 +61,7 @@ export declare namespace WebsiteStats {
|
|
|
61
61
|
name: string;
|
|
62
62
|
})[]>;
|
|
63
63
|
/** Gets pageviews within a given time range: https://umami.is/docs/api/website-stats#get-apiwebsiteswebsiteidpageviews (TODO UNTESTED) */
|
|
64
|
-
function get_WEBSITEID_Pageviews(this: API, websiteId:
|
|
64
|
+
function get_WEBSITEID_Pageviews(this: API, websiteId: Websites.Website["id"], parameters: Timestamps & Units & Filters & {
|
|
65
65
|
/** Timezone (ex. America/Los_Angeles) */
|
|
66
66
|
timezone: string;
|
|
67
67
|
/** Comparison value `prev` | `yoy` */
|
|
@@ -81,7 +81,7 @@ export declare namespace WebsiteStats {
|
|
|
81
81
|
}[];
|
|
82
82
|
}>;
|
|
83
83
|
/** Gets summarized website statistics: https://umami.is/docs/api/website-stats#get-apiwebsiteswebsiteidstats (TODO UNTESTED) */
|
|
84
|
-
function get_WEBSITEID_Stats(this: API, websiteId:
|
|
84
|
+
function get_WEBSITEID_Stats(this: API, websiteId: Websites.Website["id"], parameters: Timestamps & Filters & Units & {
|
|
85
85
|
/** Timezone (ex. America/Los_Angeles) */
|
|
86
86
|
timezone: string;
|
|
87
87
|
}): Promise<Stats & {
|
|
@@ -1,42 +1,57 @@
|
|
|
1
|
-
import { API, GenericRequestParameters,
|
|
1
|
+
import { API, DeletionResult, GenericRequestParameters, Teams, Users } from "../index.js";
|
|
2
2
|
/** Operations around Website management and statistics: https://umami.is/docs/api/websites */
|
|
3
3
|
export declare namespace Websites {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
interface Website {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
domain: string;
|
|
8
|
+
shareId: string | null;
|
|
9
|
+
resetAt: Date | null;
|
|
10
|
+
/** @remarks Is null if the website is under a team (has a `teamId`) */
|
|
11
|
+
userId: Users.User["id"] | null;
|
|
12
|
+
teamId: Teams.Team["id"] | null;
|
|
13
|
+
createdBy: Users.User["id"];
|
|
14
|
+
createdAt: Date;
|
|
15
|
+
updatedAt: Date | null;
|
|
16
|
+
deletedAt: Date | null;
|
|
17
|
+
}
|
|
18
|
+
interface WebsiteWithCreateuser extends Website {
|
|
19
|
+
user: Users.MinimalUser;
|
|
20
|
+
}
|
|
21
|
+
interface WebsiteWithUser extends Website {
|
|
22
|
+
user: Users.MinimalUser;
|
|
23
|
+
}
|
|
24
|
+
/** Returns all user websites: https://umami.is/docs/api/websites#get-apiwebsites */
|
|
25
|
+
function get(this: API, parameters?: GenericRequestParameters & {
|
|
26
|
+
/** Set to true if you want to include websites where you are the team owner */
|
|
27
|
+
includeTeams?: boolean;
|
|
28
|
+
}): Promise<WebsiteWithUser[]>;
|
|
29
|
+
/** Creates a website: https://umami.is/docs/api/websites#post-apiwebsites */
|
|
11
30
|
function post(this: API, parameters: {
|
|
12
31
|
/** The name of the website in Umami */
|
|
13
|
-
name:
|
|
32
|
+
name: Website["name"];
|
|
14
33
|
/** The full domain of the tracked website */
|
|
15
|
-
domain:
|
|
34
|
+
domain: Website["domain"];
|
|
16
35
|
/** A unique string to enable a share url. Set `null` to unshare */
|
|
17
|
-
shareId?:
|
|
36
|
+
shareId?: Website["shareId"];
|
|
18
37
|
/** The ID of the team the website will be created under */
|
|
19
|
-
teamId?:
|
|
38
|
+
teamId?: Website["teamId"];
|
|
20
39
|
/** Force a UUID assignment to the website */
|
|
21
|
-
id?:
|
|
40
|
+
id?: Website["id"];
|
|
22
41
|
}): Promise<Website>;
|
|
23
|
-
/** Gets a website by ID: https://umami.is/docs/api/websites#get-apiwebsiteswebsiteid
|
|
24
|
-
function get_WEBSITEID(this: API, websiteId:
|
|
25
|
-
/** Updates a website: https://umami.is/docs/api/websites#post-apiwebsiteswebsiteid
|
|
26
|
-
function post_WEBSITEID(this: API, websiteId:
|
|
42
|
+
/** Gets a website by ID: https://umami.is/docs/api/websites#get-apiwebsiteswebsiteid */
|
|
43
|
+
function get_WEBSITEID(this: API, websiteId: Website["id"]): Promise<Website>;
|
|
44
|
+
/** Updates a website: https://umami.is/docs/api/websites#post-apiwebsiteswebsiteid */
|
|
45
|
+
function post_WEBSITEID(this: API, websiteId: Website["id"], parameters: {
|
|
27
46
|
/** The name of the website in Umami */
|
|
28
|
-
name
|
|
47
|
+
name?: Website["name"];
|
|
29
48
|
/** The full domain of the tracked website */
|
|
30
|
-
domain
|
|
49
|
+
domain?: Website["domain"];
|
|
31
50
|
/** A unique string to enable a share url. Set `null` to unshare */
|
|
32
|
-
shareId?:
|
|
51
|
+
shareId?: Website["shareId"];
|
|
33
52
|
}): Promise<Website>;
|
|
34
|
-
/** Deletes a website: https://umami.is/docs/api/websites#delete-apiwebsiteswebsiteid
|
|
35
|
-
function delete_WEBSITEID(this: API, websiteId:
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
ok: boolean;
|
|
41
|
-
}>;
|
|
53
|
+
/** Deletes a website: https://umami.is/docs/api/websites#delete-apiwebsiteswebsiteid */
|
|
54
|
+
function delete_WEBSITEID(this: API, websiteId: Website["id"]): Promise<DeletionResult>;
|
|
55
|
+
/** Resets a website by removing all data related to the website: https://umami.is/docs/api/websites#post-apiwebsiteswebsiteidreset */
|
|
56
|
+
function post_WEBSITEID_Reset(this: API, websiteId: Website["id"]): Promise<DeletionResult>;
|
|
42
57
|
}
|
|
@@ -1,33 +1,33 @@
|
|
|
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#get-apiwebsites
|
|
4
|
+
/** Returns all user websites: https://umami.is/docs/api/websites#get-apiwebsites */
|
|
5
5
|
async function get(parameters) {
|
|
6
6
|
const response = await this.request("get", ["websites"], parameters);
|
|
7
7
|
return response.data;
|
|
8
8
|
}
|
|
9
9
|
Websites.get = get;
|
|
10
|
-
/** Creates a website: https://umami.is/docs/api/websites#post-apiwebsites
|
|
10
|
+
/** Creates a website: https://umami.is/docs/api/websites#post-apiwebsites */
|
|
11
11
|
async function post(parameters) {
|
|
12
12
|
return await this.request("post", ["websites"], parameters);
|
|
13
13
|
}
|
|
14
14
|
Websites.post = post;
|
|
15
|
-
/** Gets a website by ID: https://umami.is/docs/api/websites#get-apiwebsiteswebsiteid
|
|
15
|
+
/** Gets a website by ID: https://umami.is/docs/api/websites#get-apiwebsiteswebsiteid */
|
|
16
16
|
async function get_WEBSITEID(websiteId) {
|
|
17
17
|
return await this.request("get", ["websites", websiteId]);
|
|
18
18
|
}
|
|
19
19
|
Websites.get_WEBSITEID = get_WEBSITEID;
|
|
20
|
-
/** Updates a website: https://umami.is/docs/api/websites#post-apiwebsiteswebsiteid
|
|
20
|
+
/** Updates a website: https://umami.is/docs/api/websites#post-apiwebsiteswebsiteid */
|
|
21
21
|
async function post_WEBSITEID(websiteId, parameters) {
|
|
22
22
|
return await this.request("post", ["websites", websiteId], parameters);
|
|
23
23
|
}
|
|
24
24
|
Websites.post_WEBSITEID = post_WEBSITEID;
|
|
25
|
-
/** Deletes a website: https://umami.is/docs/api/websites#delete-apiwebsiteswebsiteid
|
|
25
|
+
/** Deletes a website: https://umami.is/docs/api/websites#delete-apiwebsiteswebsiteid */
|
|
26
26
|
async function delete_WEBSITEID(websiteId) {
|
|
27
27
|
return await this.request("delete", ["websites", websiteId]);
|
|
28
28
|
}
|
|
29
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
|
|
30
|
+
/** Resets a website by removing all data related to the website: https://umami.is/docs/api/websites#post-apiwebsiteswebsiteidreset */
|
|
31
31
|
async function post_WEBSITEID_Reset(websiteId) {
|
|
32
32
|
return await this.request("post", ["websites", websiteId, "reset"]);
|
|
33
33
|
}
|