All Verbs | /admin/crearusuario |
---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class NovedadesCarga:
fila: int = 0
columna: int = 0
tipo_error: Optional[str] = None
novedad: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GuardarDatosFormaDetalleRS:
id_detalle: Decimal = decimal.Decimal(0)
novedades: Optional[List[NovedadesCarga]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GeneralRS:
# @ApiMember(DataType="int", Description="Id del código de respuesta 1: Correcto, -1: Error", IsRequired=true, ParameterType="body")
codigo: int = 0
"""
Id del código de respuesta 1: Correcto, -1: Error
"""
# @ApiMember(DataType="string", Description="Mensaje que se envía al ejecutar el servicio", IsRequired=true, ParameterType="body")
mensaje: Optional[str] = None
"""
Mensaje que se envía al ejecutar el servicio
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ExecuteDBFunctionRS(GeneralRS):
respuesta: Optional[Object] = None
id_ejecucion: Decimal = decimal.Decimal(0)
url_archivo: Optional[str] = None
tipo_respuesta: Optional[str] = None
background: bool = False
tiempo_respuesta_b_d: int = 0
tiempo_respuesta_total: int = 0
# @ApiMember(DataType="int", Description="Id del código de respuesta 1: Correcto, -1: Error", IsRequired=true, ParameterType="body")
codigo: int = 0
"""
Id del código de respuesta 1: Correcto, -1: Error
"""
# @ApiMember(DataType="string", Description="Mensaje que se envía al ejecutar el servicio", IsRequired=true, ParameterType="body")
mensaje: Optional[str] = None
"""
Mensaje que se envía al ejecutar el servicio
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GuardarDatosFormaRS:
success: bool = False
error: Optional[str] = None
datos_llave_maestro: Optional[Dict[str, Object]] = None
novedades_detalles: Optional[List[GuardarDatosFormaDetalleRS]] = None
respuesta_proc_almacenado: Optional[ExecuteDBFunctionRS] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CreateUserAdm(GuardarDatosFormaRS):
identificacion: Optional[str] = None
nombres: Optional[str] = None
direccion: Optional[str] = None
telefonos: Optional[str] = None
email: Optional[str] = None
usuario_creo: Optional[str] = None
estado: Optional[str] = None
login_adicional: Optional[str] = None
id: int = 0
cod_sistema: int = 0
cod_empresa: int = 0
success: bool = False
error: Optional[str] = None
datos_llave_maestro: Optional[Dict[str, Object]] = None
novedades_detalles: Optional[List[GuardarDatosFormaDetalleRS]] = None
respuesta_proc_almacenado: Optional[ExecuteDBFunctionRS] = None
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /admin/crearusuario HTTP/1.1
Host: soluser-recaudo.sgsas.co
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
Identificacion: String,
Nombres: String,
Direccion: String,
Telefonos: String,
Email: String,
UsuarioCreo: String,
Estado: String,
LoginAdicional: String,
ID: 0,
CodSistema: 0,
CodEmpresa: 0,
Success: False,
Error: String,
DatosLlaveMaestro:
{
String: {}
},
NovedadesDetalles:
[
{
IDDetalle: 0,
Novedades:
[
{
Fila: 0,
Columna: 0,
TipoError: String,
Novedad: String
}
]
}
],
RespuestaProcAlmacenado:
{
Respuesta: {},
IDEjecucion: 0,
URLArchivo: String,
TipoRespuesta: String,
Background: False,
TiempoRespuestaBD: 0,
TiempoRespuestaTotal: 0,
Codigo: 0,
Mensaje: String
}
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { Success: False, Error: String, DatosLlaveMaestro: { String: {} }, NovedadesDetalles: [ { IDDetalle: 0, Novedades: [ { Fila: 0, Columna: 0, TipoError: String, Novedad: String } ] } ], RespuestaProcAlmacenado: { Respuesta: {}, IDEjecucion: 0, URLArchivo: String, TipoRespuesta: String, Background: False, TiempoRespuestaBD: 0, TiempoRespuestaTotal: 0, Codigo: 0, Mensaje: String } }