fiscalisto 0.1.13 → 0.1.14
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/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/generated.d.ts +23 -4
- package/package.json +1 -1
package/dist/core.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* llamar.
|
|
5
5
|
*/
|
|
6
6
|
import type { ErrorCode } from "./error-codes.js";
|
|
7
|
-
export declare const VERSION = "0.1.
|
|
7
|
+
export declare const VERSION = "0.1.14";
|
|
8
8
|
/**
|
|
9
9
|
* La versión de la API para la que se hizo este SDK: la manda en cada solicitud
|
|
10
10
|
* (Fiscalisto-Version), así actualizar la API no cambia lo que recibe hasta que actualice el SDK.
|
package/dist/core.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* errores y las listas que se recorren solas. Los recursos (generated.ts) solo dicen qué ruta
|
|
4
4
|
* llamar.
|
|
5
5
|
*/
|
|
6
|
-
export const VERSION = "0.1.
|
|
6
|
+
export const VERSION = "0.1.14";
|
|
7
7
|
/**
|
|
8
8
|
* La versión de la API para la que se hizo este SDK: la manda en cada solicitud
|
|
9
9
|
* (Fiscalisto-Version), así actualizar la API no cambia lo que recibe hasta que actualice el SDK.
|
package/dist/generated.d.ts
CHANGED
|
@@ -470,6 +470,25 @@ export interface Invoice {
|
|
|
470
470
|
cc: string | null;
|
|
471
471
|
/** Cuándo se envió. */
|
|
472
472
|
sent_at: string | null;
|
|
473
|
+
/** Lo que pasó con el último envío: el peor de sus destinatarios (bounced o complained pesan más que opened o delivered). sent hasta que el servidor del cliente conteste. */
|
|
474
|
+
status: "sent" | "delayed" | "delivered" | "opened" | "bounced" | "complained";
|
|
475
|
+
/** Cada dirección del envío (para y copia), con su entrega. */
|
|
476
|
+
recipients: {
|
|
477
|
+
/** La dirección de correo del destinatario. */
|
|
478
|
+
address: string;
|
|
479
|
+
/** Estado del objeto. */
|
|
480
|
+
status: "sent" | "delayed" | "delivered" | "opened" | "bounced" | "complained";
|
|
481
|
+
/** Cuando el servidor del destinatario lo aceptó. */
|
|
482
|
+
delivered_at: string | null;
|
|
483
|
+
/** La primera vez que se abrió (aproximado: algunos correos cargan las imágenes solos o no las cargan). */
|
|
484
|
+
opened_at: string | null;
|
|
485
|
+
/** Cuando rebotó. */
|
|
486
|
+
bounced_at: string | null;
|
|
487
|
+
/** Por qué rebotó, en español: «buzón no existe», «buzón lleno»… */
|
|
488
|
+
bounce_reason: string | null;
|
|
489
|
+
/** Cuando el destinatario lo marcó como spam. */
|
|
490
|
+
complained_at: string | null;
|
|
491
|
+
}[];
|
|
473
492
|
} | null;
|
|
474
493
|
/** Por qué el SAT o el PAC no lo aceptaron: mensaje, código del SAT y texto original. */
|
|
475
494
|
error: {
|
|
@@ -2731,7 +2750,7 @@ export interface WebhookTest {
|
|
|
2731
2750
|
};
|
|
2732
2751
|
}
|
|
2733
2752
|
/** Lo que puede pasar: el tipo de cada evento. */
|
|
2734
|
-
export type EventType = "invoice.stamped" | "invoice.failed" | "invoice.canceled" | "invoice.cancellation_pending" | "invoice.cancellation_rejected" | "invoice.paid" | "invoice.partially_paid" | "retention.stamped" | "retention.failed" | "retention.canceled" | "invoice_batch.completed" | "payroll_batch.completed" | "customer_data_request.completed" | "sat_download.completed" | "sat_download.failed" | "sat_declaration.created" | "sat_declaration.updated" | "ticket.invoiced" | "ticket.included_in_global" | "recurring_invoice.failed" | "quote.viewed" | "quote.accepted" | "quote.changes_requested" | "quote.rejected" | "issuer.ready" | "balance.low" | "test_clock.ready";
|
|
2753
|
+
export type EventType = "invoice.stamped" | "invoice.failed" | "invoice.canceled" | "invoice.cancellation_pending" | "invoice.cancellation_rejected" | "invoice.paid" | "invoice.partially_paid" | "invoice.email_bounced" | "invoice.email_complained" | "retention.stamped" | "retention.failed" | "retention.canceled" | "invoice_batch.completed" | "payroll_batch.completed" | "customer_data_request.completed" | "sat_download.completed" | "sat_download.failed" | "sat_declaration.created" | "sat_declaration.updated" | "ticket.invoiced" | "ticket.included_in_global" | "recurring_invoice.failed" | "quote.viewed" | "quote.accepted" | "quote.changes_requested" | "quote.rejected" | "issuer.ready" | "balance.low" | "test_clock.ready";
|
|
2735
2754
|
/** Algo que pasó en su cuenta: el objeto completo como quedó. Se manda a sus webhooks firmado (Standard Webhooks). */
|
|
2736
2755
|
export interface EventBase<T extends EventType = EventType, O = unknown> {
|
|
2737
2756
|
/** Identificador del objeto, con su prefijo (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_). */
|
|
@@ -2752,7 +2771,7 @@ export interface EventBase<T extends EventType = EventType, O = unknown> {
|
|
|
2752
2771
|
};
|
|
2753
2772
|
}
|
|
2754
2773
|
/** Un evento: según su type, data.object es la factura, la constancia o el lote. */
|
|
2755
|
-
export type Event = EventBase<"invoice.stamped", Invoice> | EventBase<"invoice.failed", Invoice> | EventBase<"invoice.canceled", Invoice> | EventBase<"invoice.cancellation_pending", Invoice> | EventBase<"invoice.cancellation_rejected", Invoice> | EventBase<"invoice.paid", Invoice> | EventBase<"invoice.partially_paid", Invoice> | EventBase<"retention.stamped", Retention> | EventBase<"retention.failed", Retention> | EventBase<"retention.canceled", Retention> | EventBase<"invoice_batch.completed", InvoiceBatch> | EventBase<"payroll_batch.completed", PayrollBatch> | EventBase<"customer_data_request.completed", CustomerDataRequest> | EventBase<"sat_download.completed", SatDownload> | EventBase<"sat_download.failed", SatDownload> | EventBase<"sat_declaration.created", SatDeclaration> | EventBase<"sat_declaration.updated", SatDeclaration> | EventBase<"ticket.invoiced", Ticket> | EventBase<"ticket.included_in_global", Ticket> | EventBase<"recurring_invoice.failed", RecurringInvoice> | EventBase<"quote.viewed", Quote> | EventBase<"quote.accepted", Quote> | EventBase<"quote.changes_requested", Quote> | EventBase<"quote.rejected", Quote> | EventBase<"issuer.ready", Issuer> | EventBase<"balance.low", Balance> | EventBase<"test_clock.ready", TestClock>;
|
|
2774
|
+
export type Event = EventBase<"invoice.stamped", Invoice> | EventBase<"invoice.failed", Invoice> | EventBase<"invoice.canceled", Invoice> | EventBase<"invoice.cancellation_pending", Invoice> | EventBase<"invoice.cancellation_rejected", Invoice> | EventBase<"invoice.paid", Invoice> | EventBase<"invoice.partially_paid", Invoice> | EventBase<"invoice.email_bounced", Invoice> | EventBase<"invoice.email_complained", Invoice> | EventBase<"retention.stamped", Retention> | EventBase<"retention.failed", Retention> | EventBase<"retention.canceled", Retention> | EventBase<"invoice_batch.completed", InvoiceBatch> | EventBase<"payroll_batch.completed", PayrollBatch> | EventBase<"customer_data_request.completed", CustomerDataRequest> | EventBase<"sat_download.completed", SatDownload> | EventBase<"sat_download.failed", SatDownload> | EventBase<"sat_declaration.created", SatDeclaration> | EventBase<"sat_declaration.updated", SatDeclaration> | EventBase<"ticket.invoiced", Ticket> | EventBase<"ticket.included_in_global", Ticket> | EventBase<"recurring_invoice.failed", RecurringInvoice> | EventBase<"quote.viewed", Quote> | EventBase<"quote.accepted", Quote> | EventBase<"quote.changes_requested", Quote> | EventBase<"quote.rejected", Quote> | EventBase<"issuer.ready", Issuer> | EventBase<"balance.low", Balance> | EventBase<"test_clock.ready", TestClock>;
|
|
2756
2775
|
/** Confirmación de que se borró. */
|
|
2757
2776
|
export interface Deleted {
|
|
2758
2777
|
/** Identificador del objeto, con su prefijo (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_). */
|
|
@@ -6001,7 +6020,7 @@ export interface RollWebhookSecretParams {
|
|
|
6001
6020
|
}
|
|
6002
6021
|
export interface TestWebhookEndpointParams {
|
|
6003
6022
|
/** El evento a mandar. Por omisión invoice.stamped. */
|
|
6004
|
-
type?: "invoice.stamped" | "invoice.failed" | "invoice.canceled" | "invoice.cancellation_pending" | "invoice.cancellation_rejected" | "invoice.paid" | "invoice.partially_paid" | "retention.stamped" | "retention.failed" | "retention.canceled" | "invoice_batch.completed" | "payroll_batch.completed" | "customer_data_request.completed" | "sat_download.completed" | "sat_download.failed" | "sat_declaration.created" | "sat_declaration.updated" | "ticket.invoiced" | "ticket.included_in_global" | "recurring_invoice.failed" | "quote.viewed" | "quote.accepted" | "quote.changes_requested" | "quote.rejected" | "issuer.ready" | "balance.low" | "test_clock.ready";
|
|
6023
|
+
type?: "invoice.stamped" | "invoice.failed" | "invoice.canceled" | "invoice.cancellation_pending" | "invoice.cancellation_rejected" | "invoice.paid" | "invoice.partially_paid" | "invoice.email_bounced" | "invoice.email_complained" | "retention.stamped" | "retention.failed" | "retention.canceled" | "invoice_batch.completed" | "payroll_batch.completed" | "customer_data_request.completed" | "sat_download.completed" | "sat_download.failed" | "sat_declaration.created" | "sat_declaration.updated" | "ticket.invoiced" | "ticket.included_in_global" | "recurring_invoice.failed" | "quote.viewed" | "quote.accepted" | "quote.changes_requested" | "quote.rejected" | "issuer.ready" | "balance.low" | "test_clock.ready";
|
|
6005
6024
|
}
|
|
6006
6025
|
/** Los parámetros de GET /v1/events. */
|
|
6007
6026
|
export interface ListEventsParams {
|
|
@@ -6010,7 +6029,7 @@ export interface ListEventsParams {
|
|
|
6010
6029
|
/** El id del último de la página anterior, para la siguiente. */
|
|
6011
6030
|
starting_after?: string;
|
|
6012
6031
|
/** Solo de este tipo (invoice.stamped), o todos los de un recurso con un comodín (invoice.*). */
|
|
6013
|
-
type?: "invoice.stamped" | "invoice.failed" | "invoice.canceled" | "invoice.cancellation_pending" | "invoice.cancellation_rejected" | "invoice.paid" | "invoice.partially_paid" | "retention.stamped" | "retention.failed" | "retention.canceled" | "invoice_batch.completed" | "payroll_batch.completed" | "customer_data_request.completed" | "sat_download.completed" | "sat_download.failed" | "sat_declaration.created" | "sat_declaration.updated" | "ticket.invoiced" | "ticket.included_in_global" | "recurring_invoice.failed" | "quote.viewed" | "quote.accepted" | "quote.changes_requested" | "quote.rejected" | "issuer.ready" | "balance.low" | "test_clock.ready" | "invoice.*" | "invoice_batch.*" | "payroll_batch.*" | "recurring_invoice.*" | "quote.*" | "ticket.*" | "retention.*" | "customer_data_request.*" | "sat_download.*" | "sat_declaration.*" | "issuer.*" | "balance.*" | "test_clock.*";
|
|
6032
|
+
type?: "invoice.stamped" | "invoice.failed" | "invoice.canceled" | "invoice.cancellation_pending" | "invoice.cancellation_rejected" | "invoice.paid" | "invoice.partially_paid" | "invoice.email_bounced" | "invoice.email_complained" | "retention.stamped" | "retention.failed" | "retention.canceled" | "invoice_batch.completed" | "payroll_batch.completed" | "customer_data_request.completed" | "sat_download.completed" | "sat_download.failed" | "sat_declaration.created" | "sat_declaration.updated" | "ticket.invoiced" | "ticket.included_in_global" | "recurring_invoice.failed" | "quote.viewed" | "quote.accepted" | "quote.changes_requested" | "quote.rejected" | "issuer.ready" | "balance.low" | "test_clock.ready" | "invoice.*" | "invoice_batch.*" | "payroll_batch.*" | "recurring_invoice.*" | "quote.*" | "ticket.*" | "retention.*" | "customer_data_request.*" | "sat_download.*" | "sat_declaration.*" | "issuer.*" | "balance.*" | "test_clock.*";
|
|
6014
6033
|
/** Solo los de este objeto (inv_…, ret_…, bat_…). */
|
|
6015
6034
|
object?: string;
|
|
6016
6035
|
/** false: los que algún webhook no recibió (su último intento falló). true: los que recibieron todos los webhooks a los que se mandaron. */
|