Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/instalacion.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ y un archivo `SHA256SUMS` con el SHA-256 de cada empaque.
El binario de Linux no corre en distribuciones con musl, como Alpine.

Los comandos de abajo descargan la última versión publicada. Para una versión fija, cambia `releases/latest/download`
por `releases/download/v<versión>`, por ejemplo `releases/download/v4.0.469`.
por `releases/download/v<versión>`, por ejemplo `releases/download/v4.0.474`.

## Linux

Expand Down Expand Up @@ -134,7 +134,7 @@ conservan, porque viven en el almacén de credenciales del sistema y no junto al

```text
$ fiscalapi --version
4.0.469
4.0.474
```

### Aviso de versión nueva
Expand All @@ -144,7 +144,7 @@ enviar tus credenciales. Si hay uno más nuevo, al terminar el comando escribe e

```text

fiscalapi 4.0.470 is available (you have 4.0.469).
fiscalapi 4.0.475 is available (you have 4.0.474).
Download it from https://github.com/FiscalAPI/fiscalapi-cli/releases/tag/v<version>
```

Expand Down
2 changes: 1 addition & 1 deletion docs/listen.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Con `--json`, stdout lleva un objeto JSON por entrega, uno por línea (JSON Line
`Ready. Your signing secret is` siguen en stderr como texto.

```json
{"time":"2026-10-12T09:47:46.1234567-06:00","deliveryId":"a7b8c9d0-e1f2-4a3b-8c4d-5e6f7a8b9c0d","eventId":"3f9c1d2e-7b4a-4e8f-9a1b-2c3d4e5f6a7b","type":"invoice.canceled","statusCode":200,"latencyMs":12,"event":{"id":"3f9c1d2e-7b4a-4e8f-9a1b-2c3d4e5f6a7b","type":"invoice.canceled","createdAt":"2026-10-12T15:47:46Z","personId":null,"data":{"relatedObject":{"id":"c4d3e2f1-a0b9-4c8d-9e7f-6a5b4c3d2e1f","type":"invoice","url":"/api/v4/invoices/c4d3e2f1-a0b9-4c8d-9e7f-6a5b4c3d2e1f"},"status":"X","previousStatus":"C"}}}
{"time":"2026-10-12T09:47:46.1234567-06:00","deliveryId":"a7b8c9d0-e1f2-4a3b-8c4d-5e6f7a8b9c0d","eventId":"3f9c1d2e-7b4a-4e8f-9a1b-2c3d4e5f6a7b","type":"invoice.canceled","statusCode":200,"latencyMs":12,"event":{"id":"3f9c1d2e-7b4a-4e8f-9a1b-2c3d4e5f6a7b","type":"invoice.canceled","createdAt":"2026-10-12T15:47:46Z","personId":null,"data":{"relatedObject":{"id":"c4d3e2f1-a0b9-4c8d-9e7f-6a5b4c3d2e1f","type":"invoice","url":"/api/v4/invoices/c4d3e2f1-a0b9-4c8d-9e7f-6a5b4c3d2e1f"},"status":"X","previousStatus":"C","reason":null}}}
```

| Campo | Contenido |
Expand Down
2 changes: 1 addition & 1 deletion docs/salida-y-codigos.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ resultado va después, en stdout:
```text
$ fiscalapi events list --page-size 1 --verbose
> GET https://test.fiscalapi.com/api/v4/events?pageSize=1
> User-Agent: fiscalapi-cli/4.0.469
> User-Agent: fiscalapi-cli/4.0.474
< 200 OK (154 ms)
< Content-Type: application/json; charset=utf-8
```
Expand Down
5 changes: 3 additions & 2 deletions docs/trigger.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ $ fiscalapi trigger invoice.canceled --json

## Cómo se entrega

- El evento tiene la forma y la firma de uno real: el recurso, `status` y `previousStatus` de su tipo (por ejemplo,
`invoice.canceled` pasa de `C` a `X`). Tu servidor lo verifica con el mismo código.
- El evento tiene la forma y la firma de uno real: el recurso, `status`, `previousStatus` y `reason` de su tipo (por
ejemplo, `invoice.canceled` pasa de `C` a `X` con `reason` en `null`, e `invoice.cancellation_rejected` trae
`reason: "rejectedByRecipient"`). Tu servidor lo verifica con el mismo código.
- Llega solo al destino indicado, aunque no esté suscrito a ese tipo ni a esa persona. Tus demás webhooks no lo
reciben.
- Es un solo intento: si tu servidor falla, no se reintenta. Repítelo con `trigger` o con
Expand Down
3 changes: 2 additions & 1 deletion docs/webhooks-y-eventos.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ $ fiscalapi events retrieve 0d6f5c1e-8a2b-4c3d-9e8f-7a6b5c4d3e2f
"url": "/api/v4/invoices/c4d3e2f1-a0b9-4c8d-9e7f-6a5b4c3d2e1f"
},
"status": "X",
"previousStatus": "C"
"previousStatus": "C",
"reason": null
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion src/FiscalApi.Cli/FiscalApi.Cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<AssemblyName>fiscalapi</AssemblyName>
<RootNamespace>FiscalApi.Cli</RootNamespace>
<PublishAot>true</PublishAot>
<Version>4.0.469</Version>
<Version>4.0.474</Version>
<Product>FiscalAPI CLI</Product>
<Company>FiscalAPI</Company>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
4 changes: 2 additions & 2 deletions tests/FiscalApi.Cli.Tests/Commands/EventsCommandTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ public sealed class EventsCommandTests
private const string EventId = "0d6f5c1e-8a2b-4c3d-9e8f-7a6b5c4d3e2f";

private const string Envelope =
$$$"""{"id":"{{{EventId}}}","type":"invoice.canceled","createdAt":"2026-10-12T15:47:46Z","personId":"persona-1","data":{"relatedObject":{"id":"factura-1","type":"invoice","url":"/api/v4/invoices/factura-1"},"status":"X","previousStatus":"C"}}""";
$$$"""{"id":"{{{EventId}}}","type":"invoice.canceled","createdAt":"2026-10-12T15:47:46Z","personId":"persona-1","data":{"relatedObject":{"id":"factura-1","type":"invoice","url":"/api/v4/invoices/factura-1"},"status":"X","previousStatus":"C","reason":null}}""";

private const string OtherEnvelope =
"""{"id":"evt-2","type":"webhook.test","createdAt":"2026-10-12T15:40:00Z","personId":null,"data":{"relatedObject":{"id":"we-1","type":"webhook","url":"/api/v4/webhooks/we-1"},"status":null,"previousStatus":null}}""";
"""{"id":"evt-2","type":"webhook.test","createdAt":"2026-10-12T15:40:00Z","personId":null,"data":{"relatedObject":{"id":"we-1","type":"webhook","url":"/api/v4/webhooks/we-1"},"status":null,"previousStatus":null,"reason":null}}""";

private const string Page =
$$"""{"items":[{{Envelope}},{{OtherEnvelope}}],"pageNumber":1,"totalPages":1,"totalCount":2,"hasPreviousPage":false,"hasNextPage":false}""";
Expand Down
2 changes: 1 addition & 1 deletion tests/FiscalApi.Cli.Tests/Listen/FakeListenerApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ internal sealed record FakeDelivery(

public string EnvelopeBody => Body ?? $$$"""
{"id":"{{{EventId}}}","type":"{{{Type}}}","createdAt":"2026-10-12T18:47:53Z","personId":null,
"data":{"relatedObject":{"id":"inv_1","type":"invoice","url":"/api/v4/invoices/inv_1"},"status":"X","previousStatus":"V"}}
"data":{"relatedObject":{"id":"inv_1","type":"invoice","url":"/api/v4/invoices/inv_1"},"status":"X","previousStatus":"V","reason":null}}
""";

public IReadOnlyDictionary<string, string> Headers
Expand Down
Loading