@excali-boards/boards-api-client 1.1.46 → 1.1.48

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.
@@ -3,12 +3,16 @@ import { WithHeaders } from '../types';
3
3
  export declare class APIAnalytics {
4
4
  private web;
5
5
  constructor(web: BoardsManager);
6
+ getGlobalAnalytics({ auth, ...rest }: AnalyticsFunctionsInput['getGlobalAnalytics']): Promise<import("../types").WebResponse<UserBoardActivityWithUser[]>>;
6
7
  getUserAnalytics({ auth, ...rest }: AnalyticsFunctionsInput['getUserAnalytics']): Promise<import("../types").WebResponse<UserBoardActivityWithBoard[]>>;
7
8
  getBoardAnalytics({ auth, boardId, categoryId, groupId, ...rest }: AnalyticsFunctionsInput['getBoardAnalytics']): Promise<import("../types").WebResponse<UserBoardActivityWithUser[]>>;
8
9
  getCategoryAnalytics({ auth, categoryId, groupId, ...rest }: AnalyticsFunctionsInput['getCategoryAnalytics']): Promise<import("../types").WebResponse<UserBoardActivityWithUser[]>>;
9
10
  getGroupAnalytics({ auth, groupId, ...rest }: AnalyticsFunctionsInput['getGroupAnalytics']): Promise<import("../types").WebResponse<UserBoardActivityWithUser[]>>;
10
11
  }
11
12
  export type AnalyticsFunctionsInput = WithHeaders<{
13
+ 'getGlobalAnalytics': {
14
+ auth: string;
15
+ };
12
16
  'getUserAnalytics': {
13
17
  auth: string;
14
18
  };
@@ -8,6 +8,12 @@ class APIAnalytics {
8
8
  this.web = web;
9
9
  }
10
10
  // Methods.
11
+ async getGlobalAnalytics({ auth, ...rest }) {
12
+ return await this.web.request({
13
+ method: 'GET', auth, ...rest,
14
+ endpoint: this.web.qp('/analytics'),
15
+ });
16
+ }
11
17
  async getUserAnalytics({ auth, ...rest }) {
12
18
  return await this.web.request({
13
19
  method: 'GET', auth, ...rest,
@@ -16,7 +16,8 @@ export type MetricsFunctionsInput = WithHeaders<{
16
16
  }>;
17
17
  export type SystemStatus = {
18
18
  cpuUsage: number;
19
- memoryUsage: string;
19
+ memoryUsageMb: number;
20
+ uptimeSeconds: number;
20
21
  activeRooms: number;
21
22
  socketConnections: number;
22
23
  queuedFiles: number;
@@ -25,4 +26,6 @@ export type SystemStatus = {
25
26
  totalBoards: number;
26
27
  totalCategories: number;
27
28
  totalGroups: number;
29
+ totalFiles: number;
30
+ storageSizeMb: number;
28
31
  };
@@ -8,6 +8,7 @@ export declare class APISessions {
8
8
  getAllSessions({ auth, ...rest }: SessionsFunctionsInput['getAllSessions']): Promise<import("../types").WebResponse<SessionsOutput>>;
9
9
  deleteSession({ auth, dbId, ...rest }: SessionsFunctionsInput['deleteSession']): Promise<import("../types").WebResponse<string>>;
10
10
  deleteAllSessions({ auth, ...rest }: SessionsFunctionsInput['deleteAllSessions']): Promise<import("../types").WebResponse<string>>;
11
+ rotateLinkedSession({ auth, body, ...rest }: SessionsFunctionsInput['rotateLinkedSession']): Promise<import("../types").WebResponse<string>>;
11
12
  }
12
13
  export type SessionsFunctionsInput = WithHeaders<{
13
14
  'createSession': {
@@ -24,6 +25,10 @@ export type SessionsFunctionsInput = WithHeaders<{
24
25
  'deleteAllSessions': {
25
26
  auth: string;
26
27
  };
28
+ 'rotateLinkedSession': {
29
+ auth: string;
30
+ body: UnlinkLoginMethodInput;
31
+ };
27
32
  }>;
28
33
  export type CreateSessionInput = {
29
34
  ip?: string;
@@ -50,3 +55,8 @@ export type SessionsOutput = {
50
55
  lastUsed: Date;
51
56
  }[];
52
57
  };
58
+ export type UnlinkLoginMethodInput = {
59
+ platform: Platforms;
60
+ email?: string;
61
+ newMainPlatform?: Platforms;
62
+ };
@@ -32,5 +32,11 @@ class APISessions {
32
32
  endpoint: this.web.qp('/sessions/all'),
33
33
  });
34
34
  }
35
+ async rotateLinkedSession({ auth, body, ...rest }) {
36
+ return await this.web.request({
37
+ method: 'POST', auth, body, ...rest,
38
+ endpoint: this.web.qp('/sessions/rotate'),
39
+ });
40
+ }
35
41
  }
36
42
  exports.APISessions = APISessions;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.46",
2
+ "version": "1.1.48",
3
3
  "name": "@excali-boards/boards-api-client",
4
4
  "description": "A simple API client for the Boards API.",
5
5
  "repository": "https://github.com/Excali-Boards/boards-api-client",