@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.
Files changed (282) hide show
  1. package/.env +0 -0
  2. package/.env.development +4 -0
  3. package/.turbo/turbo-build.log +14 -0
  4. package/CHANGELOG.md +15 -0
  5. package/build.ts +45 -0
  6. package/bun-env.d.ts +34 -0
  7. package/bunfig.toml +8 -0
  8. package/catalog-version-stamp.json +8 -0
  9. package/dist/main.js +4 -0
  10. package/dist/main.js.map +11 -0
  11. package/dist/src/config.d.ts +20 -0
  12. package/dist/src/create-logger.d.ts +1 -0
  13. package/dist/src/errors.d.ts +43 -0
  14. package/dist/src/main.d.ts +1 -0
  15. package/dist/src/preview/api.d.ts +264 -0
  16. package/dist/src/preview/client/app.d.ts +2 -0
  17. package/dist/src/preview/client/invoice/invoice-display.d.ts +5 -0
  18. package/dist/src/preview/client/invoice/invoice-setup.d.ts +8 -0
  19. package/dist/src/preview/client/preview-targets.d.ts +12 -0
  20. package/dist/src/preview/client/preview.d.ts +6 -0
  21. package/dist/src/preview/client/sidebar.d.ts +7 -0
  22. package/dist/src/preview/client/treaty.d.ts +200 -0
  23. package/dist/src/preview/client/use-target.d.ts +1 -0
  24. package/dist/src/preview/fonts/register-fonts.d.ts +1 -0
  25. package/dist/src/preview/frontend.d.ts +1 -0
  26. package/dist/src/preview/server.d.ts +1 -0
  27. package/dist/src/repository.d.ts +171 -0
  28. package/dist/src/templates/invoice/colors.d.ts +6 -0
  29. package/dist/src/templates/invoice/company-details.d.ts +10 -0
  30. package/dist/src/templates/invoice/flux-invoice.d.ts +6 -0
  31. package/dist/src/templates/invoice/footer.d.ts +2 -0
  32. package/dist/src/templates/invoice/host-invoice.d.ts +9 -0
  33. package/dist/src/templates/invoice/invoice-details.d.ts +13 -0
  34. package/dist/src/templates/invoice/invoice-notes.d.ts +1 -0
  35. package/dist/src/templates/invoice/invoice-summary.d.ts +7 -0
  36. package/dist/src/templates/invoice/letter-head.d.ts +10 -0
  37. package/dist/src/templates/invoice/li.d.ts +10 -0
  38. package/dist/src/templates/invoice/platform-and-host-details.d.ts +11 -0
  39. package/dist/src/templates/invoice/spacer.d.ts +3 -0
  40. package/dist/src/templates/invoice/split-container-items.d.ts +10 -0
  41. package/dist/src/templates/invoice/split-container.d.ts +7 -0
  42. package/dist/src/templates/invoice/standard-page.d.ts +7 -0
  43. package/dist/src/templates/invoice/types.d.ts +3 -0
  44. package/dist/src/templates/invoice/ul.d.ts +8 -0
  45. package/dist/src/templates/invoice/utils.d.ts +2 -0
  46. package/dist/tsconfig.tsbuildinfo +1 -0
  47. package/package.json +34 -40
  48. package/src/config.ts +42 -0
  49. package/src/create-logger.ts +4 -0
  50. package/src/errors.ts +35 -0
  51. package/src/main.ts +7 -0
  52. package/src/preview/api.ts +33 -0
  53. package/src/preview/client/app.tsx +30 -0
  54. package/src/preview/client/invoice/invoice-display.tsx +27 -0
  55. package/src/preview/client/invoice/invoice-setup.tsx +95 -0
  56. package/src/preview/client/preview-targets.ts +30 -0
  57. package/src/preview/client/preview.tsx +37 -0
  58. package/src/preview/client/sidebar.tsx +39 -0
  59. package/src/preview/client/treaty.ts +8 -0
  60. package/src/preview/client/use-target.ts +11 -0
  61. package/src/preview/fonts/GOTHAM-BLACK.TTF +0 -0
  62. package/src/preview/fonts/GOTHAM-BLACKITALIC.TTF +0 -0
  63. package/src/preview/fonts/GOTHAM-BOLD.TTF +0 -0
  64. package/src/preview/fonts/GOTHAM-BOLDITALIC.TTF +0 -0
  65. package/src/preview/fonts/GOTHAM-LIGHT.TTF +0 -0
  66. package/src/preview/fonts/GOTHAM-LIGHTITALIC.TTF +0 -0
  67. package/src/preview/fonts/GOTHAM-MEDIUM.TTF +0 -0
  68. package/src/preview/fonts/GOTHAM-MEDIUMITALIC.TTF +0 -0
  69. package/src/preview/fonts/GOTHAM-THIN.TTF +0 -0
  70. package/src/preview/fonts/GOTHAM-THINITALIC.TTF +0 -0
  71. package/src/preview/fonts/GOTHAM-ULTRA.TTF +0 -0
  72. package/src/preview/fonts/GOTHAM-ULTRAITALIC.TTF +0 -0
  73. package/src/preview/fonts/GOTHAM-XLIGHT.TTF +0 -0
  74. package/src/preview/fonts/GOTHAM-XLIGHTITALIC.TTF +0 -0
  75. package/src/preview/fonts/Gotham Book Italic.otf +0 -0
  76. package/src/preview/fonts/Gotham-BoldItalic.otf +0 -0
  77. package/src/preview/fonts/Gotham-Book.otf +0 -0
  78. package/src/preview/fonts/Gotham-BookItalic.otf +0 -0
  79. package/src/preview/fonts/Gotham-ExtraLight.otf +0 -0
  80. package/src/preview/fonts/Gotham-ExtraLightItalic.otf +0 -0
  81. package/src/preview/fonts/Gotham-Light.otf +0 -0
  82. package/src/preview/fonts/Gotham-LightItalic.otf +0 -0
  83. package/src/preview/fonts/Gotham-Medium.otf +0 -0
  84. package/src/preview/fonts/Gotham-MediumItalic.otf +0 -0
  85. package/src/preview/fonts/Gotham-Thin.otf +0 -0
  86. package/src/preview/fonts/Gotham-ThinItalic.otf +0 -0
  87. package/src/preview/fonts/Gotham-Ultra.otf +0 -0
  88. package/src/preview/fonts/Gotham-UltraItalic.otf +0 -0
  89. package/src/preview/fonts/GothamNarrow-Black.otf +0 -0
  90. package/src/preview/fonts/GothamNarrow-BlackItalic.otf +0 -0
  91. package/src/preview/fonts/GothamNarrow-Book.otf +0 -0
  92. package/src/preview/fonts/GothamNarrow-BookItalic.otf +0 -0
  93. package/src/preview/fonts/GothamNarrow-Light.otf +0 -0
  94. package/src/preview/fonts/GothamNarrow-LightItalic.otf +0 -0
  95. package/src/preview/fonts/GothamNarrow-Medium.otf +0 -0
  96. package/src/preview/fonts/GothamNarrow-MediumItalic.otf +0 -0
  97. package/src/preview/fonts/GothamNarrow-Thin.otf +0 -0
  98. package/src/preview/fonts/GothamNarrow-ThinItalic.otf +0 -0
  99. package/src/preview/fonts/GothamNarrow-Ultra.otf +0 -0
  100. package/src/preview/fonts/GothamNarrow-UltraItalic.otf +0 -0
  101. package/src/preview/fonts/GothamNarrow-XLight.otf +0 -0
  102. package/src/preview/fonts/GothamNarrow-XLightItalic.otf +0 -0
  103. package/src/preview/fonts/gotham-extra-narrow-bold-italic.otf +0 -0
  104. package/src/preview/fonts/gotham-extra-narrow-bold.otf +0 -0
  105. package/src/preview/fonts/gotham-extra-narrow-book-italic.otf +0 -0
  106. package/src/preview/fonts/gotham-extra-narrow-book.otf +0 -0
  107. package/src/preview/fonts/gotham-extra-narrow-light-italic.otf +0 -0
  108. package/src/preview/fonts/gotham-extra-narrow-light.otf +0 -0
  109. package/src/preview/fonts/gotham-extra-narrow-medium-italic.otf +0 -0
  110. package/src/preview/fonts/gotham-extra-narrow-medium.otf +0 -0
  111. package/src/preview/fonts/gotham-rounded-bold-italic.otf +0 -0
  112. package/src/preview/fonts/gotham-rounded-bold.otf +0 -0
  113. package/src/preview/fonts/gotham-rounded-book-italic.otf +0 -0
  114. package/src/preview/fonts/gotham-rounded-book.otf +0 -0
  115. package/src/preview/fonts/gotham-rounded-light-italic.otf +0 -0
  116. package/src/preview/fonts/gotham-rounded-light.otf +0 -0
  117. package/src/preview/fonts/gotham-rounded-medium-italic.otf +0 -0
  118. package/src/preview/fonts/gotham-rounded-medium.otf +0 -0
  119. package/src/preview/fonts/register-fonts.ts +395 -0
  120. package/src/preview/frontend.tsx +23 -0
  121. package/src/preview/global.css +39 -0
  122. package/src/preview/preview.html +12 -0
  123. package/src/preview/server.ts +28 -0
  124. package/src/repository.ts +39 -0
  125. package/src/templates/invoice/E Invoice Format.pdf +0 -0
  126. package/src/templates/invoice/colors.ts +6 -0
  127. package/src/templates/invoice/company-details.tsx +124 -0
  128. package/src/templates/invoice/flux-invoice.tsx +134 -0
  129. package/src/templates/invoice/footer.tsx +46 -0
  130. package/src/templates/invoice/host-invoice.tsx +134 -0
  131. package/src/templates/invoice/images/logo.png +0 -0
  132. package/src/templates/invoice/images/logo.svg +41 -0
  133. package/src/templates/invoice/invoice-details.tsx +231 -0
  134. package/src/templates/invoice/invoice-notes.tsx +74 -0
  135. package/src/templates/invoice/invoice-summary.tsx +135 -0
  136. package/src/templates/invoice/letter-head.tsx +132 -0
  137. package/src/templates/invoice/li.tsx +48 -0
  138. package/src/templates/invoice/platform-and-host-details.tsx +56 -0
  139. package/src/templates/invoice/spacer.tsx +5 -0
  140. package/src/templates/invoice/split-container-items.tsx +80 -0
  141. package/src/templates/invoice/split-container.tsx +35 -0
  142. package/src/templates/invoice/standard-page.tsx +45 -0
  143. package/src/templates/invoice/types.ts +6 -0
  144. package/src/templates/invoice/ul.tsx +19 -0
  145. package/src/templates/invoice/utils.ts +5 -0
  146. package/tsconfig.json +21 -0
  147. package/dist/components/FluxLogo.d.ts +0 -3
  148. package/dist/components/FluxLogo.d.ts.map +0 -1
  149. package/dist/components/FluxLogo.js +0 -66
  150. package/dist/components/FluxLogo.js.map +0 -1
  151. package/dist/components/StandardPage.d.ts +0 -7
  152. package/dist/components/StandardPage.d.ts.map +0 -1
  153. package/dist/components/StandardPage.js +0 -132
  154. package/dist/components/StandardPage.js.map +0 -1
  155. package/dist/index.d.ts +0 -4
  156. package/dist/index.d.ts.map +0 -1
  157. package/dist/index.js +0 -3
  158. package/dist/index.js.map +0 -1
  159. package/dist/templates/QuotationPdf/CustomerSubscriptionSection.d.ts +0 -10
  160. package/dist/templates/QuotationPdf/CustomerSubscriptionSection.d.ts.map +0 -1
  161. package/dist/templates/QuotationPdf/CustomerSubscriptionSection.js +0 -165
  162. package/dist/templates/QuotationPdf/CustomerSubscriptionSection.js.map +0 -1
  163. package/dist/templates/QuotationPdf/GFV.d.ts +0 -10
  164. package/dist/templates/QuotationPdf/GFV.d.ts.map +0 -1
  165. package/dist/templates/QuotationPdf/GFV.js +0 -61
  166. package/dist/templates/QuotationPdf/GFV.js.map +0 -1
  167. package/dist/templates/QuotationPdf/Header.d.ts +0 -9
  168. package/dist/templates/QuotationPdf/Header.d.ts.map +0 -1
  169. package/dist/templates/QuotationPdf/Header.js +0 -71
  170. package/dist/templates/QuotationPdf/Header.js.map +0 -1
  171. package/dist/templates/QuotationPdf/Pricing.d.ts +0 -10
  172. package/dist/templates/QuotationPdf/Pricing.d.ts.map +0 -1
  173. package/dist/templates/QuotationPdf/Pricing.js +0 -723
  174. package/dist/templates/QuotationPdf/Pricing.js.map +0 -1
  175. package/dist/templates/QuotationPdf/QuotationPdfPage.d.ts +0 -8
  176. package/dist/templates/QuotationPdf/QuotationPdfPage.d.ts.map +0 -1
  177. package/dist/templates/QuotationPdf/QuotationPdfPage.js +0 -30
  178. package/dist/templates/QuotationPdf/QuotationPdfPage.js.map +0 -1
  179. package/dist/templates/QuotationPdf/SectionBoxNew.d.ts +0 -9
  180. package/dist/templates/QuotationPdf/SectionBoxNew.d.ts.map +0 -1
  181. package/dist/templates/QuotationPdf/SectionBoxNew.js +0 -38
  182. package/dist/templates/QuotationPdf/SectionBoxNew.js.map +0 -1
  183. package/dist/templates/QuotationPdf/TermsSection.d.ts +0 -8
  184. package/dist/templates/QuotationPdf/TermsSection.d.ts.map +0 -1
  185. package/dist/templates/QuotationPdf/TermsSection.js +0 -50
  186. package/dist/templates/QuotationPdf/TermsSection.js.map +0 -1
  187. package/dist/templates/QuotationPdf/VehiclePhotos.d.ts +0 -10
  188. package/dist/templates/QuotationPdf/VehiclePhotos.d.ts.map +0 -1
  189. package/dist/templates/QuotationPdf/VehiclePhotos.js +0 -66
  190. package/dist/templates/QuotationPdf/VehiclePhotos.js.map +0 -1
  191. package/dist/templates/QuotationPdf/index.d.ts +0 -12
  192. package/dist/templates/QuotationPdf/index.d.ts.map +0 -1
  193. package/dist/templates/QuotationPdf/index.js +0 -214
  194. package/dist/templates/QuotationPdf/index.js.map +0 -1
  195. package/dist/templates/QuotationPdf/translations.d.ts +0 -68
  196. package/dist/templates/QuotationPdf/translations.d.ts.map +0 -1
  197. package/dist/templates/QuotationPdf/translations.js +0 -101
  198. package/dist/templates/QuotationPdf/translations.js.map +0 -1
  199. package/dist/templates/QuotationPdf/utils.d.ts +0 -14
  200. package/dist/templates/QuotationPdf/utils.d.ts.map +0 -1
  201. package/dist/templates/QuotationPdf/utils.js +0 -152
  202. package/dist/templates/QuotationPdf/utils.js.map +0 -1
  203. package/dist/templates/SubscriptionAgreement/Confirmation.d.ts +0 -12
  204. package/dist/templates/SubscriptionAgreement/Confirmation.d.ts.map +0 -1
  205. package/dist/templates/SubscriptionAgreement/Confirmation.js +0 -80
  206. package/dist/templates/SubscriptionAgreement/Confirmation.js.map +0 -1
  207. package/dist/templates/SubscriptionAgreement/CoverPage.d.ts +0 -14
  208. package/dist/templates/SubscriptionAgreement/CoverPage.d.ts.map +0 -1
  209. package/dist/templates/SubscriptionAgreement/CoverPage.js +0 -111
  210. package/dist/templates/SubscriptionAgreement/CoverPage.js.map +0 -1
  211. package/dist/templates/SubscriptionAgreement/CoverPageSection.d.ts +0 -7
  212. package/dist/templates/SubscriptionAgreement/CoverPageSection.d.ts.map +0 -1
  213. package/dist/templates/SubscriptionAgreement/CoverPageSection.js +0 -25
  214. package/dist/templates/SubscriptionAgreement/CoverPageSection.js.map +0 -1
  215. package/dist/templates/SubscriptionAgreement/Details.d.ts +0 -10
  216. package/dist/templates/SubscriptionAgreement/Details.d.ts.map +0 -1
  217. package/dist/templates/SubscriptionAgreement/Details.js +0 -223
  218. package/dist/templates/SubscriptionAgreement/Details.js.map +0 -1
  219. package/dist/templates/SubscriptionAgreement/Footer.d.ts +0 -10
  220. package/dist/templates/SubscriptionAgreement/Footer.d.ts.map +0 -1
  221. package/dist/templates/SubscriptionAgreement/Footer.js +0 -58
  222. package/dist/templates/SubscriptionAgreement/Footer.js.map +0 -1
  223. package/dist/templates/SubscriptionAgreement/Header.d.ts +0 -10
  224. package/dist/templates/SubscriptionAgreement/Header.d.ts.map +0 -1
  225. package/dist/templates/SubscriptionAgreement/Header.js +0 -46
  226. package/dist/templates/SubscriptionAgreement/Header.js.map +0 -1
  227. package/dist/templates/SubscriptionAgreement/LabelValue.d.ts +0 -8
  228. package/dist/templates/SubscriptionAgreement/LabelValue.d.ts.map +0 -1
  229. package/dist/templates/SubscriptionAgreement/LabelValue.js +0 -29
  230. package/dist/templates/SubscriptionAgreement/LabelValue.js.map +0 -1
  231. package/dist/templates/SubscriptionAgreement/SubscriptionAgreementPage.d.ts +0 -10
  232. package/dist/templates/SubscriptionAgreement/SubscriptionAgreementPage.d.ts.map +0 -1
  233. package/dist/templates/SubscriptionAgreement/SubscriptionAgreementPage.js +0 -33
  234. package/dist/templates/SubscriptionAgreement/SubscriptionAgreementPage.js.map +0 -1
  235. package/dist/templates/SubscriptionAgreement/TermsOfUse.d.ts +0 -8
  236. package/dist/templates/SubscriptionAgreement/TermsOfUse.d.ts.map +0 -1
  237. package/dist/templates/SubscriptionAgreement/TermsOfUse.js +0 -101
  238. package/dist/templates/SubscriptionAgreement/TermsOfUse.js.map +0 -1
  239. package/dist/templates/SubscriptionAgreement/TermsOfUseSubSection.d.ts +0 -12
  240. package/dist/templates/SubscriptionAgreement/TermsOfUseSubSection.d.ts.map +0 -1
  241. package/dist/templates/SubscriptionAgreement/TermsOfUseSubSection.js +0 -103
  242. package/dist/templates/SubscriptionAgreement/TermsOfUseSubSection.js.map +0 -1
  243. package/dist/templates/SubscriptionAgreement/index.d.ts +0 -13
  244. package/dist/templates/SubscriptionAgreement/index.d.ts.map +0 -1
  245. package/dist/templates/SubscriptionAgreement/index.js +0 -271
  246. package/dist/templates/SubscriptionAgreement/index.js.map +0 -1
  247. package/dist/templates/SubscriptionAgreement/translations.d.ts +0 -78
  248. package/dist/templates/SubscriptionAgreement/translations.d.ts.map +0 -1
  249. package/dist/templates/SubscriptionAgreement/translations.js +0 -662
  250. package/dist/templates/SubscriptionAgreement/translations.js.map +0 -1
  251. package/dist/templates/SubscriptionAgreement/types.d.ts +0 -7
  252. package/dist/templates/SubscriptionAgreement/types.d.ts.map +0 -1
  253. package/dist/templates/SubscriptionAgreement/types.js +0 -1
  254. package/dist/templates/SubscriptionAgreement/types.js.map +0 -1
  255. package/dist/templates/SubscriptionAgreement/utils.d.ts +0 -6
  256. package/dist/templates/SubscriptionAgreement/utils.d.ts.map +0 -1
  257. package/dist/templates/SubscriptionAgreement/utils.js +0 -37
  258. package/dist/templates/SubscriptionAgreement/utils.js.map +0 -1
  259. package/dist/templates/index.d.ts +0 -3
  260. package/dist/templates/index.d.ts.map +0 -1
  261. package/dist/templates/index.js +0 -2
  262. package/dist/templates/index.js.map +0 -1
  263. package/dist/theme/colors.d.ts +0 -148
  264. package/dist/theme/colors.d.ts.map +0 -1
  265. package/dist/theme/colors.js +0 -137
  266. package/dist/theme/colors.js.map +0 -1
  267. package/dist/theme/index.d.ts +0 -2
  268. package/dist/theme/index.d.ts.map +0 -1
  269. package/dist/theme/index.js +0 -1
  270. package/dist/theme/index.js.map +0 -1
  271. package/dist/types.d.ts +0 -2
  272. package/dist/types.d.ts.map +0 -1
  273. package/dist/types.js +0 -1
  274. package/dist/types.js.map +0 -1
  275. package/dist/utils.d.ts +0 -10
  276. package/dist/utils.d.ts.map +0 -1
  277. package/dist/utils.js +0 -175
  278. package/dist/utils.js.map +0 -1
  279. package/dist/watch.d.ts +0 -2
  280. package/dist/watch.d.ts.map +0 -1
  281. package/dist/watch.js +0 -11
  282. 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,6 @@
1
+ export declare const colors: {
2
+ primaryBlack: string;
3
+ blueBranding: string;
4
+ darkGrey: string;
5
+ lightGrey: string;
6
+ };
@@ -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,6 @@
1
+ import type { InvoiceForPDF } from './types';
2
+ type FLUXInvoiceProps = {
3
+ data: InvoiceForPDF;
4
+ };
5
+ export declare const FLUXInvoice: ({ data }: FLUXInvoiceProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare const FOOTER_HEIGHT = 36;
2
+ export declare const Footer: () => import("react/jsx-runtime").JSX.Element;
@@ -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,3 @@
1
+ export declare const Spacer: ({ height }: {
2
+ height?: number;
3
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -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,7 @@
1
+ type SplitContainerProps = {
2
+ left: React.ReactNode;
3
+ right?: React.ReactNode;
4
+ gap?: number;
5
+ };
6
+ export declare const SplitContainer: ({ left, right, gap, }: SplitContainerProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { ReactNode } from 'react';
2
+ type StandardPageProps = {
3
+ children: ReactNode;
4
+ letterHead: ReactNode;
5
+ };
6
+ export declare const StandardPage: ({ children, letterHead }: StandardPageProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { Treaty } from '@elysiajs/eden';
2
+ import type { appTreaty } from '../../preview/client/treaty';
3
+ export type InvoiceForPDF = Treaty.Data<ReturnType<ReturnType<(typeof appTreaty.api)['invoice-for-pdf']>['get']>>;
@@ -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 {};
@@ -0,0 +1,2 @@
1
+ import type { EInvoice } from '@driveflux/db';
2
+ export declare const carPlateAndName: (eInvoice: EInvoice) => string;