@adonis-agora/payments 0.16.2 → 0.17.0
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.
- package/CHANGELOG.md +15 -0
- package/dist/assets/spa/assets/index-C1ih3Kth.js +10 -0
- package/dist/assets/spa/assets/index-C1ih3Kth.js.map +1 -0
- package/dist/assets/spa/index.html +1 -1
- package/dist/src/drivers/asaas.d.ts.map +1 -1
- package/dist/src/drivers/asaas.js +41 -0
- package/dist/src/drivers/asaas.js.map +1 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/invoice/drivers/asaas.d.ts +44 -1
- package/dist/src/invoice/drivers/asaas.d.ts.map +1 -1
- package/dist/src/invoice/drivers/asaas.js +152 -42
- package/dist/src/invoice/drivers/asaas.js.map +1 -1
- package/dist/src/invoice/drivers/enotas.d.ts +2 -0
- package/dist/src/invoice/drivers/enotas.d.ts.map +1 -1
- package/dist/src/invoice/drivers/enotas.js +5 -0
- package/dist/src/invoice/drivers/enotas.js.map +1 -1
- package/dist/src/invoice/drivers/focus.d.ts +2 -0
- package/dist/src/invoice/drivers/focus.d.ts.map +1 -1
- package/dist/src/invoice/drivers/focus.js +5 -0
- package/dist/src/invoice/drivers/focus.js.map +1 -1
- package/dist/src/invoice/drivers/plugnotas.d.ts +2 -0
- package/dist/src/invoice/drivers/plugnotas.d.ts.map +1 -1
- package/dist/src/invoice/drivers/plugnotas.js +5 -0
- package/dist/src/invoice/drivers/plugnotas.js.map +1 -1
- package/dist/src/invoice/drivers/shared.d.ts +7 -0
- package/dist/src/invoice/drivers/shared.d.ts.map +1 -0
- package/dist/src/invoice/drivers/shared.js +9 -0
- package/dist/src/invoice/drivers/shared.js.map +1 -0
- package/dist/src/invoice/drivers/tecnospeed.d.ts +2 -0
- package/dist/src/invoice/drivers/tecnospeed.d.ts.map +1 -1
- package/dist/src/invoice/drivers/tecnospeed.js +5 -0
- package/dist/src/invoice/drivers/tecnospeed.js.map +1 -1
- package/dist/src/invoice/emit_invoice.d.ts.map +1 -1
- package/dist/src/invoice/emit_invoice.js +6 -0
- package/dist/src/invoice/emit_invoice.js.map +1 -1
- package/dist/src/invoice/invoice_provider.d.ts +51 -4
- package/dist/src/invoice/invoice_provider.d.ts.map +1 -1
- package/dist/src/types.d.ts +39 -1
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +44 -40
- package/dist/assets/spa/assets/index-1Gb8l6g0.js +0 -10
- package/dist/assets/spa/assets/index-1Gb8l6g0.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @adonis-agora/payments
|
|
2
2
|
|
|
3
|
+
## 0.17.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#125](https://github.com/DavideCarvalho/adonis-agora-payments/pull/125) [`d55ca3b`](https://github.com/DavideCarvalho/adonis-agora-payments/commit/d55ca3bf16bb6630b6510e758b300d3ec8a561eb) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - **Asaas NFS-e provider fixed** (`invoice.asaas()`); it could not schedule a valid note before.
|
|
8
|
+
|
|
9
|
+
- **Recipient:** sends the Asaas charge as `payment` (when the charge went through Asaas) or the Asaas customer id as `customer` (new `customer.gatewayId`, `cus_…`). It used to send the CPF/CNPJ in `customer`, which Asaas rejects. With neither id, `emit` throws.
|
|
10
|
+
- **Required fields:** sends `effectiveDate` (default: today in Brasília), `deductions` (default 0), `observations` and the full `taxes` object (`retainIss`, `iss`, `pis`, `cofins`, `csll`, `inss`, `ir`, plus `nbsCode` and any other key given). Retentions default to none; a missing `tax.iss` throws instead of being sent as 0. `municipalServiceId` / `municipalServiceName` are new optional `service` fields; `cityServiceCode` (or `code`) goes as `municipalServiceCode`. The non-existent `serviceCode` is no longer sent.
|
|
11
|
+
- **No more customer data in free text:** the customer's name and e-mail no longer go into `description`/`notes`, and `metadata` no longer goes into `observations`. `serviceDescription` and `observations` carry what you passed.
|
|
12
|
+
- **Idempotency:** new `externalReference`; with it, `emit` returns the live note (not cancelled, not `ERROR`) already under that reference instead of scheduling a second one.
|
|
13
|
+
- **Response mapping** follows the documented `InvoiceGetResponseDTO`: `number`, `pdfUrl`, and the statuses `SCHEDULED`/`SYNCHRONIZED` → `pending`, `AUTHORIZED`/`PROCESSING_CANCELLATION`/`CANCELLATION_DENIED` → `issued`, `CANCELED` → `canceled`, `ERROR` → `failed`.
|
|
14
|
+
- **Webhooks:** the Asaas payments driver maps `INVOICE_*` to `nfse.created|updated|synchronized|authorized|failed|cancellation_processing|canceled|cancellation_denied`, with the note on `event.data` (`gatewayId`, `status`, `providerStatus`, `number`, `pdfUrl`, `xmlUrl`, `paymentId`, `customerId`, `externalReference`, `statusDescription`…).
|
|
15
|
+
|
|
16
|
+
**Contract:** `InvoiceProvider` gains `cancel(invoiceId, options?: { reason?, providerOnly? })` (Asaas: `POST /invoices/{id}/cancel`, `providerOnly` = `cancelOnlyOnAsaas`; the other built-in providers throw "not supported"). A custom `InvoiceProvider` must add the method. `InvoiceEmitInput` and `InvoiceOptions` gain the optional `effectiveDate`, `deductions`, `observations`, `externalReference`, `customer.gatewayId`, `service.municipalServiceId` and `service.municipalServiceName`; `tax` is now typed as `InvoiceTaxes` (still open to other keys).
|
|
17
|
+
|
|
3
18
|
## 0.16.2
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|