mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-19 03:42:23 -06:00
chore: Simplified payloads and endpoints
This commit is contained in:
19
src/validate/proxy.schema.ts
Normal file
19
src/validate/proxy.schema.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { JSONSchema7 } from 'json-schema';
|
||||
import { v4 } from 'uuid';
|
||||
|
||||
import { isNotEmpty } from './validate.schema';
|
||||
|
||||
export const proxySchema: JSONSchema7 = {
|
||||
$id: v4(),
|
||||
type: 'object',
|
||||
properties: {
|
||||
enabled: { type: 'boolean', enum: [true, false] },
|
||||
host: { type: 'string' },
|
||||
port: { type: 'string' },
|
||||
protocol: { type: 'string' },
|
||||
username: { type: 'string' },
|
||||
password: { type: 'string' },
|
||||
},
|
||||
required: ['enabled', 'host', 'port', 'protocol'],
|
||||
...isNotEmpty('enabled', 'host', 'port', 'protocol'),
|
||||
};
|
||||
Reference in New Issue
Block a user