Misma info de sim para el /select

This commit is contained in:
2026-05-08 14:49:43 +02:00
parent 410f659db0
commit 63698ee1aa
8 changed files with 174 additions and 7 deletions

View File

@@ -14,6 +14,33 @@ export class ObjeniousOperationsRepository implements IOperationsRepository {
) {
}
public async getLineByIccid(iccid: string): Promise<Result<string, ObjeniousLine[]>> {
const path = "/lines"
const params = new URLSearchParams([
["identifier.identifierType", "ICCID"],
["identifier.identifiers", iccid]
])
const req = this.http.client.get<ObjeniousLineResponse>(path, {
params: params
})
const res = await tryCatch(req)
if (res.error != undefined) {
return {
error: res.error?.message
}
}
const lines = res.data.data.content
return {
data: lines
}
}
/**
* Consulta el estado de una o mas lineas directamente a la API de Objenious
* TODO: No hay paginacion como en getLinesByStatusAPI