@remnawave/backend-contract 0.0.22 → 0.0.24

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,7 +9,7 @@ const models_1 = require("../../models");
9
9
  var CreateHostCommand;
10
10
  (function (CreateHostCommand) {
11
11
  CreateHostCommand.url = api_1.REST_API.HOSTS.CREATE;
12
- CreateHostCommand.RequestSchema = models_1.HostsSchema.pick({}).extend({
12
+ CreateHostCommand.RequestSchema = zod_1.z.object({
13
13
  inboundUuid: zod_1.z
14
14
  .string({
15
15
  invalid_type_error: 'Inbound UUID must be a string',
@@ -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,7 +7,7 @@ import { HostsSchema } from '../../models';
7
7
  export namespace CreateHostCommand {
8
8
  export const url = REST_API.HOSTS.CREATE;
9
9
 
10
- export const RequestSchema = HostsSchema.pick({}).extend({
10
+ export const RequestSchema = z.object({
11
11
  inboundUuid: z
12
12
  .string({
13
13
  invalid_type_error: 'Inbound UUID must be a string',
@@ -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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnawave/backend-contract",
3
- "version": "0.0.22",
3
+ "version": "0.0.24",
4
4
  "description": "A contract library for Remnawave",
5
5
  "main": "index.js",
6
6
  "scripts": {