veriko 0.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- veriko-0.4.1/.github/workflows/ci.yml +71 -0
- veriko-0.4.1/.github/workflows/publish.yml +129 -0
- veriko-0.4.1/.github/workflows/sync-public-spec.yml +20 -0
- veriko-0.4.1/.gitignore +11 -0
- veriko-0.4.1/CHANGELOG.md +184 -0
- veriko-0.4.1/LICENSE +21 -0
- veriko-0.4.1/PKG-INFO +536 -0
- veriko-0.4.1/README.md +482 -0
- veriko-0.4.1/examples/async_and_webhooks.py +66 -0
- veriko-0.4.1/examples/flask_webhook.py +66 -0
- veriko-0.4.1/examples/validate.py +47 -0
- veriko-0.4.1/pyproject.toml +70 -0
- veriko-0.4.1/spec/openapi.yaml +21016 -0
- veriko-0.4.1/src/veriko/__init__.py +155 -0
- veriko-0.4.1/src/veriko/_http.py +337 -0
- veriko-0.4.1/src/veriko/client.py +179 -0
- veriko-0.4.1/src/veriko/errors.py +135 -0
- veriko-0.4.1/src/veriko/models.py +792 -0
- veriko-0.4.1/src/veriko/pagination.py +100 -0
- veriko-0.4.1/src/veriko/py.typed +0 -0
- veriko-0.4.1/src/veriko/resources.py +1334 -0
- veriko-0.4.1/src/veriko/webhooks.py +134 -0
- veriko-0.4.1/tests/conftest.py +196 -0
- veriko-0.4.1/tests/recordings/account-validation.json +31 -0
- veriko-0.4.1/tests/recordings/api-usage-export-csv.json +8 -0
- veriko-0.4.1/tests/recordings/api-usage.json +24 -0
- veriko-0.4.1/tests/recordings/banks.json +46 -0
- veriko-0.4.1/tests/recordings/banxico-status.json +30 -0
- veriko-0.4.1/tests/recordings/banxico-timeseries.json +39 -0
- veriko-0.4.1/tests/recordings/beneficiaries-export-csv.json +8 -0
- veriko-0.4.1/tests/recordings/beneficiaries-import-committed.json +20 -0
- veriko-0.4.1/tests/recordings/beneficiaries-import-created.json +20 -0
- veriko-0.4.1/tests/recordings/beneficiaries-import-parsing.json +36 -0
- veriko-0.4.1/tests/recordings/beneficiaries-import-preview.json +90 -0
- veriko-0.4.1/tests/recordings/beneficiaries-import-row-updated.json +40 -0
- veriko-0.4.1/tests/recordings/beneficiaries-import-status.json +36 -0
- veriko-0.4.1/tests/recordings/beneficiaries-import-template.json +8 -0
- veriko-0.4.1/tests/recordings/beneficiaries-list.json +41 -0
- veriko-0.4.1/tests/recordings/beneficiary-created.json +26 -0
- veriko-0.4.1/tests/recordings/beneficiary-lookup.json +23 -0
- veriko-0.4.1/tests/recordings/beneficiary-updated.json +26 -0
- veriko-0.4.1/tests/recordings/bin-lookup.json +30 -0
- veriko-0.4.1/tests/recordings/cep-404.json +24 -0
- veriko-0.4.1/tests/recordings/cep-pdf.json +8 -0
- veriko-0.4.1/tests/recordings/cep-xml.json +8 -0
- veriko-0.4.1/tests/recordings/deliveries-export-csv.json +8 -0
- veriko-0.4.1/tests/recordings/no-content.json +5 -0
- veriko-0.4.1/tests/recordings/not-modified.json +7 -0
- veriko-0.4.1/tests/recordings/retries-cancelled.json +35 -0
- veriko-0.4.1/tests/recordings/retry-attempts.json +45 -0
- veriko-0.4.1/tests/recordings/retry-policy-updated.json +35 -0
- veriko-0.4.1/tests/recordings/telegram-accepted.json +24 -0
- veriko-0.4.1/tests/recordings/usage-breakdown.json +31 -0
- veriko-0.4.1/tests/recordings/usage-heatmap.json +32 -0
- veriko-0.4.1/tests/recordings/usage-history.json +33 -0
- veriko-0.4.1/tests/recordings/usage-limits.json +32 -0
- veriko-0.4.1/tests/recordings/usage-summary.json +27 -0
- veriko-0.4.1/tests/recordings/validate-401.json +24 -0
- veriko-0.4.1/tests/recordings/validate-409.json +24 -0
- veriko-0.4.1/tests/recordings/validate-422.json +35 -0
- veriko-0.4.1/tests/recordings/validate-429.json +28 -0
- veriko-0.4.1/tests/recordings/validate-503.json +24 -0
- veriko-0.4.1/tests/recordings/validate-not-found.json +33 -0
- veriko-0.4.1/tests/recordings/validate-ocr.json +37 -0
- veriko-0.4.1/tests/recordings/validate-queued.json +36 -0
- veriko-0.4.1/tests/recordings/validate-returned.json +44 -0
- veriko-0.4.1/tests/recordings/validate-valid.json +57 -0
- veriko-0.4.1/tests/recordings/validation-image.json +8 -0
- veriko-0.4.1/tests/recordings/validation-queued-status.json +33 -0
- veriko-0.4.1/tests/recordings/validation-retrying.json +45 -0
- veriko-0.4.1/tests/recordings/validations-empty.json +24 -0
- veriko-0.4.1/tests/recordings/validations-export-csv.json +8 -0
- veriko-0.4.1/tests/recordings/validations-export-xlsx.json +8 -0
- veriko-0.4.1/tests/recordings/validations-page1.json +73 -0
- veriko-0.4.1/tests/recordings/validations-page2.json +49 -0
- veriko-0.4.1/tests/recordings/validations-stats.json +46 -0
- veriko-0.4.1/tests/recordings/webhook-created.json +32 -0
- veriko-0.4.1/tests/recordings/webhook-deliveries-page1.json +59 -0
- veriko-0.4.1/tests/recordings/webhook-deliveries-page2.json +42 -0
- veriko-0.4.1/tests/recordings/webhook-deliveries.json +59 -0
- veriko-0.4.1/tests/recordings/webhook-retry-resolved.json +44 -0
- veriko-0.4.1/tests/recordings/webhook-secret-rotated.json +32 -0
- veriko-0.4.1/tests/recordings/webhook-test-failed.json +26 -0
- veriko-0.4.1/tests/recordings/webhook-test-ok.json +25 -0
- veriko-0.4.1/tests/recordings/webhook-updated.json +32 -0
- veriko-0.4.1/tests/recordings/webhook-validation-completed.json +33 -0
- veriko-0.4.1/tests/recordings/webhooks-list.json +49 -0
- veriko-0.4.1/tests/spec_support.py +107 -0
- veriko-0.4.1/tests/test_beneficiaries.py +301 -0
- veriko-0.4.1/tests/test_cep.py +74 -0
- veriko-0.4.1/tests/test_client.py +86 -0
- veriko-0.4.1/tests/test_constants_follow_spec.py +61 -0
- veriko-0.4.1/tests/test_errors.py +81 -0
- veriko-0.4.1/tests/test_models_follow_spec.py +70 -0
- veriko-0.4.1/tests/test_operations.py +463 -0
- veriko-0.4.1/tests/test_recordings_follow_spec.py +200 -0
- veriko-0.4.1/tests/test_retries_idempotency.py +162 -0
- veriko-0.4.1/tests/test_spec_public.py +41 -0
- veriko-0.4.1/tests/test_usage.py +96 -0
- veriko-0.4.1/tests/test_validate.py +148 -0
- veriko-0.4.1/tests/test_validations_resource.py +463 -0
- veriko-0.4.1/tests/test_webhooks.py +138 -0
- veriko-0.4.1/tests/test_webhooks_resource.py +341 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
lint:
|
|
13
|
+
name: Estilo y tipos
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: '3.12'
|
|
21
|
+
|
|
22
|
+
- name: Instalar el paquete y sus herramientas
|
|
23
|
+
run: pip install -e ".[dev]"
|
|
24
|
+
|
|
25
|
+
- name: ruff check
|
|
26
|
+
run: ruff check .
|
|
27
|
+
|
|
28
|
+
- name: ruff format
|
|
29
|
+
run: ruff format --check .
|
|
30
|
+
|
|
31
|
+
- name: mypy
|
|
32
|
+
run: mypy
|
|
33
|
+
|
|
34
|
+
- name: Los ejemplos compilan
|
|
35
|
+
run: python -m compileall -q examples
|
|
36
|
+
|
|
37
|
+
test:
|
|
38
|
+
name: Pruebas (Python ${{ matrix.python-version }})
|
|
39
|
+
runs-on: ubuntu-latest
|
|
40
|
+
strategy:
|
|
41
|
+
fail-fast: false
|
|
42
|
+
matrix:
|
|
43
|
+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
|
|
44
|
+
steps:
|
|
45
|
+
- uses: actions/checkout@v4
|
|
46
|
+
|
|
47
|
+
- uses: actions/setup-python@v5
|
|
48
|
+
with:
|
|
49
|
+
python-version: ${{ matrix.python-version }}
|
|
50
|
+
|
|
51
|
+
- name: Instalar el paquete y sus herramientas
|
|
52
|
+
run: pip install -e ".[dev]"
|
|
53
|
+
|
|
54
|
+
- name: pytest
|
|
55
|
+
run: pytest
|
|
56
|
+
|
|
57
|
+
build:
|
|
58
|
+
name: El paquete se construye
|
|
59
|
+
runs-on: ubuntu-latest
|
|
60
|
+
steps:
|
|
61
|
+
- uses: actions/checkout@v4
|
|
62
|
+
|
|
63
|
+
- uses: actions/setup-python@v5
|
|
64
|
+
with:
|
|
65
|
+
python-version: '3.12'
|
|
66
|
+
|
|
67
|
+
- name: Construir la distribución
|
|
68
|
+
run: |
|
|
69
|
+
pip install build twine
|
|
70
|
+
python -m build
|
|
71
|
+
twine check dist/*
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
name: Publicar en PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
test:
|
|
13
|
+
name: Pruebas (Python ${{ matrix.python-version }})
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
strategy:
|
|
16
|
+
fail-fast: false
|
|
17
|
+
matrix:
|
|
18
|
+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v6
|
|
21
|
+
|
|
22
|
+
- uses: actions/setup-python@v6
|
|
23
|
+
with:
|
|
24
|
+
python-version: ${{ matrix.python-version }}
|
|
25
|
+
|
|
26
|
+
- run: pip install -e ".[dev]"
|
|
27
|
+
- run: pytest
|
|
28
|
+
|
|
29
|
+
build:
|
|
30
|
+
name: Verificar y construir
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@v6
|
|
34
|
+
with:
|
|
35
|
+
fetch-depth: 0
|
|
36
|
+
|
|
37
|
+
- uses: actions/setup-python@v6
|
|
38
|
+
with:
|
|
39
|
+
python-version: '3.12'
|
|
40
|
+
|
|
41
|
+
- name: Verificar la etiqueta
|
|
42
|
+
shell: bash
|
|
43
|
+
run: |
|
|
44
|
+
version="$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")"
|
|
45
|
+
if [ "$GITHUB_REF_NAME" != "v$version" ]; then
|
|
46
|
+
echo "La etiqueta $GITHUB_REF_NAME no coincide con la versión $version." >&2
|
|
47
|
+
exit 1
|
|
48
|
+
fi
|
|
49
|
+
git fetch origin main
|
|
50
|
+
git merge-base --is-ancestor "$(git rev-list -n 1 "$GITHUB_REF_NAME")" origin/main
|
|
51
|
+
|
|
52
|
+
- name: Instalar herramientas
|
|
53
|
+
run: pip install -e ".[dev]" build twine
|
|
54
|
+
|
|
55
|
+
- run: ruff check .
|
|
56
|
+
- run: ruff format --check .
|
|
57
|
+
- run: mypy
|
|
58
|
+
- run: python -m compileall -q examples
|
|
59
|
+
|
|
60
|
+
- name: Construir y revisar la distribución
|
|
61
|
+
run: |
|
|
62
|
+
python -m build
|
|
63
|
+
twine check dist/*
|
|
64
|
+
python -m venv /tmp/veriko-package
|
|
65
|
+
/tmp/veriko-package/bin/pip install dist/*.whl
|
|
66
|
+
/tmp/veriko-package/bin/python -c "from veriko import Veriko; assert Veriko"
|
|
67
|
+
|
|
68
|
+
- uses: actions/upload-artifact@v4
|
|
69
|
+
with:
|
|
70
|
+
name: python-package
|
|
71
|
+
path: dist/
|
|
72
|
+
if-no-files-found: error
|
|
73
|
+
|
|
74
|
+
publish:
|
|
75
|
+
name: Publicar
|
|
76
|
+
needs: [test, build]
|
|
77
|
+
runs-on: ubuntu-latest
|
|
78
|
+
environment:
|
|
79
|
+
name: pypi
|
|
80
|
+
url: https://pypi.org/p/veriko
|
|
81
|
+
permissions:
|
|
82
|
+
contents: read
|
|
83
|
+
id-token: write
|
|
84
|
+
steps:
|
|
85
|
+
- uses: actions/download-artifact@v4
|
|
86
|
+
with:
|
|
87
|
+
name: python-package
|
|
88
|
+
path: dist/
|
|
89
|
+
|
|
90
|
+
- name: Publicar en PyPI
|
|
91
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
92
|
+
with:
|
|
93
|
+
skip-existing: true
|
|
94
|
+
|
|
95
|
+
release:
|
|
96
|
+
name: Publicar las notas
|
|
97
|
+
needs: publish
|
|
98
|
+
runs-on: ubuntu-latest
|
|
99
|
+
permissions:
|
|
100
|
+
contents: write
|
|
101
|
+
steps:
|
|
102
|
+
- uses: actions/checkout@v6
|
|
103
|
+
|
|
104
|
+
- name: Extraer la entrada del changelog
|
|
105
|
+
env:
|
|
106
|
+
VERSION: ${{ github.ref_name }}
|
|
107
|
+
shell: bash
|
|
108
|
+
run: |
|
|
109
|
+
python - <<'PY'
|
|
110
|
+
import os
|
|
111
|
+
import re
|
|
112
|
+
from pathlib import Path
|
|
113
|
+
|
|
114
|
+
version = os.environ['VERSION'].removeprefix('v')
|
|
115
|
+
changelog = Path('CHANGELOG.md').read_text(encoding='utf-8')
|
|
116
|
+
match = re.search(
|
|
117
|
+
rf'^## \[{re.escape(version)}\][^\n]*\n(?P<body>.*?)(?=^## \[|\Z)',
|
|
118
|
+
changelog,
|
|
119
|
+
flags=re.MULTILINE | re.DOTALL,
|
|
120
|
+
)
|
|
121
|
+
if match is None:
|
|
122
|
+
raise SystemExit(f'No existe una entrada para {version} en CHANGELOG.md')
|
|
123
|
+
Path('release-notes.md').write_text(match.group('body').strip() + '\n', encoding='utf-8')
|
|
124
|
+
PY
|
|
125
|
+
|
|
126
|
+
- name: Crear la release de GitHub
|
|
127
|
+
env:
|
|
128
|
+
GH_TOKEN: ${{ github.token }}
|
|
129
|
+
run: gh release create "$GITHUB_REF_NAME" --verify-tag --title "$GITHUB_REF_NAME" --notes-file release-notes.md
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: Sincronizar el spec público
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: '32 8 * * *'
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
pull-requests: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
sync:
|
|
14
|
+
uses: veriko-mx-labs/.github/.github/workflows/sync-public-spec.yml@main
|
|
15
|
+
with:
|
|
16
|
+
regenerate_command: 'true'
|
|
17
|
+
auto_merge: true
|
|
18
|
+
secrets:
|
|
19
|
+
app_id: ${{ secrets.VERIKO_LABS_APP_ID }}
|
|
20
|
+
app_private_key: ${{ secrets.VERIKO_LABS_PRIVATE_KEY }}
|
veriko-0.4.1/.gitignore
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
# Registro de cambios
|
|
2
|
+
|
|
3
|
+
Formato de [Keep a Changelog](https://keepachangelog.com/es-ES/1.1.0/);
|
|
4
|
+
versiones según [SemVer](https://semver.org/lang/es/).
|
|
5
|
+
|
|
6
|
+
## [No publicado]
|
|
7
|
+
|
|
8
|
+
## [0.4.1] — 2026-09-19
|
|
9
|
+
|
|
10
|
+
Primera versión publicada en PyPI. No cambia la superficie del SDK respecto de
|
|
11
|
+
`0.4.0`.
|
|
12
|
+
|
|
13
|
+
Los cambios del producto se documentan en el
|
|
14
|
+
[changelog de la API](https://docs.veriko.mx/es/changelog).
|
|
15
|
+
|
|
16
|
+
## [0.4.0] — 2026-09-18
|
|
17
|
+
|
|
18
|
+
La superficie pasa de 48 operaciones a 49: `beneficiaries` gana la cancelación de
|
|
19
|
+
una importación, y con ella el SDK cubre todas las operaciones de máquina a máquina de
|
|
20
|
+
sus cinco familias.
|
|
21
|
+
|
|
22
|
+
### Añadido
|
|
23
|
+
|
|
24
|
+
- `beneficiaries.import_cancel()`: cancela una importación que todavía no se
|
|
25
|
+
confirmó (`DELETE /beneficiaries/imports/{id}`).
|
|
26
|
+
|
|
27
|
+
### Cambiado
|
|
28
|
+
|
|
29
|
+
- `test_operations.py` exige que las cinco familias no traigan operaciones de máquina a
|
|
30
|
+
máquina sin método, en lugar de admitir una excepción.
|
|
31
|
+
|
|
32
|
+
## [0.3.1] — 2026-09-18
|
|
33
|
+
|
|
34
|
+
Las familias `validations`, `webhooks` y `catalog` pasan a seguir el spec público. Las pruebas
|
|
35
|
+
de 0.2.0 comprobaban el SDK contra respuestas escritas a mano que no coincidían con el spec, así que
|
|
36
|
+
pasaban aunque el código enviara o leyera campos que la API no tiene. Varias formas de lo que
|
|
37
|
+
devuelve el SDK cambian; el paquete todavía no está publicado en PyPI.
|
|
38
|
+
|
|
39
|
+
### Corregido
|
|
40
|
+
|
|
41
|
+
- `set_retry_policy()` envía el cuerpo envuelto en `retry_policy`, como exige el spec.
|
|
42
|
+
Antes lo mandaba sin envolver.
|
|
43
|
+
- `set_retry_policy()` y `cancel_retries()` devuelven el estado del ciclo (`RetryState`) y no una
|
|
44
|
+
validación vacía: la respuesta del spec trae sólo `retry_state`.
|
|
45
|
+
- `ValidationSummary` deja de tener `has_cep`, `links` y `completed_at`, que un elemento de listado
|
|
46
|
+
no trae, y gana los campos que sí trae (`bank_name`, `amount`, `tracking_key`, `retry_state`...).
|
|
47
|
+
- `RetryAttempt` lee los campos del spec: `attempt_number`, `dispatched_at`, `new_status`...
|
|
48
|
+
- `Bank` gana `aliases` y pierde `short_name`, que el spec no declara.
|
|
49
|
+
- `list(playground=True)` y `with_deleted=True` viajaban como `True`; ahora `playground` envía `1` y
|
|
50
|
+
`with_deleted` envía `1` o `0`. El transporte ya no codifica ningún booleano como `True`.
|
|
51
|
+
- `webhooks.deliveries()` y `export_deliveries()` descartaban `status` y `event_type` cuando se
|
|
52
|
+
pasaba un endpoint. Ahora consultan el listado global con `endpoint_id`.
|
|
53
|
+
- Una lectura condicional que recibe `304` levanta `APIError` con `status=304`, como decía la
|
|
54
|
+
documentación. Antes `get()` devolvía una validación vacía y `banks()` una lista vacía.
|
|
55
|
+
- `webhooks.update(events=[])` levanta `events_required` en lugar de descartar el cambio.
|
|
56
|
+
- `validations.image()` propone un nombre con extensión cuando la respuesta no trae
|
|
57
|
+
`Content-Disposition`.
|
|
58
|
+
|
|
59
|
+
### Cambiado
|
|
60
|
+
|
|
61
|
+
- `stats()`, `bin_lookup()`, `banxico_status()`, `banxico_timeseries()` y `send_cep_to_telegram()`
|
|
62
|
+
devuelven los atributos del recurso, como ya hace `client.usage`: `stats["total"]`.
|
|
63
|
+
- `catalog.banks()` devuelve un `BankList`, una lista de `Bank` con el `ETag` en `etag`.
|
|
64
|
+
- `RetryState` gana `max_retries`, `interval_seconds` y `outcomes`.
|
|
65
|
+
- `WebhookEndpoint` gana `description`, `secret_hint`, `last_delivery_at` y `updated_at`;
|
|
66
|
+
`WebhookDelivery` gana `endpoint_id`, `endpoint_url`, `validation_id`, `attempt`,
|
|
67
|
+
`response_body` y `next_retry_at`.
|
|
68
|
+
|
|
69
|
+
### Añadido
|
|
70
|
+
|
|
71
|
+
- `description` en `webhooks.create()` y `webhooks.update()`.
|
|
72
|
+
- `spec/openapi.yaml`, copia del spec público, y tres pruebas que lo usan:
|
|
73
|
+
`test_operations.py` contrasta cada operación con el spec y exige que sea de máquina a
|
|
74
|
+
máquina; `test_models_follow_spec.py` comprueba que los campos de cada modelo existan en él;
|
|
75
|
+
`test_spec_public.py` vigila que la copia no sea el bundle interno.
|
|
76
|
+
- Las grabaciones de las familias `validations`, `webhooks` y `catalog` se recortan de los
|
|
77
|
+
ejemplos del spec público.
|
|
78
|
+
|
|
79
|
+
## [0.3.0] — 2026-09-18
|
|
80
|
+
|
|
81
|
+
La superficie pasa de 27 operaciones a 48: se suman las familias
|
|
82
|
+
`beneficiaries` y `usage`. Es la segunda y última tanda del alcance fijado.
|
|
83
|
+
|
|
84
|
+
### Añadido
|
|
85
|
+
|
|
86
|
+
- `client.beneficiaries`: registrar, listar, cambiar y archivar cuentas
|
|
87
|
+
beneficiarias; validación estructural de una cuenta sin gastar cuota
|
|
88
|
+
(`validate_account`); resolución de una cuenta en la lista propia (`lookup`);
|
|
89
|
+
exportación en CSV y XLSX; y la importación masiva como ciclo
|
|
90
|
+
(`import_template`, `import_start`, `import_status`, `import_preview`,
|
|
91
|
+
`import_edit_row`, `import_remove_row`, `import_commit` e `import_wait`).
|
|
92
|
+
- `client.usage`: cuota del plan (`summary`), historial mensual (`history`),
|
|
93
|
+
desglose por operación (`breakdown`), límites de tasa (`limits`), mapa de
|
|
94
|
+
calor (`heatmap`), métricas de la API (`api_usage`) y su exportación
|
|
95
|
+
(`export`).
|
|
96
|
+
- Los tipos `Beneficiary`, `BeneficiaryLookup`, `AccountValidation`,
|
|
97
|
+
`BeneficiaryImportJob`, `BeneficiaryImportRow` y `UsageSummary`.
|
|
98
|
+
- `BeneficiaryImportJob.is_settled`: la condición que espera `import_wait()`
|
|
99
|
+
(`preview_ready` o un estado final).
|
|
100
|
+
- Subida de archivos `multipart/form-data` en el transporte, sin dependencias
|
|
101
|
+
de runtime.
|
|
102
|
+
|
|
103
|
+
### Cambiado
|
|
104
|
+
|
|
105
|
+
- El transporte codifica los valores de consulta que son listas como
|
|
106
|
+
parámetros repetidos, para el filtro `buckets` de la vista previa.
|
|
107
|
+
- El arnés de pruebas entiende `PATCH`, que usa la corrección de filas.
|
|
108
|
+
|
|
109
|
+
### Pendiente para versiones siguientes
|
|
110
|
+
|
|
111
|
+
- Nada dentro del alcance fijado. Quedan fuera de propósito finanzas, métricas
|
|
112
|
+
propias, catálogo de planes, suscripción y el resumen del panel.
|
|
113
|
+
|
|
114
|
+
## [0.2.0] — 2026-09-18
|
|
115
|
+
|
|
116
|
+
La superficie pasa de 3 operaciones a 27: las familias `validations`, `webhooks`
|
|
117
|
+
y `catalog` completas.
|
|
118
|
+
|
|
119
|
+
### Añadido
|
|
120
|
+
|
|
121
|
+
- `client.validations`: validación por imagen (`validate_ocr`), modo asíncrono
|
|
122
|
+
(`enqueue`, `enqueue_ocr`) con sondeo por `ETag` (`wait_for`), listado con
|
|
123
|
+
paginación (`list`, `iter`), estadísticas, exportación en CSV y XLSX, imagen
|
|
124
|
+
del comprobante, intentos de reintento, cambio de la política de reintentos,
|
|
125
|
+
cancelación, retirada del historial y envío del comprobante a Telegram.
|
|
126
|
+
- `client.webhooks`: registrar, listar, cambiar y retirar endpoints; evento de
|
|
127
|
+
prueba; rotación del secreto; historial de entregas con paginación y su
|
|
128
|
+
exportación.
|
|
129
|
+
- `client.catalog`: catálogo de bancos SPEI, banco emisor de una tarjeta y
|
|
130
|
+
estado del servicio de Banxico con su serie temporal.
|
|
131
|
+
- `Page` y los iteradores `iter*`, que piden la página siguiente sólo cuando la
|
|
132
|
+
anterior se agota.
|
|
133
|
+
- `Validation.is_settled`: distingue un veredicto firme de uno terminal que
|
|
134
|
+
todavía puede cambiar porque hay reintentos en marcha. Es lo que espera
|
|
135
|
+
`wait_for()`.
|
|
136
|
+
- Los tipos `ValidationSummary`, `WebhookEndpoint`, `WebhookDelivery`,
|
|
137
|
+
`WebhookTestResult`, `RetryAttempt`, `Bank` y `Document`.
|
|
138
|
+
|
|
139
|
+
### Cambiado
|
|
140
|
+
|
|
141
|
+
- `validate_transfer()`, `get_validation()` y `get_cep()` siguen en la raíz del
|
|
142
|
+
cliente y se comportan igual: ahora delegan en la familia correspondiente.
|
|
143
|
+
- `Validation` gana el campo `etag`, que `get()` rellena con la cabecera de la
|
|
144
|
+
respuesta.
|
|
145
|
+
|
|
146
|
+
### Pendiente para versiones siguientes
|
|
147
|
+
|
|
148
|
+
- Beneficiarios, con su importación masiva.
|
|
149
|
+
- Métricas de consumo y límites de tasa.
|
|
150
|
+
|
|
151
|
+
## [0.1.0] — 2026-09-18
|
|
152
|
+
|
|
153
|
+
Primera versión del SDK oficial de Python.
|
|
154
|
+
|
|
155
|
+
### Añadido
|
|
156
|
+
|
|
157
|
+
- `Veriko.validate_transfer()`: valida una transferencia SPEI contra el CEP de
|
|
158
|
+
Banxico (`POST /v1/validate`), con la política de reintentos de la API
|
|
159
|
+
(`retry_policy`) y la cabecera `Idempotency-Key`.
|
|
160
|
+
- `Veriko.get_validation()`: lee una validación por su identificador, con el
|
|
161
|
+
estado del ciclo de reintentos.
|
|
162
|
+
- `Veriko.get_cep()`: descarga el comprobante oficial en XML o en PDF.
|
|
163
|
+
- `verify_webhook()` y `parse_webhook()`: verificación HMAC-SHA256 de la firma
|
|
164
|
+
de una entrega, con comparación en tiempo constante.
|
|
165
|
+
- Reintentos automáticos de los `5xx`, el `408` y el `429`, con espera
|
|
166
|
+
exponencial y respeto del `Retry-After` de la respuesta.
|
|
167
|
+
- Jerarquía de excepciones por estado HTTP, con el `code` de la API, el arreglo
|
|
168
|
+
completo de `errors` y el `request_id`.
|
|
169
|
+
- Tipado completo (`py.typed`), sin dependencias de runtime. Python 3.9 o
|
|
170
|
+
superior.
|
|
171
|
+
|
|
172
|
+
### Pendiente para versiones siguientes
|
|
173
|
+
|
|
174
|
+
- Modo asíncrono (`?async=1`) y sondeo con `ETag`.
|
|
175
|
+
- Validación por OCR de una imagen de comprobante.
|
|
176
|
+
- Beneficiarios, importación masiva y finanzas.
|
|
177
|
+
|
|
178
|
+
[No publicado]: https://github.com/veriko-mx-labs/veriko-python/compare/v0.4.1...HEAD
|
|
179
|
+
[0.4.1]: https://github.com/veriko-mx-labs/veriko-python/releases/tag/v0.4.1
|
|
180
|
+
[0.4.0]: https://github.com/veriko-mx-labs/veriko-python/releases/tag/v0.4.0
|
|
181
|
+
[0.3.1]: https://github.com/veriko-mx-labs/veriko-python/releases/tag/v0.3.1
|
|
182
|
+
[0.3.0]: https://github.com/veriko-mx-labs/veriko-python/releases/tag/v0.3.0
|
|
183
|
+
[0.2.0]: https://github.com/veriko-mx-labs/veriko-python/releases/tag/v0.2.0
|
|
184
|
+
[0.1.0]: https://github.com/veriko-mx-labs/veriko-python/releases/tag/v0.1.0
|
veriko-0.4.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Veriko
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|