platform-types 1.10.861 → 1.10.862
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/maintenance.d.ts +11 -0
- package/dist/messaging.d.ts +5 -2
- package/dist/subscription.d.ts +42 -2
- package/package.json +1 -1
package/dist/maintenance.d.ts
CHANGED
|
@@ -64,6 +64,17 @@ declare global {
|
|
|
64
64
|
/** Optional operator reason (10-500 chars, refused when it carries personal data). Internal: AUDIT row only. */
|
|
65
65
|
reason?: string;
|
|
66
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* The `422 BROADCAST_CHANNEL_NOT_CONFIGURED` body of a maintenance broadcast:
|
|
69
|
+
* `channels` names every requested channel with no platform sender (never
|
|
70
|
+
* `'email'`), in request order. Refused whole, before the roster read, any
|
|
71
|
+
* claim or any send.
|
|
72
|
+
*/
|
|
73
|
+
interface MaintenanceBroadcastChannelRefusal {
|
|
74
|
+
message: string;
|
|
75
|
+
error: 'BROADCAST_CHANNEL_NOT_CONFIGURED';
|
|
76
|
+
channels: MaintenanceBroadcastChannel[];
|
|
77
|
+
}
|
|
67
78
|
/**
|
|
68
79
|
* What one channel actually did.
|
|
69
80
|
*
|
package/dist/messaging.d.ts
CHANGED
|
@@ -277,9 +277,12 @@ declare global {
|
|
|
277
277
|
cause: 'refunded' | 'charged_back';
|
|
278
278
|
at: number;
|
|
279
279
|
};
|
|
280
|
-
/**
|
|
280
|
+
/**
|
|
281
|
+
* The platform's comprobante for the purchase — non-null only for a
|
|
282
|
+
* purchase approved on or after the platform's self-billing go-live.
|
|
283
|
+
*/
|
|
281
284
|
factura: PlatformFiscalDoc;
|
|
282
|
-
/** The platform's credit note for its reversal
|
|
285
|
+
/** The platform's credit note for its reversal — non-null only when `reversal` is set and `factura` is non-null. */
|
|
283
286
|
creditNote: PlatformFiscalDoc;
|
|
284
287
|
}
|
|
285
288
|
/** One page of the store's pack purchases, newest first. `cursor` present only when more may follow. */
|
package/dist/subscription.d.ts
CHANGED
|
@@ -727,8 +727,12 @@ declare global {
|
|
|
727
727
|
/**
|
|
728
728
|
* The platform's own fiscal document for a charge it made a tenant (a
|
|
729
729
|
* subscription payment, a message pack) or for its reversal — never an
|
|
730
|
-
* `Invoice` the tenant issues.
|
|
731
|
-
*
|
|
730
|
+
* `Invoice` the tenant issues. `null` when there is none; `pending` while it
|
|
731
|
+
* is owed and not yet authorised — an ARCA rejection or a retry stays
|
|
732
|
+
* `pending`, never a third state; `issued` once ARCA authorised it. `number`
|
|
733
|
+
* is `PPPP-NNNNNNNN` (point of sale and comprobante number, zero-padded);
|
|
734
|
+
* `issuedAt` is Unix ms. Nothing writes one yet, so every reader still
|
|
735
|
+
* answers `null`.
|
|
732
736
|
*/
|
|
733
737
|
type PlatformFiscalDoc = null | {
|
|
734
738
|
status: 'pending';
|
|
@@ -739,6 +743,21 @@ declare global {
|
|
|
739
743
|
cae: string;
|
|
740
744
|
issuedAt: number;
|
|
741
745
|
};
|
|
746
|
+
/** Which platform document `GET /subscription/invoices/{paymentId}/pdf` renders. */
|
|
747
|
+
type PlatformFiscalDocKind = 'factura' | 'creditNote';
|
|
748
|
+
/**
|
|
749
|
+
* `data` of `GET /subscription/invoices/{paymentId}/pdf?doc=factura|creditNote`
|
|
750
|
+
* (adminToken), for a subscription OR a message-pack payment of the token's
|
|
751
|
+
* store: a short-lived presigned `url` to the rendered PDF, valid until
|
|
752
|
+
* `expiresAt` (Unix ms, about 5 minutes). Fetch it on click, never cache it.
|
|
753
|
+
* `404 PLATFORM_FISCAL_DOC_NOT_FOUND` when the payment or its document does
|
|
754
|
+
* not exist; `409 PLATFORM_FISCAL_DOC_PENDING` while it is still pending.
|
|
755
|
+
* The route itself ships with platform self-billing's PDF slice.
|
|
756
|
+
*/
|
|
757
|
+
interface PlatformFiscalDocPdf {
|
|
758
|
+
url: string;
|
|
759
|
+
expiresAt: number;
|
|
760
|
+
}
|
|
742
761
|
/**
|
|
743
762
|
* One charge SINFACTURA made against a tenant, normalized out of whichever
|
|
744
763
|
* billing provider holds the money. Backs the per-tenant payment history and
|
|
@@ -751,6 +770,12 @@ declare global {
|
|
|
751
770
|
* unpaid and identity-proven distinct paid provider entries without counting matched payments
|
|
752
771
|
* twice. Unknown or partially overlapping paid aggregates are omitted and the response is truncated; retained rows carry the paid plan and period metadata below. The
|
|
753
772
|
* cross-tenant billing rollup continues to read live provider history only.
|
|
773
|
+
*
|
|
774
|
+
* Every row also carries `factura` and `creditNote` — the platform's OWN
|
|
775
|
+
* comprobante for the charge and its reversal, required and `null` when
|
|
776
|
+
* absent: non-null only on a retained `mercadopago` row that is `'paid'` or a
|
|
777
|
+
* reversed `'void'`, approved on or after the self-billing go-live (rules on
|
|
778
|
+
* each field). Top-level `pdfUrl` / `issuedAt` are unchanged by them.
|
|
754
779
|
*/
|
|
755
780
|
interface InvoiceSummary {
|
|
756
781
|
id: string;
|
|
@@ -777,6 +802,21 @@ declare global {
|
|
|
777
802
|
/** Unix ms; reversal facts preserve the original amount and map status to void. */
|
|
778
803
|
refundedAt?: number;
|
|
779
804
|
chargedBackAt?: number;
|
|
805
|
+
/**
|
|
806
|
+
* The platform's comprobante for this charge. Non-null only on a
|
|
807
|
+
* retained `mercadopago` row whose status is `'paid'`, or `'void'`
|
|
808
|
+
* because it was reversed (`refundedAt` / `chargedBackAt` set), approved
|
|
809
|
+
* on or after the platform's self-billing go-live. Stripe rows, live
|
|
810
|
+
* provider rows (`'open'`, `'failed'`, and paid entries with no retained
|
|
811
|
+
* row) and payments before the go-live are always `null`. Never omitted.
|
|
812
|
+
*/
|
|
813
|
+
factura: PlatformFiscalDoc;
|
|
814
|
+
/**
|
|
815
|
+
* The platform's credit note reversing that comprobante. Non-null only
|
|
816
|
+
* on a reversed (`'void'`) row whose `factura` is non-null; `null` on a
|
|
817
|
+
* `'paid'` row and wherever `factura` is `null`. Never omitted.
|
|
818
|
+
*/
|
|
819
|
+
creditNote: PlatformFiscalDoc;
|
|
780
820
|
}
|
|
781
821
|
/**
|
|
782
822
|
* One tier's `SK: PLAN` template row, as assessed by
|