@managemint-solutions/entities 1.6.0 → 1.7.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/dist/audit-trail/enum/index.d.ts +1 -0
- package/dist/audit-trail/enum/index.js +1 -0
- package/dist/billing/invoices/dto/index.d.ts +9 -0
- package/dist/billing/invoices/dto/index.js +2 -0
- package/dist/billing/invoices/index.d.ts +47 -0
- package/dist/billing/invoices/index.js +2 -0
- package/package.json +1 -1
|
@@ -19,6 +19,7 @@ export declare enum AuditTrailEntityType {
|
|
|
19
19
|
TASKS = "tasks",
|
|
20
20
|
TIMESHEETS = "timesheets",
|
|
21
21
|
BILLING_TRANSACTIONS = "billing_transactions",
|
|
22
|
+
INVOICE = "invoices",
|
|
22
23
|
NOTIFICATION = "notifications",
|
|
23
24
|
SUPPORT_TICKETS = "support_tickets",
|
|
24
25
|
SUPPORT_MESSAGES = "support_messages",
|
|
@@ -24,6 +24,7 @@ var AuditTrailEntityType;
|
|
|
24
24
|
AuditTrailEntityType["TASKS"] = "tasks";
|
|
25
25
|
AuditTrailEntityType["TIMESHEETS"] = "timesheets";
|
|
26
26
|
AuditTrailEntityType["BILLING_TRANSACTIONS"] = "billing_transactions";
|
|
27
|
+
AuditTrailEntityType["INVOICE"] = "invoices";
|
|
27
28
|
AuditTrailEntityType["NOTIFICATION"] = "notifications";
|
|
28
29
|
AuditTrailEntityType["SUPPORT_TICKETS"] = "support_tickets";
|
|
29
30
|
AuditTrailEntityType["SUPPORT_MESSAGES"] = "support_messages";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { BillingTransactionStatus, BillingTransactionType } from "../enum";
|
|
2
|
+
/** One priced line on an invoice document, frozen at issue time. */
|
|
3
|
+
export type InvoiceLineItem = {
|
|
4
|
+
/** The bold line: the module, e.g. "Core — subscription". */
|
|
5
|
+
label: string;
|
|
6
|
+
/** The grey sub-line: "12 seats · 2 Sep – 25 Sep 2026 (23 of 31 days)". */
|
|
7
|
+
detail?: string | null;
|
|
8
|
+
unit_amount_minor: number;
|
|
9
|
+
quantity: number;
|
|
10
|
+
amount_minor: number;
|
|
11
|
+
};
|
|
12
|
+
/** One row of GET /billing/invoices. */
|
|
13
|
+
export type InvoiceSummary = {
|
|
14
|
+
mms_id: string;
|
|
15
|
+
/** Sequential per organization; displayed as INV-000123. */
|
|
16
|
+
invoice_number: number;
|
|
17
|
+
transaction_type: BillingTransactionType;
|
|
18
|
+
/** Mirrors the backing transaction's status. */
|
|
19
|
+
status: BillingTransactionStatus;
|
|
20
|
+
issued_at: string;
|
|
21
|
+
paid_at: string | null;
|
|
22
|
+
amount_minor: number;
|
|
23
|
+
currency: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* The full invoice document data. `line_items` and `billed_to` are snapshots
|
|
27
|
+
* frozen when the invoice was written — the document must not change when the
|
|
28
|
+
* organization later edits its billing address or the pricebook moves on.
|
|
29
|
+
*/
|
|
30
|
+
export type InvoiceEntity = InvoiceSummary & {
|
|
31
|
+
billing_transaction_id: string;
|
|
32
|
+
paystack_reference: string | null;
|
|
33
|
+
period_start: string | null;
|
|
34
|
+
period_end: string | null;
|
|
35
|
+
line_items: InvoiceLineItem[];
|
|
36
|
+
billed_to: {
|
|
37
|
+
name: string;
|
|
38
|
+
email: string | null;
|
|
39
|
+
lines: string[];
|
|
40
|
+
vat_number: string | null;
|
|
41
|
+
registration_number: string | null;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
/** Response of GET /billing/invoices/:invoiceId/html — the A4 document markup. */
|
|
45
|
+
export type InvoiceHtmlResponse = {
|
|
46
|
+
html: string;
|
|
47
|
+
};
|
package/package.json
CHANGED