@powerhousedao/contributor-billing 0.1.53 → 1.0.0-dev.10

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 (189) hide show
  1. package/dist/document-models/account-transactions/gen/schema/zod.d.ts.map +1 -1
  2. package/dist/document-models/account-transactions/gen/schema/zod.js +3 -3
  3. package/dist/document-models/account-transactions/module.d.ts +1 -1
  4. package/dist/document-models/account-transactions/module.d.ts.map +1 -1
  5. package/dist/document-models/account-transactions/module.js +1 -1
  6. package/dist/document-models/accounts/gen/schema/zod.d.ts.map +1 -1
  7. package/dist/document-models/accounts/module.d.ts +1 -1
  8. package/dist/document-models/accounts/module.d.ts.map +1 -1
  9. package/dist/document-models/accounts/module.js +1 -1
  10. package/dist/document-models/billing-statement/gen/schema/zod.d.ts.map +1 -1
  11. package/dist/document-models/billing-statement/gen/schema/zod.js +4 -4
  12. package/dist/document-models/billing-statement/module.d.ts +1 -1
  13. package/dist/document-models/billing-statement/module.d.ts.map +1 -1
  14. package/dist/document-models/billing-statement/module.js +1 -1
  15. package/dist/document-models/expense-report/gen/schema/zod.d.ts.map +1 -1
  16. package/dist/document-models/expense-report/gen/schema/zod.js +38 -18
  17. package/dist/document-models/expense-report/module.d.ts +1 -1
  18. package/dist/document-models/expense-report/module.d.ts.map +1 -1
  19. package/dist/document-models/expense-report/module.js +1 -1
  20. package/dist/document-models/invoice/gen/document-model.d.ts.map +1 -1
  21. package/dist/document-models/invoice/gen/document-model.js +150 -150
  22. package/dist/document-models/invoice/gen/schema/types.d.ts +3 -6
  23. package/dist/document-models/invoice/gen/schema/types.d.ts.map +1 -1
  24. package/dist/document-models/invoice/gen/schema/zod.d.ts +2 -8
  25. package/dist/document-models/invoice/gen/schema/zod.d.ts.map +1 -1
  26. package/dist/document-models/invoice/gen/schema/zod.js +14 -25
  27. package/dist/document-models/invoice/module.d.ts +1 -1
  28. package/dist/document-models/invoice/module.d.ts.map +1 -1
  29. package/dist/document-models/invoice/module.js +1 -1
  30. package/dist/document-models/invoice/src/reducers/general.d.ts.map +1 -1
  31. package/dist/document-models/invoice/src/reducers/general.js +8 -0
  32. package/dist/document-models/invoice/src/reducers/items.d.ts.map +1 -1
  33. package/dist/document-models/invoice/src/reducers/items.js +2 -1
  34. package/dist/document-models/invoice/src/reducers/parties.d.ts.map +1 -1
  35. package/dist/document-models/invoice/src/reducers/parties.js +6 -2
  36. package/dist/document-models/invoice/src/reducers/transitions.d.ts +0 -5
  37. package/dist/document-models/invoice/src/reducers/transitions.d.ts.map +1 -1
  38. package/dist/document-models/invoice/src/reducers/transitions.js +19 -6
  39. package/dist/document-models/invoice/tests/general.test.js +11 -2
  40. package/dist/document-models/invoice/tests/items.test.js +1 -1
  41. package/dist/document-models/invoice/tests/parties.test.js +1 -1
  42. package/dist/document-models/invoice/tests/transitions.test.js +7 -2
  43. package/dist/document-models/operational-hub-profile/module.d.ts +1 -1
  44. package/dist/document-models/operational-hub-profile/module.d.ts.map +1 -1
  45. package/dist/document-models/operational-hub-profile/module.js +1 -1
  46. package/dist/document-models/snapshot-report/gen/schema/zod.d.ts.map +1 -1
  47. package/dist/document-models/snapshot-report/gen/schema/zod.js +12 -12
  48. package/dist/document-models/snapshot-report/module.d.ts +1 -1
  49. package/dist/document-models/snapshot-report/module.d.ts.map +1 -1
  50. package/dist/document-models/snapshot-report/module.js +1 -1
  51. package/dist/editors/accounts-editor/editor.d.ts.map +1 -1
  52. package/dist/editors/accounts-editor/editor.js +2 -2
  53. package/dist/editors/builder-team-admin/components/DriveExplorer.d.ts.map +1 -1
  54. package/dist/editors/builder-team-admin/components/DriveExplorer.js +64 -4
  55. package/dist/editors/builder-team-admin/module.js +1 -1
  56. package/dist/editors/contributor-billing/components/DashboardHome.d.ts.map +1 -1
  57. package/dist/editors/contributor-billing/components/DashboardHome.js +2 -8
  58. package/dist/editors/contributor-billing/components/DocumentDropZone.d.ts.map +1 -1
  59. package/dist/editors/contributor-billing/components/DocumentDropZone.js +37 -8
  60. package/dist/editors/contributor-billing/components/DriveContents.d.ts.map +1 -1
  61. package/dist/editors/contributor-billing/components/DriveContents.js +4 -1
  62. package/dist/editors/contributor-billing/components/DriveExplorer.d.ts.map +1 -1
  63. package/dist/editors/contributor-billing/components/DriveExplorer.js +54 -3
  64. package/dist/editors/contributor-billing/components/FolderTree.d.ts.map +1 -1
  65. package/dist/editors/contributor-billing/components/FolderTree.js +6 -15
  66. package/dist/editors/contributor-billing/components/InvoiceTable/HeaderControls.d.ts +2 -1
  67. package/dist/editors/contributor-billing/components/InvoiceTable/HeaderControls.d.ts.map +1 -1
  68. package/dist/editors/contributor-billing/components/InvoiceTable/HeaderControls.js +41 -6
  69. package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTable.d.ts +1 -1
  70. package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTable.d.ts.map +1 -1
  71. package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTable.js +16 -1
  72. package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableContainer.d.ts +3 -1
  73. package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableContainer.d.ts.map +1 -1
  74. package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableContainer.js +13 -11
  75. package/dist/editors/contributor-billing/components/MonthReportCard.d.ts +11 -4
  76. package/dist/editors/contributor-billing/components/MonthReportCard.d.ts.map +1 -1
  77. package/dist/editors/contributor-billing/components/MonthReportCard.js +55 -6
  78. package/dist/editors/contributor-billing/components/MonthlyReportsOverview.d.ts +1 -1
  79. package/dist/editors/contributor-billing/components/MonthlyReportsOverview.d.ts.map +1 -1
  80. package/dist/editors/contributor-billing/components/MonthlyReportsOverview.js +104 -7
  81. package/dist/editors/contributor-billing/components/ReportingView.d.ts +0 -3
  82. package/dist/editors/contributor-billing/components/ReportingView.d.ts.map +1 -1
  83. package/dist/editors/contributor-billing/components/ReportingView.js +65 -8
  84. package/dist/editors/contributor-billing/components/ToastRenderer.d.ts +2 -0
  85. package/dist/editors/contributor-billing/components/ToastRenderer.d.ts.map +1 -0
  86. package/dist/editors/contributor-billing/components/ToastRenderer.js +14 -0
  87. package/dist/editors/contributor-billing/components/cbToast.d.ts +16 -0
  88. package/dist/editors/contributor-billing/components/cbToast.d.ts.map +1 -0
  89. package/dist/editors/contributor-billing/components/cbToast.js +29 -0
  90. package/dist/editors/contributor-billing/hooks/useDocumentAutoPlacement.d.ts.map +1 -1
  91. package/dist/editors/contributor-billing/hooks/useDocumentAutoPlacement.js +42 -2
  92. package/dist/editors/contributor-billing/hooks/useMonthlyReports.d.ts +4 -0
  93. package/dist/editors/contributor-billing/hooks/useMonthlyReports.d.ts.map +1 -1
  94. package/dist/editors/contributor-billing/hooks/useMonthlyReports.js +4 -0
  95. package/dist/editors/contributor-billing/module.js +1 -1
  96. package/dist/editors/invoice/InvoicePDF.d.ts.map +1 -1
  97. package/dist/editors/invoice/InvoicePDF.js +12 -9
  98. package/dist/editors/invoice/editor.d.ts.map +1 -1
  99. package/dist/editors/invoice/editor.js +6 -10
  100. package/dist/editors/invoice/exportUBL.d.ts.map +1 -1
  101. package/dist/editors/invoice/exportUBL.js +1 -2
  102. package/dist/editors/invoice/ingestPDF.js +1 -1
  103. package/dist/editors/invoice/invoiceToGnosis.d.ts.map +1 -1
  104. package/dist/editors/invoice/invoiceToGnosis.js +25 -22
  105. package/dist/editors/invoice/invoiceToast.d.ts +4 -0
  106. package/dist/editors/invoice/invoiceToast.d.ts.map +1 -0
  107. package/dist/editors/invoice/invoiceToast.js +6 -0
  108. package/dist/editors/invoice/legalEntity/legalEntity.d.ts +2 -1
  109. package/dist/editors/invoice/legalEntity/legalEntity.d.ts.map +1 -1
  110. package/dist/editors/invoice/legalEntity/legalEntity.js +3 -14
  111. package/dist/editors/invoice/legalEntity/walletSection.d.ts +1 -0
  112. package/dist/editors/invoice/legalEntity/walletSection.d.ts.map +1 -1
  113. package/dist/editors/invoice/legalEntity/walletSection.js +2 -2
  114. package/dist/editors/invoice/lineItems.js +1 -1
  115. package/dist/editors/invoice/requestFinance.d.ts +3 -2
  116. package/dist/editors/invoice/requestFinance.d.ts.map +1 -1
  117. package/dist/editors/invoice/requestFinance.js +38 -42
  118. package/dist/editors/invoice/validation/validationHandler.d.ts +1 -1
  119. package/dist/editors/invoice/validation/validationHandler.d.ts.map +1 -1
  120. package/dist/editors/invoice/validation/validationHandler.js +15 -2
  121. package/dist/editors/invoice/validation/validationManager.d.ts +1 -1
  122. package/dist/editors/invoice/validation/validationManager.d.ts.map +1 -1
  123. package/dist/editors/invoice/validation/validationManager.js +2 -1
  124. package/dist/editors/invoice/validation/validationRules.d.ts +1 -0
  125. package/dist/editors/invoice/validation/validationRules.d.ts.map +1 -1
  126. package/dist/editors/invoice/validation/validationRules.js +26 -1
  127. package/dist/editors/snapshot-report-editor/components/DateRangePicker.d.ts +19 -0
  128. package/dist/editors/snapshot-report-editor/components/DateRangePicker.d.ts.map +1 -0
  129. package/dist/editors/snapshot-report-editor/components/DateRangePicker.js +66 -0
  130. package/dist/editors/snapshot-report-editor/editor.d.ts.map +1 -1
  131. package/dist/editors/snapshot-report-editor/editor.js +72 -48
  132. package/dist/scripts/download-all-drive-documents/download-drive-documents.d.ts +33 -0
  133. package/dist/scripts/download-all-drive-documents/download-drive-documents.d.ts.map +1 -0
  134. package/dist/scripts/download-all-drive-documents/download-drive-documents.js +583 -0
  135. package/dist/scripts/invoice/requestFinance.d.ts +18 -1
  136. package/dist/scripts/invoice/requestFinance.d.ts.map +1 -1
  137. package/dist/scripts/invoice/requestFinance.js +17 -5
  138. package/dist/scripts/upload-phd-documents/upload-phd-documents.d.ts +20 -0
  139. package/dist/scripts/upload-phd-documents/upload-phd-documents.d.ts.map +1 -0
  140. package/dist/scripts/upload-phd-documents/upload-phd-documents.js +313 -0
  141. package/dist/style.css +201 -106
  142. package/dist/subgraphs/budget-statements/resolvers.d.ts +38 -0
  143. package/dist/subgraphs/budget-statements/resolvers.d.ts.map +1 -1
  144. package/dist/subgraphs/budget-statements/resolvers.js +192 -62
  145. package/dist/subgraphs/budget-statements/resolvers.test.d.ts +2 -0
  146. package/dist/subgraphs/budget-statements/resolvers.test.d.ts.map +1 -0
  147. package/dist/subgraphs/budget-statements/resolvers.test.js +339 -0
  148. package/dist/subgraphs/budget-statements/schema.d.ts.map +1 -1
  149. package/dist/subgraphs/budget-statements/schema.js +8 -0
  150. package/dist/subgraphs/index.d.ts +0 -1
  151. package/dist/subgraphs/index.d.ts.map +1 -1
  152. package/dist/subgraphs/index.js +0 -1
  153. package/dist/subgraphs/invoice-addon/customResolvers.d.ts +70 -11
  154. package/dist/subgraphs/invoice-addon/customResolvers.d.ts.map +1 -1
  155. package/dist/subgraphs/invoice-addon/customResolvers.js +12 -27
  156. package/package.json +35 -28
  157. package/dist/document-models/invoice/src/tests/document-model.test.d.ts +0 -10
  158. package/dist/document-models/invoice/src/tests/document-model.test.d.ts.map +0 -1
  159. package/dist/document-models/invoice/src/tests/document-model.test.js +0 -104
  160. package/dist/document-models/invoice/src/tests/general.test.d.ts +0 -6
  161. package/dist/document-models/invoice/src/tests/general.test.d.ts.map +0 -1
  162. package/dist/document-models/invoice/src/tests/general.test.js +0 -49
  163. package/dist/document-models/invoice/src/tests/items.test.d.ts +0 -6
  164. package/dist/document-models/invoice/src/tests/items.test.d.ts.map +0 -1
  165. package/dist/document-models/invoice/src/tests/items.test.js +0 -59
  166. package/dist/document-models/invoice/src/tests/parties.test.d.ts +0 -6
  167. package/dist/document-models/invoice/src/tests/parties.test.d.ts.map +0 -1
  168. package/dist/document-models/invoice/src/tests/parties.test.js +0 -69
  169. package/dist/document-models/invoice/src/tests/transitions.test.d.ts +0 -6
  170. package/dist/document-models/invoice/src/tests/transitions.test.d.ts.map +0 -1
  171. package/dist/document-models/invoice/src/tests/transitions.test.js +0 -59
  172. package/dist/document-models/invoice/utils/statusTransitions.d.ts +0 -13
  173. package/dist/document-models/invoice/utils/statusTransitions.d.ts.map +0 -1
  174. package/dist/document-models/invoice/utils/statusTransitions.js +0 -13
  175. package/dist/editors/builder-team-admin/components/overview/SubscriptionsStats.d.ts +0 -15
  176. package/dist/editors/builder-team-admin/components/overview/SubscriptionsStats.d.ts.map +0 -1
  177. package/dist/editors/builder-team-admin/components/overview/SubscriptionsStats.js +0 -61
  178. package/dist/editors/contributor-billing/components/CreateHubProfileModal.d.ts +0 -12
  179. package/dist/editors/contributor-billing/components/CreateHubProfileModal.d.ts.map +0 -1
  180. package/dist/editors/contributor-billing/components/CreateHubProfileModal.js +0 -74
  181. package/dist/subgraphs/resources-services/index.d.ts +0 -11
  182. package/dist/subgraphs/resources-services/index.d.ts.map +0 -1
  183. package/dist/subgraphs/resources-services/index.js +0 -11
  184. package/dist/subgraphs/resources-services/resolvers.d.ts +0 -3
  185. package/dist/subgraphs/resources-services/resolvers.d.ts.map +0 -1
  186. package/dist/subgraphs/resources-services/resolvers.js +0 -462
  187. package/dist/subgraphs/resources-services/schema.d.ts +0 -3
  188. package/dist/subgraphs/resources-services/schema.d.ts.map +0 -1
  189. package/dist/subgraphs/resources-services/schema.js +0 -284
@@ -1,5 +1,5 @@
1
1
  import * as z from "zod";
2
- import type { AcceptInput, AddLineItemInput, AddPaymentInput, Address, Bank, CancelInput, ClosePaymentInput, ConfirmPaymentInput, ContactInfo, DeleteLineItemInput, EditInvoiceInput, EditIssuerBankInput, EditIssuerInput, EditIssuerWalletInput, EditLineItemInput, EditPayerBankInput, EditPayerInput, EditPayerWalletInput, EditPaymentDataInput, EditStatusInput, ExportedData, IntermediaryBank, InvoiceLineItem, InvoiceState, InvoiceTag, InvoiceWallet, IssueInput, LegalEntity, LegalEntityCorporateRegistrationId, LegalEntityTaxId, Payment, PaymentRouting, ReapprovePaymentInput, RegisterPaymentTxInput, ReinstateInput, RejectInput, Rejection, ReportPaymentIssueInput, ResetInput, SchedulePaymentInput, SetExportedDataInput, SetInvoiceTagInput, SetLineItemTagInput, Token } from "./types.js";
2
+ import type { AcceptInput, AddLineItemInput, AddPaymentInput, Address, Bank, CancelInput, ClosePaymentInput, ConfirmPaymentInput, ContactInfo, DeleteLineItemInput, EditInvoiceInput, EditIssuerBankInput, EditIssuerInput, EditIssuerWalletInput, EditLineItemInput, EditPayerBankInput, EditPayerInput, EditPayerWalletInput, EditPaymentDataInput, EditStatusInput, ExportedData, IntermediaryBank, InvoiceLineItem, InvoiceState, InvoiceTag, InvoiceWallet, IssueInput, LegalEntity, LegalEntityId, Payment, PaymentRouting, ReapprovePaymentInput, RegisterPaymentTxInput, ReinstateInput, RejectInput, Rejection, ReportPaymentIssueInput, ResetInput, SchedulePaymentInput, SetExportedDataInput, SetInvoiceTagInput, SetLineItemTagInput, Token } from "./types.js";
3
3
  type Properties<T> = Required<{
4
4
  [K in keyof T]: z.ZodType<T[K]>;
5
5
  }>;
@@ -68,13 +68,7 @@ export declare function InvoiceTagSchema(): z.ZodObject<Properties<InvoiceTag>>;
68
68
  export declare function InvoiceWalletSchema(): z.ZodObject<Properties<InvoiceWallet>>;
69
69
  export declare function IssueInputSchema(): z.ZodObject<Properties<IssueInput>>;
70
70
  export declare function LegalEntitySchema(): z.ZodObject<Properties<LegalEntity>>;
71
- export declare function LegalEntityCorporateRegistrationIdSchema(): z.ZodObject<Properties<LegalEntityCorporateRegistrationId>>;
72
- export declare function LegalEntityIdSchema(): z.ZodUnion<readonly [z.ZodObject<Required<{
73
- corpRegId: z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>;
74
- }>, z.core.$strip>, z.ZodObject<Required<{
75
- taxId: z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>;
76
- }>, z.core.$strip>]>;
77
- export declare function LegalEntityTaxIdSchema(): z.ZodObject<Properties<LegalEntityTaxId>>;
71
+ export declare function LegalEntityIdSchema(): z.ZodObject<Properties<LegalEntityId>>;
78
72
  export declare function PaymentSchema(): z.ZodObject<Properties<Payment>>;
79
73
  export declare function PaymentRoutingSchema(): z.ZodObject<Properties<PaymentRouting>>;
80
74
  export declare function ReapprovePaymentInputSchema(): z.ZodObject<Properties<ReapprovePaymentInput>>;
@@ -1 +1 @@
1
- {"version":3,"file":"zod.d.ts","sourceRoot":"","sources":["../../../../../document-models/invoice/gen/schema/zod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,KAAK,EACV,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,OAAO,EACP,IAAI,EACJ,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,UAAU,EACV,aAAa,EACb,UAAU,EACV,WAAW,EACX,kCAAkC,EAClC,gBAAgB,EAChB,OAAO,EACP,cAAc,EACd,qBAAqB,EACrB,sBAAsB,EACtB,cAAc,EACd,WAAW,EACX,SAAS,EACT,uBAAuB,EACvB,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,KAAK,EACN,MAAM,YAAY,CAAC;AAEpB,KAAK,UAAU,CAAC,CAAC,IAAI,QAAQ,CAAC;KAC3B,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAChC,CAAC,CAAC;AAEH,KAAK,iBAAiB,GAAG,EAAE,CAAC;AAE5B,eAAO,MAAM,mBAAmB,GAAI,GAAG,GAAG,KAAG,CAAC,IAAI,iBACnB,CAAC;AAEhC,eAAO,MAAM,uBAAuB,gGAEI,CAAC;AAEzC,eAAO,MAAM,mBAAmB;;;;EAI9B,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;EAInC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;EAKnC,CAAC;AAEH,eAAO,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AKA;AAED,wBAAgB,0BAA0B,IAAI,CAAC,CAAC,SAAS,CACvD,UAAU,CAAC,oBAAoB,CAAC,CACjC,CAKA;AAED,wBAAgB,wBAAwB,IAAI,CAAC,CAAC,SAAS,CACrD,UAAU,CAAC,kBAAkB,CAAC,CAC/B,CAMA;AAED,wBAAgB,yBAAyB,IAAI,CAAC,CAAC,SAAS,CACtD,UAAU,CAAC,mBAAmB,CAAC,CAChC,CAOA;AAED,wBAAgB,WAAW,IAAI,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAS5D"}
1
+ {"version":3,"file":"zod.d.ts","sourceRoot":"","sources":["../../../../../document-models/invoice/gen/schema/zod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,KAAK,EACV,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,OAAO,EACP,IAAI,EACJ,WAAW,EACX,iBAAiB,EAGjB,mBAAmB,EACnB,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,YAAY,EACZ,gBAAgB,EAGhB,eAAe,EACf,YAAY,EACZ,UAAU,EACV,aAAa,EACb,UAAU,EACV,WAAW,EACX,aAAa,EACb,OAAO,EACP,cAAc,EACd,qBAAqB,EACrB,sBAAsB,EACtB,cAAc,EACd,WAAW,EACX,SAAS,EACT,uBAAuB,EACvB,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EAEnB,KAAK,EACN,MAAM,YAAY,CAAC;AAEpB,KAAK,UAAU,CAAC,CAAC,IAAI,QAAQ,CAAC;KAC3B,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAChC,CAAC,C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KA;AAED,wBAAgB,gBAAgB,IAAI,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAItE;AAED,wBAAgB,0BAA0B,IAAI,CAAC,CAAC,SAAS,CACvD,UAAU,CAAC,oBAAoB,CAAC,CACjC,CAKA;AAED,wBAAgB,0BAA0B,IAAI,CAAC,CAAC,SAAS,CACvD,UAAU,CAAC,oBAAoB,CAAC,CACjC,CAKA;AAED,wBAAgB,wBAAwB,IAAI,CAAC,CAAC,SAAS,CACrD,UAAU,CAAC,kBAAkB,CAAC,CAC/B,CAMA;AAED,wBAAgB,yBAAyB,IAAI,CAAC,CAAC,SAAS,CACtD,UAAU,CAAC,mBAAmB,CAAC,CAChC,CAOA;AAED,wBAAgB,WAAW,IAAI,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAS5D"}
@@ -39,7 +39,7 @@ export const StatusSchema = z.enum([
39
39
  ]);
40
40
  export function AcceptInputSchema() {
41
41
  return z.object({
42
- payAfter: z.string().datetime().nullish(),
42
+ payAfter: z.iso.datetime().nullish(),
43
43
  });
44
44
  }
45
45
  export function AddLineItemInputSchema() {
@@ -60,7 +60,7 @@ export function AddPaymentInputSchema() {
60
60
  confirmed: z.boolean(),
61
61
  id: z.string(),
62
62
  issue: z.string().nullish(),
63
- paymentDate: z.string().datetime().nullish(),
63
+ paymentDate: z.iso.datetime().nullish(),
64
64
  processorRef: z.string().nullish(),
65
65
  txnRef: z.string().nullish(),
66
66
  });
@@ -255,7 +255,7 @@ export function EditPaymentDataInputSchema() {
255
255
  confirmed: z.boolean(),
256
256
  id: z.string(),
257
257
  issue: z.string().nullish(),
258
- paymentDate: z.string().datetime().nullish(),
258
+ paymentDate: z.iso.datetime().nullish(),
259
259
  processorRef: z.string().nullish(),
260
260
  txnRef: z.string().nullish(),
261
261
  });
@@ -269,7 +269,7 @@ export function ExportedDataSchema() {
269
269
  return z.object({
270
270
  __typename: z.literal("ExportedData").optional(),
271
271
  exportedLineItems: z.array(z.array(z.string())),
272
- timestamp: z.string().datetime().nullish(),
272
+ timestamp: z.iso.datetime().nullish(),
273
273
  });
274
274
  }
275
275
  export function IntermediaryBankSchema() {
@@ -306,16 +306,16 @@ export function InvoiceStateSchema() {
306
306
  __typename: z.literal("InvoiceState").optional(),
307
307
  closureReason: ClosureReasonSchema.nullish(),
308
308
  currency: z.string(),
309
- dateDelivered: z.string().datetime().nullish(),
310
- dateDue: z.string().datetime().nullish(),
311
- dateIssued: z.string().datetime().nullish(),
309
+ dateDelivered: z.iso.datetime().nullish(),
310
+ dateDue: z.iso.datetime().nullish(),
311
+ dateIssued: z.iso.datetime().nullish(),
312
312
  exported: z.lazy(() => ExportedDataSchema()),
313
313
  invoiceNo: z.string(),
314
314
  invoiceTags: z.array(z.lazy(() => InvoiceTagSchema())),
315
315
  issuer: z.lazy(() => LegalEntitySchema()),
316
316
  lineItems: z.array(z.lazy(() => InvoiceLineItemSchema())),
317
317
  notes: z.string().nullish(),
318
- payAfter: z.string().datetime().nullish(),
318
+ payAfter: z.iso.datetime().nullish(),
319
319
  payer: z.lazy(() => LegalEntitySchema()),
320
320
  payments: z.array(z.lazy(() => PaymentSchema())),
321
321
  rejections: z.array(z.lazy(() => RejectionSchema())),
@@ -358,22 +358,11 @@ export function LegalEntitySchema() {
358
358
  paymentRouting: z.lazy(() => PaymentRoutingSchema().nullish()),
359
359
  });
360
360
  }
361
- export function LegalEntityCorporateRegistrationIdSchema() {
362
- return z.object({
363
- __typename: z.literal("LegalEntityCorporateRegistrationId").optional(),
364
- corpRegId: z.string(),
365
- });
366
- }
367
361
  export function LegalEntityIdSchema() {
368
- return z.union([
369
- LegalEntityCorporateRegistrationIdSchema(),
370
- LegalEntityTaxIdSchema(),
371
- ]);
372
- }
373
- export function LegalEntityTaxIdSchema() {
374
362
  return z.object({
375
- __typename: z.literal("LegalEntityTaxId").optional(),
376
- taxId: z.string(),
363
+ __typename: z.literal("LegalEntityId").optional(),
364
+ corpRegId: z.string().nullish(),
365
+ taxId: z.string().nullish(),
377
366
  });
378
367
  }
379
368
  export function PaymentSchema() {
@@ -383,7 +372,7 @@ export function PaymentSchema() {
383
372
  confirmed: z.boolean(),
384
373
  id: z.string(),
385
374
  issue: z.string().nullish(),
386
- paymentDate: z.string().datetime().nullish(),
375
+ paymentDate: z.iso.datetime().nullish(),
387
376
  processorRef: z.string().nullish(),
388
377
  txnRef: z.string().nullish(),
389
378
  });
@@ -403,7 +392,7 @@ export function ReapprovePaymentInputSchema() {
403
392
  export function RegisterPaymentTxInputSchema() {
404
393
  return z.object({
405
394
  id: z.string(),
406
- timestamp: z.string().datetime(),
395
+ timestamp: z.iso.datetime(),
407
396
  txRef: z.string(),
408
397
  });
409
398
  }
@@ -447,7 +436,7 @@ export function SchedulePaymentInputSchema() {
447
436
  export function SetExportedDataInputSchema() {
448
437
  return z.object({
449
438
  exportedLineItems: z.array(z.array(z.string())),
450
- timestamp: z.string().datetime(),
439
+ timestamp: z.iso.datetime(),
451
440
  });
452
441
  }
453
442
  export function SetInvoiceTagInputSchema() {
@@ -1,5 +1,5 @@
1
1
  import type { DocumentModelModule } from "document-model";
2
2
  import type { InvoicePHState } from "@powerhousedao/contributor-billing/document-models/invoice";
3
- /** Document model module for the Todo List document type */
3
+ /** Document model module for the Invoice document type */
4
4
  export declare const Invoice: DocumentModelModule<InvoicePHState>;
5
5
  //# sourceMappingURL=module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../document-models/invoice/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAG1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4DAA4D,CAAC;AAQjG,4DAA4D;AAC5D,eAAO,MAAM,OAAO,EAAE,mBAAmB,CAAC,cAAc,CAMvD,CAAC"}
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../document-models/invoice/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAG1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4DAA4D,CAAC;AAQjG,0DAA0D;AAC1D,eAAO,MAAM,OAAO,EAAE,mBAAmB,CAAC,cAAc,CAMvD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { createState } from "document-model";
2
2
  import { defaultBaseState } from "document-model/core";
3
3
  import { actions, documentModel, reducer, utils, } from "@powerhousedao/contributor-billing/document-models/invoice";
4
- /** Document model module for the Todo List document type */
4
+ /** Document model module for the Invoice document type */
5
5
  export const Invoice = {
6
6
  version: 1,
7
7
  reducer,
@@ -1 +1 @@
1
- {"version":3,"file":"general.d.ts","sourceRoot":"","sources":["../../../../../document-models/invoice/src/reducers/general.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4DAA4D,CAAC;AAgB3G,eAAO,MAAM,wBAAwB,EAAE,wBA2DtC,CAAC"}
1
+ {"version":3,"file":"general.d.ts","sourceRoot":"","sources":["../../../../../document-models/invoice/src/reducers/general.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4DAA4D,CAAC;AAgB3G,eAAO,MAAM,wBAAwB,EAAE,wBAuEtC,CAAC"}
@@ -33,6 +33,14 @@ export const invoiceGeneralOperations = {
33
33
  state = Object.assign(state, newState);
34
34
  },
35
35
  editStatusOperation(state, action) {
36
+ if (state.status === "DRAFT" &&
37
+ action.input.status !== "DRAFT" &&
38
+ action.input.status !== "CANCELLED") {
39
+ const wallet = state.issuer?.paymentRouting?.wallet;
40
+ if (!wallet?.address || (!wallet.chainName && !wallet.chainId)) {
41
+ throw new Error("Issuer wallet address and chain must be set before moving out of DRAFT");
42
+ }
43
+ }
36
44
  state.status = action.input.status;
37
45
  },
38
46
  editPaymentDataOperation(state, action) {
@@ -1 +1 @@
1
- {"version":3,"file":"items.d.ts","sourceRoot":"","sources":["../../../../../document-models/invoice/src/reducers/items.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4DAA4D,CAAC;AAEzG,eAAO,MAAM,sBAAsB,EAAE,sBA6FpC,CAAC"}
1
+ {"version":3,"file":"items.d.ts","sourceRoot":"","sources":["../../../../../document-models/invoice/src/reducers/items.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4DAA4D,CAAC;AAEzG,eAAO,MAAM,sBAAsB,EAAE,sBA8FpC,CAAC"}
@@ -17,7 +17,8 @@ export const invoiceItemsOperations = {
17
17
  const sanitizedInput = Object.fromEntries(Object.entries(action.input).filter(([, value]) => value !== null));
18
18
  // Ensure lineItemTag is always an array if provided
19
19
  if ("lineItemTag" in action.input) {
20
- sanitizedInput.lineItemTag = (action.input.lineItemTag ?? []);
20
+ sanitizedInput.lineItemTag = (action.input.lineItemTag ??
21
+ []);
21
22
  }
22
23
  const nextItem = {
23
24
  ...stateItem,
@@ -1 +1 @@
1
- {"version":3,"file":"parties.d.ts","sourceRoot":"","sources":["../../../../../document-models/invoice/src/reducers/parties.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4DAA4D,CAAC;AAS3G,eAAO,MAAM,wBAAwB,EAAE,wBA6ctC,CAAC"}
1
+ {"version":3,"file":"parties.d.ts","sourceRoot":"","sources":["../../../../../document-models/invoice/src/reducers/parties.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4DAA4D,CAAC;AAS3G,eAAO,MAAM,wBAAwB,EAAE,wBAidtC,CAAC"}
@@ -51,7 +51,9 @@ export const invoicePartiesOperations = {
51
51
  : (state.issuer.country ?? null);
52
52
  }
53
53
  if ("id" in action.input) {
54
- state.issuer.id = action.input.id ? { taxId: action.input.id } : null;
54
+ state.issuer.id = action.input.id
55
+ ? { corpRegId: action.input.id, taxId: null }
56
+ : null;
55
57
  }
56
58
  if ("name" in action.input) {
57
59
  state.issuer.name =
@@ -187,7 +189,9 @@ export const invoicePartiesOperations = {
187
189
  : (state.payer.country ?? null);
188
190
  }
189
191
  if ("id" in action.input) {
190
- state.payer.id = action.input.id ? { taxId: action.input.id } : null;
192
+ state.payer.id = action.input.id
193
+ ? { taxId: action.input.id, corpRegId: null }
194
+ : null;
191
195
  }
192
196
  if ("name" in action.input) {
193
197
  state.payer.name =
@@ -1,8 +1,3 @@
1
- /**
2
- * This is a scaffold file meant for customization:
3
- * - modify it by implementing the reducer functions
4
- * - delete the file and run the code generator again to have it reset
5
- */
6
1
  import type { InvoiceTransitionsOperations } from "@powerhousedao/contributor-billing/document-models/invoice";
7
2
  export declare const invoiceTransitionsOperations: InvoiceTransitionsOperations;
8
3
  //# sourceMappingURL=transitions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transitions.d.ts","sourceRoot":"","sources":["../../../../../document-models/invoice/src/reducers/transitions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,4DAA4D,CAAC;AAgB/G,eAAO,MAAM,4BAA4B,EAAE,4BA+J1C,CAAC"}
1
+ {"version":3,"file":"transitions.d.ts","sourceRoot":"","sources":["../../../../../document-models/invoice/src/reducers/transitions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,4DAA4D,CAAC;AA6B/G,eAAO,MAAM,4BAA4B,EAAE,4BA0K1C,CAAC"}
@@ -1,9 +1,3 @@
1
- /**
2
- * This is a scaffold file meant for customization:
3
- * - modify it by implementing the reducer functions
4
- * - delete the file and run the code generator again to have it reset
5
- */
6
- import { permittedTransitions } from "../../utils/statusTransitions.js";
7
1
  /**
8
2
  * Converts a date string to ISO datetime format if it's not already in that format
9
3
  * Handles both date-only (YYYY-MM-DD) and datetime (YYYY-MM-DDTHH:mm:ss.sssZ) strings
@@ -17,6 +11,18 @@ function ensureDatetimeFormat(dateStr) {
17
11
  // Convert date-only to datetime at midnight UTC
18
12
  return `${dateStr}T00:00:00.000Z`;
19
13
  }
14
+ const permittedTransitions = {
15
+ DRAFT: ["CANCELLED", "ISSUED"],
16
+ CANCELLED: ["DRAFT"],
17
+ ISSUED: ["REJECTED", "ACCEPTED"],
18
+ REJECTED: ["ISSUED"],
19
+ ACCEPTED: ["PAYMENTSCHEDULED", "PAYMENTCLOSED"],
20
+ PAYMENTSCHEDULED: ["PAYMENTSENT", "PAYMENTISSUE", "PAYMENTCLOSED"],
21
+ PAYMENTSENT: ["PAYMENTISSUE", "PAYMENTRECEIVED"],
22
+ PAYMENTISSUE: ["ACCEPTED", "PAYMENTCLOSED"],
23
+ PAYMENTRECEIVED: ["PAYMENTISSUE"],
24
+ PAYMENTCLOSED: ["ACCEPTED"],
25
+ };
20
26
  export const invoiceTransitionsOperations = {
21
27
  cancelOperation(state) {
22
28
  if (permittedTransitions[state.status].includes("CANCELLED")) {
@@ -30,6 +36,13 @@ export const invoiceTransitionsOperations = {
30
36
  if (!action.input.invoiceNo || !action.input.dateIssued) {
31
37
  throw new Error("Invoice number and date issued are required");
32
38
  }
39
+ const wallet = state.issuer?.paymentRouting?.wallet;
40
+ const stablecoins = ["USDS", "DAI", "USDC"];
41
+ const isStablecoin = stablecoins.includes(state.currency.toUpperCase());
42
+ if (isStablecoin &&
43
+ (!wallet?.address || (!wallet.chainName && !wallet.chainId))) {
44
+ throw new Error("Issuer wallet address and chain must be set before issuing an invoice");
45
+ }
33
46
  if (permittedTransitions[state.status].includes("ISSUED")) {
34
47
  state.status = "ISSUED";
35
48
  state.invoiceNo = action.input.invoiceNo;
@@ -1,10 +1,19 @@
1
1
  import { generateMock } from "@powerhousedao/codegen";
2
2
  import { describe, expect, it } from "vitest";
3
- import { reducer, utils, isInvoiceDocument, editInvoice, editStatus, editPaymentData, setExportedData, addPayment, EditInvoiceInputSchema, EditStatusInputSchema, EditPaymentDataInputSchema, SetExportedDataInputSchema, AddPaymentInputSchema, } from "@powerhousedao/contributor-billing/document-models/invoice";
3
+ import { reducer, utils, isInvoiceDocument, editInvoice, editStatus, EditStatusInputSchema, editPaymentData, EditPaymentDataInputSchema, setExportedData, SetExportedDataInputSchema, addPayment, AddPaymentInputSchema, } from "@powerhousedao/contributor-billing/document-models/invoice";
4
4
  describe("GeneralOperations", () => {
5
5
  it("should handle editInvoice operation", () => {
6
6
  const document = utils.createDocument();
7
- const input = generateMock(EditInvoiceInputSchema());
7
+ // Use explicit valid input: generateMock can produce invalid date strings
8
+ // that fail InvoiceStateSchema's z.iso.datetime() validation
9
+ const input = {
10
+ invoiceNo: "INV-001",
11
+ dateIssued: "2024-01-15",
12
+ dateDue: "2024-02-15",
13
+ dateDelivered: "2024-01-20",
14
+ currency: "USD",
15
+ notes: "Test notes",
16
+ };
8
17
  const updatedDocument = reducer(document, editInvoice(input));
9
18
  expect(isInvoiceDocument(updatedDocument)).toBe(true);
10
19
  expect(updatedDocument.operations.global).toHaveLength(1);
@@ -1,6 +1,6 @@
1
1
  import { generateMock } from "@powerhousedao/codegen";
2
2
  import { describe, expect, it } from "vitest";
3
- import { reducer, utils, isInvoiceDocument, addLineItem, editLineItem, deleteLineItem, setLineItemTag, setInvoiceTag, AddLineItemInputSchema, EditLineItemInputSchema, DeleteLineItemInputSchema, SetLineItemTagInputSchema, SetInvoiceTagInputSchema, } from "@powerhousedao/contributor-billing/document-models/invoice";
3
+ import { reducer, utils, isInvoiceDocument, addLineItem, AddLineItemInputSchema, editLineItem, deleteLineItem, setLineItemTag, EditLineItemInputSchema, DeleteLineItemInputSchema, SetLineItemTagInputSchema, setInvoiceTag, SetInvoiceTagInputSchema, } from "@powerhousedao/contributor-billing/document-models/invoice";
4
4
  describe("ItemsOperations", () => {
5
5
  it("should handle addLineItem operation", () => {
6
6
  const document = utils.createDocument();
@@ -1,6 +1,6 @@
1
1
  import { generateMock } from "@powerhousedao/codegen";
2
2
  import { describe, expect, it } from "vitest";
3
- import { reducer, utils, isInvoiceDocument, editIssuer, editIssuerBank, editIssuerWallet, editPayer, editPayerBank, editPayerWallet, EditIssuerInputSchema, EditIssuerBankInputSchema, EditIssuerWalletInputSchema, EditPayerInputSchema, EditPayerBankInputSchema, EditPayerWalletInputSchema, } from "@powerhousedao/contributor-billing/document-models/invoice";
3
+ import { reducer, utils, isInvoiceDocument, editIssuer, EditIssuerInputSchema, editIssuerBank, EditIssuerBankInputSchema, editIssuerWallet, EditIssuerWalletInputSchema, editPayer, EditPayerInputSchema, editPayerBank, editPayerWallet, EditPayerBankInputSchema, EditPayerWalletInputSchema, } from "@powerhousedao/contributor-billing/document-models/invoice";
4
4
  describe("PartiesOperations", () => {
5
5
  it("should handle editIssuer operation", () => {
6
6
  const document = utils.createDocument();
@@ -1,6 +1,6 @@
1
1
  import { generateMock } from "@powerhousedao/codegen";
2
2
  import { describe, expect, it } from "vitest";
3
- import { reducer, utils, isInvoiceDocument, cancel, issue, reset, reject, accept, reinstate, schedulePayment, reapprovePayment, registerPaymentTx, reportPaymentIssue, confirmPayment, closePayment, CancelInputSchema, IssueInputSchema, ResetInputSchema, RejectInputSchema, AcceptInputSchema, ReinstateInputSchema, SchedulePaymentInputSchema, ReapprovePaymentInputSchema, RegisterPaymentTxInputSchema, ReportPaymentIssueInputSchema, ConfirmPaymentInputSchema, ClosePaymentInputSchema, } from "@powerhousedao/contributor-billing/document-models/invoice";
3
+ import { reducer, utils, isInvoiceDocument, cancel, CancelInputSchema, issue, reset, ResetInputSchema, reject, accept, reinstate, RejectInputSchema, AcceptInputSchema, ReinstateInputSchema, schedulePayment, SchedulePaymentInputSchema, reapprovePayment, ReapprovePaymentInputSchema, registerPaymentTx, RegisterPaymentTxInputSchema, reportPaymentIssue, confirmPayment, closePayment, ReportPaymentIssueInputSchema, ConfirmPaymentInputSchema, ClosePaymentInputSchema, } from "@powerhousedao/contributor-billing/document-models/invoice";
4
4
  describe("TransitionsOperations", () => {
5
5
  it("should handle cancel operation", () => {
6
6
  const document = utils.createDocument();
@@ -14,7 +14,12 @@ describe("TransitionsOperations", () => {
14
14
  });
15
15
  it("should handle issue operation", () => {
16
16
  const document = utils.createDocument();
17
- const input = generateMock(IssueInputSchema());
17
+ // Use explicit valid input: generateMock can produce invalid date strings
18
+ // that fail InvoiceStateSchema's z.iso.datetime() validation
19
+ const input = {
20
+ invoiceNo: "INV-001",
21
+ dateIssued: "2024-01-15",
22
+ };
18
23
  const updatedDocument = reducer(document, issue(input));
19
24
  expect(isInvoiceDocument(updatedDocument)).toBe(true);
20
25
  expect(updatedDocument.operations.global).toHaveLength(1);
@@ -1,5 +1,5 @@
1
1
  import type { DocumentModelModule } from "document-model";
2
2
  import type { OperationalHubProfilePHState } from "@powerhousedao/contributor-billing/document-models/operational-hub-profile";
3
- /** Document model module for the Todo List document type */
3
+ /** Document model module for the OperationalHubProfile document type */
4
4
  export declare const OperationalHubProfile: DocumentModelModule<OperationalHubProfilePHState>;
5
5
  //# sourceMappingURL=module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../document-models/operational-hub-profile/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAG1D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,4EAA4E,CAAC;AAQ/H,4DAA4D;AAC5D,eAAO,MAAM,qBAAqB,EAAE,mBAAmB,CAAC,4BAA4B,CAOjF,CAAC"}
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../document-models/operational-hub-profile/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAG1D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,4EAA4E,CAAC;AAQ/H,wEAAwE;AACxE,eAAO,MAAM,qBAAqB,EAAE,mBAAmB,CAAC,4BAA4B,CAOjF,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { createState } from "document-model";
2
2
  import { defaultBaseState } from "document-model/core";
3
3
  import { actions, documentModel, reducer, utils, } from "@powerhousedao/contributor-billing/document-models/operational-hub-profile";
4
- /** Document model module for the Todo List document type */
4
+ /** Document model module for the OperationalHubProfile document type */
5
5
  export const OperationalHubProfile = {
6
6
  version: 1,
7
7
  reducer,
@@ -1 +1 @@
1
- {"version":3,"file":"zod.d.ts","sourceRoot":"","sources":["../../../../../document-models/snapshot-report/gen/schema/zod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,KAAK,EACV,eAAe,EACf,uBAAuB,EACvB,mBAAmB,EACnB,yBAAyB,EACzB,wBAAwB,EACxB,kBAAkB,EAClB,0BAA0B,EAC1B,0BAA0B,EAC1B,sBAAsB,EACtB,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACvB,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,8BAA8B,EAC9B,8BAA8B,EAC/B,MAAM,YAAY,CAAC;AAEpB,KAAK,UAAU,CAAC,CAAC,IAAI,QAAQ,CAAC;KAC3B,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAChC,CAAC,CAAC;AAEH,KAAK,iBAAiB,GAAG,EAAE,CAAC;AAE5B,eAAO,MAAM,mBAAmB,GAAI,GAAG,GAAG,KAAG,CAAC,IAAI,iBACnB,CAAC;AAEhC,eAAO,MAAM,uBAAuB,gGAEI,CAAC;AAEzC,eAAO,MAAM,iBAAiB;;;;;EAK5B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;EAKjC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;EAAgC,CAAC;AAExE,eAAO,MAAM,+BAA+B;;;EAAgC,CAAC;AAE7E,eAAO,MAAM,yBAAyB;;;;;;EAMp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KA;AAED,wBAAgB,yBAAyB,IAAI,CAAC,CAAC,SAAS,CACtD,UAAU,CAAC,mBAAmB,CAAC,CAChC,CAIA;AAED,wBAAgB,0BAA0B,IAAI,CAAC,CAAC,SAAS,CACvD,UAAU,CAAC,oBAAoB,CAAC,CACjC,CAOA;AAED,wBAAgB,6BAA6B,IAAI,CAAC,CAAC,SAAS,CAC1D,UAAU,CAAC,uBAAuB,CAAC,CACpC,CAOA;AAED,wBAAgB,qBAAqB,IAAI,CAAC,CAAC,SAAS,CAClD,UAAU,CAAC,eAAe,CAAC,CAC5B,CAaA;AAED,wBAAgB,yBAAyB,IAAI,CAAC,CAAC,SAAS,CACtD,UAAU,CAAC,mBAAmB,CAAC,CAChC,CAYA;AAED,wBAAgB,yBAAyB,IAAI,CAAC,CAAC,SAAS,CACtD,UAAU,CAAC,mBAAmB,CAAC,CAChC,CAoBA;AAED,wBAAgB,kBAAkB,IAAI,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAO1E;AAED,wBAAgB,oCAAoC,IAAI,CAAC,CAAC,SAAS,CACjE,UAAU,CAAC,8BAA8B,CAAC,CAC3C,CAKA;AAED,wBAAgB,oCAAoC,IAAI,CAAC,CAAC,SAAS,CACjE,UAAU,CAAC,8BAA8B,CAAC,CAC3C,CAKA"}
1
+ {"version":3,"file":"zod.d.ts","sourceRoot":"","sources":["../../../../../document-models/snapshot-report/gen/schema/zod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,KAAK,EAGV,eAAe,EACf,uBAAuB,EACvB,mBAAmB,EACnB,yBAAyB,EACzB,wBAAwB,EACxB,kBAAkB,EAClB,0BAA0B,EAC1B,0BAA0B,EAC1B,sBAAsB,EACtB,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACvB,eAAe,EACf,mBAAmB,EACnB,mBA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AO1E;AAED,wBAAgB,oCAAoC,IAAI,CAAC,CAAC,SAAS,CACjE,UAAU,CAAC,8BAA8B,CAAC,CAC3C,CAKA;AAED,wBAAgB,oCAAoC,IAAI,CAAC,CAAC,SAAS,CACjE,UAAU,CAAC,8BAA8B,CAAC,CAC3C,CAKA"}
@@ -58,7 +58,7 @@ export function AddTransactionInputSchema() {
58
58
  })
59
59
  .nullish(),
60
60
  counterPartyAccountId: z.string().nullish(),
61
- datetime: z.string().datetime(),
61
+ datetime: z.iso.datetime(),
62
62
  direction: TransactionDirectionInputSchema,
63
63
  flowType: TransactionFlowTypeInputSchema.nullish(),
64
64
  id: z.string(),
@@ -114,26 +114,26 @@ export function SetEndingBalanceInputSchema() {
114
114
  }
115
115
  export function SetPeriodEndInputSchema() {
116
116
  return z.object({
117
- periodEnd: z.string().datetime(),
117
+ periodEnd: z.iso.datetime(),
118
118
  });
119
119
  }
120
120
  export function SetPeriodInputSchema() {
121
121
  return z.object({
122
- endDate: z.string().datetime(),
123
- startDate: z.string().datetime(),
122
+ endDate: z.iso.datetime(),
123
+ startDate: z.iso.datetime(),
124
124
  });
125
125
  }
126
126
  export function SetPeriodStartInputSchema() {
127
127
  return z.object({
128
- periodStart: z.string().datetime(),
128
+ periodStart: z.iso.datetime(),
129
129
  });
130
130
  }
131
131
  export function SetReportConfigInputSchema() {
132
132
  return z.object({
133
133
  accountsDocumentId: z.string().nullish(),
134
- endDate: z.string().datetime().nullish(),
134
+ endDate: z.iso.datetime().nullish(),
135
135
  reportName: z.string().nullish(),
136
- startDate: z.string().datetime().nullish(),
136
+ startDate: z.iso.datetime().nullish(),
137
137
  });
138
138
  }
139
139
  export function SetStartingBalanceInputSchema() {
@@ -162,13 +162,13 @@ export function SnapshotReportStateSchema() {
162
162
  return z.object({
163
163
  __typename: z.literal("SnapshotReportState").optional(),
164
164
  accountsDocumentId: z.string().nullish(),
165
- endDate: z.string().datetime().nullish(),
165
+ endDate: z.iso.datetime().nullish(),
166
166
  ownerIds: z.array(z.string()),
167
167
  reportName: z.string().nullish(),
168
- reportPeriodEnd: z.string().datetime().nullish(),
169
- reportPeriodStart: z.string().datetime().nullish(),
168
+ reportPeriodEnd: z.iso.datetime().nullish(),
169
+ reportPeriodStart: z.iso.datetime().nullish(),
170
170
  snapshotAccounts: z.array(z.lazy(() => SnapshotAccountSchema())),
171
- startDate: z.string().datetime().nullish(),
171
+ startDate: z.iso.datetime().nullish(),
172
172
  });
173
173
  }
174
174
  export function SnapshotTransactionSchema() {
@@ -183,7 +183,7 @@ export function SnapshotTransactionSchema() {
183
183
  })
184
184
  .nullish(),
185
185
  counterPartyAccountId: z.string().nullish(),
186
- datetime: z.string().datetime(),
186
+ datetime: z.iso.datetime(),
187
187
  direction: TransactionDirectionSchema,
188
188
  flowType: TransactionFlowTypeSchema.nullish(),
189
189
  id: z.string(),
@@ -1,5 +1,5 @@
1
1
  import type { DocumentModelModule } from "document-model";
2
2
  import type { SnapshotReportPHState } from "@powerhousedao/contributor-billing/document-models/snapshot-report";
3
- /** Document model module for the Todo List document type */
3
+ /** Document model module for the SnapshotReport document type */
4
4
  export declare const SnapshotReport: DocumentModelModule<SnapshotReportPHState>;
5
5
  //# sourceMappingURL=module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../document-models/snapshot-report/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAG1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oEAAoE,CAAC;AAQhH,4DAA4D;AAC5D,eAAO,MAAM,cAAc,EAAE,mBAAmB,CAAC,qBAAqB,CAMrE,CAAC"}
1
+ {"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../document-models/snapshot-report/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAG1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oEAAoE,CAAC;AAQhH,iEAAiE;AACjE,eAAO,MAAM,cAAc,EAAE,mBAAmB,CAAC,qBAAqB,CAMrE,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { createState } from "document-model";
2
2
  import { defaultBaseState } from "document-model/core";
3
3
  import { actions, documentModel, reducer, utils, } from "@powerhousedao/contributor-billing/document-models/snapshot-report";
4
- /** Document model module for the Todo List document type */
4
+ /** Document model module for the SnapshotReport document type */
5
5
  export const SnapshotReport = {
6
6
  version: 1,
7
7
  reducer,
@@ -1 +1 @@
1
- {"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../editors/accounts-editor/editor.tsx"],"names":[],"mappings":"AA0IA,MAAM,CAAC,OAAO,UAAU,MAAM,4CA0kB7B"}
1
+ {"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../editors/accounts-editor/editor.tsx"],"names":[],"mappings":"AAsIA,MAAM,CAAC,OAAO,UAAU,MAAM,4CA8jB7B"}
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  import { useState } from "react";
3
3
  import { Button } from "@powerhousedao/document-engineering";
4
4
  import { ChevronDown, ChevronUp, HelpCircle, Plus, RefreshCw, X, } from "lucide-react";
5
- import { DocumentToolbar, toast, ToastContainer, } from "@powerhousedao/design-system/connect";
5
+ import { DocumentToolbar, toast } from "@powerhousedao/design-system/connect";
6
6
  import { setSelectedNode, useParentFolderForSelectedNode, useSelectedDrive, } from "@powerhousedao/reactor-browser";
7
7
  import { generateId } from "document-model/core";
8
8
  import { useSelectedAccountsDocument } from "../hooks/useAccountsDocument.js";
@@ -213,5 +213,5 @@ export default function Editor() {
213
213
  isOpen: false,
214
214
  accountId: null,
215
215
  accountName: "",
216
- }), className: "px-4 py-2 border border-gray-300 rounded-lg font-medium text-gray-700 hover:bg-gray-50 transition-colors", children: "Cancel" }), _jsx(Button, { onClick: confirmDelete, className: "px-4 py-2 bg-red-600 hover:bg-red-700 text-white rounded-lg font-medium transition-colors", children: "Delete Account" })] })] }) })), syncConfirm && (_jsx("div", { className: "fixed inset-0 bg-black/50 flex items-center justify-center z-50", onClick: () => setSyncConfirm(false), children: _jsxs("div", { className: "bg-white rounded-lg shadow-xl max-w-md w-full mx-4 p-6", onClick: (e) => e.stopPropagation(), role: "dialog", "aria-modal": "true", "aria-labelledby": "sync-modal-title", children: [_jsx("h3", { id: "sync-modal-title", className: "text-lg font-semibold text-gray-900 mb-2", children: "Sync Transactions" }), _jsxs("p", { className: "text-gray-600 mb-6", children: ["This will sync transactions for all ", accounts.length, " account", accounts.length !== 1 ? "s" : "", ". Accounts without transaction documents will have them created automatically."] }), _jsxs("div", { className: "flex justify-end gap-3", children: [_jsx(Button, { onClick: () => setSyncConfirm(false), className: "px-4 py-2 border border-gray-300 rounded-lg font-medium text-gray-700 hover:bg-gray-50 transition-colors", children: "Cancel" }), _jsx(Button, { onClick: () => void handleSyncAllTransactions(), className: "px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg font-medium transition-colors", children: "Sync All" })] })] }) })), _jsx(ToastContainer, { position: "bottom-right", autoClose: 4000, hideProgressBar: false, newestOnTop: false, closeOnClick: true, rtl: false, pauseOnFocusLoss: true, draggable: true, pauseOnHover: true })] }));
216
+ }), className: "px-4 py-2 border border-gray-300 rounded-lg font-medium text-gray-700 hover:bg-gray-50 transition-colors", children: "Cancel" }), _jsx(Button, { onClick: confirmDelete, className: "px-4 py-2 bg-red-600 hover:bg-red-700 text-white rounded-lg font-medium transition-colors", children: "Delete Account" })] })] }) })), syncConfirm && (_jsx("div", { className: "fixed inset-0 bg-black/50 flex items-center justify-center z-50", onClick: () => setSyncConfirm(false), children: _jsxs("div", { className: "bg-white rounded-lg shadow-xl max-w-md w-full mx-4 p-6", onClick: (e) => e.stopPropagation(), role: "dialog", "aria-modal": "true", "aria-labelledby": "sync-modal-title", children: [_jsx("h3", { id: "sync-modal-title", className: "text-lg font-semibold text-gray-900 mb-2", children: "Sync Transactions" }), _jsxs("p", { className: "text-gray-600 mb-6", children: ["This will sync transactions for all ", accounts.length, " account", accounts.length !== 1 ? "s" : "", ". Accounts without transaction documents will have them created automatically."] }), _jsxs("div", { className: "flex justify-end gap-3", children: [_jsx(Button, { onClick: () => setSyncConfirm(false), className: "px-4 py-2 border border-gray-300 rounded-lg font-medium text-gray-700 hover:bg-gray-50 transition-colors", children: "Cancel" }), _jsx(Button, { onClick: () => void handleSyncAllTransactions(), className: "px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg font-medium transition-colors", children: "Sync All" })] })] }) }))] }));
217
217
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DriveExplorer.d.ts","sourceRoot":"","sources":["../../../../editors/builder-team-admin/components/DriveExplorer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAclD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,WAAW,2CAuHtD"}
1
+ {"version":3,"file":"DriveExplorer.d.ts","sourceRoot":"","sources":["../../../../editors/builder-team-admin/components/DriveExplorer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAuClD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,WAAW,2CAqMtD"}