@remnawave/backend-contract 0.0.31 → 0.0.32

Sign up to get free protection for your applications and to get access to all the features.
@@ -37,6 +37,11 @@ var GetStatsCommand;
37
37
  previous: zod_1.z.string(),
38
38
  percentage: zod_1.z.number(),
39
39
  }),
40
+ sevenDaysStats: zod_1.z.array(zod_1.z.object({
41
+ nodeName: zod_1.z.string(),
42
+ totalBytes: zod_1.z.string(),
43
+ date: zod_1.z.string(),
44
+ })),
40
45
  }),
41
46
  }),
42
47
  });
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EVENTS = void 0;
4
+ exports.EVENTS = {
5
+ USER: {
6
+ CREATED: 'user.created',
7
+ MODIFIED: 'user.modified',
8
+ DELETED: 'user.deleted',
9
+ REVOKED: 'user.revoked',
10
+ DISABLED: 'user.disabled',
11
+ ENABLED: 'user.enabled',
12
+ LIMITED: 'user.limited',
13
+ EXPIRED: 'user.expired',
14
+ TRAFFIC_RESET: 'user.traffic_reset',
15
+ TRAFFIC_REACHED: 'user.traffic_reached',
16
+ },
17
+ NODE: {
18
+ CREATED: 'node.created',
19
+ MODIFIED: 'node.modified',
20
+ DISABLED: 'node.disabled',
21
+ ENABLED: 'node.enabled',
22
+ DELETED: 'node.deleted',
23
+ CONNECTION_LOST: 'node.connection_lost',
24
+ CONNECTION_RESTORED: 'node.connection_restored',
25
+ RESTARTED: 'node.restarted',
26
+ },
27
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./events"), exports);
@@ -20,3 +20,4 @@ __exportStar(require("./nodes"), exports);
20
20
  __exportStar(require("./roles"), exports);
21
21
  __exportStar(require("./templates"), exports);
22
22
  __exportStar(require("./users"), exports);
23
+ __exportStar(require("./events"), exports);
@@ -41,6 +41,13 @@ export namespace GetStatsCommand {
41
41
  previous: z.string(),
42
42
  percentage: z.number(),
43
43
  }),
44
+ sevenDaysStats: z.array(
45
+ z.object({
46
+ nodeName: z.string(),
47
+ totalBytes: z.string(),
48
+ date: z.string(),
49
+ }),
50
+ ),
44
51
  }),
45
52
  }),
46
53
  });
@@ -0,0 +1,24 @@
1
+ export const EVENTS = {
2
+ USER: {
3
+ CREATED: 'user.created',
4
+ MODIFIED: 'user.modified',
5
+ DELETED: 'user.deleted',
6
+ REVOKED: 'user.revoked',
7
+ DISABLED: 'user.disabled',
8
+ ENABLED: 'user.enabled',
9
+ LIMITED: 'user.limited',
10
+ EXPIRED: 'user.expired',
11
+ TRAFFIC_RESET: 'user.traffic_reset',
12
+ TRAFFIC_REACHED: 'user.traffic_reached',
13
+ },
14
+ NODE: {
15
+ CREATED: 'node.created',
16
+ MODIFIED: 'node.modified',
17
+ DISABLED: 'node.disabled',
18
+ ENABLED: 'node.enabled',
19
+ DELETED: 'node.deleted',
20
+ CONNECTION_LOST: 'node.connection_lost',
21
+ CONNECTION_RESTORED: 'node.connection_restored',
22
+ RESTARTED: 'node.restarted',
23
+ },
24
+ };
@@ -0,0 +1 @@
1
+ export * from './events';
@@ -4,3 +4,4 @@ export * from './nodes';
4
4
  export * from './roles';
5
5
  export * from './templates';
6
6
  export * from './users';
7
+ export * from './events';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "0.0.31",
3
+ "version": "0.0.32",
4
4
  "description": "A contract library for Remnawave",
5
5
  "main": "index.js",
6
6
  "scripts": {