@powerhousedao/contributor-billing 0.1.30 → 0.1.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/document-models/account-transactions/actions.d.ts +20 -0
- package/dist/document-models/account-transactions/actions.d.ts.map +1 -0
- package/dist/document-models/account-transactions/actions.js +9 -0
- package/dist/document-models/account-transactions/gen/account/actions.d.ts +8 -0
- package/dist/document-models/account-transactions/gen/account/actions.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/account/creators.d.ts +4 -0
- package/dist/document-models/account-transactions/gen/account/creators.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/account/creators.js +3 -0
- package/dist/document-models/account-transactions/gen/account/error.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/account/operations.d.ts +7 -0
- package/dist/document-models/account-transactions/gen/account/operations.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/actions.d.ts +8 -0
- package/dist/document-models/account-transactions/gen/actions.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/actions.js +3 -0
- package/dist/document-models/account-transactions/gen/budgets/actions.d.ts +16 -0
- package/dist/document-models/account-transactions/gen/budgets/actions.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/budgets/actions.js +1 -0
- package/dist/document-models/account-transactions/gen/budgets/creators.d.ts +6 -0
- package/dist/document-models/account-transactions/gen/budgets/creators.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/budgets/creators.js +5 -0
- package/dist/document-models/account-transactions/gen/budgets/error.d.ts +2 -0
- package/dist/document-models/account-transactions/gen/budgets/error.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/budgets/error.js +1 -0
- package/dist/document-models/account-transactions/gen/budgets/operations.d.ts +9 -0
- package/dist/document-models/account-transactions/gen/budgets/operations.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/budgets/operations.js +3 -0
- package/dist/document-models/account-transactions/gen/creators.d.ts +7 -0
- package/dist/document-models/account-transactions/gen/creators.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/creators.js +6 -0
- package/dist/document-models/account-transactions/gen/document-model.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/document-model.js +139 -0
- package/dist/document-models/account-transactions/gen/document-schema.d.ts +180 -0
- package/dist/document-models/account-transactions/gen/document-schema.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/document-schema.js +33 -0
- package/dist/document-models/account-transactions/gen/document-type.d.ts +2 -0
- package/dist/document-models/account-transactions/gen/document-type.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/document-type.js +1 -0
- package/dist/document-models/account-transactions/gen/index.d.ts +14 -0
- package/dist/document-models/account-transactions/gen/index.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/index.js +13 -0
- package/dist/document-models/account-transactions/gen/ph-factories.d.ts +23 -0
- package/dist/document-models/account-transactions/gen/ph-factories.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/ph-factories.js +59 -0
- package/dist/document-models/account-transactions/gen/reducer.d.ts +3 -0
- package/dist/document-models/account-transactions/gen/reducer.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/reducer.js +47 -0
- package/dist/document-models/account-transactions/gen/schema/index.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/schema/types.d.ts +230 -0
- package/dist/document-models/account-transactions/gen/schema/types.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/schema/zod.d.ts +25 -0
- package/dist/document-models/account-transactions/gen/schema/zod.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/schema/zod.js +144 -0
- package/dist/document-models/account-transactions/gen/transactions/actions.d.ts +20 -0
- package/dist/document-models/account-transactions/gen/transactions/actions.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/transactions/actions.js +1 -0
- package/dist/document-models/account-transactions/gen/transactions/creators.d.ts +7 -0
- package/dist/document-models/account-transactions/gen/transactions/creators.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/transactions/creators.js +6 -0
- package/dist/document-models/account-transactions/gen/transactions/error.d.ts +2 -0
- package/dist/document-models/account-transactions/gen/transactions/error.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/transactions/error.js +1 -0
- package/dist/document-models/account-transactions/gen/transactions/operations.d.ts +10 -0
- package/dist/document-models/account-transactions/gen/transactions/operations.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/transactions/operations.js +3 -0
- package/dist/document-models/account-transactions/gen/types.d.ts +12 -0
- package/dist/document-models/account-transactions/gen/types.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/utils.d.ts +15 -0
- package/dist/document-models/account-transactions/gen/utils.d.ts.map +1 -0
- package/dist/document-models/account-transactions/gen/utils.js +63 -0
- package/dist/document-models/account-transactions/hooks.d.ts +11 -0
- package/dist/document-models/account-transactions/hooks.d.ts.map +1 -0
- package/dist/document-models/account-transactions/hooks.js +26 -0
- package/dist/document-models/account-transactions/index.d.ts.map +1 -0
- package/dist/document-models/account-transactions/module.d.ts +5 -0
- package/dist/document-models/account-transactions/module.d.ts.map +1 -0
- package/dist/document-models/account-transactions/module.js +10 -0
- package/dist/document-models/account-transactions/src/index.d.ts.map +1 -0
- package/dist/document-models/account-transactions/src/reducers/account.d.ts +3 -0
- package/dist/document-models/account-transactions/src/reducers/account.d.ts.map +1 -0
- package/dist/document-models/account-transactions/src/reducers/account.js +13 -0
- package/dist/document-models/account-transactions/src/reducers/budgets.d.ts +3 -0
- package/dist/document-models/account-transactions/src/reducers/budgets.d.ts.map +1 -0
- package/dist/document-models/account-transactions/src/reducers/budgets.js +20 -0
- package/dist/document-models/account-transactions/src/reducers/transactions.d.ts +3 -0
- package/dist/document-models/account-transactions/src/reducers/transactions.d.ts.map +1 -0
- package/dist/document-models/account-transactions/src/reducers/transactions.js +69 -0
- package/dist/document-models/{integrations/src/tests/integrations.test.d.ts → account-transactions/src/tests/account.test.d.ts} +1 -1
- package/dist/document-models/account-transactions/src/tests/account.test.d.ts.map +1 -0
- package/dist/document-models/account-transactions/src/tests/account.test.js +19 -0
- package/dist/document-models/account-transactions/src/tests/budgets.test.d.ts +6 -0
- package/dist/document-models/account-transactions/src/tests/budgets.test.d.ts.map +1 -0
- package/dist/document-models/account-transactions/src/tests/budgets.test.js +39 -0
- package/dist/document-models/account-transactions/src/tests/document-model.test.d.ts.map +1 -0
- package/dist/document-models/account-transactions/src/tests/document-model.test.js +104 -0
- package/dist/document-models/account-transactions/src/tests/transactions.test.d.ts +6 -0
- package/dist/document-models/account-transactions/src/tests/transactions.test.d.ts.map +1 -0
- package/dist/document-models/account-transactions/src/tests/transactions.test.js +49 -0
- package/dist/document-models/account-transactions/src/utils.d.ts.map +1 -0
- package/dist/document-models/account-transactions/utils.d.ts +14 -0
- package/dist/document-models/account-transactions/utils.d.ts.map +1 -0
- package/dist/document-models/account-transactions/utils.js +7 -0
- package/dist/document-models/{integrations → accounts}/actions.d.ts +5 -4
- package/dist/document-models/accounts/actions.d.ts.map +1 -0
- package/dist/document-models/accounts/actions.js +4 -0
- package/dist/document-models/accounts/gen/accounts/actions.d.ts +20 -0
- package/dist/document-models/accounts/gen/accounts/actions.d.ts.map +1 -0
- package/dist/document-models/accounts/gen/accounts/actions.js +1 -0
- package/dist/document-models/accounts/gen/accounts/creators.d.ts +7 -0
- package/dist/document-models/accounts/gen/accounts/creators.d.ts.map +1 -0
- package/dist/document-models/accounts/gen/accounts/creators.js +6 -0
- package/dist/document-models/accounts/gen/accounts/error.d.ts +2 -0
- package/dist/document-models/accounts/gen/accounts/error.d.ts.map +1 -0
- package/dist/document-models/accounts/gen/accounts/error.js +1 -0
- package/dist/document-models/accounts/gen/accounts/operations.d.ts +10 -0
- package/dist/document-models/accounts/gen/accounts/operations.d.ts.map +1 -0
- package/dist/document-models/accounts/gen/accounts/operations.js +3 -0
- package/dist/document-models/accounts/gen/actions.d.ts +4 -0
- package/dist/document-models/accounts/gen/actions.d.ts.map +1 -0
- package/dist/document-models/accounts/gen/actions.js +1 -0
- package/dist/document-models/accounts/gen/creators.d.ts +3 -0
- package/dist/document-models/accounts/gen/creators.d.ts.map +1 -0
- package/dist/document-models/accounts/gen/creators.js +2 -0
- package/dist/document-models/accounts/gen/document-model.d.ts +3 -0
- package/dist/document-models/accounts/gen/document-model.d.ts.map +1 -0
- package/dist/document-models/accounts/gen/document-model.js +81 -0
- package/dist/document-models/accounts/gen/document-schema.d.ts +142 -0
- package/dist/document-models/accounts/gen/document-schema.d.ts.map +1 -0
- package/dist/document-models/accounts/gen/document-schema.js +33 -0
- package/dist/document-models/accounts/gen/document-type.d.ts +2 -0
- package/dist/document-models/accounts/gen/document-type.d.ts.map +1 -0
- package/dist/document-models/accounts/gen/document-type.js +1 -0
- package/dist/document-models/{integrations → accounts}/gen/index.d.ts +2 -2
- package/dist/document-models/accounts/gen/index.d.ts.map +1 -0
- package/dist/document-models/{integrations → accounts}/gen/index.js +2 -2
- package/dist/document-models/accounts/gen/ph-factories.d.ts +23 -0
- package/dist/document-models/accounts/gen/ph-factories.d.ts.map +1 -0
- package/dist/document-models/{integrations → accounts}/gen/ph-factories.js +3 -5
- package/dist/document-models/accounts/gen/reducer.d.ts +3 -0
- package/dist/document-models/accounts/gen/reducer.d.ts.map +1 -0
- package/dist/document-models/accounts/gen/reducer.js +29 -0
- package/dist/document-models/accounts/gen/schema/index.d.ts +3 -0
- package/dist/document-models/accounts/gen/schema/index.d.ts.map +1 -0
- package/dist/document-models/accounts/gen/schema/index.js +2 -0
- package/dist/document-models/{integrations → accounts}/gen/schema/types.d.ts +41 -53
- package/dist/document-models/accounts/gen/schema/types.d.ts.map +1 -0
- package/dist/document-models/accounts/gen/schema/types.js +1 -0
- package/dist/document-models/accounts/gen/schema/zod.d.ts +20 -0
- package/dist/document-models/accounts/gen/schema/zod.d.ts.map +1 -0
- package/dist/document-models/accounts/gen/schema/zod.js +80 -0
- package/dist/document-models/accounts/gen/types.d.ts +12 -0
- package/dist/document-models/accounts/gen/types.d.ts.map +1 -0
- package/dist/document-models/accounts/gen/types.js +1 -0
- package/dist/document-models/accounts/gen/utils.d.ts +15 -0
- package/dist/document-models/accounts/gen/utils.d.ts.map +1 -0
- package/dist/document-models/{integrations → accounts}/gen/utils.js +8 -10
- package/dist/document-models/accounts/hooks.d.ts +11 -0
- package/dist/document-models/accounts/hooks.d.ts.map +1 -0
- package/dist/document-models/accounts/hooks.js +26 -0
- package/dist/document-models/accounts/index.d.ts +10 -0
- package/dist/document-models/accounts/index.d.ts.map +1 -0
- package/dist/document-models/accounts/index.js +9 -0
- package/dist/document-models/accounts/module.d.ts +5 -0
- package/dist/document-models/accounts/module.d.ts.map +1 -0
- package/dist/document-models/{integrations → accounts}/module.js +2 -2
- package/dist/document-models/accounts/src/index.d.ts +2 -0
- package/dist/document-models/accounts/src/index.d.ts.map +1 -0
- package/dist/document-models/accounts/src/index.js +1 -0
- package/dist/document-models/accounts/src/reducers/accounts.d.ts +3 -0
- package/dist/document-models/accounts/src/reducers/accounts.d.ts.map +1 -0
- package/dist/document-models/accounts/src/reducers/accounts.js +52 -0
- package/dist/document-models/accounts/src/tests/accounts.test.d.ts +6 -0
- package/dist/document-models/accounts/src/tests/accounts.test.d.ts.map +1 -0
- package/dist/document-models/accounts/src/tests/accounts.test.js +19 -0
- package/dist/document-models/accounts/src/tests/document-model.test.d.ts +10 -0
- package/dist/document-models/accounts/src/tests/document-model.test.d.ts.map +1 -0
- package/dist/document-models/{integrations → accounts}/src/tests/document-model.test.js +26 -26
- package/dist/document-models/accounts/src/utils.d.ts +2 -0
- package/dist/document-models/accounts/src/utils.d.ts.map +1 -0
- package/dist/document-models/accounts/src/utils.js +1 -0
- package/dist/document-models/accounts/utils.d.ts +14 -0
- package/dist/document-models/accounts/utils.d.ts.map +1 -0
- package/dist/document-models/{integrations → accounts}/utils.js +1 -1
- package/dist/document-models/billing-statement/gen/document-schema.d.ts +32 -32
- package/dist/document-models/billing-statement/gen/document-schema.d.ts.map +1 -1
- package/dist/document-models/billing-statement/src/reducers/line-items.d.ts.map +1 -1
- package/dist/document-models/billing-statement/src/reducers/line-items.js +0 -1
- package/dist/document-models/document-models.d.ts.map +1 -1
- package/dist/document-models/document-models.js +11 -3
- package/dist/document-models/expense-report/actions.d.ts +2 -0
- package/dist/document-models/expense-report/actions.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/document-model.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/document-model.js +25 -3
- package/dist/document-models/expense-report/gen/document-schema.d.ts +38 -0
- package/dist/document-models/expense-report/gen/document-schema.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/ph-factories.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/ph-factories.js +17 -15
- package/dist/document-models/expense-report/gen/reducer.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/reducer.js +9 -1
- package/dist/document-models/expense-report/gen/schema/types.d.ts +14 -0
- package/dist/document-models/expense-report/gen/schema/types.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/schema/zod.d.ts +5 -1
- package/dist/document-models/expense-report/gen/schema/zod.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/schema/zod.js +22 -0
- package/dist/document-models/expense-report/gen/utils.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/utils.js +17 -15
- package/dist/document-models/expense-report/gen/wallet/actions.d.ts +10 -2
- package/dist/document-models/expense-report/gen/wallet/actions.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/wallet/creators.d.ts +4 -2
- package/dist/document-models/expense-report/gen/wallet/creators.d.ts.map +1 -1
- package/dist/document-models/expense-report/gen/wallet/creators.js +3 -1
- package/dist/document-models/expense-report/gen/wallet/operations.d.ts +3 -1
- package/dist/document-models/expense-report/gen/wallet/operations.d.ts.map +1 -1
- package/dist/document-models/expense-report/src/reducers/wallet.d.ts.map +1 -1
- package/dist/document-models/expense-report/src/reducers/wallet.js +29 -7
- package/dist/document-models/index.d.ts +10 -2
- package/dist/document-models/index.d.ts.map +1 -1
- package/dist/document-models/index.js +10 -2
- package/dist/document-models/invoice/gen/document-schema.d.ts +96 -96
- package/dist/document-models/invoice/gen/document-schema.d.ts.map +1 -1
- package/dist/document-models/service-offering/actions.d.ts +42 -0
- package/dist/document-models/service-offering/actions.d.ts.map +1 -0
- package/dist/document-models/service-offering/actions.js +10 -0
- package/dist/document-models/service-offering/gen/actions.d.ts +10 -0
- package/dist/document-models/service-offering/gen/actions.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/actions.js +4 -0
- package/dist/document-models/service-offering/gen/creators.d.ts +9 -0
- package/dist/document-models/service-offering/gen/creators.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/creators.js +8 -0
- package/dist/document-models/service-offering/gen/document-model.d.ts +3 -0
- package/dist/document-models/service-offering/gen/document-model.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/document-model.js +620 -0
- package/dist/document-models/service-offering/gen/document-schema.d.ts +427 -0
- package/dist/document-models/service-offering/gen/document-schema.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/document-schema.js +33 -0
- package/dist/document-models/service-offering/gen/document-type.d.ts +2 -0
- package/dist/document-models/service-offering/gen/document-type.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/document-type.js +1 -0
- package/dist/document-models/service-offering/gen/index.d.ts +15 -0
- package/dist/document-models/service-offering/gen/index.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/index.js +14 -0
- package/dist/document-models/service-offering/gen/offering-management/actions.d.ts +52 -0
- package/dist/document-models/service-offering/gen/offering-management/actions.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/offering-management/actions.js +1 -0
- package/dist/document-models/service-offering/gen/offering-management/creators.d.ts +15 -0
- package/dist/document-models/service-offering/gen/offering-management/creators.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/offering-management/creators.js +14 -0
- package/dist/document-models/service-offering/gen/offering-management/error.d.ts +35 -0
- package/dist/document-models/service-offering/gen/offering-management/error.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/offering-management/error.js +38 -0
- package/dist/document-models/service-offering/gen/offering-management/operations.d.ts +18 -0
- package/dist/document-models/service-offering/gen/offering-management/operations.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/offering-management/operations.js +3 -0
- package/dist/document-models/service-offering/gen/option-group-management/actions.d.ts +16 -0
- package/dist/document-models/service-offering/gen/option-group-management/actions.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/option-group-management/actions.js +1 -0
- package/dist/document-models/service-offering/gen/option-group-management/creators.d.ts +6 -0
- package/dist/document-models/service-offering/gen/option-group-management/creators.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/option-group-management/creators.js +5 -0
- package/dist/document-models/service-offering/gen/option-group-management/error.d.ts +28 -0
- package/dist/document-models/service-offering/gen/option-group-management/error.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/option-group-management/error.js +29 -0
- package/dist/document-models/service-offering/gen/option-group-management/operations.d.ts +9 -0
- package/dist/document-models/service-offering/gen/option-group-management/operations.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/option-group-management/operations.js +3 -0
- package/dist/document-models/service-offering/gen/ph-factories.d.ts +23 -0
- package/dist/document-models/service-offering/gen/ph-factories.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/ph-factories.js +62 -0
- package/dist/document-models/service-offering/gen/reducer.d.ts +3 -0
- package/dist/document-models/service-offering/gen/reducer.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/reducer.js +136 -0
- package/dist/document-models/service-offering/gen/schema/index.d.ts +3 -0
- package/dist/document-models/service-offering/gen/schema/index.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/schema/index.js +2 -0
- package/dist/document-models/service-offering/gen/schema/types.d.ts +424 -0
- package/dist/document-models/service-offering/gen/schema/types.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/schema/types.js +1 -0
- package/dist/document-models/service-offering/gen/schema/zod.d.ts +54 -0
- package/dist/document-models/service-offering/gen/schema/zod.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/schema/zod.js +408 -0
- package/dist/document-models/service-offering/gen/service-management/actions.d.ts +24 -0
- package/dist/document-models/service-offering/gen/service-management/actions.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/service-management/actions.js +1 -0
- package/dist/document-models/service-offering/gen/service-management/creators.d.ts +8 -0
- package/dist/document-models/service-offering/gen/service-management/creators.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/service-management/creators.js +7 -0
- package/dist/document-models/service-offering/gen/service-management/error.d.ts +52 -0
- package/dist/document-models/service-offering/gen/service-management/error.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/service-management/error.js +61 -0
- package/dist/document-models/service-offering/gen/service-management/operations.d.ts +11 -0
- package/dist/document-models/service-offering/gen/service-management/operations.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/service-management/operations.js +3 -0
- package/dist/document-models/service-offering/gen/tier-management/actions.d.ts +44 -0
- package/dist/document-models/service-offering/gen/tier-management/actions.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/tier-management/actions.js +1 -0
- package/dist/document-models/service-offering/gen/tier-management/creators.d.ts +13 -0
- package/dist/document-models/service-offering/gen/tier-management/creators.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/tier-management/creators.js +12 -0
- package/dist/document-models/service-offering/gen/tier-management/error.d.ts +107 -0
- package/dist/document-models/service-offering/gen/tier-management/error.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/tier-management/error.js +134 -0
- package/dist/document-models/service-offering/gen/tier-management/operations.d.ts +16 -0
- package/dist/document-models/service-offering/gen/tier-management/operations.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/tier-management/operations.js +3 -0
- package/dist/document-models/service-offering/gen/types.d.ts +12 -0
- package/dist/document-models/service-offering/gen/types.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/types.js +1 -0
- package/dist/document-models/service-offering/gen/utils.d.ts +15 -0
- package/dist/document-models/service-offering/gen/utils.d.ts.map +1 -0
- package/dist/document-models/service-offering/gen/utils.js +66 -0
- package/dist/document-models/service-offering/hooks.d.ts +11 -0
- package/dist/document-models/service-offering/hooks.d.ts.map +1 -0
- package/dist/document-models/service-offering/hooks.js +26 -0
- package/dist/document-models/service-offering/index.d.ts +10 -0
- package/dist/document-models/service-offering/index.d.ts.map +1 -0
- package/dist/document-models/service-offering/index.js +9 -0
- package/dist/document-models/service-offering/module.d.ts +5 -0
- package/dist/document-models/service-offering/module.d.ts.map +1 -0
- package/dist/document-models/service-offering/module.js +10 -0
- package/dist/document-models/service-offering/src/index.d.ts +2 -0
- package/dist/document-models/service-offering/src/index.d.ts.map +1 -0
- package/dist/document-models/service-offering/src/index.js +1 -0
- package/dist/document-models/service-offering/src/reducers/offering-management.d.ts +3 -0
- package/dist/document-models/service-offering/src/reducers/offering-management.d.ts.map +1 -0
- package/dist/document-models/service-offering/src/reducers/offering-management.js +100 -0
- package/dist/document-models/service-offering/src/reducers/option-group-management.d.ts +3 -0
- package/dist/document-models/service-offering/src/reducers/option-group-management.d.ts.map +1 -0
- package/dist/document-models/service-offering/src/reducers/option-group-management.js +47 -0
- package/dist/document-models/service-offering/src/reducers/service-management.d.ts +3 -0
- package/dist/document-models/service-offering/src/reducers/service-management.d.ts.map +1 -0
- package/dist/document-models/service-offering/src/reducers/service-management.js +74 -0
- package/dist/document-models/service-offering/src/reducers/tier-management.d.ts +3 -0
- package/dist/document-models/service-offering/src/reducers/tier-management.d.ts.map +1 -0
- package/dist/document-models/service-offering/src/reducers/tier-management.js +159 -0
- package/dist/document-models/service-offering/src/tests/document-model.test.d.ts +10 -0
- package/dist/document-models/service-offering/src/tests/document-model.test.d.ts.map +1 -0
- package/dist/document-models/service-offering/src/tests/document-model.test.js +104 -0
- package/dist/document-models/service-offering/src/tests/offering-management.test.d.ts +6 -0
- package/dist/document-models/service-offering/src/tests/offering-management.test.d.ts.map +1 -0
- package/dist/document-models/service-offering/src/tests/offering-management.test.js +129 -0
- package/dist/document-models/service-offering/src/tests/option-group-management.test.d.ts +6 -0
- package/dist/document-models/service-offering/src/tests/option-group-management.test.d.ts.map +1 -0
- package/dist/document-models/service-offering/src/tests/option-group-management.test.js +39 -0
- package/dist/document-models/service-offering/src/tests/service-management.test.d.ts +6 -0
- package/dist/document-models/service-offering/src/tests/service-management.test.d.ts.map +1 -0
- package/dist/document-models/service-offering/src/tests/service-management.test.js +59 -0
- package/dist/document-models/service-offering/src/tests/tier-management.test.d.ts +2 -0
- package/dist/document-models/service-offering/src/tests/tier-management.test.d.ts.map +1 -0
- package/dist/document-models/service-offering/src/tests/tier-management.test.js +1 -0
- package/dist/document-models/service-offering/src/utils.d.ts +2 -0
- package/dist/document-models/service-offering/src/utils.d.ts.map +1 -0
- package/dist/document-models/service-offering/src/utils.js +1 -0
- package/dist/document-models/service-offering/utils.d.ts +14 -0
- package/dist/document-models/service-offering/utils.d.ts.map +1 -0
- package/dist/document-models/service-offering/utils.js +7 -0
- package/dist/document-models/service-subscriptions/actions.d.ts +25 -0
- package/dist/document-models/service-subscriptions/actions.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/actions.js +9 -0
- package/dist/document-models/service-subscriptions/gen/actions.d.ts +8 -0
- package/dist/document-models/service-subscriptions/gen/actions.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/actions.js +3 -0
- package/dist/document-models/service-subscriptions/gen/categories/actions.d.ts +16 -0
- package/dist/document-models/service-subscriptions/gen/categories/actions.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/categories/actions.js +1 -0
- package/dist/document-models/service-subscriptions/gen/categories/creators.d.ts +6 -0
- package/dist/document-models/service-subscriptions/gen/categories/creators.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/categories/creators.js +5 -0
- package/dist/document-models/service-subscriptions/gen/categories/error.d.ts +2 -0
- package/dist/document-models/service-subscriptions/gen/categories/error.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/categories/error.js +1 -0
- package/dist/document-models/service-subscriptions/gen/categories/operations.d.ts +9 -0
- package/dist/document-models/service-subscriptions/gen/categories/operations.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/categories/operations.js +3 -0
- package/dist/document-models/service-subscriptions/gen/creators.d.ts +7 -0
- package/dist/document-models/service-subscriptions/gen/creators.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/creators.js +6 -0
- package/dist/document-models/service-subscriptions/gen/document-model.d.ts +3 -0
- package/dist/document-models/service-subscriptions/gen/document-model.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/document-model.js +194 -0
- package/dist/document-models/service-subscriptions/gen/document-schema.d.ts +180 -0
- package/dist/document-models/service-subscriptions/gen/document-schema.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/document-schema.js +33 -0
- package/dist/document-models/service-subscriptions/gen/document-type.d.ts +2 -0
- package/dist/document-models/service-subscriptions/gen/document-type.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/document-type.js +1 -0
- package/dist/document-models/service-subscriptions/gen/index.d.ts +14 -0
- package/dist/document-models/service-subscriptions/gen/index.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/index.js +13 -0
- package/dist/document-models/service-subscriptions/gen/ph-factories.d.ts +23 -0
- package/dist/document-models/service-subscriptions/gen/ph-factories.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/ph-factories.js +45 -0
- package/dist/document-models/service-subscriptions/gen/reducer.d.ts +3 -0
- package/dist/document-models/service-subscriptions/gen/reducer.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/reducer.js +67 -0
- package/dist/document-models/service-subscriptions/gen/schema/index.d.ts +3 -0
- package/dist/document-models/service-subscriptions/gen/schema/index.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/schema/index.js +2 -0
- package/dist/document-models/service-subscriptions/gen/schema/types.d.ts +274 -0
- package/dist/document-models/service-subscriptions/gen/schema/types.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/schema/types.js +1 -0
- package/dist/document-models/service-subscriptions/gen/schema/zod.d.ts +31 -0
- package/dist/document-models/service-subscriptions/gen/schema/zod.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/schema/zod.js +199 -0
- package/dist/document-models/service-subscriptions/gen/subscriptions/actions.d.ts +32 -0
- package/dist/document-models/service-subscriptions/gen/subscriptions/actions.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/subscriptions/actions.js +1 -0
- package/dist/document-models/service-subscriptions/gen/subscriptions/creators.d.ts +10 -0
- package/dist/document-models/service-subscriptions/gen/subscriptions/creators.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/subscriptions/creators.js +9 -0
- package/dist/document-models/service-subscriptions/gen/subscriptions/error.d.ts +2 -0
- package/dist/document-models/service-subscriptions/gen/subscriptions/error.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/subscriptions/error.js +1 -0
- package/dist/document-models/service-subscriptions/gen/subscriptions/operations.d.ts +13 -0
- package/dist/document-models/service-subscriptions/gen/subscriptions/operations.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/subscriptions/operations.js +3 -0
- package/dist/document-models/service-subscriptions/gen/types.d.ts +12 -0
- package/dist/document-models/service-subscriptions/gen/types.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/types.js +1 -0
- package/dist/document-models/service-subscriptions/gen/utils.d.ts +15 -0
- package/dist/document-models/service-subscriptions/gen/utils.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/utils.js +53 -0
- package/dist/document-models/service-subscriptions/gen/vendors/actions.d.ts +16 -0
- package/dist/document-models/service-subscriptions/gen/vendors/actions.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/vendors/actions.js +1 -0
- package/dist/document-models/service-subscriptions/gen/vendors/creators.d.ts +6 -0
- package/dist/document-models/service-subscriptions/gen/vendors/creators.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/vendors/creators.js +5 -0
- package/dist/document-models/service-subscriptions/gen/vendors/error.d.ts +2 -0
- package/dist/document-models/service-subscriptions/gen/vendors/error.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/vendors/error.js +1 -0
- package/dist/document-models/service-subscriptions/gen/vendors/operations.d.ts +9 -0
- package/dist/document-models/service-subscriptions/gen/vendors/operations.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/gen/vendors/operations.js +3 -0
- package/dist/document-models/service-subscriptions/hooks.d.ts +11 -0
- package/dist/document-models/service-subscriptions/hooks.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/hooks.js +26 -0
- package/dist/document-models/service-subscriptions/index.d.ts +10 -0
- package/dist/document-models/service-subscriptions/index.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/index.js +9 -0
- package/dist/document-models/service-subscriptions/module.d.ts +5 -0
- package/dist/document-models/service-subscriptions/module.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/module.js +10 -0
- package/dist/document-models/service-subscriptions/src/index.d.ts +2 -0
- package/dist/document-models/service-subscriptions/src/index.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/src/index.js +1 -0
- package/dist/document-models/service-subscriptions/src/reducers/categories.d.ts +3 -0
- package/dist/document-models/service-subscriptions/src/reducers/categories.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/src/reducers/categories.js +24 -0
- package/dist/document-models/service-subscriptions/src/reducers/subscriptions.d.ts +3 -0
- package/dist/document-models/service-subscriptions/src/reducers/subscriptions.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/src/reducers/subscriptions.js +114 -0
- package/dist/document-models/service-subscriptions/src/reducers/vendors.d.ts +3 -0
- package/dist/document-models/service-subscriptions/src/reducers/vendors.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/src/reducers/vendors.js +30 -0
- package/dist/document-models/service-subscriptions/src/tests/categories.test.d.ts +6 -0
- package/dist/document-models/service-subscriptions/src/tests/categories.test.d.ts.map +1 -0
- package/dist/document-models/{integrations/src/tests/integrations.test.js → service-subscriptions/src/tests/categories.test.js} +17 -17
- package/dist/document-models/service-subscriptions/src/tests/document-model.test.d.ts +10 -0
- package/dist/document-models/service-subscriptions/src/tests/document-model.test.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/src/tests/document-model.test.js +104 -0
- package/dist/document-models/service-subscriptions/src/tests/subscriptions.test.d.ts +6 -0
- package/dist/document-models/service-subscriptions/src/tests/subscriptions.test.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/src/tests/subscriptions.test.js +79 -0
- package/dist/document-models/service-subscriptions/src/tests/vendors.test.d.ts +6 -0
- package/dist/document-models/service-subscriptions/src/tests/vendors.test.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/src/tests/vendors.test.js +39 -0
- package/dist/document-models/service-subscriptions/src/utils.d.ts +2 -0
- package/dist/document-models/service-subscriptions/src/utils.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/src/utils.js +1 -0
- package/dist/document-models/service-subscriptions/utils.d.ts +14 -0
- package/dist/document-models/service-subscriptions/utils.d.ts.map +1 -0
- package/dist/document-models/service-subscriptions/utils.js +7 -0
- package/dist/document-models/snapshot-report/actions.d.ts +29 -0
- package/dist/document-models/snapshot-report/actions.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/actions.js +10 -0
- package/dist/document-models/snapshot-report/gen/accounts/actions.d.ts +16 -0
- package/dist/document-models/snapshot-report/gen/accounts/actions.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/accounts/actions.js +1 -0
- package/dist/document-models/snapshot-report/gen/accounts/creators.d.ts +6 -0
- package/dist/document-models/snapshot-report/gen/accounts/creators.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/accounts/creators.js +5 -0
- package/dist/document-models/snapshot-report/gen/accounts/error.d.ts +28 -0
- package/dist/document-models/snapshot-report/gen/accounts/error.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/accounts/error.js +29 -0
- package/dist/document-models/snapshot-report/gen/accounts/operations.d.ts +9 -0
- package/dist/document-models/snapshot-report/gen/accounts/operations.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/accounts/operations.js +3 -0
- package/dist/document-models/snapshot-report/gen/actions.d.ts +10 -0
- package/dist/document-models/snapshot-report/gen/actions.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/actions.js +4 -0
- package/dist/document-models/snapshot-report/gen/balances/actions.d.ts +20 -0
- package/dist/document-models/snapshot-report/gen/balances/actions.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/balances/actions.js +1 -0
- package/dist/document-models/snapshot-report/gen/balances/creators.d.ts +7 -0
- package/dist/document-models/snapshot-report/gen/balances/creators.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/balances/creators.js +6 -0
- package/dist/document-models/snapshot-report/gen/balances/error.d.ts +35 -0
- package/dist/document-models/snapshot-report/gen/balances/error.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/balances/error.js +38 -0
- package/dist/document-models/snapshot-report/gen/balances/operations.d.ts +10 -0
- package/dist/document-models/snapshot-report/gen/balances/operations.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/balances/operations.js +3 -0
- package/dist/document-models/snapshot-report/gen/configuration/actions.d.ts +28 -0
- package/dist/document-models/snapshot-report/gen/configuration/actions.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/configuration/actions.js +1 -0
- package/dist/document-models/snapshot-report/gen/configuration/creators.d.ts +9 -0
- package/dist/document-models/snapshot-report/gen/configuration/creators.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/configuration/creators.js +8 -0
- package/dist/document-models/snapshot-report/gen/configuration/error.d.ts +2 -0
- package/dist/document-models/snapshot-report/gen/configuration/error.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/configuration/error.js +1 -0
- package/dist/document-models/snapshot-report/gen/configuration/operations.d.ts +12 -0
- package/dist/document-models/snapshot-report/gen/configuration/operations.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/configuration/operations.js +3 -0
- package/dist/document-models/snapshot-report/gen/creators.d.ts +9 -0
- package/dist/document-models/snapshot-report/gen/creators.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/creators.js +8 -0
- package/dist/document-models/snapshot-report/gen/document-model.d.ts +3 -0
- package/dist/document-models/snapshot-report/gen/document-model.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/document-model.js +332 -0
- package/dist/document-models/snapshot-report/gen/document-schema.d.ts +275 -0
- package/dist/document-models/snapshot-report/gen/document-schema.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/document-schema.js +33 -0
- package/dist/document-models/snapshot-report/gen/document-type.d.ts +2 -0
- package/dist/document-models/snapshot-report/gen/document-type.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/document-type.js +1 -0
- package/dist/document-models/snapshot-report/gen/index.d.ts +15 -0
- package/dist/document-models/snapshot-report/gen/index.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/index.js +14 -0
- package/dist/document-models/snapshot-report/gen/ph-factories.d.ts +23 -0
- package/dist/document-models/snapshot-report/gen/ph-factories.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/ph-factories.js +54 -0
- package/dist/document-models/snapshot-report/gen/reducer.d.ts +3 -0
- package/dist/document-models/snapshot-report/gen/reducer.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/reducer.js +84 -0
- package/dist/document-models/snapshot-report/gen/schema/index.d.ts +3 -0
- package/dist/document-models/snapshot-report/gen/schema/index.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/schema/index.js +2 -0
- package/dist/document-models/snapshot-report/gen/schema/types.d.ts +264 -0
- package/dist/document-models/snapshot-report/gen/schema/types.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/schema/types.js +1 -0
- package/dist/document-models/snapshot-report/gen/schema/zod.d.ts +37 -0
- package/dist/document-models/snapshot-report/gen/schema/zod.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/schema/zod.js +208 -0
- package/dist/document-models/snapshot-report/gen/transactions/actions.d.ts +20 -0
- package/dist/document-models/snapshot-report/gen/transactions/actions.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/transactions/actions.js +1 -0
- package/dist/document-models/snapshot-report/gen/transactions/creators.d.ts +7 -0
- package/dist/document-models/snapshot-report/gen/transactions/creators.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/transactions/creators.js +6 -0
- package/dist/document-models/snapshot-report/gen/transactions/error.d.ts +33 -0
- package/dist/document-models/snapshot-report/gen/transactions/error.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/transactions/error.js +36 -0
- package/dist/document-models/snapshot-report/gen/transactions/operations.d.ts +10 -0
- package/dist/document-models/snapshot-report/gen/transactions/operations.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/transactions/operations.js +3 -0
- package/dist/document-models/snapshot-report/gen/types.d.ts +12 -0
- package/dist/document-models/snapshot-report/gen/types.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/types.js +1 -0
- package/dist/document-models/snapshot-report/gen/utils.d.ts +15 -0
- package/dist/document-models/snapshot-report/gen/utils.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/gen/utils.js +58 -0
- package/dist/document-models/snapshot-report/hooks.d.ts +11 -0
- package/dist/document-models/snapshot-report/hooks.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/hooks.js +26 -0
- package/dist/document-models/snapshot-report/index.d.ts +10 -0
- package/dist/document-models/snapshot-report/index.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/index.js +9 -0
- package/dist/document-models/snapshot-report/module.d.ts +5 -0
- package/dist/document-models/snapshot-report/module.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/module.js +10 -0
- package/dist/document-models/snapshot-report/src/index.d.ts +2 -0
- package/dist/document-models/snapshot-report/src/index.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/src/index.js +1 -0
- package/dist/document-models/snapshot-report/src/reducers/accounts.d.ts +3 -0
- package/dist/document-models/snapshot-report/src/reducers/accounts.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/src/reducers/accounts.js +34 -0
- package/dist/document-models/snapshot-report/src/reducers/balances.d.ts +3 -0
- package/dist/document-models/snapshot-report/src/reducers/balances.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/src/reducers/balances.js +60 -0
- package/dist/document-models/snapshot-report/src/reducers/configuration.d.ts +3 -0
- package/dist/document-models/snapshot-report/src/reducers/configuration.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/src/reducers/configuration.js +35 -0
- package/dist/document-models/snapshot-report/src/reducers/transactions.d.ts +3 -0
- package/dist/document-models/snapshot-report/src/reducers/transactions.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/src/reducers/transactions.js +99 -0
- package/dist/document-models/snapshot-report/src/tests/accounts.test.d.ts +6 -0
- package/dist/document-models/snapshot-report/src/tests/accounts.test.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/src/tests/accounts.test.js +39 -0
- package/dist/document-models/snapshot-report/src/tests/balances.test.d.ts +6 -0
- package/dist/document-models/snapshot-report/src/tests/balances.test.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/src/tests/balances.test.js +49 -0
- package/dist/document-models/snapshot-report/src/tests/configuration.test.d.ts +6 -0
- package/dist/document-models/snapshot-report/src/tests/configuration.test.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/src/tests/configuration.test.js +39 -0
- package/dist/document-models/snapshot-report/src/tests/document-model.test.d.ts +10 -0
- package/dist/document-models/snapshot-report/src/tests/document-model.test.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/src/tests/document-model.test.js +104 -0
- package/dist/document-models/snapshot-report/src/tests/transactions.test.d.ts +6 -0
- package/dist/document-models/snapshot-report/src/tests/transactions.test.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/src/tests/transactions.test.js +39 -0
- package/dist/document-models/snapshot-report/src/utils.d.ts +2 -0
- package/dist/document-models/snapshot-report/src/utils.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/src/utils.js +1 -0
- package/dist/document-models/snapshot-report/utils.d.ts +14 -0
- package/dist/document-models/snapshot-report/utils.d.ts.map +1 -0
- package/dist/document-models/snapshot-report/utils.js +7 -0
- package/dist/editors/account-transactions-editor/alchemyIntegration.d.ts +55 -0
- package/dist/editors/account-transactions-editor/alchemyIntegration.d.ts.map +1 -0
- package/dist/editors/account-transactions-editor/alchemyIntegration.js +136 -0
- package/dist/editors/account-transactions-editor/components/AccountSection.d.ts +9 -0
- package/dist/editors/account-transactions-editor/components/AccountSection.d.ts.map +1 -0
- package/dist/editors/account-transactions-editor/components/AccountSection.js +18 -0
- package/dist/editors/account-transactions-editor/components/DocumentHeader.d.ts +8 -0
- package/dist/editors/account-transactions-editor/components/DocumentHeader.d.ts.map +1 -0
- package/dist/editors/account-transactions-editor/components/DocumentHeader.js +13 -0
- package/dist/editors/account-transactions-editor/components/TransactionForm.d.ts +10 -0
- package/dist/editors/account-transactions-editor/components/TransactionForm.d.ts.map +1 -0
- package/dist/editors/account-transactions-editor/components/TransactionForm.js +70 -0
- package/dist/editors/account-transactions-editor/components/TransactionsTable.d.ts +9 -0
- package/dist/editors/account-transactions-editor/components/TransactionsTable.d.ts.map +1 -0
- package/dist/editors/account-transactions-editor/components/TransactionsTable.js +56 -0
- package/dist/editors/account-transactions-editor/editor.d.ts +3 -0
- package/dist/editors/account-transactions-editor/editor.d.ts.map +1 -0
- package/dist/editors/account-transactions-editor/editor.js +212 -0
- package/dist/editors/account-transactions-editor/index.d.ts +3 -0
- package/dist/editors/account-transactions-editor/index.d.ts.map +1 -0
- package/dist/editors/account-transactions-editor/index.js +9 -0
- package/dist/editors/account-transactions-editor/module.d.ts +3 -0
- package/dist/editors/account-transactions-editor/module.d.ts.map +1 -0
- package/dist/editors/account-transactions-editor/module.js +9 -0
- package/dist/editors/accounts-editor/components/AccountCard.d.ts +12 -0
- package/dist/editors/accounts-editor/components/AccountCard.d.ts.map +1 -0
- package/dist/editors/accounts-editor/components/AccountCard.js +23 -0
- package/dist/editors/accounts-editor/components/AccountForm.d.ts +19 -0
- package/dist/editors/accounts-editor/components/AccountForm.d.ts.map +1 -0
- package/dist/editors/accounts-editor/components/AccountForm.js +66 -0
- package/dist/editors/accounts-editor/components/AccountsFilter.d.ts +8 -0
- package/dist/editors/accounts-editor/components/AccountsFilter.d.ts.map +1 -0
- package/dist/editors/accounts-editor/components/AccountsFilter.js +34 -0
- package/dist/editors/accounts-editor/components/AccountsList.d.ts +12 -0
- package/dist/editors/accounts-editor/components/AccountsList.d.ts.map +1 -0
- package/dist/editors/accounts-editor/components/AccountsList.js +8 -0
- package/dist/editors/accounts-editor/components/DocumentHeader.d.ts +15 -0
- package/dist/editors/accounts-editor/components/DocumentHeader.d.ts.map +1 -0
- package/dist/editors/accounts-editor/components/DocumentHeader.js +23 -0
- package/dist/editors/accounts-editor/components/KYCStatusBadge.d.ts +7 -0
- package/dist/editors/accounts-editor/components/KYCStatusBadge.d.ts.map +1 -0
- package/dist/editors/accounts-editor/components/KYCStatusBadge.js +17 -0
- package/dist/editors/accounts-editor/editor.d.ts +3 -0
- package/dist/editors/accounts-editor/editor.d.ts.map +1 -0
- package/dist/editors/accounts-editor/editor.js +159 -0
- package/dist/editors/accounts-editor/index.d.ts +3 -0
- package/dist/editors/accounts-editor/index.d.ts.map +1 -0
- package/dist/editors/accounts-editor/index.js +9 -0
- package/dist/editors/accounts-editor/module.d.ts +3 -0
- package/dist/editors/accounts-editor/module.d.ts.map +1 -0
- package/dist/editors/accounts-editor/module.js +9 -0
- package/dist/editors/accounts-editor/services/accountTransactionsService.d.ts +29 -0
- package/dist/editors/accounts-editor/services/accountTransactionsService.d.ts.map +1 -0
- package/dist/editors/accounts-editor/services/accountTransactionsService.js +252 -0
- package/dist/editors/builder-team-admin/components/CreateDocument.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/DriveContents.d.ts +6 -0
- package/dist/editors/builder-team-admin/components/DriveContents.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/DriveContents.js +36 -0
- package/dist/editors/builder-team-admin/components/DriveExplorer.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/DriveExplorer.js +49 -0
- package/dist/editors/builder-team-admin/components/EmptyState.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/ExpenseReportsStats.d.ts +11 -0
- package/dist/editors/builder-team-admin/components/ExpenseReportsStats.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/ExpenseReportsStats.js +137 -0
- package/dist/editors/builder-team-admin/components/Files.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/FolderTree.d.ts +14 -0
- package/dist/editors/builder-team-admin/components/FolderTree.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/FolderTree.js +307 -0
- package/dist/editors/builder-team-admin/components/Folders.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/NavigationBreadcrumbs.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/expense-reports.d.ts +2 -0
- package/dist/editors/builder-team-admin/components/expense-reports.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/expense-reports.js +118 -0
- package/dist/editors/builder-team-admin/components/overview/ProfileHeader.d.ts +10 -0
- package/dist/editors/builder-team-admin/components/overview/ProfileHeader.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/overview/ProfileHeader.js +24 -0
- package/dist/editors/builder-team-admin/components/overview/SubscriptionsStats.d.ts +15 -0
- package/dist/editors/builder-team-admin/components/overview/SubscriptionsStats.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/overview/SubscriptionsStats.js +61 -0
- package/dist/editors/builder-team-admin/components/overview/TeamMembersOverview.d.ts +10 -0
- package/dist/editors/builder-team-admin/components/overview/TeamMembersOverview.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/overview/TeamMembersOverview.js +121 -0
- package/dist/editors/builder-team-admin/components/snapshot-reports.d.ts +2 -0
- package/dist/editors/builder-team-admin/components/snapshot-reports.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/snapshot-reports.js +116 -0
- package/dist/editors/builder-team-admin/components/team-members.d.ts +2 -0
- package/dist/editors/builder-team-admin/components/team-members.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/components/team-members.js +309 -0
- package/dist/editors/{clean-new-editor → builder-team-admin}/config.d.ts +1 -1
- package/dist/editors/builder-team-admin/config.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/config.js +8 -0
- package/dist/editors/{clean-new-editor → builder-team-admin}/editor.d.ts +1 -1
- package/dist/editors/builder-team-admin/editor.d.ts.map +1 -0
- package/dist/editors/{clean-new-editor → builder-team-admin}/editor.js +1 -1
- package/dist/editors/builder-team-admin/hooks/useExpenseReportAutoPlacement.d.ts +25 -0
- package/dist/editors/builder-team-admin/hooks/useExpenseReportAutoPlacement.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/hooks/useExpenseReportAutoPlacement.js +180 -0
- package/dist/editors/builder-team-admin/hooks/useRemoteBuilderProfiles.d.ts +20 -0
- package/dist/editors/builder-team-admin/hooks/useRemoteBuilderProfiles.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/hooks/useRemoteBuilderProfiles.js +57 -0
- package/dist/editors/builder-team-admin/hooks/useSnapshotReportAutoPlacement.d.ts +25 -0
- package/dist/editors/builder-team-admin/hooks/useSnapshotReportAutoPlacement.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/hooks/useSnapshotReportAutoPlacement.js +180 -0
- package/dist/editors/builder-team-admin/module.d.ts +3 -0
- package/dist/editors/builder-team-admin/module.d.ts.map +1 -0
- package/dist/editors/{clean-new-editor → builder-team-admin}/module.js +3 -3
- package/dist/editors/builder-team-admin/utils/graphql-client.d.ts +41 -0
- package/dist/editors/builder-team-admin/utils/graphql-client.d.ts.map +1 -0
- package/dist/editors/builder-team-admin/utils/graphql-client.js +189 -0
- package/dist/editors/contributor-billing/components/DriveContents.d.ts.map +1 -1
- package/dist/editors/contributor-billing/components/DriveContents.js +5 -1
- package/dist/editors/contributor-billing/components/DriveExplorer.d.ts.map +1 -1
- package/dist/editors/contributor-billing/components/DriveExplorer.js +7 -7
- package/dist/editors/contributor-billing/components/FolderTree.d.ts +12 -3
- package/dist/editors/contributor-billing/components/FolderTree.d.ts.map +1 -1
- package/dist/editors/contributor-billing/components/FolderTree.js +146 -56
- package/dist/editors/contributor-billing/components/InvoiceTable/ConfirmationModal.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/HeaderControls.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/HeaderStats.d.ts.map +1 -0
- package/dist/{old-contributor-billing → editors/contributor-billing}/components/InvoiceTable/HeaderStats.js +10 -9
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTable.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/{InvoiceTable.js → InvoiceTable/InvoiceTable.js} +5 -5
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableContainer.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableRow.d.ts.map +1 -0
- package/dist/editors/contributor-billing/components/InvoiceTable/InvoiceTableSection.d.ts.map +1 -0
- package/dist/editors/contributor-billing/config.d.ts.map +1 -1
- package/dist/editors/contributor-billing/config.js +0 -1
- package/dist/editors/editors.d.ts.map +1 -1
- package/dist/editors/editors.js +13 -3
- package/dist/editors/expense-report/components/AddBillingStatementModal.d.ts.map +1 -1
- package/dist/editors/expense-report/components/AddReportToRemoteDrive.d.ts +13 -0
- package/dist/editors/expense-report/components/AddReportToRemoteDrive.d.ts.map +1 -0
- package/dist/editors/expense-report/components/AddReportToRemoteDrive.js +76 -0
- package/dist/editors/expense-report/components/AggregatedExpensesTable.d.ts.map +1 -1
- package/dist/editors/expense-report/components/AggregatedExpensesTable.js +9 -7
- package/dist/editors/expense-report/components/ExpenseReportPDF.d.ts.map +1 -1
- package/dist/editors/expense-report/components/ExpenseReportTransactionsTable.d.ts +15 -0
- package/dist/editors/expense-report/components/ExpenseReportTransactionsTable.d.ts.map +1 -0
- package/dist/editors/expense-report/components/ExpenseReportTransactionsTable.js +64 -0
- package/dist/editors/expense-report/components/SetOwner.d.ts +8 -0
- package/dist/editors/expense-report/components/SetOwner.d.ts.map +1 -0
- package/dist/editors/expense-report/components/SetOwner.js +98 -0
- package/dist/editors/expense-report/components/WalletsTable.d.ts +3 -1
- package/dist/editors/expense-report/components/WalletsTable.d.ts.map +1 -1
- package/dist/editors/expense-report/components/WalletsTable.js +564 -89
- package/dist/editors/expense-report/editor.d.ts.map +1 -1
- package/dist/editors/expense-report/editor.js +120 -21
- package/dist/editors/expense-report/hooks/useSyncWallet.d.ts +2 -2
- package/dist/editors/expense-report/hooks/useSyncWallet.d.ts.map +1 -1
- package/dist/editors/expense-report/hooks/useSyncWallet.js +92 -17
- package/dist/editors/expense-report/hooks/useWalletSync.d.ts.map +1 -1
- package/dist/editors/expense-report/hooks/useWalletSync.js +2 -1
- package/dist/editors/expense-report/services/walletAccountService.d.ts +40 -0
- package/dist/editors/expense-report/services/walletAccountService.d.ts.map +1 -0
- package/dist/editors/expense-report/services/walletAccountService.js +403 -0
- package/dist/editors/hooks/useAccountTransactionsDocument.d.ts +4 -0
- package/dist/editors/hooks/useAccountTransactionsDocument.d.ts.map +1 -0
- package/dist/editors/hooks/useAccountTransactionsDocument.js +8 -0
- package/dist/editors/hooks/useAccountsDocument.d.ts +4 -0
- package/dist/editors/hooks/useAccountsDocument.d.ts.map +1 -0
- package/dist/editors/hooks/useAccountsDocument.js +8 -0
- package/dist/editors/hooks/useSnapshotReportDocument.d.ts +4 -0
- package/dist/editors/hooks/useSnapshotReportDocument.d.ts.map +1 -0
- package/dist/editors/hooks/useSnapshotReportDocument.js +8 -0
- package/dist/editors/index.d.ts +7 -2
- package/dist/editors/index.d.ts.map +1 -1
- package/dist/editors/index.js +7 -2
- package/dist/editors/invoice/editor.d.ts.map +1 -1
- package/dist/editors/invoice/editor.js +20 -34
- package/dist/editors/invoice/invoiceToGnosis.js +1 -1
- package/dist/editors/invoice/lineItemTags/lineItemTags.d.ts.map +1 -1
- package/dist/editors/invoice/lineItemTags/lineItemTags.js +4 -25
- package/dist/editors/invoice/lineItems.d.ts +1 -1
- package/dist/editors/invoice/lineItems.d.ts.map +1 -1
- package/dist/editors/invoice/lineItems.js +31 -75
- package/dist/editors/invoice/module.d.ts +1 -1
- package/dist/editors/invoice/module.d.ts.map +1 -1
- package/dist/editors/invoice/module.js +1 -1
- package/dist/editors/service-offering-editor/components/EditName.d.ts +3 -0
- package/dist/editors/service-offering-editor/components/EditName.d.ts.map +1 -0
- package/dist/editors/service-offering-editor/components/EditName.js +31 -0
- package/dist/editors/service-offering-editor/components/OfferingInfo.d.ts +9 -0
- package/dist/editors/service-offering-editor/components/OfferingInfo.d.ts.map +1 -0
- package/dist/editors/service-offering-editor/components/OfferingInfo.js +62 -0
- package/dist/editors/service-offering-editor/components/ScopeAndFacets.d.ts +9 -0
- package/dist/editors/service-offering-editor/components/ScopeAndFacets.d.ts.map +1 -0
- package/dist/editors/service-offering-editor/components/ScopeAndFacets.js +1077 -0
- package/dist/editors/service-offering-editor/components/ServiceCatalog.d.ts +16 -0
- package/dist/editors/service-offering-editor/components/ServiceCatalog.d.ts.map +1 -0
- package/dist/editors/service-offering-editor/components/ServiceCatalog.js +1379 -0
- package/dist/editors/service-offering-editor/components/ServicesList.d.ts +9 -0
- package/dist/editors/service-offering-editor/components/ServicesList.d.ts.map +1 -0
- package/dist/editors/service-offering-editor/components/ServicesList.js +63 -0
- package/dist/editors/service-offering-editor/components/TabNavigation.d.ts +9 -0
- package/dist/editors/service-offering-editor/components/TabNavigation.d.ts.map +1 -0
- package/dist/editors/service-offering-editor/components/TabNavigation.js +243 -0
- package/dist/editors/service-offering-editor/components/TheMatrix.d.ts +10 -0
- package/dist/editors/service-offering-editor/components/TheMatrix.d.ts.map +1 -0
- package/dist/editors/service-offering-editor/components/TheMatrix.js +1686 -0
- package/dist/editors/service-offering-editor/components/TierDefinition.d.ts +9 -0
- package/dist/editors/service-offering-editor/components/TierDefinition.d.ts.map +1 -0
- package/dist/editors/service-offering-editor/components/TierDefinition.js +653 -0
- package/dist/editors/service-offering-editor/components/TiersList.d.ts +9 -0
- package/dist/editors/service-offering-editor/components/TiersList.d.ts.map +1 -0
- package/dist/editors/service-offering-editor/components/TiersList.js +137 -0
- package/dist/editors/service-offering-editor/editor.d.ts +2 -0
- package/dist/editors/service-offering-editor/editor.d.ts.map +1 -0
- package/dist/editors/service-offering-editor/editor.js +336 -0
- package/dist/editors/service-offering-editor/module.d.ts +4 -0
- package/dist/editors/service-offering-editor/module.d.ts.map +1 -0
- package/dist/editors/service-offering-editor/module.js +10 -0
- package/dist/editors/service-subscriptions-editor/components/AddCategoryModal.d.ts +7 -0
- package/dist/editors/service-subscriptions-editor/components/AddCategoryModal.d.ts.map +1 -0
- package/dist/editors/service-subscriptions-editor/components/AddCategoryModal.js +39 -0
- package/dist/editors/service-subscriptions-editor/components/AddSubscriptionModal.d.ts +10 -0
- package/dist/editors/service-subscriptions-editor/components/AddSubscriptionModal.d.ts.map +1 -0
- package/dist/editors/service-subscriptions-editor/components/AddSubscriptionModal.js +64 -0
- package/dist/editors/service-subscriptions-editor/components/AddVendorModal.d.ts +7 -0
- package/dist/editors/service-subscriptions-editor/components/AddVendorModal.d.ts.map +1 -0
- package/dist/editors/service-subscriptions-editor/components/AddVendorModal.js +43 -0
- package/dist/editors/service-subscriptions-editor/components/CategoriesList.d.ts +8 -0
- package/dist/editors/service-subscriptions-editor/components/CategoriesList.d.ts.map +1 -0
- package/dist/editors/service-subscriptions-editor/components/CategoriesList.js +23 -0
- package/dist/editors/service-subscriptions-editor/components/EditName.d.ts +3 -0
- package/dist/editors/service-subscriptions-editor/components/EditName.d.ts.map +1 -0
- package/dist/editors/service-subscriptions-editor/components/EditName.js +31 -0
- package/dist/editors/service-subscriptions-editor/components/StatsOverview.d.ts +8 -0
- package/dist/editors/service-subscriptions-editor/components/StatsOverview.d.ts.map +1 -0
- package/dist/editors/service-subscriptions-editor/components/StatsOverview.js +32 -0
- package/dist/editors/service-subscriptions-editor/components/SubscriptionsList.d.ts +10 -0
- package/dist/editors/service-subscriptions-editor/components/SubscriptionsList.d.ts.map +1 -0
- package/dist/editors/service-subscriptions-editor/components/SubscriptionsList.js +88 -0
- package/dist/editors/service-subscriptions-editor/components/VendorsList.d.ts +8 -0
- package/dist/editors/service-subscriptions-editor/components/VendorsList.d.ts.map +1 -0
- package/dist/editors/service-subscriptions-editor/components/VendorsList.js +23 -0
- package/dist/editors/service-subscriptions-editor/editor.d.ts +2 -0
- package/dist/editors/service-subscriptions-editor/editor.d.ts.map +1 -0
- package/dist/editors/service-subscriptions-editor/editor.js +60 -0
- package/dist/editors/{integrations → service-subscriptions-editor}/module.d.ts +1 -1
- package/dist/editors/service-subscriptions-editor/module.d.ts.map +1 -0
- package/dist/editors/service-subscriptions-editor/module.js +10 -0
- package/dist/editors/snapshot-report-editor/components/AddReportToRemoteDrive.d.ts +13 -0
- package/dist/editors/snapshot-report-editor/components/AddReportToRemoteDrive.d.ts.map +1 -0
- package/dist/editors/snapshot-report-editor/components/AddReportToRemoteDrive.js +76 -0
- package/dist/editors/snapshot-report-editor/components/SetOwner.d.ts +8 -0
- package/dist/editors/snapshot-report-editor/components/SetOwner.d.ts.map +1 -0
- package/dist/editors/snapshot-report-editor/components/SetOwner.js +98 -0
- package/dist/editors/snapshot-report-editor/editor.d.ts +2 -0
- package/dist/editors/snapshot-report-editor/editor.d.ts.map +1 -0
- package/dist/editors/snapshot-report-editor/editor.js +560 -0
- package/dist/editors/snapshot-report-editor/hooks/useSyncSnapshotAccount.d.ts +15 -0
- package/dist/editors/snapshot-report-editor/hooks/useSyncSnapshotAccount.d.ts.map +1 -0
- package/dist/editors/snapshot-report-editor/hooks/useSyncSnapshotAccount.js +327 -0
- package/dist/editors/snapshot-report-editor/module.d.ts +3 -0
- package/dist/editors/snapshot-report-editor/module.d.ts.map +1 -0
- package/dist/editors/snapshot-report-editor/module.js +9 -0
- package/dist/editors/snapshot-report-editor/utils/balanceCalculations.d.ts +26 -0
- package/dist/editors/snapshot-report-editor/utils/balanceCalculations.d.ts.map +1 -0
- package/dist/editors/snapshot-report-editor/utils/balanceCalculations.js +103 -0
- package/dist/editors/snapshot-report-editor/utils/deriveTransactions.d.ts +47 -0
- package/dist/editors/snapshot-report-editor/utils/deriveTransactions.d.ts.map +1 -0
- package/dist/editors/snapshot-report-editor/utils/deriveTransactions.js +89 -0
- package/dist/editors/snapshot-report-editor/utils/flowTypeCalculations.d.ts +29 -0
- package/dist/editors/snapshot-report-editor/utils/flowTypeCalculations.d.ts.map +1 -0
- package/dist/editors/snapshot-report-editor/utils/flowTypeCalculations.js +63 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/powerhouse.manifest.json +78 -6
- package/dist/scripts/alchemy/alchemyClient.d.ts +63 -0
- package/dist/scripts/alchemy/alchemyClient.d.ts.map +1 -0
- package/dist/scripts/alchemy/alchemyClient.js +232 -0
- package/dist/scripts/alchemy/alchemyEnvironment.d.ts +29 -0
- package/dist/scripts/alchemy/alchemyEnvironment.d.ts.map +1 -0
- package/dist/scripts/alchemy/alchemyEnvironment.js +49 -0
- package/dist/scripts/alchemy/alchemyHelpers.d.ts +24 -0
- package/dist/scripts/alchemy/alchemyHelpers.d.ts.map +1 -0
- package/dist/scripts/alchemy/alchemyHelpers.js +116 -0
- package/dist/scripts/alchemy/alchemyTypes.d.ts +93 -0
- package/dist/scripts/alchemy/alchemyTypes.d.ts.map +1 -0
- package/dist/scripts/alchemy/alchemyTypes.js +25 -0
- package/dist/scripts/invoice/pdfToClaudeAI.d.ts.map +1 -1
- package/dist/scripts/invoice/pdfToClaudeAI.js +186 -4
- package/dist/style.css +4288 -158
- package/dist/subgraphs/{integrations → acc-txs-addon}/index.d.ts +1 -1
- package/dist/subgraphs/acc-txs-addon/index.d.ts.map +1 -0
- package/dist/subgraphs/{integrations → acc-txs-addon}/index.js +2 -2
- package/dist/subgraphs/acc-txs-addon/resolvers.d.ts +3 -0
- package/dist/subgraphs/acc-txs-addon/resolvers.d.ts.map +1 -0
- package/dist/subgraphs/acc-txs-addon/resolvers.js +144 -0
- package/dist/subgraphs/acc-txs-addon/schema.d.ts.map +1 -0
- package/dist/subgraphs/acc-txs-addon/schema.js +47 -0
- package/dist/subgraphs/account-transactions/index.d.ts +11 -0
- package/dist/subgraphs/account-transactions/index.d.ts.map +1 -0
- package/dist/subgraphs/account-transactions/index.js +11 -0
- package/dist/subgraphs/account-transactions/resolvers.d.ts.map +1 -0
- package/dist/subgraphs/account-transactions/resolvers.js +168 -0
- package/dist/subgraphs/account-transactions/schema.d.ts +3 -0
- package/dist/subgraphs/account-transactions/schema.d.ts.map +1 -0
- package/dist/subgraphs/account-transactions/schema.js +129 -0
- package/dist/subgraphs/accounts/index.d.ts +11 -0
- package/dist/subgraphs/accounts/index.d.ts.map +1 -0
- package/dist/subgraphs/accounts/index.js +11 -0
- package/dist/subgraphs/accounts/resolvers.d.ts +3 -0
- package/dist/subgraphs/accounts/resolvers.d.ts.map +1 -0
- package/dist/subgraphs/{integrations → accounts}/resolvers.js +27 -15
- package/dist/subgraphs/accounts/schema.d.ts +3 -0
- package/dist/subgraphs/accounts/schema.d.ts.map +1 -0
- package/dist/subgraphs/accounts/schema.js +75 -0
- package/dist/subgraphs/expense-report/resolvers.d.ts.map +1 -1
- package/dist/subgraphs/expense-report/resolvers.js +24 -0
- package/dist/subgraphs/expense-report/schema.d.ts.map +1 -1
- package/dist/subgraphs/expense-report/schema.js +24 -0
- package/dist/subgraphs/index.d.ts +6 -1
- package/dist/subgraphs/index.d.ts.map +1 -1
- package/dist/subgraphs/index.js +6 -1
- package/dist/subgraphs/invoice-addon/customResolvers.js +1 -1
- package/dist/subgraphs/service-offering/index.d.ts +11 -0
- package/dist/subgraphs/service-offering/index.d.ts.map +1 -0
- package/dist/subgraphs/service-offering/index.js +11 -0
- package/dist/subgraphs/service-offering/resolvers.d.ts +3 -0
- package/dist/subgraphs/service-offering/resolvers.d.ts.map +1 -0
- package/dist/subgraphs/service-offering/resolvers.js +432 -0
- package/dist/subgraphs/service-offering/schema.d.ts +3 -0
- package/dist/subgraphs/service-offering/schema.d.ts.map +1 -0
- package/dist/subgraphs/service-offering/schema.js +386 -0
- package/dist/subgraphs/service-subscriptions/index.d.ts +11 -0
- package/dist/subgraphs/service-subscriptions/index.d.ts.map +1 -0
- package/dist/subgraphs/service-subscriptions/index.js +11 -0
- package/dist/subgraphs/service-subscriptions/resolvers.d.ts +3 -0
- package/dist/subgraphs/service-subscriptions/resolvers.d.ts.map +1 -0
- package/dist/subgraphs/service-subscriptions/resolvers.js +228 -0
- package/dist/subgraphs/service-subscriptions/schema.d.ts +3 -0
- package/dist/subgraphs/service-subscriptions/schema.d.ts.map +1 -0
- package/dist/subgraphs/service-subscriptions/schema.js +193 -0
- package/dist/subgraphs/snapshot-report/index.d.ts +11 -0
- package/dist/subgraphs/snapshot-report/index.d.ts.map +1 -0
- package/dist/subgraphs/snapshot-report/index.js +11 -0
- package/dist/subgraphs/snapshot-report/resolvers.d.ts +3 -0
- package/dist/subgraphs/snapshot-report/resolvers.d.ts.map +1 -0
- package/dist/subgraphs/snapshot-report/resolvers.js +276 -0
- package/dist/subgraphs/snapshot-report/schema.d.ts +3 -0
- package/dist/subgraphs/snapshot-report/schema.d.ts.map +1 -0
- package/dist/subgraphs/snapshot-report/schema.js +206 -0
- package/package.json +15 -14
- package/dist/document-models/integrations/actions.d.ts.map +0 -1
- package/dist/document-models/integrations/actions.js +0 -4
- package/dist/document-models/integrations/gen/actions.d.ts +0 -4
- package/dist/document-models/integrations/gen/actions.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/actions.js +0 -1
- package/dist/document-models/integrations/gen/creators.d.ts +0 -3
- package/dist/document-models/integrations/gen/creators.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/creators.js +0 -2
- package/dist/document-models/integrations/gen/document-model.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/document-model.js +0 -70
- package/dist/document-models/integrations/gen/document-schema.d.ts +0 -180
- package/dist/document-models/integrations/gen/document-schema.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/document-schema.js +0 -33
- package/dist/document-models/integrations/gen/document-type.d.ts +0 -2
- package/dist/document-models/integrations/gen/document-type.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/document-type.js +0 -1
- package/dist/document-models/integrations/gen/index.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/integrations/actions.d.ts +0 -16
- package/dist/document-models/integrations/gen/integrations/actions.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/integrations/creators.d.ts +0 -6
- package/dist/document-models/integrations/gen/integrations/creators.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/integrations/creators.js +0 -5
- package/dist/document-models/integrations/gen/integrations/error.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/integrations/operations.d.ts +0 -9
- package/dist/document-models/integrations/gen/integrations/operations.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/ph-factories.d.ts +0 -23
- package/dist/document-models/integrations/gen/ph-factories.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/reducer.d.ts +0 -3
- package/dist/document-models/integrations/gen/reducer.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/reducer.js +0 -25
- package/dist/document-models/integrations/gen/schema/index.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/schema/types.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/schema/zod.d.ts +0 -19
- package/dist/document-models/integrations/gen/schema/zod.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/schema/zod.js +0 -97
- package/dist/document-models/integrations/gen/types.d.ts +0 -12
- package/dist/document-models/integrations/gen/types.d.ts.map +0 -1
- package/dist/document-models/integrations/gen/utils.d.ts +0 -15
- package/dist/document-models/integrations/gen/utils.d.ts.map +0 -1
- package/dist/document-models/integrations/hooks.d.ts +0 -11
- package/dist/document-models/integrations/hooks.d.ts.map +0 -1
- package/dist/document-models/integrations/hooks.js +0 -26
- package/dist/document-models/integrations/index.d.ts.map +0 -1
- package/dist/document-models/integrations/module.d.ts +0 -5
- package/dist/document-models/integrations/module.d.ts.map +0 -1
- package/dist/document-models/integrations/src/index.d.ts.map +0 -1
- package/dist/document-models/integrations/src/reducers/integrations.d.ts +0 -3
- package/dist/document-models/integrations/src/reducers/integrations.d.ts.map +0 -1
- package/dist/document-models/integrations/src/reducers/integrations.js +0 -14
- package/dist/document-models/integrations/src/tests/document-model.test.d.ts.map +0 -1
- package/dist/document-models/integrations/src/tests/integrations.test.d.ts.map +0 -1
- package/dist/document-models/integrations/src/utils.d.ts.map +0 -1
- package/dist/document-models/integrations/utils.d.ts +0 -14
- package/dist/document-models/integrations/utils.d.ts.map +0 -1
- package/dist/editors/clean-new-editor/components/CreateDocument.d.ts.map +0 -1
- package/dist/editors/clean-new-editor/components/DriveContents.d.ts +0 -3
- package/dist/editors/clean-new-editor/components/DriveContents.d.ts.map +0 -1
- package/dist/editors/clean-new-editor/components/DriveContents.js +0 -10
- package/dist/editors/clean-new-editor/components/DriveExplorer.d.ts.map +0 -1
- package/dist/editors/clean-new-editor/components/DriveExplorer.js +0 -16
- package/dist/editors/clean-new-editor/components/EmptyState.d.ts.map +0 -1
- package/dist/editors/clean-new-editor/components/Files.d.ts.map +0 -1
- package/dist/editors/clean-new-editor/components/FolderTree.d.ts +0 -6
- package/dist/editors/clean-new-editor/components/FolderTree.d.ts.map +0 -1
- package/dist/editors/clean-new-editor/components/FolderTree.js +0 -65
- package/dist/editors/clean-new-editor/components/Folders.d.ts.map +0 -1
- package/dist/editors/clean-new-editor/components/NavigationBreadcrumbs.d.ts.map +0 -1
- package/dist/editors/clean-new-editor/config.d.ts.map +0 -1
- package/dist/editors/clean-new-editor/config.js +0 -5
- package/dist/editors/clean-new-editor/editor.d.ts.map +0 -1
- package/dist/editors/clean-new-editor/module.d.ts +0 -3
- package/dist/editors/clean-new-editor/module.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/ConfirmationModal.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/HeaderControls.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/HeaderStats.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/HeaderStats.js +0 -73
- package/dist/editors/contributor-billing/components/InvoiceTable.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/InvoiceTableContainer.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/InvoiceTableRow.d.ts.map +0 -1
- package/dist/editors/contributor-billing/components/InvoiceTableSection.d.ts.map +0 -1
- package/dist/editors/integrations/components/EditName.d.ts +0 -3
- package/dist/editors/integrations/components/EditName.d.ts.map +0 -1
- package/dist/editors/integrations/components/EditName.js +0 -31
- package/dist/editors/integrations/editor.d.ts +0 -3
- package/dist/editors/integrations/editor.d.ts.map +0 -1
- package/dist/editors/integrations/editor.js +0 -6
- package/dist/editors/integrations/module.d.ts.map +0 -1
- package/dist/editors/integrations/module.js +0 -10
- package/dist/old-contributor-billing/components/DriveExplorer.d.ts +0 -7
- package/dist/old-contributor-billing/components/DriveExplorer.d.ts.map +0 -1
- package/dist/old-contributor-billing/components/DriveExplorer.js +0 -184
- package/dist/old-contributor-billing/components/InvoiceTable/HeaderControls.d.ts +0 -25
- package/dist/old-contributor-billing/components/InvoiceTable/HeaderControls.d.ts.map +0 -1
- package/dist/old-contributor-billing/components/InvoiceTable/HeaderControls.js +0 -154
- package/dist/old-contributor-billing/components/InvoiceTable/HeaderStats.d.ts +0 -2
- package/dist/old-contributor-billing/components/InvoiceTable/HeaderStats.d.ts.map +0 -1
- package/dist/old-contributor-billing/components/InvoiceTable/InvoiceTable.d.ts +0 -30
- package/dist/old-contributor-billing/components/InvoiceTable/InvoiceTable.d.ts.map +0 -1
- package/dist/old-contributor-billing/components/InvoiceTable/InvoiceTable.js +0 -254
- package/dist/old-contributor-billing/components/InvoiceTable/InvoiceTableRow.d.ts +0 -16
- package/dist/old-contributor-billing/components/InvoiceTable/InvoiceTableRow.d.ts.map +0 -1
- package/dist/old-contributor-billing/components/InvoiceTable/InvoiceTableRow.js +0 -47
- package/dist/old-contributor-billing/components/InvoiceTable/InvoiceTableSection.d.ts +0 -10
- package/dist/old-contributor-billing/components/InvoiceTable/InvoiceTableSection.d.ts.map +0 -1
- package/dist/old-contributor-billing/components/InvoiceTable/InvoiceTableSection.js +0 -10
- package/dist/old-contributor-billing/components/InvoiceTable/RowActionMenu.d.ts +0 -8
- package/dist/old-contributor-billing/components/InvoiceTable/RowActionMenu.d.ts.map +0 -1
- package/dist/old-contributor-billing/components/InvoiceTable/RowActionMenu.js +0 -2
- package/dist/old-contributor-billing/config.d.ts +0 -3
- package/dist/old-contributor-billing/config.d.ts.map +0 -1
- package/dist/old-contributor-billing/config.js +0 -4
- package/dist/old-contributor-billing/editor.d.ts +0 -3
- package/dist/old-contributor-billing/editor.d.ts.map +0 -1
- package/dist/old-contributor-billing/editor.js +0 -8
- package/dist/old-contributor-billing/module.d.ts +0 -3
- package/dist/old-contributor-billing/module.d.ts.map +0 -1
- package/dist/old-contributor-billing/module.js +0 -9
- package/dist/old-contributor-billing/util.d.ts +0 -10
- package/dist/old-contributor-billing/util.d.ts.map +0 -1
- package/dist/old-contributor-billing/util.js +0 -112
- package/dist/subgraphs/integrations/index.d.ts.map +0 -1
- package/dist/subgraphs/integrations/resolvers.d.ts.map +0 -1
- package/dist/subgraphs/integrations/schema.d.ts.map +0 -1
- package/dist/subgraphs/integrations/schema.js +0 -69
- /package/dist/document-models/{integrations/gen/integrations → account-transactions/gen/account}/actions.js +0 -0
- /package/dist/document-models/{integrations/gen/integrations → account-transactions/gen/account}/error.d.ts +0 -0
- /package/dist/document-models/{integrations/gen/integrations → account-transactions/gen/account}/error.js +0 -0
- /package/dist/document-models/{integrations/gen/integrations → account-transactions/gen/account}/operations.js +0 -0
- /package/dist/document-models/{integrations → account-transactions}/gen/document-model.d.ts +0 -0
- /package/dist/document-models/{integrations → account-transactions}/gen/schema/index.d.ts +0 -0
- /package/dist/document-models/{integrations → account-transactions}/gen/schema/index.js +0 -0
- /package/dist/document-models/{integrations → account-transactions}/gen/schema/types.js +0 -0
- /package/dist/document-models/{integrations → account-transactions}/gen/types.js +0 -0
- /package/dist/document-models/{integrations → account-transactions}/index.d.ts +0 -0
- /package/dist/document-models/{integrations → account-transactions}/index.js +0 -0
- /package/dist/document-models/{integrations → account-transactions}/src/index.d.ts +0 -0
- /package/dist/document-models/{integrations → account-transactions}/src/index.js +0 -0
- /package/dist/document-models/{integrations → account-transactions}/src/tests/document-model.test.d.ts +0 -0
- /package/dist/document-models/{integrations → account-transactions}/src/utils.d.ts +0 -0
- /package/dist/document-models/{integrations → account-transactions}/src/utils.js +0 -0
- /package/dist/editors/{clean-new-editor → builder-team-admin}/components/CreateDocument.d.ts +0 -0
- /package/dist/editors/{clean-new-editor → builder-team-admin}/components/CreateDocument.js +0 -0
- /package/dist/editors/{clean-new-editor → builder-team-admin}/components/DriveExplorer.d.ts +0 -0
- /package/dist/editors/{clean-new-editor → builder-team-admin}/components/EmptyState.d.ts +0 -0
- /package/dist/editors/{clean-new-editor → builder-team-admin}/components/EmptyState.js +0 -0
- /package/dist/editors/{clean-new-editor → builder-team-admin}/components/Files.d.ts +0 -0
- /package/dist/editors/{clean-new-editor → builder-team-admin}/components/Files.js +0 -0
- /package/dist/editors/{clean-new-editor → builder-team-admin}/components/Folders.d.ts +0 -0
- /package/dist/editors/{clean-new-editor → builder-team-admin}/components/Folders.js +0 -0
- /package/dist/editors/{clean-new-editor → builder-team-admin}/components/NavigationBreadcrumbs.d.ts +0 -0
- /package/dist/editors/{clean-new-editor → builder-team-admin}/components/NavigationBreadcrumbs.js +0 -0
- /package/dist/editors/contributor-billing/components/{ConfirmationModal.d.ts → InvoiceTable/ConfirmationModal.d.ts} +0 -0
- /package/dist/editors/contributor-billing/components/{ConfirmationModal.js → InvoiceTable/ConfirmationModal.js} +0 -0
- /package/dist/editors/contributor-billing/components/{HeaderControls.d.ts → InvoiceTable/HeaderControls.d.ts} +0 -0
- /package/dist/editors/contributor-billing/components/{HeaderControls.js → InvoiceTable/HeaderControls.js} +0 -0
- /package/dist/editors/contributor-billing/components/{HeaderStats.d.ts → InvoiceTable/HeaderStats.d.ts} +0 -0
- /package/dist/editors/contributor-billing/components/{InvoiceTable.d.ts → InvoiceTable/InvoiceTable.d.ts} +0 -0
- /package/dist/editors/contributor-billing/components/{InvoiceTableContainer.d.ts → InvoiceTable/InvoiceTableContainer.d.ts} +0 -0
- /package/dist/editors/contributor-billing/components/{InvoiceTableContainer.js → InvoiceTable/InvoiceTableContainer.js} +0 -0
- /package/dist/editors/contributor-billing/components/{InvoiceTableRow.d.ts → InvoiceTable/InvoiceTableRow.d.ts} +0 -0
- /package/dist/editors/contributor-billing/components/{InvoiceTableRow.js → InvoiceTable/InvoiceTableRow.js} +0 -0
- /package/dist/editors/contributor-billing/components/{InvoiceTableSection.d.ts → InvoiceTable/InvoiceTableSection.d.ts} +0 -0
- /package/dist/editors/contributor-billing/components/{InvoiceTableSection.js → InvoiceTable/InvoiceTableSection.js} +0 -0
- /package/dist/subgraphs/{integrations → acc-txs-addon}/schema.d.ts +0 -0
- /package/dist/subgraphs/{integrations → account-transactions}/resolvers.d.ts +0 -0
|
@@ -0,0 +1,560 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { generateId } from "document-model/core";
|
|
3
|
+
import { useState, useMemo, useEffect } from "react";
|
|
4
|
+
import { useDocumentsInSelectedDrive, useParentFolderForSelectedNode, setSelectedNode, dispatchActions, } from "@powerhousedao/reactor-browser";
|
|
5
|
+
import { DocumentToolbar } from "@powerhousedao/design-system/connect";
|
|
6
|
+
import { Button, Select, DatePicker } from "@powerhousedao/document-engineering";
|
|
7
|
+
import { ChevronDown, ChevronUp, RefreshCw } from "lucide-react";
|
|
8
|
+
import { useSelectedSnapshotReportDocument } from "../hooks/useSnapshotReportDocument.js";
|
|
9
|
+
import { setReportConfig, addSnapshotAccount, addTransaction, setPeriodStart, setPeriodEnd, } from "../../document-models/snapshot-report/gen/creators.js";
|
|
10
|
+
import { SetOwner } from "./components/SetOwner.js";
|
|
11
|
+
import { useSyncSnapshotAccount } from "./hooks/useSyncSnapshotAccount.js";
|
|
12
|
+
import { formatBalance } from "./utils/balanceCalculations.js";
|
|
13
|
+
import { calculateTransactionFlowInfo } from "./utils/flowTypeCalculations.js";
|
|
14
|
+
import { deriveTransactionsForAccount } from "./utils/deriveTransactions.js";
|
|
15
|
+
import { actions as accountsActions } from "../../document-models/accounts/index.js";
|
|
16
|
+
import { transactionsActions } from "../../document-models/snapshot-report/index.js";
|
|
17
|
+
// Helper function to generate month options from January 2025 to current month
|
|
18
|
+
function generateMonthOptions() {
|
|
19
|
+
const options = [];
|
|
20
|
+
const startDate = new Date(2025, 0, 1); // January 2025
|
|
21
|
+
const currentDate = new Date();
|
|
22
|
+
const date = new Date(startDate);
|
|
23
|
+
while (date <= currentDate) {
|
|
24
|
+
const year = date.getFullYear();
|
|
25
|
+
const month = date.getMonth();
|
|
26
|
+
const monthName = date.toLocaleDateString("en-US", { month: "long" });
|
|
27
|
+
const label = `${monthName} ${year}`;
|
|
28
|
+
// Value format: YYYY-MM (e.g., "2025-01")
|
|
29
|
+
const value = `${year}-${String(month + 1).padStart(2, "0")}`;
|
|
30
|
+
options.push({ label, value });
|
|
31
|
+
// Move to next month
|
|
32
|
+
date.setMonth(date.getMonth() + 1);
|
|
33
|
+
}
|
|
34
|
+
// Reverse to show most recent first
|
|
35
|
+
return options.reverse();
|
|
36
|
+
}
|
|
37
|
+
// Helper function to get start and end dates for a given month
|
|
38
|
+
function getMonthDateRange(yearMonth) {
|
|
39
|
+
const [year, month] = yearMonth.split("-").map(Number);
|
|
40
|
+
// First day of month at 00:00:00 UTC
|
|
41
|
+
const periodStart = new Date(Date.UTC(year, month - 1, 1, 0, 0, 0, 0)).toISOString();
|
|
42
|
+
// Last day of month at 23:59:59.999 UTC
|
|
43
|
+
// Get the last day by using day 0 of the next month
|
|
44
|
+
const lastDay = new Date(Date.UTC(year, month, 0)).getUTCDate();
|
|
45
|
+
const periodEnd = new Date(Date.UTC(year, month - 1, lastDay, 23, 59, 59, 999)).toISOString();
|
|
46
|
+
return { periodStart, periodEnd };
|
|
47
|
+
}
|
|
48
|
+
export default function Editor() {
|
|
49
|
+
const [document, dispatch] = useSelectedSnapshotReportDocument();
|
|
50
|
+
const documentsInDrive = useDocumentsInSelectedDrive();
|
|
51
|
+
const [isAccountPickerOpen, setIsAccountPickerOpen] = useState(false);
|
|
52
|
+
const [selectedAccountIds, setSelectedAccountIds] = useState(new Set());
|
|
53
|
+
const [expandedAccounts, setExpandedAccounts] = useState(new Set());
|
|
54
|
+
const [syncingAccounts, setSyncingAccounts] = useState(new Set());
|
|
55
|
+
const [isSyncingAll, setIsSyncingAll] = useState(false);
|
|
56
|
+
const { syncAccount } = useSyncSnapshotAccount();
|
|
57
|
+
if (!document) {
|
|
58
|
+
return _jsx("div", { children: "Loading..." });
|
|
59
|
+
}
|
|
60
|
+
const { reportName, startDate, endDate, snapshotAccounts, accountsDocumentId, ownerId, reportPeriodStart, reportPeriodEnd, } = document.state.global;
|
|
61
|
+
// Filter for Accounts documents
|
|
62
|
+
const accountsDocuments = documentsInDrive
|
|
63
|
+
? documentsInDrive.filter((doc) => doc.header.documentType === "powerhouse/accounts")
|
|
64
|
+
: [];
|
|
65
|
+
// Find selected accounts document
|
|
66
|
+
const selectedAccountsDoc = accountsDocuments.find((doc) => doc.header.id === accountsDocumentId);
|
|
67
|
+
// Get available accounts from the selected Accounts document
|
|
68
|
+
const availableAccounts = selectedAccountsDoc
|
|
69
|
+
? selectedAccountsDoc.state.global?.accounts || []
|
|
70
|
+
: [];
|
|
71
|
+
// Get IDs of accounts already in the snapshot
|
|
72
|
+
const existingAccountIds = new Set(snapshotAccounts.map((acc) => acc.accountId));
|
|
73
|
+
// Create a map of accountId to accountEntry for quick lookup
|
|
74
|
+
const accountEntryMap = new Map(availableAccounts.map((acc) => [acc.id, acc]));
|
|
75
|
+
// Local state for the selected period (before confirmation)
|
|
76
|
+
const [selectedPeriod, setSelectedPeriod] = useState(() => {
|
|
77
|
+
if (reportPeriodStart) {
|
|
78
|
+
const date = new Date(reportPeriodStart);
|
|
79
|
+
return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}`;
|
|
80
|
+
}
|
|
81
|
+
// Default to current month
|
|
82
|
+
const now = new Date();
|
|
83
|
+
return `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, "0")}`;
|
|
84
|
+
});
|
|
85
|
+
// Track if the selected period differs from the saved period
|
|
86
|
+
const savedPeriod = useMemo(() => {
|
|
87
|
+
if (reportPeriodStart) {
|
|
88
|
+
const date = new Date(reportPeriodStart);
|
|
89
|
+
return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}`;
|
|
90
|
+
}
|
|
91
|
+
return "";
|
|
92
|
+
}, [reportPeriodStart]);
|
|
93
|
+
// Track if we're in editing mode
|
|
94
|
+
const [isEditingPeriod, setIsEditingPeriod] = useState(!savedPeriod);
|
|
95
|
+
const isPeriodChanged = selectedPeriod !== savedPeriod;
|
|
96
|
+
// Update selected period when document period changes externally
|
|
97
|
+
useEffect(() => {
|
|
98
|
+
if (savedPeriod && savedPeriod !== selectedPeriod) {
|
|
99
|
+
setSelectedPeriod(savedPeriod);
|
|
100
|
+
}
|
|
101
|
+
}, [savedPeriod]);
|
|
102
|
+
// Handle period dropdown change (doesn't save yet)
|
|
103
|
+
const handlePeriodChange = (value) => {
|
|
104
|
+
setSelectedPeriod(value);
|
|
105
|
+
};
|
|
106
|
+
// Handle period confirmation (saves to document)
|
|
107
|
+
const handleConfirmPeriod = () => {
|
|
108
|
+
const { periodStart, periodEnd } = getMonthDateRange(selectedPeriod);
|
|
109
|
+
// Dispatch both start and end dates
|
|
110
|
+
dispatch?.(setPeriodStart({ periodStart }));
|
|
111
|
+
dispatch?.(setPeriodEnd({ periodEnd }));
|
|
112
|
+
// Exit editing mode
|
|
113
|
+
setIsEditingPeriod(false);
|
|
114
|
+
};
|
|
115
|
+
// Handle starting to edit the period
|
|
116
|
+
const handleEditPeriod = () => {
|
|
117
|
+
setIsEditingPeriod(true);
|
|
118
|
+
};
|
|
119
|
+
// Generate month options
|
|
120
|
+
const monthOptions = useMemo(() => generateMonthOptions(), []);
|
|
121
|
+
// Get the formatted display label for the current period
|
|
122
|
+
const periodDisplayLabel = useMemo(() => {
|
|
123
|
+
const option = monthOptions.find((opt) => opt.value === selectedPeriod);
|
|
124
|
+
return option ? option.label : selectedPeriod;
|
|
125
|
+
}, [selectedPeriod, monthOptions]);
|
|
126
|
+
// Note: startDate/endDate are used for transaction filtering (the actual date range to fetch)
|
|
127
|
+
// reportPeriodStart/End are used for the reporting period label (e.g., "January 2025")
|
|
128
|
+
// Handle sync for a single account
|
|
129
|
+
const handleSyncAccount = async (snapshotAccount) => {
|
|
130
|
+
if (!startDate || !endDate) {
|
|
131
|
+
alert("Please set the Snapshot Period (start and end dates) before syncing");
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
setSyncingAccounts((prev) => new Set(prev).add(snapshotAccount.id));
|
|
135
|
+
try {
|
|
136
|
+
const accountEntry = accountEntryMap.get(snapshotAccount.accountId);
|
|
137
|
+
const result = await syncAccount(snapshotAccount, accountEntry, accountsDocumentId || undefined, startDate, endDate, dispatch, snapshotAccounts, document?.header?.id);
|
|
138
|
+
if (result.success) {
|
|
139
|
+
// If account transactions document was created, update the Accounts document
|
|
140
|
+
if (result.documentId && accountEntry && accountsDocumentId) {
|
|
141
|
+
await dispatchActions([
|
|
142
|
+
accountsActions.updateAccount({
|
|
143
|
+
id: accountEntry.id,
|
|
144
|
+
accountTransactionsId: result.documentId,
|
|
145
|
+
}),
|
|
146
|
+
], accountsDocumentId);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
alert(`Sync failed: ${result.message}`);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
catch (error) {
|
|
154
|
+
console.error("Error syncing account:", error);
|
|
155
|
+
alert(`Error: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
156
|
+
}
|
|
157
|
+
finally {
|
|
158
|
+
setSyncingAccounts((prev) => {
|
|
159
|
+
const newSet = new Set(prev);
|
|
160
|
+
newSet.delete(snapshotAccount.id);
|
|
161
|
+
return newSet;
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
// Handle sync all accounts - parallel with concurrency limit
|
|
166
|
+
const handleSyncAll = async () => {
|
|
167
|
+
if (!startDate || !endDate) {
|
|
168
|
+
alert("Please set the Snapshot Period (start and end dates) before syncing");
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
setIsSyncingAll(true);
|
|
172
|
+
const accountUpdates = [];
|
|
173
|
+
const CONCURRENCY_LIMIT = 5;
|
|
174
|
+
try {
|
|
175
|
+
// Process accounts in batches of 5 for parallel execution
|
|
176
|
+
for (let i = 0; i < snapshotAccounts.length; i += CONCURRENCY_LIMIT) {
|
|
177
|
+
const batch = snapshotAccounts.slice(i, i + CONCURRENCY_LIMIT);
|
|
178
|
+
await Promise.all(batch.map(async (account) => {
|
|
179
|
+
const accountEntry = accountEntryMap.get(account.accountId);
|
|
180
|
+
setSyncingAccounts((prev) => new Set(prev).add(account.id));
|
|
181
|
+
try {
|
|
182
|
+
const result = await syncAccount(account, accountEntry, accountsDocumentId || undefined, startDate, endDate, dispatch, snapshotAccounts, document?.header?.id);
|
|
183
|
+
if (result.documentId && accountEntry) {
|
|
184
|
+
accountUpdates.push({
|
|
185
|
+
id: accountEntry.id,
|
|
186
|
+
accountTransactionsId: result.documentId,
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
finally {
|
|
191
|
+
setSyncingAccounts((prev) => {
|
|
192
|
+
const newSet = new Set(prev);
|
|
193
|
+
newSet.delete(account.id);
|
|
194
|
+
return newSet;
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
}));
|
|
198
|
+
}
|
|
199
|
+
// Single batch update to Accounts document
|
|
200
|
+
if (accountUpdates.length > 0 && accountsDocumentId) {
|
|
201
|
+
await dispatchActions(accountUpdates.map((u) => accountsActions.updateAccount(u)), accountsDocumentId);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
finally {
|
|
205
|
+
setIsSyncingAll(false);
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
const handleSetReportName = (name) => {
|
|
209
|
+
dispatch?.(setReportConfig({
|
|
210
|
+
reportName: name,
|
|
211
|
+
startDate: startDate || undefined,
|
|
212
|
+
endDate: endDate || undefined,
|
|
213
|
+
accountsDocumentId: undefined,
|
|
214
|
+
}));
|
|
215
|
+
};
|
|
216
|
+
const handleToggleAccountExpansion = (accountId) => {
|
|
217
|
+
setExpandedAccounts((prev) => {
|
|
218
|
+
const newSet = new Set(prev);
|
|
219
|
+
if (newSet.has(accountId)) {
|
|
220
|
+
newSet.delete(accountId);
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
newSet.add(accountId);
|
|
224
|
+
}
|
|
225
|
+
return newSet;
|
|
226
|
+
});
|
|
227
|
+
};
|
|
228
|
+
const handleOpenAccountPicker = () => {
|
|
229
|
+
if (!accountsDocumentId) {
|
|
230
|
+
alert("Please select an Accounts document first");
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
setIsAccountPickerOpen(true);
|
|
234
|
+
setSelectedAccountIds(new Set());
|
|
235
|
+
};
|
|
236
|
+
const handleToggleAccount = (accountId) => {
|
|
237
|
+
const newSelection = new Set(selectedAccountIds);
|
|
238
|
+
if (newSelection.has(accountId)) {
|
|
239
|
+
newSelection.delete(accountId);
|
|
240
|
+
}
|
|
241
|
+
else {
|
|
242
|
+
newSelection.add(accountId);
|
|
243
|
+
}
|
|
244
|
+
setSelectedAccountIds(newSelection);
|
|
245
|
+
};
|
|
246
|
+
const handleImportAccounts = async () => {
|
|
247
|
+
if (!documentsInDrive || !startDate || !endDate) {
|
|
248
|
+
alert("Please set the report period (start and end dates) before importing accounts");
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
const start = new Date(startDate);
|
|
252
|
+
const end = new Date(endDate);
|
|
253
|
+
// Track newly imported accounts for two-pass import
|
|
254
|
+
const newlyImportedAccounts = [];
|
|
255
|
+
// Build a combined list of existing + newly imported accounts for flow type calculation
|
|
256
|
+
const allAccountsForLookup = [
|
|
257
|
+
...snapshotAccounts,
|
|
258
|
+
...Array.from(selectedAccountIds)
|
|
259
|
+
.map((accountId) => {
|
|
260
|
+
const account = availableAccounts.find((acc) => acc.id === accountId);
|
|
261
|
+
if (account && !existingAccountIds.has(accountId) && account.type) {
|
|
262
|
+
return {
|
|
263
|
+
id: generateId(),
|
|
264
|
+
accountId: account.id,
|
|
265
|
+
accountAddress: account.account,
|
|
266
|
+
accountName: account.name,
|
|
267
|
+
type: account.type,
|
|
268
|
+
accountTransactionsId: account.accountTransactionsId || null,
|
|
269
|
+
startingBalances: [],
|
|
270
|
+
endingBalances: [],
|
|
271
|
+
transactions: [],
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
return null;
|
|
275
|
+
})
|
|
276
|
+
.filter(Boolean),
|
|
277
|
+
];
|
|
278
|
+
// FIRST PASS: Import all accounts
|
|
279
|
+
// - Internal accounts: Import with transactions from AccountTransactions doc
|
|
280
|
+
// - Non-Internal accounts: Import account only (transactions derived later)
|
|
281
|
+
for (const accountId of selectedAccountIds) {
|
|
282
|
+
const account = availableAccounts.find((acc) => acc.id === accountId);
|
|
283
|
+
if (account && !existingAccountIds.has(accountId)) {
|
|
284
|
+
if (!account.type) {
|
|
285
|
+
alert(`Account "${account.name}" does not have a type set. Please update the account first.`);
|
|
286
|
+
continue;
|
|
287
|
+
}
|
|
288
|
+
// Add the snapshot account
|
|
289
|
+
const snapshotAccountId = generateId();
|
|
290
|
+
dispatch?.(addSnapshotAccount({
|
|
291
|
+
id: snapshotAccountId,
|
|
292
|
+
accountId: account.id,
|
|
293
|
+
accountAddress: account.account,
|
|
294
|
+
accountName: account.name,
|
|
295
|
+
type: account.type,
|
|
296
|
+
accountTransactionsId: account.accountTransactionsId || undefined,
|
|
297
|
+
}));
|
|
298
|
+
// Track for second pass
|
|
299
|
+
newlyImportedAccounts.push({
|
|
300
|
+
snapshotAccountId,
|
|
301
|
+
accountAddress: account.account,
|
|
302
|
+
accountType: account.type,
|
|
303
|
+
accountTransactionsId: account.accountTransactionsId,
|
|
304
|
+
});
|
|
305
|
+
// Only import transactions for Internal accounts
|
|
306
|
+
// Non-Internal accounts will derive transactions from Internal accounts
|
|
307
|
+
if (account.type === "Internal" && account.accountTransactionsId) {
|
|
308
|
+
const txDoc = documentsInDrive.find((doc) => doc.header.id === account.accountTransactionsId &&
|
|
309
|
+
doc.header.documentType === "powerhouse/account-transactions");
|
|
310
|
+
if (txDoc?.state?.global?.transactions) {
|
|
311
|
+
const transactions = txDoc.state.global.transactions;
|
|
312
|
+
// Filter transactions by the report period
|
|
313
|
+
const filteredTransactions = transactions.filter((tx) => {
|
|
314
|
+
if (!tx?.datetime)
|
|
315
|
+
return false;
|
|
316
|
+
const txDate = new Date(tx.datetime);
|
|
317
|
+
if (isNaN(txDate.getTime()))
|
|
318
|
+
return false;
|
|
319
|
+
return txDate >= start && txDate <= end;
|
|
320
|
+
});
|
|
321
|
+
// Add each transaction to the snapshot account
|
|
322
|
+
for (const tx of filteredTransactions) {
|
|
323
|
+
const { flowType, counterPartyAccountId } = calculateTransactionFlowInfo(tx.direction, account.type, tx.counterParty, allAccountsForLookup);
|
|
324
|
+
dispatch?.(addTransaction({
|
|
325
|
+
accountId: snapshotAccountId,
|
|
326
|
+
id: generateId(),
|
|
327
|
+
transactionId: tx.id,
|
|
328
|
+
counterParty: tx.counterParty || undefined,
|
|
329
|
+
amount: tx.amount,
|
|
330
|
+
datetime: tx.datetime,
|
|
331
|
+
txHash: tx.details?.txHash || "",
|
|
332
|
+
token: tx.details?.token || "",
|
|
333
|
+
blockNumber: tx.details?.blockNumber || undefined,
|
|
334
|
+
direction: tx.direction,
|
|
335
|
+
flowType: flowType,
|
|
336
|
+
counterPartyAccountId: counterPartyAccountId || undefined,
|
|
337
|
+
}));
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
// SECOND PASS: Derive transactions for non-Internal accounts
|
|
344
|
+
// We need to wait a moment for state to update, then derive
|
|
345
|
+
// For now, user can click "Sync" on non-Internal accounts to derive
|
|
346
|
+
// TODO: Implement auto-derive after import completes
|
|
347
|
+
setIsAccountPickerOpen(false);
|
|
348
|
+
setSelectedAccountIds(new Set());
|
|
349
|
+
};
|
|
350
|
+
/**
|
|
351
|
+
* Derive transactions for a non-Internal account from Internal accounts
|
|
352
|
+
* This finds all transactions in Internal accounts where the counter-party
|
|
353
|
+
* matches the non-Internal account's address
|
|
354
|
+
*/
|
|
355
|
+
const handleDeriveTransactions = async (accountId) => {
|
|
356
|
+
const account = snapshotAccounts.find((a) => a.id === accountId);
|
|
357
|
+
if (!account || account.type === "Internal") {
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
const internalAccounts = snapshotAccounts.filter((a) => a.type === "Internal");
|
|
361
|
+
if (internalAccounts.length === 0) {
|
|
362
|
+
alert("No Internal accounts found. Import Internal accounts first.");
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
// Get derived transactions
|
|
366
|
+
const derivedTxs = deriveTransactionsForAccount(account, internalAccounts);
|
|
367
|
+
// Remove existing transactions for this account
|
|
368
|
+
for (const tx of account.transactions) {
|
|
369
|
+
dispatch?.(transactionsActions.removeTransaction({ id: tx.id }));
|
|
370
|
+
}
|
|
371
|
+
// Add derived transactions
|
|
372
|
+
for (const tx of derivedTxs) {
|
|
373
|
+
dispatch?.(addTransaction({
|
|
374
|
+
accountId: account.id,
|
|
375
|
+
id: tx.id,
|
|
376
|
+
transactionId: tx.transactionId,
|
|
377
|
+
counterParty: tx.counterParty,
|
|
378
|
+
amount: tx.amount,
|
|
379
|
+
datetime: tx.datetime,
|
|
380
|
+
txHash: tx.txHash,
|
|
381
|
+
token: tx.token,
|
|
382
|
+
blockNumber: tx.blockNumber ?? undefined,
|
|
383
|
+
direction: tx.direction,
|
|
384
|
+
flowType: tx.flowType,
|
|
385
|
+
counterPartyAccountId: tx.counterPartyAccountId,
|
|
386
|
+
}));
|
|
387
|
+
}
|
|
388
|
+
};
|
|
389
|
+
/**
|
|
390
|
+
* Derive transactions for all non-Internal accounts
|
|
391
|
+
*/
|
|
392
|
+
const handleDeriveAllNonInternal = async () => {
|
|
393
|
+
const internalAccounts = snapshotAccounts.filter((a) => a.type === "Internal");
|
|
394
|
+
if (internalAccounts.length === 0) {
|
|
395
|
+
alert("No Internal accounts found. Import Internal accounts first.");
|
|
396
|
+
return;
|
|
397
|
+
}
|
|
398
|
+
const nonInternalAccounts = snapshotAccounts.filter((a) => a.type !== "Internal");
|
|
399
|
+
for (const account of nonInternalAccounts) {
|
|
400
|
+
await handleDeriveTransactions(account.id);
|
|
401
|
+
}
|
|
402
|
+
};
|
|
403
|
+
// Handlers for the legacy startDate/endDate fields (DatePicker approach)
|
|
404
|
+
const handleStartDateChange = (e) => {
|
|
405
|
+
const dateValue = e.target.value;
|
|
406
|
+
if (!dateValue)
|
|
407
|
+
return;
|
|
408
|
+
// DatePicker may return ISO string or date string - extract just the date part
|
|
409
|
+
const dateString = dateValue.split("T")[0]; // Get YYYY-MM-DD part if ISO string
|
|
410
|
+
if (!dateString)
|
|
411
|
+
return;
|
|
412
|
+
// Create date at start of day (00:00:00)
|
|
413
|
+
const date = new Date(dateString + "T00:00:00.000Z");
|
|
414
|
+
if (isNaN(date.getTime())) {
|
|
415
|
+
console.error("Invalid date value:", dateValue);
|
|
416
|
+
return;
|
|
417
|
+
}
|
|
418
|
+
const isoDateTime = date.toISOString();
|
|
419
|
+
dispatch?.(setReportConfig({
|
|
420
|
+
startDate: isoDateTime,
|
|
421
|
+
endDate: endDate || undefined,
|
|
422
|
+
reportName: reportName || undefined,
|
|
423
|
+
accountsDocumentId: accountsDocumentId || undefined,
|
|
424
|
+
}));
|
|
425
|
+
};
|
|
426
|
+
const handleEndDateChange = (e) => {
|
|
427
|
+
const dateValue = e.target.value;
|
|
428
|
+
if (!dateValue)
|
|
429
|
+
return;
|
|
430
|
+
// DatePicker may return ISO string or date string - extract just the date part
|
|
431
|
+
const dateString = dateValue.split("T")[0]; // Get YYYY-MM-DD part if ISO string
|
|
432
|
+
if (!dateString)
|
|
433
|
+
return;
|
|
434
|
+
// Create date at end of day (23:59:59.999)
|
|
435
|
+
const endOfDay = new Date(dateString + "T23:59:59.999Z");
|
|
436
|
+
if (isNaN(endOfDay.getTime())) {
|
|
437
|
+
console.error("Invalid date value:", dateValue);
|
|
438
|
+
return;
|
|
439
|
+
}
|
|
440
|
+
const isoDateTime = endOfDay.toISOString();
|
|
441
|
+
dispatch?.(setReportConfig({
|
|
442
|
+
endDate: isoDateTime,
|
|
443
|
+
startDate: startDate || undefined,
|
|
444
|
+
reportName: reportName || undefined,
|
|
445
|
+
accountsDocumentId: accountsDocumentId || undefined,
|
|
446
|
+
}));
|
|
447
|
+
};
|
|
448
|
+
// Get the parent folder node for the currently selected node
|
|
449
|
+
const parentFolder = useParentFolderForSelectedNode();
|
|
450
|
+
// Set the selected node to the parent folder node (close the editor)
|
|
451
|
+
function handleClose() {
|
|
452
|
+
setSelectedNode(parentFolder?.id);
|
|
453
|
+
}
|
|
454
|
+
return (_jsxs("div", { children: [_jsx(DocumentToolbar, { document: document, onClose: handleClose }), _jsxs("div", { className: "p-6 max-w-7xl mx-auto", children: [_jsx("h1", { className: "text-3xl font-bold mb-6", children: "Snapshot Report" }), _jsxs("div", { className: "bg-white rounded-lg shadow p-6 mb-6", children: [_jsx("h2", { className: "text-xl font-semibold mb-4", children: "Report Configuration" }), _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [_jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Report Name" }), _jsx("input", { type: "text", value: reportName || "", onChange: (e) => handleSetReportName(e.target.value), className: "w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500", placeholder: "Q4 2024 Treasury Report" })] }), _jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Owner" }), _jsx(SetOwner, { ownerId: ownerId, dispatch: dispatch })] }), _jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Accounts Document" }), _jsxs("select", { value: accountsDocumentId || "", onChange: (e) => dispatch?.(setReportConfig({
|
|
455
|
+
accountsDocumentId: e.target.value || undefined,
|
|
456
|
+
reportName: reportName || undefined,
|
|
457
|
+
startDate: startDate || undefined,
|
|
458
|
+
endDate: endDate || undefined,
|
|
459
|
+
})), className: "w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500", children: [_jsx("option", { value: "", children: "Select an Accounts document..." }), accountsDocuments.map((doc) => (_jsx("option", { value: doc.header.id, children: doc.header.name ||
|
|
460
|
+
`Accounts (${doc.header.id.slice(0, 8)}...)` }, doc.header.id)))] }), selectedAccountsDoc && (_jsxs("p", { className: "text-xs text-gray-500 mt-1", children: [selectedAccountsDoc.state.global?.accounts
|
|
461
|
+
?.length || 0, " ", "accounts available"] }))] })] }), _jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Reporting Period" }), isEditingPeriod ? (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Select, { options: monthOptions, value: selectedPeriod, onChange: (value) => handlePeriodChange(value), className: "min-w-[180px]" }), isPeriodChanged && (_jsx(Button, { variant: "default", onClick: handleConfirmPeriod, className: "text-sm", children: "Set Period" }))] })) : (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "text-lg font-bold text-gray-900", children: periodDisplayLabel }), _jsx(Button, { variant: "ghost", onClick: handleEditPeriod, className: "text-sm", children: "Change" })] }))] }), _jsxs("div", { children: [_jsx("label", { className: "block text-sm font-medium text-gray-700 mb-2", children: "Snapshot Period" }), _jsxs("div", { className: "flex gap-2 items-center", children: [_jsx(DatePicker, { name: "startDate", value: startDate ? startDate.split("T")[0] : "", onChange: handleStartDateChange, dateFormat: "YYYY-MM-DD", className: "flex-1" }), _jsx("span", { className: "self-center", children: "to" }), _jsx(DatePicker, { name: "endDate", value: endDate ? endDate.split("T")[0] : "", onChange: handleEndDateChange, dateFormat: "YYYY-MM-DD", className: "flex-1" })] })] })] })] }), _jsxs("div", { className: "bg-white rounded-lg shadow p-6", children: [_jsxs("div", { className: "flex justify-between items-center mb-4", children: [_jsx("h2", { className: "text-xl font-semibold", children: "Snapshot Accounts" }), _jsxs("div", { className: "flex gap-2", children: [snapshotAccounts.length > 0 && (_jsxs("button", { onClick: handleSyncAll, disabled: isSyncingAll || !startDate || !endDate, className: "px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-green-500 disabled:bg-gray-400 disabled:cursor-not-allowed flex items-center gap-2", children: [_jsx(RefreshCw, { className: `w-4 h-4 ${isSyncingAll ? "animate-spin" : ""}` }), "Sync All"] })), _jsx("button", { onClick: handleOpenAccountPicker, disabled: !accountsDocumentId, className: "px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 disabled:bg-gray-400 disabled:cursor-not-allowed", children: "Add Account" })] })] }), snapshotAccounts.length === 0 ? (_jsxs("div", { className: "text-center py-12 text-gray-500", children: [_jsx("p", { children: "No accounts added yet" }), _jsx("p", { className: "text-sm mt-2", children: "Click \"Add Account\" to select accounts for this snapshot" })] })) : (_jsx("div", { className: "space-y-6", children: [
|
|
462
|
+
{
|
|
463
|
+
type: "Source",
|
|
464
|
+
label: "Source",
|
|
465
|
+
borderClass: "border-emerald-300",
|
|
466
|
+
badgeClass: "bg-emerald-100 text-emerald-800",
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
type: "Internal",
|
|
470
|
+
label: "Internal",
|
|
471
|
+
borderClass: "border-blue-300",
|
|
472
|
+
badgeClass: "bg-blue-100 text-blue-800",
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
type: "Destination",
|
|
476
|
+
label: "Destination",
|
|
477
|
+
borderClass: "border-amber-300",
|
|
478
|
+
badgeClass: "bg-amber-100 text-amber-800",
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
type: "External",
|
|
482
|
+
label: "External",
|
|
483
|
+
borderClass: "border-gray-300",
|
|
484
|
+
badgeClass: "bg-gray-100 text-gray-800",
|
|
485
|
+
},
|
|
486
|
+
].map(({ type, label, borderClass, badgeClass }) => {
|
|
487
|
+
const accountsOfType = snapshotAccounts.filter((a) => a.type === type);
|
|
488
|
+
if (accountsOfType.length === 0)
|
|
489
|
+
return null;
|
|
490
|
+
return (_jsxs("div", { children: [_jsxs("div", { className: `flex items-center gap-2 mb-3 pb-2 border-b-2 ${borderClass}`, children: [_jsx("span", { className: `px-2 py-0.5 text-xs font-semibold rounded ${badgeClass}`, children: label }), _jsxs("span", { className: "text-sm text-gray-500", children: [accountsOfType.length, " account", accountsOfType.length !== 1 ? "s" : ""] })] }), _jsx("div", { className: "space-y-4", children: accountsOfType.map((account) => (_jsxs("div", { className: "border border-gray-200 rounded-lg overflow-hidden", children: [_jsxs("div", { className: "p-4", children: [_jsxs("div", { className: "flex justify-between items-start", children: [_jsxs("div", { className: "flex-1", children: [_jsxs("div", { className: "flex items-center gap-2 mb-2", children: [_jsx("h3", { className: "font-semibold", children: account.accountName }), _jsx("button", { onClick: () => handleSyncAccount(account), disabled: syncingAccounts.has(account.id) ||
|
|
491
|
+
!startDate ||
|
|
492
|
+
!endDate, className: "p-1.5 rounded-md hover:bg-gray-100 disabled:opacity-50 disabled:cursor-not-allowed", title: "Sync account transactions and balances", children: _jsx(RefreshCw, { className: `w-4 h-4 ${syncingAccounts.has(account.id)
|
|
493
|
+
? "animate-spin text-blue-600"
|
|
494
|
+
: "text-gray-600"}` }) })] }), _jsx("p", { className: "text-sm text-gray-600", children: account.accountAddress }), _jsx("span", { className: `inline-block mt-2 px-3 py-1 text-xs font-medium rounded-full ${account.type === "Source"
|
|
495
|
+
? "bg-emerald-100 text-emerald-800"
|
|
496
|
+
: account.type === "Internal"
|
|
497
|
+
? "bg-blue-100 text-blue-800"
|
|
498
|
+
: account.type === "Destination"
|
|
499
|
+
? "bg-amber-100 text-amber-800"
|
|
500
|
+
: "bg-gray-100 text-gray-800"}`, children: account.type })] }), _jsxs("div", { className: "text-right", children: [_jsxs("p", { className: "text-sm text-gray-600", children: ["Transactions: ", account.transactions.length] }), _jsxs("p", { className: "text-sm text-gray-600", children: ["Tokens: ", account.startingBalances.length] })] })] }), (() => {
|
|
501
|
+
// Helper to check if a balance is non-zero
|
|
502
|
+
const isNonZero = (amount) => {
|
|
503
|
+
const value = parseFloat(amount?.value || "0");
|
|
504
|
+
return value !== 0;
|
|
505
|
+
};
|
|
506
|
+
// Filter to non-zero balances
|
|
507
|
+
const nonZeroStarting = account.startingBalances.filter((b) => {
|
|
508
|
+
const endingBalance = account.endingBalances.find((eb) => eb.token === b.token);
|
|
509
|
+
return (isNonZero(b.amount) ||
|
|
510
|
+
(endingBalance &&
|
|
511
|
+
isNonZero(endingBalance.amount)));
|
|
512
|
+
});
|
|
513
|
+
const endingOnlyBalances = account.endingBalances.filter((eb) => !account.startingBalances.some((sb) => sb.token === eb.token) && isNonZero(eb.amount));
|
|
514
|
+
const hasBalances = nonZeroStarting.length > 0 ||
|
|
515
|
+
endingOnlyBalances.length > 0;
|
|
516
|
+
if (!hasBalances)
|
|
517
|
+
return null;
|
|
518
|
+
return (_jsxs("div", { className: "mt-4 pt-4 border-t border-gray-200", children: [_jsx("h4", { className: "text-sm font-semibold text-gray-700 mb-2", children: "Balances" }), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-3", children: [nonZeroStarting.map((balance) => {
|
|
519
|
+
const endingBalance = account.endingBalances.find((eb) => eb.token === balance.token);
|
|
520
|
+
return (_jsxs("div", { className: "bg-gray-50 rounded p-2 text-sm", children: [_jsx("div", { className: "font-medium text-gray-700 mb-1", children: balance.token }), _jsxs("div", { className: "text-xs text-gray-600 space-y-1", style: {
|
|
521
|
+
fontVariantNumeric: "tabular-nums",
|
|
522
|
+
}, children: [_jsxs("div", { children: ["Opening:", " ", _jsx("span", { className: "font-medium", children: formatBalance(balance.amount) })] }), endingBalance && (_jsxs("div", { children: ["Closing:", " ", _jsx("span", { className: "font-medium", children: formatBalance(endingBalance.amount) })] }))] })] }, balance.id));
|
|
523
|
+
}), endingOnlyBalances.map((balance) => (_jsxs("div", { className: "bg-gray-50 rounded p-2 text-sm", children: [_jsx("div", { className: "font-medium text-gray-700 mb-1", children: balance.token }), _jsx("div", { className: "text-xs text-gray-600", style: {
|
|
524
|
+
fontVariantNumeric: "tabular-nums",
|
|
525
|
+
}, children: _jsxs("div", { children: ["Closing:", " ", _jsx("span", { className: "font-medium", children: formatBalance(balance.amount) })] }) })] }, balance.id)))] })] }));
|
|
526
|
+
})(), account.transactions.length > 0 && (_jsx("button", { onClick: () => handleToggleAccountExpansion(account.id), className: "mt-3 flex items-center gap-2 text-sm text-blue-600 hover:text-blue-800", children: expandedAccounts.has(account.id) ? (_jsxs(_Fragment, { children: [_jsx(ChevronUp, { className: "w-4 h-4" }), _jsx("span", { children: "Hide Transactions" })] })) : (_jsxs(_Fragment, { children: [_jsx(ChevronDown, { className: "w-4 h-4" }), _jsx("span", { children: "Show Transactions" })] })) }))] }), expandedAccounts.has(account.id) &&
|
|
527
|
+
account.transactions.length > 0 && (_jsx("div", { className: "border-t border-gray-200 bg-gray-50", children: _jsxs("div", { className: "p-4", children: [_jsxs("h4", { className: "text-sm font-semibold text-gray-700 mb-3", children: ["Transactions (", account.transactions.length, ")"] }), _jsx("div", { className: "space-y-2", children: account.transactions.map((tx) => (_jsx("div", { className: "bg-white border border-gray-200 rounded p-3 text-sm", children: _jsxs("div", { className: "grid grid-cols-2 gap-2", children: [_jsxs("div", { children: [_jsx("span", { className: "text-gray-500", children: "Direction:" }), _jsx("span", { className: `ml-2 font-medium ${tx.direction === "INFLOW"
|
|
528
|
+
? "text-green-600"
|
|
529
|
+
: "text-red-600"}`, children: tx.direction })] }), _jsxs("div", { children: [_jsx("span", { className: "text-gray-500", children: "Amount:" }), _jsx("span", { className: "ml-2 font-medium", children: typeof tx.amount === "object" &&
|
|
530
|
+
tx.amount?.value !== undefined
|
|
531
|
+
? `${tx.amount.value} ${tx.amount.unit || tx.token}`
|
|
532
|
+
: `${tx.amount} ${tx.token}` })] }), _jsxs("div", { children: [_jsx("span", { className: "text-gray-500", children: "Date:" }), _jsx("span", { className: "ml-2", children: new Date(tx.datetime).toLocaleDateString() })] }), _jsxs("div", { children: [_jsx("span", { className: "text-gray-500", children: "Time:" }), _jsx("span", { className: "ml-2", children: new Date(tx.datetime).toLocaleTimeString() })] }), tx.counterParty && (_jsxs("div", { className: "col-span-2", children: [_jsx("span", { className: "text-gray-500", children: "Counter Party:" }), _jsx("span", { className: "ml-2 font-mono text-xs", children: tx.counterParty })] })), tx.flowType && (_jsxs("div", { children: [_jsx("span", { className: "text-gray-500", children: "Flow Type:" }), _jsx("span", { className: `ml-2 px-2 py-0.5 rounded text-xs font-medium ${tx.flowType === "TopUp"
|
|
533
|
+
? "bg-green-100 text-green-800"
|
|
534
|
+
: tx.flowType === "Return"
|
|
535
|
+
? "bg-orange-100 text-orange-800"
|
|
536
|
+
: tx.flowType ===
|
|
537
|
+
"Internal"
|
|
538
|
+
? "bg-purple-100 text-purple-800"
|
|
539
|
+
: "bg-red-100 text-red-800"}`, children: tx.flowType })] })), _jsxs("div", { className: "col-span-2", children: [_jsx("span", { className: "text-gray-500", children: "Tx Hash:" }), _jsxs("a", { href: `https://etherscan.io/tx/${tx.txHash}`, target: "_blank", rel: "noopener noreferrer", className: "ml-2 text-blue-600 hover:underline font-mono text-xs", children: [tx.txHash.substring(0, 10), "...", tx.txHash.substring(tx.txHash.length - 8)] })] })] }) }, tx.id))) })] }) }))] }, account.id))) })] }, type));
|
|
540
|
+
}) }))] }), isAccountPickerOpen && (_jsx("div", { className: "fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50", children: _jsxs("div", { className: "bg-white rounded-lg shadow-xl max-w-2xl w-full mx-4 max-h-[80vh] flex flex-col", children: [_jsxs("div", { className: "p-6 border-b", children: [_jsx("h3", { className: "text-xl font-semibold", children: "Select Accounts to Import" }), _jsx("p", { className: "text-sm text-gray-600 mt-1", children: "Choose accounts from the selected Accounts document" })] }), _jsx("div", { className: "p-6 overflow-y-auto flex-1", children: availableAccounts.length === 0 ? (_jsx("div", { className: "text-center py-8 text-gray-500", children: "No accounts available in the selected document" })) : (_jsx("div", { className: "space-y-2", children: availableAccounts.map((account) => {
|
|
541
|
+
const isAlreadyAdded = existingAccountIds.has(account.id);
|
|
542
|
+
const isSelected = selectedAccountIds.has(account.id);
|
|
543
|
+
return (_jsx("div", { onClick: () => !isAlreadyAdded && handleToggleAccount(account.id), className: `p-4 border rounded-lg cursor-pointer transition-colors ${isAlreadyAdded
|
|
544
|
+
? "bg-gray-100 cursor-not-allowed opacity-50"
|
|
545
|
+
: isSelected
|
|
546
|
+
? "bg-blue-50 border-blue-500"
|
|
547
|
+
: "hover:bg-gray-50"}`, children: _jsxs("div", { className: "flex items-start justify-between", children: [_jsxs("div", { className: "flex items-start gap-3", children: [_jsx("input", { type: "checkbox", checked: isSelected, disabled: isAlreadyAdded, onChange: () => { }, className: "mt-1" }), _jsxs("div", { children: [_jsx("h4", { className: "font-medium", children: account.name }), _jsx("p", { className: "text-sm text-gray-600", children: account.account }), _jsx("span", { className: `inline-block mt-2 px-2 py-1 text-xs rounded ${account.type === "Source"
|
|
548
|
+
? "bg-emerald-100 text-emerald-800"
|
|
549
|
+
: account.type === "Internal"
|
|
550
|
+
? "bg-blue-100 text-blue-800"
|
|
551
|
+
: account.type === "Destination"
|
|
552
|
+
? "bg-amber-100 text-amber-800"
|
|
553
|
+
: "bg-gray-100 text-gray-700"}`, children: account.type || "External" })] })] }), isAlreadyAdded && (_jsx("span", { className: "text-xs text-gray-500", children: "Already added" }))] }) }, account.id));
|
|
554
|
+
}) })) }), _jsxs("div", { className: "p-6 border-t flex justify-end gap-3", children: [_jsx("button", { onClick: () => {
|
|
555
|
+
setIsAccountPickerOpen(false);
|
|
556
|
+
setSelectedAccountIds(new Set());
|
|
557
|
+
}, className: "px-4 py-2 border border-gray-300 rounded-md hover:bg-gray-50", children: "Cancel" }), _jsxs("button", { onClick: handleImportAccounts, disabled: selectedAccountIds.size === 0, className: "px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 disabled:bg-gray-400 disabled:cursor-not-allowed", children: ["Import", " ", selectedAccountIds.size > 0
|
|
558
|
+
? `(${selectedAccountIds.size})`
|
|
559
|
+
: ""] })] })] }) }))] })] }));
|
|
560
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook for syncing snapshot accounts with account transactions documents
|
|
3
|
+
* Similar to useSyncWallet in expense-report
|
|
4
|
+
*/
|
|
5
|
+
import type { SnapshotAccount } from "../../../document-models/snapshot-report/gen/types.js";
|
|
6
|
+
import type { AccountEntry } from "../../../document-models/accounts/gen/schema/types.js";
|
|
7
|
+
export declare function useSyncSnapshotAccount(): {
|
|
8
|
+
syncAccount: (snapshotAccount: SnapshotAccount, accountEntry: AccountEntry | undefined, accountsDocumentId: string | null | undefined, startDate: string | null | undefined, endDate: string | null | undefined, dispatch: any, allSnapshotAccounts?: SnapshotAccount[], snapshotDocumentId?: string) => Promise<{
|
|
9
|
+
success: boolean;
|
|
10
|
+
message: string;
|
|
11
|
+
transactionsAdded?: number;
|
|
12
|
+
documentId?: string;
|
|
13
|
+
}>;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=useSyncSnapshotAccount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSyncSnapshotAccount.d.ts","sourceRoot":"","sources":["../../../../editors/snapshot-report-editor/hooks/useSyncSnapshotAccount.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiBH,OAAO,KAAK,EACV,eAAe,EAEhB,MAAM,uDAAuD,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uDAAuD,CAAC;AAG1F,wBAAgB,sBAAsB;mCAKjB,eAAe,gBAClB,YAAY,GAAG,SAAS,sBAClB,MAAM,GAAG,IAAI,GAAG,SAAS,aAClC,MAAM,GAAG,IAAI,GAAG,SAAS,WAC3B,MAAM,GAAG,IAAI,GAAG,SAAS,YACxB,GAAG,wBACQ,eAAe,EAAE,uBACjB,MAAM,KAC1B,OAAO,CAAC;QACT,OAAO,EAAE,OAAO,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;EAsbH"}
|