@remnawave/backend-contract 0.0.23 → 0.0.25

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.
@@ -35,8 +35,8 @@ var CreateHostCommand;
35
35
  host: zod_1.z.string().optional(),
36
36
  alpn: zod_1.z.optional(zod_1.z.enum([alpn_1.ALPN_VALUES[0], ...alpn_1.ALPN_VALUES]).nullable()),
37
37
  fingerprint: zod_1.z.optional(zod_1.z.enum([fingerprints_1.FINGERPRINTS_VALUES[0], ...fingerprints_1.FINGERPRINTS_VALUES]).nullable()),
38
- allowInsecure: zod_1.z.boolean().optional().default(false),
39
- isDisabled: zod_1.z.boolean().optional().default(false),
38
+ allowInsecure: zod_1.z.optional(zod_1.z.boolean().default(false)),
39
+ isDisabled: zod_1.z.optional(zod_1.z.boolean().default(false)),
40
40
  });
41
41
  CreateHostCommand.ResponseSchema = zod_1.z.object({
42
42
  response: models_1.HostsSchema,
@@ -7,6 +7,9 @@ const constants_1 = require("../../constants");
7
7
  var GetStatsCommand;
8
8
  (function (GetStatsCommand) {
9
9
  GetStatsCommand.url = api_1.REST_API.SYSTEM.STATS;
10
+ GetStatsCommand.RequestQuerySchema = zod_1.z.object({
11
+ dt: zod_1.z.string().datetime({ offset: true }).optional(),
12
+ });
10
13
  GetStatsCommand.ResponseSchema = zod_1.z.object({
11
14
  response: zod_1.z.object({
12
15
  cpu: zod_1.z.object({
@@ -35,8 +35,8 @@ export namespace CreateHostCommand {
35
35
  fingerprint: z.optional(
36
36
  z.enum([FINGERPRINTS_VALUES[0], ...FINGERPRINTS_VALUES]).nullable(),
37
37
  ),
38
- allowInsecure: z.boolean().optional().default(false),
39
- isDisabled: z.boolean().optional().default(false),
38
+ allowInsecure: z.optional(z.boolean().default(false)),
39
+ isDisabled: z.optional(z.boolean().default(false)),
40
40
  });
41
41
  export type Request = z.infer<typeof RequestSchema>;
42
42
 
@@ -5,6 +5,12 @@ import { USERS_STATUS } from '../../constants';
5
5
  export namespace GetStatsCommand {
6
6
  export const url = REST_API.SYSTEM.STATS;
7
7
 
8
+ export const RequestQuerySchema = z.object({
9
+ dt: z.string().datetime({ offset: true }).optional(),
10
+ });
11
+
12
+ export type Request = z.infer<typeof RequestQuerySchema>;
13
+
8
14
  export const ResponseSchema = z.object({
9
15
  response: z.object({
10
16
  cpu: z.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "description": "A contract library for Remnawave",
5
5
  "main": "index.js",
6
6
  "scripts": {