@managemint-solutions/entities 1.6.0 → 1.7.1

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.
@@ -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,9 @@
1
+ export type GetInvoicesDto = {
2
+ page: number;
3
+ page_size: number;
4
+ /** Comma-joined BillingTransactionStatus values on the wire. Absent = all invoices. */
5
+ status_in?: string | null;
6
+ };
7
+ export type InvoiceIdDto = {
8
+ invoiceId: string;
9
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -82,7 +82,7 @@ export interface PermissionsEntity {
82
82
  update_timesheets: boolean;
83
83
  delete_timesheets: boolean;
84
84
  create_documents: boolean;
85
- read_docuemnts: boolean;
85
+ read_documents: boolean;
86
86
  update_documents: boolean;
87
87
  delete_documents: boolean;
88
88
  create_leave: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managemint-solutions/entities",
3
- "version": "1.6.0",
3
+ "version": "1.7.1",
4
4
  "description": "Entity types used by both the api and portal",
5
5
  "homepage": "https://github.com/ManageMint-Solutions/managemint-solutions-entities#readme",
6
6
  "bugs": {