@powerhousedao/contributor-billing 0.1.27 → 0.1.30

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 (390) hide show
  1. package/README.md +165 -8
  2. package/dist/document-models/billing-statement/actions.d.ts +1 -0
  3. package/dist/document-models/billing-statement/actions.d.ts.map +1 -1
  4. package/dist/document-models/billing-statement/gen/document-model.d.ts.map +1 -1
  5. package/dist/document-models/billing-statement/gen/document-model.js +58 -47
  6. package/dist/document-models/billing-statement/gen/document-schema.d.ts +38 -38
  7. package/dist/document-models/billing-statement/gen/document-schema.d.ts.map +1 -1
  8. package/dist/document-models/billing-statement/gen/line-items/actions.d.ts +6 -2
  9. package/dist/document-models/billing-statement/gen/line-items/actions.d.ts.map +1 -1
  10. package/dist/document-models/billing-statement/gen/line-items/creators.d.ts +3 -2
  11. package/dist/document-models/billing-statement/gen/line-items/creators.d.ts.map +1 -1
  12. package/dist/document-models/billing-statement/gen/line-items/creators.js +2 -1
  13. package/dist/document-models/billing-statement/gen/line-items/operations.d.ts +2 -1
  14. package/dist/document-models/billing-statement/gen/line-items/operations.d.ts.map +1 -1
  15. package/dist/document-models/billing-statement/gen/ph-factories.js +1 -1
  16. package/dist/document-models/billing-statement/gen/reducer.d.ts.map +1 -1
  17. package/dist/document-models/billing-statement/gen/reducer.js +5 -1
  18. package/dist/document-models/billing-statement/gen/schema/types.d.ts +3 -0
  19. package/dist/document-models/billing-statement/gen/schema/types.d.ts.map +1 -1
  20. package/dist/document-models/billing-statement/gen/schema/zod.d.ts +2 -1
  21. package/dist/document-models/billing-statement/gen/schema/zod.d.ts.map +1 -1
  22. package/dist/document-models/billing-statement/gen/schema/zod.js +5 -0
  23. package/dist/document-models/billing-statement/gen/utils.js +2 -2
  24. package/dist/document-models/billing-statement/src/reducers/general.d.ts.map +1 -1
  25. package/dist/document-models/billing-statement/src/reducers/general.js +5 -4
  26. package/dist/document-models/billing-statement/src/reducers/line-items.d.ts.map +1 -1
  27. package/dist/document-models/billing-statement/src/reducers/line-items.js +7 -2
  28. package/dist/document-models/billing-statement/src/reducers/tags.d.ts.map +1 -1
  29. package/dist/document-models/billing-statement/src/reducers/tags.js +1 -1
  30. package/dist/document-models/billing-statement/src/tests/document-model.test.d.ts +4 -0
  31. package/dist/document-models/billing-statement/src/tests/document-model.test.d.ts.map +1 -1
  32. package/dist/document-models/billing-statement/src/tests/document-model.test.js +94 -7
  33. package/dist/document-models/billing-statement/src/tests/general.test.d.ts +2 -1
  34. package/dist/document-models/billing-statement/src/tests/general.test.d.ts.map +1 -1
  35. package/dist/document-models/billing-statement/src/tests/general.test.js +33 -88
  36. package/dist/document-models/billing-statement/src/tests/line-items.test.js +22 -125
  37. package/dist/document-models/billing-statement/src/tests/tags.test.js +13 -47
  38. package/dist/document-models/document-models.js +2 -2
  39. package/dist/document-models/expense-report/gen/document-model.d.ts.map +1 -1
  40. package/dist/document-models/expense-report/gen/document-model.js +48 -48
  41. package/dist/document-models/expense-report/gen/document-schema.d.ts +6 -6
  42. package/dist/document-models/expense-report/gen/utils.js +1 -1
  43. package/dist/document-models/expense-report/src/tests/document-model.test.d.ts +4 -0
  44. package/dist/document-models/expense-report/src/tests/document-model.test.d.ts.map +1 -1
  45. package/dist/document-models/expense-report/src/tests/document-model.test.js +94 -8
  46. package/dist/document-models/expense-report/src/tests/wallet.test.js +145 -10
  47. package/dist/document-models/index.d.ts +2 -6
  48. package/dist/document-models/index.d.ts.map +1 -1
  49. package/dist/document-models/index.js +2 -6
  50. package/dist/document-models/integrations/gen/document-model.js +33 -33
  51. package/dist/document-models/integrations/gen/document-schema.d.ts +6 -6
  52. package/dist/document-models/integrations/gen/utils.js +1 -1
  53. package/dist/document-models/integrations/src/reducers/integrations.d.ts.map +1 -1
  54. package/dist/document-models/integrations/src/reducers/integrations.js +9 -32
  55. package/dist/document-models/integrations/src/tests/document-model.test.d.ts +4 -0
  56. package/dist/document-models/integrations/src/tests/document-model.test.d.ts.map +1 -1
  57. package/dist/document-models/integrations/src/tests/document-model.test.js +91 -5
  58. package/dist/document-models/integrations/src/tests/integrations.test.js +21 -46
  59. package/dist/document-models/invoice/gen/document-model.js +147 -147
  60. package/dist/document-models/invoice/gen/document-schema.d.ts +127 -127
  61. package/dist/document-models/invoice/gen/document-schema.d.ts.map +1 -1
  62. package/dist/document-models/invoice/gen/ph-factories.d.ts.map +1 -1
  63. package/dist/document-models/invoice/gen/ph-factories.js +16 -122
  64. package/dist/document-models/invoice/gen/schema/types.d.ts +4 -4
  65. package/dist/document-models/invoice/gen/schema/types.d.ts.map +1 -1
  66. package/dist/document-models/invoice/gen/schema/zod.d.ts.map +1 -1
  67. package/dist/document-models/invoice/gen/schema/zod.js +4 -4
  68. package/dist/document-models/invoice/gen/utils.d.ts.map +1 -1
  69. package/dist/document-models/invoice/gen/utils.js +17 -123
  70. package/dist/document-models/invoice/src/reducers/general.d.ts.map +1 -1
  71. package/dist/document-models/invoice/src/reducers/general.js +34 -10
  72. package/dist/document-models/invoice/src/reducers/items.d.ts.map +1 -1
  73. package/dist/document-models/invoice/src/reducers/items.js +7 -7
  74. package/dist/document-models/invoice/src/reducers/parties.d.ts.map +1 -1
  75. package/dist/document-models/invoice/src/reducers/parties.js +96 -50
  76. package/dist/document-models/invoice/src/reducers/transitions.d.ts.map +1 -1
  77. package/dist/document-models/invoice/src/reducers/transitions.js +69 -53
  78. package/dist/document-models/invoice/src/tests/document-model.test.d.ts +4 -0
  79. package/dist/document-models/invoice/src/tests/document-model.test.d.ts.map +1 -1
  80. package/dist/document-models/invoice/src/tests/document-model.test.js +91 -4
  81. package/dist/document-models/invoice/src/tests/general.test.js +24 -26
  82. package/dist/document-models/invoice/src/tests/items.test.js +37 -17
  83. package/dist/document-models/invoice/src/tests/parties.test.js +32 -26
  84. package/dist/document-models/invoice/src/tests/transitions.test.js +52 -500
  85. package/dist/document-models/invoice/utils/statusTransitions.d.ts.map +1 -1
  86. package/dist/document-models/invoice/utils/statusTransitions.js +10 -10
  87. package/dist/editors/billing-statement/components/lineItemsTable.d.ts.map +1 -1
  88. package/dist/editors/billing-statement/components/lineItemsTable.js +32 -23
  89. package/dist/editors/billing-statement/components/objectSetTable.d.ts.map +1 -1
  90. package/dist/editors/billing-statement/components/objectSetTable.js +1 -2
  91. package/dist/editors/billing-statement/editor.d.ts +4 -0
  92. package/dist/editors/billing-statement/editor.d.ts.map +1 -1
  93. package/dist/editors/billing-statement/editor.js +34 -16
  94. package/dist/editors/billing-statement/lineItemTags/lineItemTags.d.ts.map +1 -1
  95. package/dist/editors/billing-statement/lineItemTags/lineItemTags.js +36 -37
  96. package/dist/editors/billing-statement/lineItemTags/tagMapping.d.ts.map +1 -1
  97. package/dist/editors/billing-statement/lineItemTags/tagMapping.js +28 -10
  98. package/dist/editors/clean-new-editor/components/CreateDocument.d.ts +6 -0
  99. package/dist/editors/clean-new-editor/components/CreateDocument.d.ts.map +1 -0
  100. package/dist/editors/clean-new-editor/components/CreateDocument.js +18 -0
  101. package/dist/editors/clean-new-editor/components/DriveContents.d.ts +3 -0
  102. package/dist/editors/clean-new-editor/components/DriveContents.d.ts.map +1 -0
  103. package/dist/editors/clean-new-editor/components/DriveContents.js +10 -0
  104. package/dist/editors/clean-new-editor/components/DriveExplorer.d.ts +7 -0
  105. package/dist/editors/clean-new-editor/components/DriveExplorer.d.ts.map +1 -0
  106. package/dist/editors/clean-new-editor/components/DriveExplorer.js +16 -0
  107. package/dist/editors/clean-new-editor/components/EmptyState.d.ts +3 -0
  108. package/dist/editors/clean-new-editor/components/EmptyState.d.ts.map +1 -0
  109. package/dist/editors/clean-new-editor/components/EmptyState.js +10 -0
  110. package/dist/editors/clean-new-editor/components/Files.d.ts +3 -0
  111. package/dist/editors/clean-new-editor/components/Files.d.ts.map +1 -0
  112. package/dist/editors/clean-new-editor/components/Files.js +12 -0
  113. package/dist/editors/clean-new-editor/components/FolderTree.d.ts +6 -0
  114. package/dist/editors/clean-new-editor/components/FolderTree.d.ts.map +1 -0
  115. package/dist/editors/clean-new-editor/components/FolderTree.js +65 -0
  116. package/dist/editors/clean-new-editor/components/Folders.d.ts +3 -0
  117. package/dist/editors/clean-new-editor/components/Folders.d.ts.map +1 -0
  118. package/dist/editors/clean-new-editor/components/Folders.js +12 -0
  119. package/dist/editors/clean-new-editor/components/NavigationBreadcrumbs.d.ts +3 -0
  120. package/dist/editors/clean-new-editor/components/NavigationBreadcrumbs.d.ts.map +1 -0
  121. package/dist/editors/clean-new-editor/components/NavigationBreadcrumbs.js +6 -0
  122. package/dist/editors/clean-new-editor/config.d.ts +4 -0
  123. package/dist/editors/clean-new-editor/config.d.ts.map +1 -0
  124. package/dist/editors/clean-new-editor/config.js +5 -0
  125. package/dist/editors/clean-new-editor/editor.d.ts +4 -0
  126. package/dist/editors/clean-new-editor/editor.d.ts.map +1 -0
  127. package/dist/editors/clean-new-editor/editor.js +11 -0
  128. package/dist/editors/clean-new-editor/module.d.ts +3 -0
  129. package/dist/editors/clean-new-editor/module.d.ts.map +1 -0
  130. package/dist/editors/clean-new-editor/module.js +10 -0
  131. package/dist/editors/contributor-billing/components/ConfirmationModal.d.ts +14 -0
  132. package/dist/editors/contributor-billing/components/ConfirmationModal.d.ts.map +1 -0
  133. package/dist/editors/contributor-billing/components/ConfirmationModal.js +6 -0
  134. package/dist/editors/contributor-billing/components/CreateDocument.d.ts +6 -0
  135. package/dist/editors/contributor-billing/components/CreateDocument.d.ts.map +1 -0
  136. package/dist/editors/contributor-billing/components/CreateDocument.js +18 -0
  137. package/dist/editors/contributor-billing/components/DriveContents.d.ts +3 -0
  138. package/dist/editors/contributor-billing/components/DriveContents.d.ts.map +1 -0
  139. package/dist/editors/contributor-billing/components/DriveContents.js +10 -0
  140. package/dist/editors/contributor-billing/components/DriveExplorer.d.ts +3 -3
  141. package/dist/editors/contributor-billing/components/DriveExplorer.d.ts.map +1 -1
  142. package/dist/editors/contributor-billing/components/DriveExplorer.js +13 -180
  143. package/dist/editors/contributor-billing/components/EmptyState.d.ts +3 -0
  144. package/dist/editors/contributor-billing/components/EmptyState.d.ts.map +1 -0
  145. package/dist/editors/contributor-billing/components/EmptyState.js +10 -0
  146. package/dist/editors/contributor-billing/components/Files.d.ts +3 -0
  147. package/dist/editors/contributor-billing/components/Files.d.ts.map +1 -0
  148. package/dist/editors/contributor-billing/components/Files.js +12 -0
  149. package/dist/editors/contributor-billing/components/FolderTree.d.ts +6 -0
  150. package/dist/editors/contributor-billing/components/FolderTree.d.ts.map +1 -0
  151. package/dist/editors/contributor-billing/components/FolderTree.js +65 -0
  152. package/dist/editors/contributor-billing/components/Folders.d.ts +3 -0
  153. package/dist/editors/contributor-billing/components/Folders.d.ts.map +1 -0
  154. package/dist/editors/contributor-billing/components/Folders.js +12 -0
  155. package/dist/editors/contributor-billing/components/HeaderControls.d.ts +38 -0
  156. package/dist/editors/contributor-billing/components/HeaderControls.d.ts.map +1 -0
  157. package/dist/editors/contributor-billing/components/HeaderControls.js +124 -0
  158. package/dist/editors/contributor-billing/components/HeaderStats.d.ts.map +1 -0
  159. package/dist/editors/contributor-billing/components/{InvoiceTable/HeaderStats.js → HeaderStats.js} +1 -1
  160. package/dist/editors/contributor-billing/components/InvoiceTable.d.ts +22 -0
  161. package/dist/editors/contributor-billing/components/InvoiceTable.d.ts.map +1 -0
  162. package/dist/editors/contributor-billing/components/InvoiceTable.js +399 -0
  163. package/dist/editors/contributor-billing/components/InvoiceTableContainer.d.ts +6 -0
  164. package/dist/editors/contributor-billing/components/InvoiceTableContainer.d.ts.map +1 -0
  165. package/dist/editors/contributor-billing/components/InvoiceTableContainer.js +111 -0
  166. package/dist/editors/contributor-billing/components/InvoiceTableRow.d.ts +32 -0
  167. package/dist/editors/contributor-billing/components/InvoiceTableRow.d.ts.map +1 -0
  168. package/dist/editors/contributor-billing/components/InvoiceTableRow.js +55 -0
  169. package/dist/editors/contributor-billing/components/InvoiceTableSection.d.ts +13 -0
  170. package/dist/editors/contributor-billing/components/InvoiceTableSection.d.ts.map +1 -0
  171. package/dist/editors/contributor-billing/components/InvoiceTableSection.js +16 -0
  172. package/dist/editors/contributor-billing/components/NavigationBreadcrumbs.d.ts +3 -0
  173. package/dist/editors/contributor-billing/components/NavigationBreadcrumbs.d.ts.map +1 -0
  174. package/dist/editors/contributor-billing/components/NavigationBreadcrumbs.js +6 -0
  175. package/dist/editors/contributor-billing/config.d.ts +1 -0
  176. package/dist/editors/contributor-billing/config.d.ts.map +1 -1
  177. package/dist/editors/contributor-billing/config.js +4 -1
  178. package/dist/editors/contributor-billing/editor.d.ts +1 -0
  179. package/dist/editors/contributor-billing/editor.d.ts.map +1 -1
  180. package/dist/editors/contributor-billing/editor.js +4 -1
  181. package/dist/editors/contributor-billing/module.d.ts +1 -1
  182. package/dist/editors/contributor-billing/module.d.ts.map +1 -1
  183. package/dist/editors/contributor-billing/module.js +3 -2
  184. package/dist/editors/contributor-billing/utils/exchangeRate.d.ts +15 -0
  185. package/dist/editors/contributor-billing/utils/exchangeRate.d.ts.map +1 -0
  186. package/dist/editors/contributor-billing/utils/exchangeRate.js +122 -0
  187. package/dist/editors/editors.js +2 -2
  188. package/dist/editors/expense-report/components/AddBillingStatementModal.d.ts.map +1 -1
  189. package/dist/editors/expense-report/editor.js +8 -8
  190. package/dist/editors/index.d.ts +2 -2
  191. package/dist/editors/index.d.ts.map +1 -1
  192. package/dist/editors/index.js +2 -2
  193. package/dist/editors/integrations/components/EditName.d.ts +3 -0
  194. package/dist/editors/integrations/components/EditName.d.ts.map +1 -0
  195. package/dist/editors/integrations/components/EditName.js +31 -0
  196. package/dist/editors/integrations/editor.d.ts +2 -4
  197. package/dist/editors/integrations/editor.d.ts.map +1 -1
  198. package/dist/editors/integrations/editor.js +5 -132
  199. package/dist/editors/integrations/module.d.ts +1 -0
  200. package/dist/editors/integrations/module.d.ts.map +1 -1
  201. package/dist/editors/integrations/module.js +3 -2
  202. package/dist/editors/invoice/components/confirmationModal.js +1 -1
  203. package/dist/editors/invoice/components/countryForm.d.ts.map +1 -1
  204. package/dist/editors/invoice/components/countryForm.js +1 -1
  205. package/dist/editors/invoice/components/currencyForm.d.ts.map +1 -1
  206. package/dist/editors/invoice/components/currencyForm.js +1 -1
  207. package/dist/editors/invoice/components/datePicker.d.ts +1 -1
  208. package/dist/editors/invoice/components/datePicker.d.ts.map +1 -1
  209. package/dist/editors/invoice/components/datePicker.js +1 -1
  210. package/dist/editors/invoice/components/inputField.d.ts.map +1 -1
  211. package/dist/editors/invoice/components/inputField.js +3 -2
  212. package/dist/editors/invoice/components/lineItemMobileModal.d.ts.map +1 -1
  213. package/dist/editors/invoice/components/lineItemMobileModal.js +1 -1
  214. package/dist/editors/invoice/components/numberForm.d.ts.map +1 -1
  215. package/dist/editors/invoice/components/selectField.js +7 -7
  216. package/dist/editors/invoice/components/statusModalComponents.d.ts.map +1 -1
  217. package/dist/editors/invoice/components/statusModalComponents.js +27 -3
  218. package/dist/editors/invoice/editor.d.ts +1 -4
  219. package/dist/editors/invoice/editor.d.ts.map +1 -1
  220. package/dist/editors/invoice/editor.js +102 -40
  221. package/dist/editors/invoice/exportUBL.d.ts.map +1 -1
  222. package/dist/editors/invoice/exportUBL.js +35 -18
  223. package/dist/editors/invoice/ingestPDF.d.ts.map +1 -1
  224. package/dist/editors/invoice/ingestPDF.js +15 -9
  225. package/dist/editors/invoice/invoiceToGnosis.js +2 -2
  226. package/dist/editors/invoice/legalEntity/bankSection.d.ts.map +1 -1
  227. package/dist/editors/invoice/legalEntity/bankSection.js +19 -10
  228. package/dist/editors/invoice/legalEntity/legalEntity.d.ts +4 -0
  229. package/dist/editors/invoice/legalEntity/legalEntity.d.ts.map +1 -1
  230. package/dist/editors/invoice/legalEntity/legalEntity.js +66 -2
  231. package/dist/editors/invoice/legalEntity/walletSection.d.ts.map +1 -1
  232. package/dist/editors/invoice/legalEntity/walletSection.js +3 -3
  233. package/dist/editors/invoice/lineItemTags/lineItemTags.d.ts.map +1 -1
  234. package/dist/editors/invoice/lineItemTags/lineItemTags.js +1 -1
  235. package/dist/editors/invoice/lineItemTags/tagMobileModal.d.ts.map +1 -1
  236. package/dist/editors/invoice/lineItemTags/tagMobileModal.js +4 -3
  237. package/dist/editors/invoice/lineItems.d.ts.map +1 -1
  238. package/dist/editors/invoice/module.d.ts +1 -0
  239. package/dist/editors/invoice/module.d.ts.map +1 -1
  240. package/dist/editors/invoice/module.js +2 -1
  241. package/dist/editors/invoice/requestFinance.js +3 -3
  242. package/dist/editors/invoice/uploadPdfChunked.d.ts.map +1 -1
  243. package/dist/editors/invoice/uploadPdfChunked.js +5 -4
  244. package/dist/editors/invoice/utils/utils.d.ts.map +1 -1
  245. package/dist/editors/invoice/utils/utils.js +5 -4
  246. package/dist/editors/invoice/validation/validationHandler.d.ts.map +1 -1
  247. package/dist/editors/invoice/validation/validationHandler.js +11 -5
  248. package/dist/editors/invoice/validation/validationManager.d.ts +2 -2
  249. package/dist/editors/invoice/validation/validationManager.d.ts.map +1 -1
  250. package/dist/editors/invoice/validation/validationManager.js +5 -5
  251. package/dist/editors/invoice/validation/validationRules.d.ts.map +1 -1
  252. package/dist/editors/invoice/validation/validationRules.js +178 -178
  253. package/dist/index.d.ts +2 -2
  254. package/dist/index.d.ts.map +1 -1
  255. package/dist/index.js +4 -2
  256. package/dist/old-contributor-billing/components/DriveExplorer.d.ts +7 -0
  257. package/dist/old-contributor-billing/components/DriveExplorer.d.ts.map +1 -0
  258. package/dist/old-contributor-billing/components/DriveExplorer.js +184 -0
  259. package/dist/old-contributor-billing/components/InvoiceTable/HeaderControls.d.ts.map +1 -0
  260. package/dist/old-contributor-billing/components/InvoiceTable/HeaderStats.d.ts +2 -0
  261. package/dist/old-contributor-billing/components/InvoiceTable/HeaderStats.d.ts.map +1 -0
  262. package/dist/old-contributor-billing/components/InvoiceTable/HeaderStats.js +73 -0
  263. package/dist/old-contributor-billing/components/InvoiceTable/InvoiceTable.d.ts.map +1 -0
  264. package/dist/old-contributor-billing/components/InvoiceTable/InvoiceTableRow.d.ts.map +1 -0
  265. package/dist/old-contributor-billing/components/InvoiceTable/InvoiceTableSection.d.ts.map +1 -0
  266. package/dist/{editors/contributor-billing → old-contributor-billing}/components/InvoiceTable/InvoiceTableSection.js +1 -1
  267. package/dist/{editors/contributor-billing → old-contributor-billing}/components/InvoiceTable/RowActionMenu.d.ts +1 -1
  268. package/dist/old-contributor-billing/components/InvoiceTable/RowActionMenu.d.ts.map +1 -0
  269. package/dist/old-contributor-billing/components/InvoiceTable/RowActionMenu.js +2 -0
  270. package/dist/old-contributor-billing/config.d.ts +3 -0
  271. package/dist/old-contributor-billing/config.d.ts.map +1 -0
  272. package/dist/old-contributor-billing/config.js +4 -0
  273. package/dist/old-contributor-billing/editor.d.ts +3 -0
  274. package/dist/old-contributor-billing/editor.d.ts.map +1 -0
  275. package/dist/old-contributor-billing/editor.js +8 -0
  276. package/dist/old-contributor-billing/module.d.ts +3 -0
  277. package/dist/old-contributor-billing/module.d.ts.map +1 -0
  278. package/dist/old-contributor-billing/module.js +9 -0
  279. package/dist/old-contributor-billing/util.d.ts.map +1 -0
  280. package/dist/{editors/contributor-billing → old-contributor-billing}/util.js +11 -9
  281. package/dist/powerhouse.manifest.json +6 -41
  282. package/dist/processors/index.d.ts +1 -6
  283. package/dist/processors/index.d.ts.map +1 -1
  284. package/dist/processors/index.js +1 -18
  285. package/dist/scripts/contributor-billing/createExpenseReportCsv.d.ts.map +1 -1
  286. package/dist/scripts/contributor-billing/createExpenseReportCsv.js +24 -24
  287. package/dist/scripts/contributor-billing/createXeroCsv.d.ts.map +1 -1
  288. package/dist/scripts/contributor-billing/createXeroCsv.js +52 -46
  289. package/dist/scripts/invoice/autoTagging.d.ts +1 -1
  290. package/dist/scripts/invoice/autoTagging.d.ts.map +1 -1
  291. package/dist/scripts/invoice/autoTagging.js +168 -138
  292. package/dist/scripts/invoice/exampleBatchTxn.js +16 -16
  293. package/dist/scripts/invoice/gnosisTransactionBuilder.d.ts.map +1 -1
  294. package/dist/scripts/invoice/gnosisTransactionBuilder.js +32 -25
  295. package/dist/scripts/invoice/pdfToClaudeAI.d.ts.map +1 -1
  296. package/dist/scripts/invoice/pdfToClaudeAI.js +36 -30
  297. package/dist/scripts/invoice/requestFinance.d.ts.map +1 -1
  298. package/dist/scripts/invoice/requestFinance.js +13 -13
  299. package/dist/style.css +407 -13659
  300. package/dist/subgraphs/billing-statement/resolvers.d.ts +1 -1
  301. package/dist/subgraphs/billing-statement/resolvers.d.ts.map +1 -1
  302. package/dist/subgraphs/billing-statement/resolvers.js +16 -5
  303. package/dist/subgraphs/billing-statement/schema.d.ts.map +1 -1
  304. package/dist/subgraphs/billing-statement/schema.js +12 -67
  305. package/dist/subgraphs/expense-report/resolvers.d.ts +1 -1
  306. package/dist/subgraphs/expense-report/resolvers.d.ts.map +1 -1
  307. package/dist/subgraphs/expense-report/resolvers.js +4 -5
  308. package/dist/subgraphs/expense-report/schema.d.ts.map +1 -1
  309. package/dist/subgraphs/expense-report/schema.js +5 -48
  310. package/dist/subgraphs/index.d.ts +1 -0
  311. package/dist/subgraphs/index.d.ts.map +1 -1
  312. package/dist/subgraphs/index.js +1 -0
  313. package/dist/subgraphs/integrations/resolvers.d.ts +1 -1
  314. package/dist/subgraphs/integrations/resolvers.d.ts.map +1 -1
  315. package/dist/subgraphs/integrations/resolvers.js +4 -5
  316. package/dist/subgraphs/integrations/schema.d.ts.map +1 -1
  317. package/dist/subgraphs/integrations/schema.js +3 -43
  318. package/dist/subgraphs/invoice/index.d.ts.map +1 -1
  319. package/dist/subgraphs/invoice/index.js +1 -20
  320. package/dist/subgraphs/invoice/resolvers.d.ts +1 -1
  321. package/dist/subgraphs/invoice/resolvers.d.ts.map +1 -1
  322. package/dist/subgraphs/invoice/resolvers.js +4 -9
  323. package/dist/subgraphs/invoice/schema.d.ts.map +1 -1
  324. package/dist/subgraphs/invoice/schema.js +14 -232
  325. package/dist/subgraphs/{invoice → invoice-addon}/customResolvers.d.ts +1 -1
  326. package/dist/subgraphs/invoice-addon/customResolvers.d.ts.map +1 -0
  327. package/dist/subgraphs/{invoice → invoice-addon}/customResolvers.js +38 -34
  328. package/dist/subgraphs/invoice-addon/index.d.ts +11 -0
  329. package/dist/subgraphs/invoice-addon/index.d.ts.map +1 -0
  330. package/dist/subgraphs/invoice-addon/index.js +11 -0
  331. package/dist/subgraphs/invoice-addon/resolvers.d.ts +3 -0
  332. package/dist/subgraphs/invoice-addon/resolvers.d.ts.map +1 -0
  333. package/dist/subgraphs/invoice-addon/resolvers.js +12 -0
  334. package/dist/subgraphs/invoice-addon/schema.d.ts +3 -0
  335. package/dist/subgraphs/invoice-addon/schema.d.ts.map +1 -0
  336. package/dist/subgraphs/invoice-addon/schema.js +52 -0
  337. package/package.json +9 -20
  338. package/dist/document-models/expense-report/gen/expense-report/actions.d.ts +0 -8
  339. package/dist/document-models/expense-report/gen/expense-report/actions.d.ts.map +0 -1
  340. package/dist/document-models/expense-report/gen/expense-report/actions.js +0 -1
  341. package/dist/document-models/expense-report/gen/expense-report/creators.d.ts +0 -4
  342. package/dist/document-models/expense-report/gen/expense-report/creators.d.ts.map +0 -1
  343. package/dist/document-models/expense-report/gen/expense-report/creators.js +0 -3
  344. package/dist/document-models/expense-report/gen/expense-report/error.d.ts +0 -2
  345. package/dist/document-models/expense-report/gen/expense-report/error.d.ts.map +0 -1
  346. package/dist/document-models/expense-report/gen/expense-report/error.js +0 -1
  347. package/dist/document-models/expense-report/gen/expense-report/operations.d.ts +0 -7
  348. package/dist/document-models/expense-report/gen/expense-report/operations.d.ts.map +0 -1
  349. package/dist/document-models/expense-report/gen/expense-report/operations.js +0 -3
  350. package/dist/document-models/expense-report/src/tests/expense-report.test.d.ts +0 -6
  351. package/dist/document-models/expense-report/src/tests/expense-report.test.d.ts.map +0 -1
  352. package/dist/document-models/expense-report/src/tests/expense-report.test.js +0 -24
  353. package/dist/editors/contributor-billing/components/InvoiceTable/HeaderControls.d.ts.map +0 -1
  354. package/dist/editors/contributor-billing/components/InvoiceTable/HeaderStats.d.ts.map +0 -1
  355. package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTable.d.ts.map +0 -1
  356. package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableRow.d.ts.map +0 -1
  357. package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableSection.d.ts.map +0 -1
  358. package/dist/editors/contributor-billing/components/InvoiceTable/RowActionMenu.d.ts.map +0 -1
  359. package/dist/editors/contributor-billing/components/InvoiceTable/RowActionMenu.js +0 -2
  360. package/dist/editors/contributor-billing/util.d.ts.map +0 -1
  361. package/dist/editors/hooks/useBillingStatementDocument.d.ts +0 -4
  362. package/dist/editors/hooks/useBillingStatementDocument.d.ts.map +0 -1
  363. package/dist/editors/hooks/useBillingStatementDocument.js +0 -8
  364. package/dist/editors/hooks/useExpenseReportDocument.d.ts +0 -4
  365. package/dist/editors/hooks/useExpenseReportDocument.d.ts.map +0 -1
  366. package/dist/editors/hooks/useExpenseReportDocument.js +0 -8
  367. package/dist/editors/hooks/useIntegrationsDocument.d.ts +0 -4
  368. package/dist/editors/hooks/useIntegrationsDocument.d.ts.map +0 -1
  369. package/dist/editors/hooks/useIntegrationsDocument.js +0 -8
  370. package/dist/editors/hooks/useInvoiceDocument.d.ts +0 -4
  371. package/dist/editors/hooks/useInvoiceDocument.d.ts.map +0 -1
  372. package/dist/editors/hooks/useInvoiceDocument.js +0 -8
  373. package/dist/editors/integrations/config.d.ts +0 -3
  374. package/dist/editors/integrations/config.d.ts.map +0 -1
  375. package/dist/editors/integrations/config.js +0 -3
  376. package/dist/processors/line-item-processor/index.d.ts +0 -11
  377. package/dist/processors/line-item-processor/index.d.ts.map +0 -1
  378. package/dist/processors/line-item-processor/index.js +0 -36
  379. package/dist/subgraphs/invoice/customResolvers.d.ts.map +0 -1
  380. package/editors/invoice/assets/custom.d.ts +0 -4
  381. package/editors/invoice/assets/powerhouseLogo.png +0 -0
  382. /package/dist/editors/contributor-billing/components/{InvoiceTable/HeaderStats.d.ts → HeaderStats.d.ts} +0 -0
  383. /package/dist/{editors/contributor-billing → old-contributor-billing}/components/InvoiceTable/HeaderControls.d.ts +0 -0
  384. /package/dist/{editors/contributor-billing → old-contributor-billing}/components/InvoiceTable/HeaderControls.js +0 -0
  385. /package/dist/{editors/contributor-billing → old-contributor-billing}/components/InvoiceTable/InvoiceTable.d.ts +0 -0
  386. /package/dist/{editors/contributor-billing → old-contributor-billing}/components/InvoiceTable/InvoiceTable.js +0 -0
  387. /package/dist/{editors/contributor-billing → old-contributor-billing}/components/InvoiceTable/InvoiceTableRow.d.ts +0 -0
  388. /package/dist/{editors/contributor-billing → old-contributor-billing}/components/InvoiceTable/InvoiceTableRow.js +0 -0
  389. /package/dist/{editors/contributor-billing → old-contributor-billing}/components/InvoiceTable/InvoiceTableSection.d.ts +0 -0
  390. /package/dist/{editors/contributor-billing → old-contributor-billing}/util.d.ts +0 -0
package/README.md CHANGED
@@ -1,22 +1,179 @@
1
1
  # Document Model Boilerplate
2
2
 
3
- Invoice package that can be used to create invoice document models and request payments in Fiat and Crypto.
3
+ This Document Model Boilerplate provides code generation for scaffolding editors and models.
4
+ It ensures compatibility with host applications like Connect and the Reactors for seamless document model and editor integration.
4
5
 
5
- ## Requirements
6
+ ## Standard Document Model Workflow with help of the boilerplate.
7
+ This tutorial will guide you through the process of creating a new document model using the Document Model Editor in the Connect app.
6
8
 
7
- `.env` file in the root of the project
9
+ <details>
10
+ <summary>Available NPM commands</summary>
8
11
 
9
- ## Installation
12
+ - `generate`: Updates the generated code according to the JSON spec and GraphQL schema of your document model, made in Connect.
13
+ - `lint`: Checks for errors with ESLint and TypeScript checking.
14
+ - `format`: Formats the code using Prettier.
15
+ - `build`: Builds the library project using Vite.
16
+ - `storybook`: Starts Storybook in development mode.
17
+ - `build-storybook`: Builds Storybook.
18
+ - `test`: Runs Jest for testing.
19
+
20
+ </details>
21
+
22
+ ### 1. Defining Your Document Model GraphQL Schema
23
+ Start by creating your own 'Powerhouse Project' (Document model + editor).
24
+
25
+ Step 1: Run the following command to set up your project inside this directory:
26
+
27
+ ```bash
28
+ npm create document-model-lib
29
+ ```
30
+
31
+ Step 2: Use the Document Model Editor in the Connect app
32
+
33
+ The following command gives you access to all the powerhouse CLI tools available, install it globally if you are a poweruser.
34
+
35
+ ```bash
36
+ npm install ph-cmd
37
+ ```
38
+ Now you are able to launch Connect in Studio Mode (Locally):
39
+
40
+ ```bash
41
+ npm run connect
42
+ ```
43
+
44
+ Open the 'Document Model' creator at the bottom of connect to define your document mode with it's GraphQL Schema Definition.
45
+ This schema will define the structure and fields for your document model using GraphQL.
46
+ Follow one of our tutorials on Academy to get familiar with the process.
47
+
48
+ ### 2. Defining Document Model Operations
49
+ Using the Document Model Operations Editor, define the operations for your document model and their GraphQL counterparts.
50
+ These operations will handle state changes within your document model.
51
+
52
+ **Best Practices:**
53
+
54
+ - Clearly define CRUD operations (Create, Read, Update, Delete).
55
+ - Use GraphQL input types to specify the parameters for each operation.
56
+ - Ensure that operations align with user intent to maintain a clean and understandable API.
57
+
58
+ ### 3. Generating Scaffolding Code
59
+ Export your document model as a .zip file from Connect.
60
+ Import the .zip file into your project directory created in Step 1.
61
+ Run the following command to generate the scaffolding code:
62
+
63
+ ```bash
64
+ npm run generate YourModelName.phdm.zip
65
+ ```
66
+
67
+ This will create a new directory under /document-models containing:
68
+
69
+ JSON file with the document model specification.
70
+ GraphQL file with state and operation schemas.
71
+ A gen/ folder with autogenerated code.
72
+ A src/ folder for your custom code implementation.
73
+
74
+ ### 4. Implementing Reducer Code and Unit Tests
75
+ Navigate to the reducer directory:
76
+
77
+ ```bash
78
+ cd document-models/"YourModelName"/src/reducers
79
+ ```
80
+
81
+ Implement the reducer functions for each document model operation. These functions will handle state transitions.
82
+
83
+ Add utility functions in:
10
84
 
11
85
  ```bash
12
- npm install
86
+ document-models/"YourModelName"/src/utils.ts
13
87
  ```
14
88
 
15
- ## Usage
89
+ Write unit tests to ensure the correctness of your reducers:
90
+
91
+ Test files should be located in:
92
+
93
+ ```bash
94
+ document-models/"YourModelName"/src/reducers/tests
95
+ ```
96
+
97
+ Run the tests:
98
+
99
+ ```bash
100
+ npm test
101
+ ```
102
+
103
+ Test the editor functionality:
104
+
105
+ ```bash
106
+ npm run connect
107
+ ```
108
+
109
+ ### 5. Implementing Document Editors
110
+ Generate the editor template for your document model:
111
+
112
+ ```bash
113
+ npm run generate -- --editor YourModelName --document-types powerhouse/YourModelName
114
+ ```
115
+
116
+ The --editor flag specifies the name of your document model.
117
+ The --document-types flag links the editor to your document model type.
118
+ After generation:
119
+
120
+ Open the editor template:
16
121
 
17
122
  ```bash
18
- npm run connect // to run the Connect app
19
- npm run reactor // to run the Reactor backend
123
+ editors/YourModelName/editor.tsx
124
+ ```
20
125
 
126
+ Customize the editor interface to suit your document model.
127
+
128
+ ### 6. Testing the Document Editor
129
+ Run the Connect app to test your document editor:
130
+
131
+ ```bash
132
+ npm run connect
21
133
  ```
22
134
 
135
+ Verify that the editor functions as expected.
136
+ Perform end-to-end testing to ensure smooth integration between the document model and its editor.
137
+
138
+ ### 7. Adding a Manifest File
139
+ Create a manifest file to describe your document model and editor. This enables proper integration with the host application.
140
+
141
+ **Example manifest.json:**
142
+
143
+ ```json
144
+ {
145
+ "name": "your-model-name",
146
+ "description": "A brief description of your document model.",
147
+ "category": "your-category", // e.g., "Finance", "People Ops", "Legal"
148
+ "publisher": {
149
+ "name": "your-publisher-name",
150
+ "url": "your-publisher-url"
151
+ },
152
+ "documentModels": [
153
+ {
154
+ "id": "your-model-id",
155
+ "name": "your-model-name"
156
+ }
157
+ ],
158
+ "editors": [
159
+ {
160
+ "id": "your-editor-id",
161
+ "name": "your-editor-name",
162
+ "documentTypes": ["your-model-id"]
163
+ }
164
+ ]
165
+ }
166
+ ```
167
+
168
+ ### Steps to finalize:
169
+
170
+ Place the manifest file at your project root.
171
+ Update your index.js to export your modules and include the new document model and editor.
172
+
173
+ ### Final Thoughts
174
+ You've now successfully created a Document Model and its corresponding Editor using the Connect app!
175
+
176
+ Next Steps:
177
+ - Expand functionality: Add more operations or complex logic to your document model.
178
+ - Improve UX: Enhance the document editor for a smoother user experience.
179
+ - Integrate with other systems: Use APIs or GraphQL to connect your document model with external services.
@@ -3,6 +3,7 @@ export declare const actions: {
3
3
  editLineItemTag: (input: import("./index.js").EditLineItemTagInput) => import("./index.js").EditLineItemTagAction;
4
4
  addLineItem: (input: import("./index.js").AddLineItemInput) => import("./index.js").AddLineItemAction;
5
5
  editLineItem: (input: import("./index.js").EditLineItemInput) => import("./index.js").EditLineItemAction;
6
+ deleteLineItem: (input: import("./index.js").DeleteLineItemInput) => import("./index.js").DeleteLineItemAction;
6
7
  editBillingStatement: (input: import("./index.js").EditBillingStatementInput) => import("./index.js").EditBillingStatementAction;
7
8
  editContributor: (input: import("./index.js").EditContributorInput) => import("./index.js").EditContributorAction;
8
9
  editStatus: (input: import("./index.js").EditStatusInput) => import("./index.js").EditStatusAction;
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../document-models/billing-statement/actions.ts"],"names":[],"mappings":"AAOA,sDAAsD;AACtD,eAAO,MAAM,OAAO;sBAGZ,gDACI;kBAEK,4CAAuB;mBAA2K,6CAAwB;2BAAnG,qDAAgC;sBAAyM,gDAA2B;iBAAoL,2CAAsB;;eAA6vM,CAAC,eAAe,CAAC;gBAAkE,CAAC,eAAe,CAAC;iBAAmE,CAAC,aAAa,CAAC,eAAe,CAAC;;;;gBAAqS,CAAC;CAD9zO,CAAC"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../document-models/billing-statement/actions.ts"],"names":[],"mappings":"AAOA,sDAAsD;AACtD,eAAO,MAAM,OAAO;sBAGZ,gDACI;kBAE2F,4CAAuB;mBAA2K,6CAAwB;qBAAgL,+CAA0B;2BAAnY,qDAAgC;sBAAyM,gDAA2B;iBAAoL,2CAAsB;;eAA6vM,CAAC,eAAe,CAAC;gBAAkE,CAAC,eAAe,CAAC;iBAAmE,CAAC,aAAa,CAAC,eAAe,CAAC;;;;gBAAqS,CAAC;CAD9zO,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"document-model.d.ts","sourceRoot":"","sources":["../../../../document-models/billing-statement/gen/document-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAE/D,eAAO,MAAM,aAAa,EAAE,wBA8H3B,CAAC"}
1
+ {"version":3,"file":"document-model.d.ts","sourceRoot":"","sources":["../../../../document-models/billing-statement/gen/document-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAE/D,eAAO,MAAM,aAAa,EAAE,wBAyI3B,CAAC"}
@@ -1,117 +1,128 @@
1
1
  export const documentModel = {
2
- id: "powerhouse/billing-statement",
3
- name: "Billing Statement",
4
- extension: ".phdm",
5
- description: "The Billing Statement Document Model captures a contributor’s issued charges, with itemized line entries and auto-calculated totals in cash and POWT's.",
6
2
  author: {
7
3
  name: "Powerhouse",
8
4
  website: "https://powerhouse.inc",
9
5
  },
6
+ description: "The Billing Statement Document Model captures a contributor’s issued charges, with itemized line entries and auto-calculated totals in cash and POWT's.",
7
+ extension: "",
8
+ id: "powerhouse/billing-statement",
9
+ name: "Billing Statement",
10
10
  specifications: [
11
11
  {
12
- version: 1,
13
12
  changeLog: [],
14
- state: {
15
- global: {
16
- schema: "type BillingStatementState {\n contributor: PHID # Change to AID when available\n dateIssued: DateTime!\n dateDue: DateTime\n lineItems: [BillingStatementLineItem!]!\n status: BillingStatementStatus!\n currency: String!\n totalCash: Float!\n totalPowt: Float!\n notes: String\n}\n\ntype BillingStatementLineItem {\n id: OID!\n description: String!\n quantity: Float!\n unit: BillingStatementUnit!\n unitPricePwt: Float!\n unitPriceCash: Float!\n totalPricePwt: Float!\n totalPriceCash: Float!\n lineItemTag: [BillingStatementTag!]!\n}\n\ntype BillingStatementTag {\n dimension: String!\n value: String!\n label: String\n}\n\nenum BillingStatementStatus {\n DRAFT\n ISSUED\n ACCEPTED\n REJECTED\n PAID\n}\n\nenum BillingStatementStatusInput {\n DRAFT\n ISSUED\n ACCEPTED\n REJECTED\n PAID\n}\n\nenum BillingStatementUnit {\n MINUTE\n HOUR\n DAY\n UNIT\n}\n\nenum BillingStatementUnitInput {\n MINUTE\n HOUR\n DAY\n UNIT\n}\n\n",
17
- initialValue: '"{\\n \\"contributor\\": \\"\\",\\n \\"dateIssued\\": \\"2025-06-10T15:42:17.873Z\\",\\n \\"dateDue\\": \\"2025-06-10T15:42:17.873Z\\",\\n \\"lineItems\\": [],\\n \\"status\\": \\"DRAFT\\",\\n \\"currency\\": \\"\\",\\n \\"totalCash\\": 0,\\n \\"totalPowt\\": 0,\\n \\"notes\\": \\"\\"\\n}"',
18
- examples: [],
19
- },
20
- local: {
21
- schema: "",
22
- initialValue: '""',
23
- examples: [],
24
- },
25
- },
26
13
  modules: [
27
14
  {
15
+ description: "",
28
16
  id: "dnNu8Q38g6PEhUWWnwSWA1mTr40=",
29
17
  name: "general",
30
- description: "",
31
18
  operations: [
32
19
  {
33
- id: "obKvjYTcH1TKFjSO5DGtmC9HS7w=",
34
- name: "EDIT_BILLING_STATEMENT",
35
20
  description: "",
36
- schema: "input EditBillingStatementInput {\n dateIssued: DateTime\n dateDue: DateTime\n currency: String\n notes: String\n}",
37
- template: "",
38
- reducer: "",
39
21
  errors: [],
40
22
  examples: [],
23
+ id: "obKvjYTcH1TKFjSO5DGtmC9HS7w=",
24
+ name: "EDIT_BILLING_STATEMENT",
25
+ reducer: "",
26
+ schema: "input EditBillingStatementInput {\n dateIssued: DateTime\n dateDue: DateTime\n currency: String\n notes: String\n}",
41
27
  scope: "global",
28
+ template: "",
42
29
  },
43
30
  {
44
- id: "pkU1fg9dl0SDxHb+294KsqUDMN4=",
45
- name: "EDIT_CONTRIBUTOR",
46
31
  description: "",
47
- schema: "input EditContributorInput {\n contributor: PHID!\n}",
48
- template: "",
49
- reducer: "",
50
32
  errors: [],
51
33
  examples: [],
34
+ id: "pkU1fg9dl0SDxHb+294KsqUDMN4=",
35
+ name: "EDIT_CONTRIBUTOR",
36
+ reducer: "",
37
+ schema: "input EditContributorInput {\n contributor: PHID!\n}",
52
38
  scope: "global",
39
+ template: "",
53
40
  },
54
41
  {
55
- id: "sAZCp+O/axy6cbtI/rrV0/A5eMw=",
56
- name: "EDIT_STATUS",
57
42
  description: "",
58
- schema: "input EditStatusInput {\n status: BillingStatementStatusInput!\n}",
59
- template: "",
60
- reducer: "",
61
43
  errors: [],
62
44
  examples: [],
45
+ id: "sAZCp+O/axy6cbtI/rrV0/A5eMw=",
46
+ name: "EDIT_STATUS",
47
+ reducer: "",
48
+ schema: "input EditStatusInput {\n status: BillingStatementStatusInput!\n}",
63
49
  scope: "global",
50
+ template: "",
64
51
  },
65
52
  ],
66
53
  },
67
54
  {
55
+ description: "",
68
56
  id: "kNoQafB6U1J4Gq8GrcjRyGhrRvg=",
69
57
  name: "line_items",
70
- description: "",
71
58
  operations: [
72
59
  {
73
- id: "5s+0/bYYzWZd4rOdj53uQ2orOaE=",
74
- name: "ADD_LINE_ITEM",
75
60
  description: "BillingStatementState.totalCash / .totalPowt will be a sum of the line item values.",
76
- schema: "input AddLineItemInput {\n id: OID!\n description: String!\n quantity: Float!\n unit: BillingStatementUnitInput!\n unitPricePwt: Float!\n unitPriceCash: Float!\n totalPricePwt: Float!\n totalPriceCash: Float!\n}",
77
- template: "",
78
- reducer: "",
79
61
  errors: [],
80
62
  examples: [],
63
+ id: "5s+0/bYYzWZd4rOdj53uQ2orOaE=",
64
+ name: "ADD_LINE_ITEM",
65
+ reducer: "",
66
+ schema: "input AddLineItemInput {\n id: OID!\n description: String!\n quantity: Float!\n unit: BillingStatementUnitInput!\n unitPricePwt: Float!\n unitPriceCash: Float!\n totalPricePwt: Float!\n totalPriceCash: Float!\n}",
81
67
  scope: "global",
68
+ template: "",
82
69
  },
83
70
  {
71
+ description: "BillingStatementState.totalCash / .totalPowt will be a sum of the line item values.",
72
+ errors: [],
73
+ examples: [],
84
74
  id: "iBzTjNAr/a4NsuxZmy821GoN/NE=",
85
75
  name: "EDIT_LINE_ITEM",
86
- description: "BillingStatementState.totalCash / .totalPowt will be a sum of the line item values.",
76
+ reducer: "",
87
77
  schema: "input EditLineItemInput {\n id: OID!\n description: String\n quantity: Float\n unit: BillingStatementUnitInput\n unitPricePwt: Float\n unitPriceCash: Float\n totalPricePwt: Float\n totalPriceCash: Float\n}",
78
+ scope: "global",
88
79
  template: "",
89
- reducer: "",
80
+ },
81
+ {
82
+ description: "",
90
83
  errors: [],
91
84
  examples: [],
85
+ id: "6b6bad0d-ef1c-4aa8-81eb-6ca605bf46b8",
86
+ name: "DELETE_LINE_ITEM",
87
+ reducer: "",
88
+ schema: "input DeleteLineItemInput {\n id: OID!\n}",
92
89
  scope: "global",
90
+ template: "",
93
91
  },
94
92
  ],
95
93
  },
96
94
  {
95
+ description: "",
97
96
  id: "jg5q35JaHcb5iNDdFkB2xYYNrDU=",
98
97
  name: "tags",
99
- description: "",
100
98
  operations: [
101
99
  {
102
- id: "k5kMjZ+cO/7fVOPTvyTZ07XMVEA=",
103
- name: "EDIT_LINE_ITEM_TAG",
104
100
  description: "",
105
- schema: "input EditLineItemTagInput {\n lineItemId: OID!\n dimension: String!\n value: String!\n label: String\n}",
106
- template: "",
107
- reducer: "",
108
101
  errors: [],
109
102
  examples: [],
103
+ id: "k5kMjZ+cO/7fVOPTvyTZ07XMVEA=",
104
+ name: "EDIT_LINE_ITEM_TAG",
105
+ reducer: "",
106
+ schema: "input EditLineItemTagInput {\n lineItemId: OID!\n dimension: String!\n value: String!\n label: String\n}",
110
107
  scope: "global",
108
+ template: "",
111
109
  },
112
110
  ],
113
111
  },
114
112
  ],
113
+ state: {
114
+ global: {
115
+ examples: [],
116
+ initialValue: '"{\\n \\"contributor\\": null,\\n \\"dateIssued\\": \\"2025-06-10T15:42:17.873Z\\",\\n \\"dateDue\\": \\"2025-06-10T15:42:17.873Z\\",\\n \\"lineItems\\": [],\\n \\"status\\": \\"DRAFT\\",\\n \\"currency\\": \\"\\",\\n \\"totalCash\\": 0,\\n \\"totalPowt\\": 0,\\n \\"notes\\": \\"\\"\\n}"',
117
+ schema: "type BillingStatementState {\n contributor: PHID # Change to AID when available\n dateIssued: DateTime!\n dateDue: DateTime\n lineItems: [BillingStatementLineItem!]!\n status: BillingStatementStatus!\n currency: String!\n totalCash: Float!\n totalPowt: Float!\n notes: String\n}\n\ntype BillingStatementLineItem {\n id: OID!\n description: String!\n quantity: Float!\n unit: BillingStatementUnit!\n unitPricePwt: Float!\n unitPriceCash: Float!\n totalPricePwt: Float!\n totalPriceCash: Float!\n lineItemTag: [BillingStatementTag!]!\n}\n\ntype BillingStatementTag {\n dimension: String!\n value: String!\n label: String\n}\n\nenum BillingStatementStatus {\n DRAFT\n ISSUED\n ACCEPTED\n REJECTED\n PAID\n}\n\nenum BillingStatementStatusInput {\n DRAFT\n ISSUED\n ACCEPTED\n REJECTED\n PAID\n}\n\nenum BillingStatementUnit {\n MINUTE\n HOUR\n DAY\n UNIT\n}\n\nenum BillingStatementUnitInput {\n MINUTE\n HOUR\n DAY\n UNIT\n}\n\n",
118
+ },
119
+ local: {
120
+ examples: [],
121
+ initialValue: '""',
122
+ schema: "",
123
+ },
124
+ },
125
+ version: 1,
115
126
  },
116
127
  ],
117
128
  };