Cron completo y mejora de logs
This commit is contained in:
@@ -16,6 +16,7 @@ export class ObjeniousOperationsRepository implements IOperationsRepository {
|
||||
|
||||
/**
|
||||
* Consulta el estado de una o mas lineas directamente a la API de Objenious
|
||||
* TODO: No hay paginacion como en getLinesByStatusAPI
|
||||
*/
|
||||
public async getLinesAPI(
|
||||
identifierType: "ICCID" | "IMSI" | "IMEI" | "MSISDN" | "REFERENCE",
|
||||
@@ -59,7 +60,8 @@ export class ObjeniousOperationsRepository implements IOperationsRepository {
|
||||
public async * getLinesByStatusAPI(args?: {
|
||||
pageSize?: number,
|
||||
pageNumber?: number,
|
||||
status?: string
|
||||
status?: string,
|
||||
iccids?: string[]
|
||||
}): AsyncGenerator<Result<string, ObjeniousLine[]>, Result<string, ObjeniousLine[]>, any> {
|
||||
|
||||
const path = "/lines"
|
||||
@@ -70,6 +72,12 @@ export class ObjeniousOperationsRepository implements IOperationsRepository {
|
||||
|
||||
const params: Record<string, string | number> = {}
|
||||
|
||||
// Si se va a filtrar por iccids especificamente, en un futuro habra que ampliar el tipo de filtros
|
||||
if (args?.iccids != undefined) {
|
||||
params["identifier.identifierType"] = "ICCID"
|
||||
params["identifier.identifiers"] = args.iccids.toString()
|
||||
}
|
||||
|
||||
const loadNextLine = async (page: number): Promise<Result<string, ObjeniousLine[]>> => {
|
||||
if (args?.status != undefined) params["simStatus"] = args.status
|
||||
params["pageSize"] = pageSize
|
||||
|
||||
Reference in New Issue
Block a user