@driveflux/pdf 4.0.77 → 5.0.0-feature-e-invoicing.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/.env +0 -0
- package/.env.development +4 -0
- package/.turbo/turbo-build.log +14 -0
- package/CHANGELOG.md +15 -0
- package/build.ts +45 -0
- package/bun-env.d.ts +34 -0
- package/bunfig.toml +8 -0
- package/catalog-version-stamp.json +8 -0
- package/dist/main.js +4 -0
- package/dist/main.js.map +11 -0
- package/dist/src/config.d.ts +20 -0
- package/dist/src/create-logger.d.ts +1 -0
- package/dist/src/errors.d.ts +43 -0
- package/dist/src/main.d.ts +1 -0
- package/dist/src/preview/api.d.ts +264 -0
- package/dist/src/preview/client/app.d.ts +2 -0
- package/dist/src/preview/client/invoice/invoice-display.d.ts +5 -0
- package/dist/src/preview/client/invoice/invoice-setup.d.ts +8 -0
- package/dist/src/preview/client/preview-targets.d.ts +12 -0
- package/dist/src/preview/client/preview.d.ts +6 -0
- package/dist/src/preview/client/sidebar.d.ts +7 -0
- package/dist/src/preview/client/treaty.d.ts +200 -0
- package/dist/src/preview/client/use-target.d.ts +1 -0
- package/dist/src/preview/fonts/register-fonts.d.ts +1 -0
- package/dist/src/preview/frontend.d.ts +1 -0
- package/dist/src/preview/server.d.ts +1 -0
- package/dist/src/repository.d.ts +171 -0
- package/dist/src/templates/invoice/colors.d.ts +6 -0
- package/dist/src/templates/invoice/company-details.d.ts +10 -0
- package/dist/src/templates/invoice/flux-invoice.d.ts +6 -0
- package/dist/src/templates/invoice/footer.d.ts +2 -0
- package/dist/src/templates/invoice/host-invoice.d.ts +9 -0
- package/dist/src/templates/invoice/invoice-details.d.ts +13 -0
- package/dist/src/templates/invoice/invoice-notes.d.ts +1 -0
- package/dist/src/templates/invoice/invoice-summary.d.ts +7 -0
- package/dist/src/templates/invoice/letter-head.d.ts +10 -0
- package/dist/src/templates/invoice/li.d.ts +10 -0
- package/dist/src/templates/invoice/platform-and-host-details.d.ts +11 -0
- package/dist/src/templates/invoice/spacer.d.ts +3 -0
- package/dist/src/templates/invoice/split-container-items.d.ts +10 -0
- package/dist/src/templates/invoice/split-container.d.ts +7 -0
- package/dist/src/templates/invoice/standard-page.d.ts +7 -0
- package/dist/src/templates/invoice/types.d.ts +3 -0
- package/dist/src/templates/invoice/ul.d.ts +8 -0
- package/dist/src/templates/invoice/utils.d.ts +2 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +34 -40
- package/src/config.ts +42 -0
- package/src/create-logger.ts +4 -0
- package/src/errors.ts +35 -0
- package/src/main.ts +7 -0
- package/src/preview/api.ts +33 -0
- package/src/preview/client/app.tsx +30 -0
- package/src/preview/client/invoice/invoice-display.tsx +27 -0
- package/src/preview/client/invoice/invoice-setup.tsx +95 -0
- package/src/preview/client/preview-targets.ts +30 -0
- package/src/preview/client/preview.tsx +37 -0
- package/src/preview/client/sidebar.tsx +39 -0
- package/src/preview/client/treaty.ts +8 -0
- package/src/preview/client/use-target.ts +11 -0
- package/src/preview/fonts/GOTHAM-BLACK.TTF +0 -0
- package/src/preview/fonts/GOTHAM-BLACKITALIC.TTF +0 -0
- package/src/preview/fonts/GOTHAM-BOLD.TTF +0 -0
- package/src/preview/fonts/GOTHAM-BOLDITALIC.TTF +0 -0
- package/src/preview/fonts/GOTHAM-LIGHT.TTF +0 -0
- package/src/preview/fonts/GOTHAM-LIGHTITALIC.TTF +0 -0
- package/src/preview/fonts/GOTHAM-MEDIUM.TTF +0 -0
- package/src/preview/fonts/GOTHAM-MEDIUMITALIC.TTF +0 -0
- package/src/preview/fonts/GOTHAM-THIN.TTF +0 -0
- package/src/preview/fonts/GOTHAM-THINITALIC.TTF +0 -0
- package/src/preview/fonts/GOTHAM-ULTRA.TTF +0 -0
- package/src/preview/fonts/GOTHAM-ULTRAITALIC.TTF +0 -0
- package/src/preview/fonts/GOTHAM-XLIGHT.TTF +0 -0
- package/src/preview/fonts/GOTHAM-XLIGHTITALIC.TTF +0 -0
- package/src/preview/fonts/Gotham Book Italic.otf +0 -0
- package/src/preview/fonts/Gotham-BoldItalic.otf +0 -0
- package/src/preview/fonts/Gotham-Book.otf +0 -0
- package/src/preview/fonts/Gotham-BookItalic.otf +0 -0
- package/src/preview/fonts/Gotham-ExtraLight.otf +0 -0
- package/src/preview/fonts/Gotham-ExtraLightItalic.otf +0 -0
- package/src/preview/fonts/Gotham-Light.otf +0 -0
- package/src/preview/fonts/Gotham-LightItalic.otf +0 -0
- package/src/preview/fonts/Gotham-Medium.otf +0 -0
- package/src/preview/fonts/Gotham-MediumItalic.otf +0 -0
- package/src/preview/fonts/Gotham-Thin.otf +0 -0
- package/src/preview/fonts/Gotham-ThinItalic.otf +0 -0
- package/src/preview/fonts/Gotham-Ultra.otf +0 -0
- package/src/preview/fonts/Gotham-UltraItalic.otf +0 -0
- package/src/preview/fonts/GothamNarrow-Black.otf +0 -0
- package/src/preview/fonts/GothamNarrow-BlackItalic.otf +0 -0
- package/src/preview/fonts/GothamNarrow-Book.otf +0 -0
- package/src/preview/fonts/GothamNarrow-BookItalic.otf +0 -0
- package/src/preview/fonts/GothamNarrow-Light.otf +0 -0
- package/src/preview/fonts/GothamNarrow-LightItalic.otf +0 -0
- package/src/preview/fonts/GothamNarrow-Medium.otf +0 -0
- package/src/preview/fonts/GothamNarrow-MediumItalic.otf +0 -0
- package/src/preview/fonts/GothamNarrow-Thin.otf +0 -0
- package/src/preview/fonts/GothamNarrow-ThinItalic.otf +0 -0
- package/src/preview/fonts/GothamNarrow-Ultra.otf +0 -0
- package/src/preview/fonts/GothamNarrow-UltraItalic.otf +0 -0
- package/src/preview/fonts/GothamNarrow-XLight.otf +0 -0
- package/src/preview/fonts/GothamNarrow-XLightItalic.otf +0 -0
- package/src/preview/fonts/gotham-extra-narrow-bold-italic.otf +0 -0
- package/src/preview/fonts/gotham-extra-narrow-bold.otf +0 -0
- package/src/preview/fonts/gotham-extra-narrow-book-italic.otf +0 -0
- package/src/preview/fonts/gotham-extra-narrow-book.otf +0 -0
- package/src/preview/fonts/gotham-extra-narrow-light-italic.otf +0 -0
- package/src/preview/fonts/gotham-extra-narrow-light.otf +0 -0
- package/src/preview/fonts/gotham-extra-narrow-medium-italic.otf +0 -0
- package/src/preview/fonts/gotham-extra-narrow-medium.otf +0 -0
- package/src/preview/fonts/gotham-rounded-bold-italic.otf +0 -0
- package/src/preview/fonts/gotham-rounded-bold.otf +0 -0
- package/src/preview/fonts/gotham-rounded-book-italic.otf +0 -0
- package/src/preview/fonts/gotham-rounded-book.otf +0 -0
- package/src/preview/fonts/gotham-rounded-light-italic.otf +0 -0
- package/src/preview/fonts/gotham-rounded-light.otf +0 -0
- package/src/preview/fonts/gotham-rounded-medium-italic.otf +0 -0
- package/src/preview/fonts/gotham-rounded-medium.otf +0 -0
- package/src/preview/fonts/register-fonts.ts +395 -0
- package/src/preview/frontend.tsx +23 -0
- package/src/preview/global.css +39 -0
- package/src/preview/preview.html +12 -0
- package/src/preview/server.ts +28 -0
- package/src/repository.ts +39 -0
- package/src/templates/invoice/E Invoice Format.pdf +0 -0
- package/src/templates/invoice/colors.ts +6 -0
- package/src/templates/invoice/company-details.tsx +124 -0
- package/src/templates/invoice/flux-invoice.tsx +134 -0
- package/src/templates/invoice/footer.tsx +46 -0
- package/src/templates/invoice/host-invoice.tsx +134 -0
- package/src/templates/invoice/images/logo.png +0 -0
- package/src/templates/invoice/images/logo.svg +41 -0
- package/src/templates/invoice/invoice-details.tsx +231 -0
- package/src/templates/invoice/invoice-notes.tsx +74 -0
- package/src/templates/invoice/invoice-summary.tsx +135 -0
- package/src/templates/invoice/letter-head.tsx +132 -0
- package/src/templates/invoice/li.tsx +48 -0
- package/src/templates/invoice/platform-and-host-details.tsx +56 -0
- package/src/templates/invoice/spacer.tsx +5 -0
- package/src/templates/invoice/split-container-items.tsx +80 -0
- package/src/templates/invoice/split-container.tsx +35 -0
- package/src/templates/invoice/standard-page.tsx +45 -0
- package/src/templates/invoice/types.ts +6 -0
- package/src/templates/invoice/ul.tsx +19 -0
- package/src/templates/invoice/utils.ts +5 -0
- package/tsconfig.json +21 -0
- package/dist/components/FluxLogo.d.ts +0 -3
- package/dist/components/FluxLogo.d.ts.map +0 -1
- package/dist/components/FluxLogo.js +0 -66
- package/dist/components/FluxLogo.js.map +0 -1
- package/dist/components/StandardPage.d.ts +0 -7
- package/dist/components/StandardPage.d.ts.map +0 -1
- package/dist/components/StandardPage.js +0 -132
- package/dist/components/StandardPage.js.map +0 -1
- package/dist/index.d.ts +0 -4
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -3
- package/dist/index.js.map +0 -1
- package/dist/templates/QuotationPdf/CustomerSubscriptionSection.d.ts +0 -10
- package/dist/templates/QuotationPdf/CustomerSubscriptionSection.d.ts.map +0 -1
- package/dist/templates/QuotationPdf/CustomerSubscriptionSection.js +0 -165
- package/dist/templates/QuotationPdf/CustomerSubscriptionSection.js.map +0 -1
- package/dist/templates/QuotationPdf/GFV.d.ts +0 -10
- package/dist/templates/QuotationPdf/GFV.d.ts.map +0 -1
- package/dist/templates/QuotationPdf/GFV.js +0 -61
- package/dist/templates/QuotationPdf/GFV.js.map +0 -1
- package/dist/templates/QuotationPdf/Header.d.ts +0 -9
- package/dist/templates/QuotationPdf/Header.d.ts.map +0 -1
- package/dist/templates/QuotationPdf/Header.js +0 -71
- package/dist/templates/QuotationPdf/Header.js.map +0 -1
- package/dist/templates/QuotationPdf/Pricing.d.ts +0 -10
- package/dist/templates/QuotationPdf/Pricing.d.ts.map +0 -1
- package/dist/templates/QuotationPdf/Pricing.js +0 -723
- package/dist/templates/QuotationPdf/Pricing.js.map +0 -1
- package/dist/templates/QuotationPdf/QuotationPdfPage.d.ts +0 -8
- package/dist/templates/QuotationPdf/QuotationPdfPage.d.ts.map +0 -1
- package/dist/templates/QuotationPdf/QuotationPdfPage.js +0 -30
- package/dist/templates/QuotationPdf/QuotationPdfPage.js.map +0 -1
- package/dist/templates/QuotationPdf/SectionBoxNew.d.ts +0 -9
- package/dist/templates/QuotationPdf/SectionBoxNew.d.ts.map +0 -1
- package/dist/templates/QuotationPdf/SectionBoxNew.js +0 -38
- package/dist/templates/QuotationPdf/SectionBoxNew.js.map +0 -1
- package/dist/templates/QuotationPdf/TermsSection.d.ts +0 -8
- package/dist/templates/QuotationPdf/TermsSection.d.ts.map +0 -1
- package/dist/templates/QuotationPdf/TermsSection.js +0 -50
- package/dist/templates/QuotationPdf/TermsSection.js.map +0 -1
- package/dist/templates/QuotationPdf/VehiclePhotos.d.ts +0 -10
- package/dist/templates/QuotationPdf/VehiclePhotos.d.ts.map +0 -1
- package/dist/templates/QuotationPdf/VehiclePhotos.js +0 -66
- package/dist/templates/QuotationPdf/VehiclePhotos.js.map +0 -1
- package/dist/templates/QuotationPdf/index.d.ts +0 -12
- package/dist/templates/QuotationPdf/index.d.ts.map +0 -1
- package/dist/templates/QuotationPdf/index.js +0 -214
- package/dist/templates/QuotationPdf/index.js.map +0 -1
- package/dist/templates/QuotationPdf/translations.d.ts +0 -68
- package/dist/templates/QuotationPdf/translations.d.ts.map +0 -1
- package/dist/templates/QuotationPdf/translations.js +0 -101
- package/dist/templates/QuotationPdf/translations.js.map +0 -1
- package/dist/templates/QuotationPdf/utils.d.ts +0 -14
- package/dist/templates/QuotationPdf/utils.d.ts.map +0 -1
- package/dist/templates/QuotationPdf/utils.js +0 -152
- package/dist/templates/QuotationPdf/utils.js.map +0 -1
- package/dist/templates/SubscriptionAgreement/Confirmation.d.ts +0 -12
- package/dist/templates/SubscriptionAgreement/Confirmation.d.ts.map +0 -1
- package/dist/templates/SubscriptionAgreement/Confirmation.js +0 -80
- package/dist/templates/SubscriptionAgreement/Confirmation.js.map +0 -1
- package/dist/templates/SubscriptionAgreement/CoverPage.d.ts +0 -14
- package/dist/templates/SubscriptionAgreement/CoverPage.d.ts.map +0 -1
- package/dist/templates/SubscriptionAgreement/CoverPage.js +0 -111
- package/dist/templates/SubscriptionAgreement/CoverPage.js.map +0 -1
- package/dist/templates/SubscriptionAgreement/CoverPageSection.d.ts +0 -7
- package/dist/templates/SubscriptionAgreement/CoverPageSection.d.ts.map +0 -1
- package/dist/templates/SubscriptionAgreement/CoverPageSection.js +0 -25
- package/dist/templates/SubscriptionAgreement/CoverPageSection.js.map +0 -1
- package/dist/templates/SubscriptionAgreement/Details.d.ts +0 -10
- package/dist/templates/SubscriptionAgreement/Details.d.ts.map +0 -1
- package/dist/templates/SubscriptionAgreement/Details.js +0 -223
- package/dist/templates/SubscriptionAgreement/Details.js.map +0 -1
- package/dist/templates/SubscriptionAgreement/Footer.d.ts +0 -10
- package/dist/templates/SubscriptionAgreement/Footer.d.ts.map +0 -1
- package/dist/templates/SubscriptionAgreement/Footer.js +0 -58
- package/dist/templates/SubscriptionAgreement/Footer.js.map +0 -1
- package/dist/templates/SubscriptionAgreement/Header.d.ts +0 -10
- package/dist/templates/SubscriptionAgreement/Header.d.ts.map +0 -1
- package/dist/templates/SubscriptionAgreement/Header.js +0 -46
- package/dist/templates/SubscriptionAgreement/Header.js.map +0 -1
- package/dist/templates/SubscriptionAgreement/LabelValue.d.ts +0 -8
- package/dist/templates/SubscriptionAgreement/LabelValue.d.ts.map +0 -1
- package/dist/templates/SubscriptionAgreement/LabelValue.js +0 -29
- package/dist/templates/SubscriptionAgreement/LabelValue.js.map +0 -1
- package/dist/templates/SubscriptionAgreement/SubscriptionAgreementPage.d.ts +0 -10
- package/dist/templates/SubscriptionAgreement/SubscriptionAgreementPage.d.ts.map +0 -1
- package/dist/templates/SubscriptionAgreement/SubscriptionAgreementPage.js +0 -33
- package/dist/templates/SubscriptionAgreement/SubscriptionAgreementPage.js.map +0 -1
- package/dist/templates/SubscriptionAgreement/TermsOfUse.d.ts +0 -8
- package/dist/templates/SubscriptionAgreement/TermsOfUse.d.ts.map +0 -1
- package/dist/templates/SubscriptionAgreement/TermsOfUse.js +0 -101
- package/dist/templates/SubscriptionAgreement/TermsOfUse.js.map +0 -1
- package/dist/templates/SubscriptionAgreement/TermsOfUseSubSection.d.ts +0 -12
- package/dist/templates/SubscriptionAgreement/TermsOfUseSubSection.d.ts.map +0 -1
- package/dist/templates/SubscriptionAgreement/TermsOfUseSubSection.js +0 -103
- package/dist/templates/SubscriptionAgreement/TermsOfUseSubSection.js.map +0 -1
- package/dist/templates/SubscriptionAgreement/index.d.ts +0 -13
- package/dist/templates/SubscriptionAgreement/index.d.ts.map +0 -1
- package/dist/templates/SubscriptionAgreement/index.js +0 -271
- package/dist/templates/SubscriptionAgreement/index.js.map +0 -1
- package/dist/templates/SubscriptionAgreement/translations.d.ts +0 -78
- package/dist/templates/SubscriptionAgreement/translations.d.ts.map +0 -1
- package/dist/templates/SubscriptionAgreement/translations.js +0 -662
- package/dist/templates/SubscriptionAgreement/translations.js.map +0 -1
- package/dist/templates/SubscriptionAgreement/types.d.ts +0 -7
- package/dist/templates/SubscriptionAgreement/types.d.ts.map +0 -1
- package/dist/templates/SubscriptionAgreement/types.js +0 -1
- package/dist/templates/SubscriptionAgreement/types.js.map +0 -1
- package/dist/templates/SubscriptionAgreement/utils.d.ts +0 -6
- package/dist/templates/SubscriptionAgreement/utils.d.ts.map +0 -1
- package/dist/templates/SubscriptionAgreement/utils.js +0 -37
- package/dist/templates/SubscriptionAgreement/utils.js.map +0 -1
- package/dist/templates/index.d.ts +0 -3
- package/dist/templates/index.d.ts.map +0 -1
- package/dist/templates/index.js +0 -2
- package/dist/templates/index.js.map +0 -1
- package/dist/theme/colors.d.ts +0 -148
- package/dist/theme/colors.d.ts.map +0 -1
- package/dist/theme/colors.js +0 -137
- package/dist/theme/colors.js.map +0 -1
- package/dist/theme/index.d.ts +0 -2
- package/dist/theme/index.d.ts.map +0 -1
- package/dist/theme/index.js +0 -1
- package/dist/theme/index.js.map +0 -1
- package/dist/types.d.ts +0 -2
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -1
- package/dist/types.js.map +0 -1
- package/dist/utils.d.ts +0 -10
- package/dist/utils.d.ts.map +0 -1
- package/dist/utils.js +0 -175
- package/dist/utils.js.map +0 -1
- package/dist/watch.d.ts +0 -2
- package/dist/watch.d.ts.map +0 -1
- package/dist/watch.js +0 -11
- package/dist/watch.js.map +0 -1
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
export declare const appTreaty: {
|
|
2
|
+
api: {
|
|
3
|
+
"invoice-for-pdf": ((params: {
|
|
4
|
+
invoiceId: string | number;
|
|
5
|
+
}) => {
|
|
6
|
+
get: (options?: {
|
|
7
|
+
headers?: Record<string, unknown> | undefined;
|
|
8
|
+
query?: Record<string, unknown> | undefined;
|
|
9
|
+
fetch?: RequestInit | undefined;
|
|
10
|
+
} | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
|
11
|
+
400: {
|
|
12
|
+
readonly code: "invoice_not_einvoice" | "invoice_not_found";
|
|
13
|
+
readonly context: "PDFError";
|
|
14
|
+
readonly message: string;
|
|
15
|
+
};
|
|
16
|
+
404: {
|
|
17
|
+
readonly code: "invoice_not_einvoice" | "invoice_not_found";
|
|
18
|
+
readonly context: "PDFError";
|
|
19
|
+
readonly message: string;
|
|
20
|
+
};
|
|
21
|
+
200: Omit<{
|
|
22
|
+
date: Date;
|
|
23
|
+
id: string;
|
|
24
|
+
eInvoice: {
|
|
25
|
+
poNumber: string | null;
|
|
26
|
+
fluxDetails: {
|
|
27
|
+
invoiceNumber: string;
|
|
28
|
+
poNumber: string | null;
|
|
29
|
+
companyNumber: string | null;
|
|
30
|
+
companyName: string;
|
|
31
|
+
id: string | null;
|
|
32
|
+
sstNo: string | null;
|
|
33
|
+
tinNo: string | null;
|
|
34
|
+
address: string;
|
|
35
|
+
} & {
|
|
36
|
+
lines: {
|
|
37
|
+
description: string;
|
|
38
|
+
amount: number;
|
|
39
|
+
discountedAmount: number | null;
|
|
40
|
+
promoCode: string | null;
|
|
41
|
+
taxAmount: number;
|
|
42
|
+
total: number;
|
|
43
|
+
}[];
|
|
44
|
+
};
|
|
45
|
+
hostDetails: ({
|
|
46
|
+
invoiceNumber: string;
|
|
47
|
+
poNumber: string | null;
|
|
48
|
+
companyNumber: string | null;
|
|
49
|
+
companyName: string;
|
|
50
|
+
id: string | null;
|
|
51
|
+
sstNo: string | null;
|
|
52
|
+
tinNo: string | null;
|
|
53
|
+
address: string;
|
|
54
|
+
} & {
|
|
55
|
+
lines: {
|
|
56
|
+
description: string;
|
|
57
|
+
amount: number;
|
|
58
|
+
discountedAmount: number | null;
|
|
59
|
+
promoCode: string | null;
|
|
60
|
+
taxAmount: number;
|
|
61
|
+
total: number;
|
|
62
|
+
}[];
|
|
63
|
+
}) | null;
|
|
64
|
+
vehicle: {
|
|
65
|
+
plateNumber: string;
|
|
66
|
+
name: string;
|
|
67
|
+
color: string;
|
|
68
|
+
};
|
|
69
|
+
linesSummary: {
|
|
70
|
+
description: string;
|
|
71
|
+
amount: number;
|
|
72
|
+
discountedAmount: number | null;
|
|
73
|
+
promoCode: string | null;
|
|
74
|
+
}[];
|
|
75
|
+
} | null;
|
|
76
|
+
payerName: string;
|
|
77
|
+
payerEmail: string;
|
|
78
|
+
payerPhoneNumber: string | null;
|
|
79
|
+
billingAddress: {
|
|
80
|
+
name: string | null;
|
|
81
|
+
street1: string;
|
|
82
|
+
street2: string | null;
|
|
83
|
+
city: string;
|
|
84
|
+
state: string;
|
|
85
|
+
country: string;
|
|
86
|
+
postalCode: string;
|
|
87
|
+
} | null;
|
|
88
|
+
lines: {
|
|
89
|
+
id: string;
|
|
90
|
+
object: import("@driveflux/db").InvoiceLineObject;
|
|
91
|
+
taxPercentage: number;
|
|
92
|
+
amount: number;
|
|
93
|
+
discountAmount: number | null;
|
|
94
|
+
amountAfterTax: number;
|
|
95
|
+
taxAmount: number;
|
|
96
|
+
discountRatio: number;
|
|
97
|
+
subTotal: number;
|
|
98
|
+
total: number;
|
|
99
|
+
description: string;
|
|
100
|
+
quantity: number;
|
|
101
|
+
periodStart: Date | null;
|
|
102
|
+
periodEnd: Date | null;
|
|
103
|
+
isProration: boolean;
|
|
104
|
+
chargingFor: string | null;
|
|
105
|
+
exemptFromTax: boolean;
|
|
106
|
+
appliedDiscountId: string | null;
|
|
107
|
+
couponCode: string | null;
|
|
108
|
+
metadata: PrismaJson.SimpleMetadata | null;
|
|
109
|
+
plan: string | null;
|
|
110
|
+
mileagePackage: string | null;
|
|
111
|
+
subscriptionId: string | null;
|
|
112
|
+
cycleId: string | null;
|
|
113
|
+
vehicleId: string | null;
|
|
114
|
+
excessMileage: number | null;
|
|
115
|
+
suggestedPayoutAmount: number | null;
|
|
116
|
+
payoutId: string | null;
|
|
117
|
+
payoutLineId: string | null;
|
|
118
|
+
depositNoOfMonths: number | null;
|
|
119
|
+
}[];
|
|
120
|
+
total: number;
|
|
121
|
+
paid: boolean;
|
|
122
|
+
paidAt: Date | null;
|
|
123
|
+
createdAt: Date;
|
|
124
|
+
subscriptionDetails: {
|
|
125
|
+
subscriptionId: string | null;
|
|
126
|
+
vehicleId: string;
|
|
127
|
+
make: string;
|
|
128
|
+
vehicleModel: string;
|
|
129
|
+
variant: string;
|
|
130
|
+
year: number;
|
|
131
|
+
plan: import("@driveflux/db").PlanType;
|
|
132
|
+
mileagePackage: import("@driveflux/db").MileagePackage;
|
|
133
|
+
} | null;
|
|
134
|
+
}, "eInvoice"> & {
|
|
135
|
+
eInvoice: NonNullable<{
|
|
136
|
+
poNumber: string | null;
|
|
137
|
+
fluxDetails: {
|
|
138
|
+
invoiceNumber: string;
|
|
139
|
+
poNumber: string | null;
|
|
140
|
+
companyNumber: string | null;
|
|
141
|
+
companyName: string;
|
|
142
|
+
id: string | null;
|
|
143
|
+
sstNo: string | null;
|
|
144
|
+
tinNo: string | null;
|
|
145
|
+
address: string;
|
|
146
|
+
} & {
|
|
147
|
+
lines: {
|
|
148
|
+
description: string;
|
|
149
|
+
amount: number;
|
|
150
|
+
discountedAmount: number | null;
|
|
151
|
+
promoCode: string | null;
|
|
152
|
+
taxAmount: number;
|
|
153
|
+
total: number;
|
|
154
|
+
}[];
|
|
155
|
+
};
|
|
156
|
+
hostDetails: ({
|
|
157
|
+
invoiceNumber: string;
|
|
158
|
+
poNumber: string | null;
|
|
159
|
+
companyNumber: string | null;
|
|
160
|
+
companyName: string;
|
|
161
|
+
id: string | null;
|
|
162
|
+
sstNo: string | null;
|
|
163
|
+
tinNo: string | null;
|
|
164
|
+
address: string;
|
|
165
|
+
} & {
|
|
166
|
+
lines: {
|
|
167
|
+
description: string;
|
|
168
|
+
amount: number;
|
|
169
|
+
discountedAmount: number | null;
|
|
170
|
+
promoCode: string | null;
|
|
171
|
+
taxAmount: number;
|
|
172
|
+
total: number;
|
|
173
|
+
}[];
|
|
174
|
+
}) | null;
|
|
175
|
+
vehicle: {
|
|
176
|
+
plateNumber: string;
|
|
177
|
+
name: string;
|
|
178
|
+
color: string;
|
|
179
|
+
};
|
|
180
|
+
linesSummary: {
|
|
181
|
+
description: string;
|
|
182
|
+
amount: number;
|
|
183
|
+
discountedAmount: number | null;
|
|
184
|
+
promoCode: string | null;
|
|
185
|
+
}[];
|
|
186
|
+
}>;
|
|
187
|
+
};
|
|
188
|
+
422: {
|
|
189
|
+
type: "validation";
|
|
190
|
+
on: string;
|
|
191
|
+
summary?: string;
|
|
192
|
+
message?: string;
|
|
193
|
+
found?: unknown;
|
|
194
|
+
property?: string;
|
|
195
|
+
expected?: string;
|
|
196
|
+
};
|
|
197
|
+
}>>;
|
|
198
|
+
}) & {};
|
|
199
|
+
};
|
|
200
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useTarget: () => import("nuqs").UseQueryStateReturn<"invoice", undefined>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const registerFonts: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
declare class PDFRepository {
|
|
2
|
+
getInvoiceForPDF(invoiceId: string): Promise<Omit<{
|
|
3
|
+
date: Date;
|
|
4
|
+
id: string;
|
|
5
|
+
eInvoice: {
|
|
6
|
+
poNumber: string | null;
|
|
7
|
+
fluxDetails: {
|
|
8
|
+
invoiceNumber: string;
|
|
9
|
+
poNumber: string | null;
|
|
10
|
+
companyNumber: string | null;
|
|
11
|
+
companyName: string;
|
|
12
|
+
id: string | null;
|
|
13
|
+
sstNo: string | null;
|
|
14
|
+
tinNo: string | null;
|
|
15
|
+
address: string;
|
|
16
|
+
} & {
|
|
17
|
+
lines: {
|
|
18
|
+
description: string;
|
|
19
|
+
amount: number;
|
|
20
|
+
discountedAmount: number | null;
|
|
21
|
+
promoCode: string | null;
|
|
22
|
+
taxAmount: number;
|
|
23
|
+
total: number;
|
|
24
|
+
}[];
|
|
25
|
+
};
|
|
26
|
+
hostDetails: ({
|
|
27
|
+
invoiceNumber: string;
|
|
28
|
+
poNumber: string | null;
|
|
29
|
+
companyNumber: string | null;
|
|
30
|
+
companyName: string;
|
|
31
|
+
id: string | null;
|
|
32
|
+
sstNo: string | null;
|
|
33
|
+
tinNo: string | null;
|
|
34
|
+
address: string;
|
|
35
|
+
} & {
|
|
36
|
+
lines: {
|
|
37
|
+
description: string;
|
|
38
|
+
amount: number;
|
|
39
|
+
discountedAmount: number | null;
|
|
40
|
+
promoCode: string | null;
|
|
41
|
+
taxAmount: number;
|
|
42
|
+
total: number;
|
|
43
|
+
}[];
|
|
44
|
+
}) | null;
|
|
45
|
+
vehicle: {
|
|
46
|
+
plateNumber: string;
|
|
47
|
+
name: string;
|
|
48
|
+
color: string;
|
|
49
|
+
};
|
|
50
|
+
linesSummary: {
|
|
51
|
+
description: string;
|
|
52
|
+
amount: number;
|
|
53
|
+
discountedAmount: number | null;
|
|
54
|
+
promoCode: string | null;
|
|
55
|
+
}[];
|
|
56
|
+
} | null;
|
|
57
|
+
payerName: string;
|
|
58
|
+
payerEmail: string;
|
|
59
|
+
payerPhoneNumber: string | null;
|
|
60
|
+
billingAddress: {
|
|
61
|
+
name: string | null;
|
|
62
|
+
street1: string;
|
|
63
|
+
street2: string | null;
|
|
64
|
+
city: string;
|
|
65
|
+
state: string;
|
|
66
|
+
country: string;
|
|
67
|
+
postalCode: string;
|
|
68
|
+
} | null;
|
|
69
|
+
lines: {
|
|
70
|
+
id: string;
|
|
71
|
+
object: import("@driveflux/db").InvoiceLineObject;
|
|
72
|
+
taxPercentage: number;
|
|
73
|
+
amount: number;
|
|
74
|
+
discountAmount: number | null;
|
|
75
|
+
amountAfterTax: number;
|
|
76
|
+
taxAmount: number;
|
|
77
|
+
discountRatio: number;
|
|
78
|
+
subTotal: number;
|
|
79
|
+
total: number;
|
|
80
|
+
description: string;
|
|
81
|
+
quantity: number;
|
|
82
|
+
periodStart: Date | null;
|
|
83
|
+
periodEnd: Date | null;
|
|
84
|
+
isProration: boolean;
|
|
85
|
+
chargingFor: string | null;
|
|
86
|
+
exemptFromTax: boolean;
|
|
87
|
+
appliedDiscountId: string | null;
|
|
88
|
+
couponCode: string | null;
|
|
89
|
+
metadata: PrismaJson.SimpleMetadata | null;
|
|
90
|
+
plan: string | null;
|
|
91
|
+
mileagePackage: string | null;
|
|
92
|
+
subscriptionId: string | null;
|
|
93
|
+
cycleId: string | null;
|
|
94
|
+
vehicleId: string | null;
|
|
95
|
+
excessMileage: number | null;
|
|
96
|
+
suggestedPayoutAmount: number | null;
|
|
97
|
+
payoutId: string | null;
|
|
98
|
+
payoutLineId: string | null;
|
|
99
|
+
depositNoOfMonths: number | null;
|
|
100
|
+
}[];
|
|
101
|
+
total: number;
|
|
102
|
+
paid: boolean;
|
|
103
|
+
paidAt: Date | null;
|
|
104
|
+
createdAt: Date;
|
|
105
|
+
subscriptionDetails: {
|
|
106
|
+
subscriptionId: string | null;
|
|
107
|
+
vehicleId: string;
|
|
108
|
+
make: string;
|
|
109
|
+
vehicleModel: string;
|
|
110
|
+
variant: string;
|
|
111
|
+
year: number;
|
|
112
|
+
plan: import("@driveflux/db").PlanType;
|
|
113
|
+
mileagePackage: import("@driveflux/db").MileagePackage;
|
|
114
|
+
} | null;
|
|
115
|
+
}, "eInvoice"> & {
|
|
116
|
+
eInvoice: NonNullable<{
|
|
117
|
+
poNumber: string | null;
|
|
118
|
+
fluxDetails: {
|
|
119
|
+
invoiceNumber: string;
|
|
120
|
+
poNumber: string | null;
|
|
121
|
+
companyNumber: string | null;
|
|
122
|
+
companyName: string;
|
|
123
|
+
id: string | null;
|
|
124
|
+
sstNo: string | null;
|
|
125
|
+
tinNo: string | null;
|
|
126
|
+
address: string;
|
|
127
|
+
} & {
|
|
128
|
+
lines: {
|
|
129
|
+
description: string;
|
|
130
|
+
amount: number;
|
|
131
|
+
discountedAmount: number | null;
|
|
132
|
+
promoCode: string | null;
|
|
133
|
+
taxAmount: number;
|
|
134
|
+
total: number;
|
|
135
|
+
}[];
|
|
136
|
+
};
|
|
137
|
+
hostDetails: ({
|
|
138
|
+
invoiceNumber: string;
|
|
139
|
+
poNumber: string | null;
|
|
140
|
+
companyNumber: string | null;
|
|
141
|
+
companyName: string;
|
|
142
|
+
id: string | null;
|
|
143
|
+
sstNo: string | null;
|
|
144
|
+
tinNo: string | null;
|
|
145
|
+
address: string;
|
|
146
|
+
} & {
|
|
147
|
+
lines: {
|
|
148
|
+
description: string;
|
|
149
|
+
amount: number;
|
|
150
|
+
discountedAmount: number | null;
|
|
151
|
+
promoCode: string | null;
|
|
152
|
+
taxAmount: number;
|
|
153
|
+
total: number;
|
|
154
|
+
}[];
|
|
155
|
+
}) | null;
|
|
156
|
+
vehicle: {
|
|
157
|
+
plateNumber: string;
|
|
158
|
+
name: string;
|
|
159
|
+
color: string;
|
|
160
|
+
};
|
|
161
|
+
linesSummary: {
|
|
162
|
+
description: string;
|
|
163
|
+
amount: number;
|
|
164
|
+
discountedAmount: number | null;
|
|
165
|
+
promoCode: string | null;
|
|
166
|
+
}[];
|
|
167
|
+
}>;
|
|
168
|
+
}>;
|
|
169
|
+
}
|
|
170
|
+
export declare const repository: PDFRepository;
|
|
171
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type CompanyDetailsProps = {
|
|
2
|
+
title: string;
|
|
3
|
+
companyName: string;
|
|
4
|
+
address: string;
|
|
5
|
+
sstNumber: string;
|
|
6
|
+
tinNumber: string;
|
|
7
|
+
invoiceNumber: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const CompanyDetails: ({ title, companyName, address, sstNumber, tinNumber, invoiceNumber, }: CompanyDetailsProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { InvoiceForPDF } from './types';
|
|
2
|
+
export type HostInvoiceProps = {
|
|
3
|
+
data: {
|
|
4
|
+
eInvoice: Pick<InvoiceForPDF['eInvoice'], 'poNumber' | 'fluxDetails'> & {
|
|
5
|
+
hostDetails: NonNullable<InvoiceForPDF['eInvoice']['hostDetails']>;
|
|
6
|
+
};
|
|
7
|
+
} & Pick<InvoiceForPDF, 'payerName' | 'billingAddress' | 'payerPhoneNumber' | 'payerEmail' | 'date' | 'total' | 'paidAt' | 'subscriptionDetails'>;
|
|
8
|
+
};
|
|
9
|
+
export declare const HostInvoice: ({ data }: HostInvoiceProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type InvoiceDetailsProps = {
|
|
2
|
+
showSST?: boolean;
|
|
3
|
+
paid: boolean;
|
|
4
|
+
total: number;
|
|
5
|
+
items: {
|
|
6
|
+
description: string;
|
|
7
|
+
amount: number;
|
|
8
|
+
taxAmount?: number;
|
|
9
|
+
total?: number;
|
|
10
|
+
}[];
|
|
11
|
+
};
|
|
12
|
+
export declare const InvoiceDetails: ({ items, total, showSST, paid, }: InvoiceDetailsProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const InvoiceNotes: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { InvoiceForPDF } from './types';
|
|
2
|
+
type InvoiceSummaryData = Pick<InvoiceForPDF, 'subscriptionDetails' | 'payerName' | 'billingAddress' | 'payerPhoneNumber' | 'payerEmail' | 'total' | 'paidAt' | 'createdAt' | 'eInvoice'>;
|
|
3
|
+
type InvoiceSummaryProps = {
|
|
4
|
+
data: InvoiceSummaryData;
|
|
5
|
+
};
|
|
6
|
+
export declare const InvoiceSummary: ({ data }: InvoiceSummaryProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type LetterHeadProps = {
|
|
2
|
+
logoSource?: string;
|
|
3
|
+
companyName?: string;
|
|
4
|
+
companyAddress?: string;
|
|
5
|
+
purpose: string;
|
|
6
|
+
idLabel: string;
|
|
7
|
+
idValue: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const LetterHead: ({ logoSource, companyName, companyAddress, purpose, idLabel, idValue, }: LetterHeadProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type NodeProps } from '@react-pdf/renderer';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
interface LiProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
style?: Exclude<NodeProps['style'], Array<unknown>>;
|
|
6
|
+
bulletStyle?: Exclude<NodeProps['style'], Array<unknown>>;
|
|
7
|
+
bullet?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const Li: ({ children, style, bulletStyle, bullet }: LiProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { InvoiceForPDF } from './types';
|
|
2
|
+
type PlatformAndHostDetailsProps = {
|
|
3
|
+
data: {
|
|
4
|
+
eInvoice: {
|
|
5
|
+
fluxDetails: NonNullable<InvoiceForPDF['eInvoice']['fluxDetails']>;
|
|
6
|
+
hostDetails: InvoiceForPDF['eInvoice']['hostDetails'];
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare const PlatformAndHostDetails: ({ data, }: PlatformAndHostDetailsProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
type SplitContainerItem = {
|
|
3
|
+
title: string;
|
|
4
|
+
value: ReactNode;
|
|
5
|
+
};
|
|
6
|
+
type SplitContainerItemsProps = {
|
|
7
|
+
items: SplitContainerItem[];
|
|
8
|
+
};
|
|
9
|
+
export declare const SplitContainerItems: ({ items }: SplitContainerItemsProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type NodeProps } from '@react-pdf/renderer';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
interface UlProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
style?: Exclude<NodeProps['style'], Array<unknown>>;
|
|
6
|
+
}
|
|
7
|
+
export declare const Ul: ({ children, style }: UlProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|