@powerhousedao/contributor-billing 0.1.31 → 0.1.33
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/ingestPDF.js +1 -1
- package/dist/editors/invoice/invoiceToGnosis.js +3 -3
- 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/invoice/requestFinance.js +2 -2
- package/dist/editors/invoice/uploadPdfChunked.js +2 -2
- 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 -13
- 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,327 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook for syncing snapshot accounts with account transactions documents
|
|
3
|
+
* Similar to useSyncWallet in expense-report
|
|
4
|
+
*/
|
|
5
|
+
import { useDocumentsInSelectedDrive, useSelectedDrive, dispatchActions, } from "@powerhousedao/reactor-browser";
|
|
6
|
+
import { generateId } from "document-model/core";
|
|
7
|
+
import { accountTransactionsService } from "../../accounts-editor/services/accountTransactionsService.js";
|
|
8
|
+
import { actions as accountsActions } from "../../../document-models/accounts/index.js";
|
|
9
|
+
import { actions as snapshotActions, balancesActions, transactionsActions, } from "../../../document-models/snapshot-report/index.js";
|
|
10
|
+
import { calculateBalances } from "../utils/balanceCalculations.js";
|
|
11
|
+
import { deriveTransactionsForAccount } from "../utils/deriveTransactions.js";
|
|
12
|
+
import { calculateTransactionFlowInfo } from "../utils/flowTypeCalculations.js";
|
|
13
|
+
export function useSyncSnapshotAccount() {
|
|
14
|
+
const documents = useDocumentsInSelectedDrive();
|
|
15
|
+
const [selectedDrive] = useSelectedDrive();
|
|
16
|
+
const syncAccount = async (snapshotAccount, accountEntry, accountsDocumentId, startDate, endDate, dispatch, allSnapshotAccounts = [], snapshotDocumentId) => {
|
|
17
|
+
if (!documents || !startDate || !endDate) {
|
|
18
|
+
return {
|
|
19
|
+
success: false,
|
|
20
|
+
message: "Missing required data (documents, startDate, or endDate)",
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
try {
|
|
24
|
+
// Handle non-Internal accounts differently - derive from Internal accounts
|
|
25
|
+
if (snapshotAccount.type !== "Internal") {
|
|
26
|
+
return await syncNonInternalAccount(snapshotAccount, startDate, endDate, dispatch, allSnapshotAccounts, snapshotDocumentId);
|
|
27
|
+
}
|
|
28
|
+
// For Internal accounts: sync from AccountTransactions document
|
|
29
|
+
// Step 1: Ensure account transactions document exists
|
|
30
|
+
let accountTransactionsDocId = snapshotAccount.accountTransactionsId;
|
|
31
|
+
if (!accountTransactionsDocId && accountEntry) {
|
|
32
|
+
// Create account transactions document
|
|
33
|
+
const driveId = selectedDrive?.header?.id;
|
|
34
|
+
if (!driveId) {
|
|
35
|
+
return {
|
|
36
|
+
success: false,
|
|
37
|
+
message: "No drive selected",
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
const result = await accountTransactionsService.createAccountTransactionsDocument(accountEntry, accountsDocumentId || "", driveId);
|
|
41
|
+
if (!result.success || !result.documentId) {
|
|
42
|
+
return {
|
|
43
|
+
success: false,
|
|
44
|
+
message: result.message ||
|
|
45
|
+
"Failed to create account transactions document",
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
accountTransactionsDocId = result.documentId;
|
|
49
|
+
}
|
|
50
|
+
// Step 2: Get account transactions document
|
|
51
|
+
if (!accountTransactionsDocId) {
|
|
52
|
+
return {
|
|
53
|
+
success: false,
|
|
54
|
+
message: "No account transactions document available",
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
const txDoc = documents.find((doc) => doc.header.id === accountTransactionsDocId &&
|
|
58
|
+
doc.header.documentType === "powerhouse/account-transactions");
|
|
59
|
+
if (!txDoc?.state?.global?.transactions) {
|
|
60
|
+
return {
|
|
61
|
+
success: false,
|
|
62
|
+
message: "Account transactions document not found or has no transactions",
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
const allTransactions = txDoc.state.global.transactions;
|
|
66
|
+
// Step 3: Filter transactions by period
|
|
67
|
+
const start = new Date(startDate);
|
|
68
|
+
const end = new Date(endDate);
|
|
69
|
+
const periodTransactions = allTransactions.filter((tx) => {
|
|
70
|
+
if (!tx?.datetime)
|
|
71
|
+
return false;
|
|
72
|
+
const txDate = new Date(tx.datetime);
|
|
73
|
+
if (isNaN(txDate.getTime()))
|
|
74
|
+
return false;
|
|
75
|
+
return txDate >= start && txDate <= end;
|
|
76
|
+
});
|
|
77
|
+
// Step 4: Check if transactions have changed before updating
|
|
78
|
+
// Compare by transactionId to detect actual changes
|
|
79
|
+
const existingTransactionIds = new Set(snapshotAccount.transactions.map((tx) => tx.transactionId));
|
|
80
|
+
const newTransactionIds = new Set(periodTransactions.map((tx) => tx.id));
|
|
81
|
+
// Check if the sets are identical (no changes needed)
|
|
82
|
+
const hasChanges = existingTransactionIds.size !== newTransactionIds.size ||
|
|
83
|
+
[...existingTransactionIds].some((id) => !newTransactionIds.has(id)) ||
|
|
84
|
+
[...newTransactionIds].some((id) => !existingTransactionIds.has(id));
|
|
85
|
+
if (!hasChanges) {
|
|
86
|
+
return {
|
|
87
|
+
success: true,
|
|
88
|
+
message: "No changes detected - already in sync",
|
|
89
|
+
transactionsAdded: snapshotAccount.transactions.length,
|
|
90
|
+
documentId: accountTransactionsDocId,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
// Step 5: Calculate balances BEFORE making any changes
|
|
94
|
+
// Map account transactions format to snapshot transaction format
|
|
95
|
+
const allTransactionsForBalance = allTransactions.map((tx) => {
|
|
96
|
+
// Extract token from transaction
|
|
97
|
+
const token = tx.details?.token ||
|
|
98
|
+
(typeof tx.amount === "object" && tx.amount?.unit
|
|
99
|
+
? tx.amount.unit
|
|
100
|
+
: typeof tx.amount === "string"
|
|
101
|
+
? tx.amount.split(" ")[1] || ""
|
|
102
|
+
: "");
|
|
103
|
+
return {
|
|
104
|
+
id: String(tx.id),
|
|
105
|
+
transactionId: String(tx.id),
|
|
106
|
+
counterParty: tx.counterParty || null,
|
|
107
|
+
amount: tx.amount,
|
|
108
|
+
datetime: tx.datetime,
|
|
109
|
+
txHash: tx.details?.txHash || "",
|
|
110
|
+
token: token,
|
|
111
|
+
blockNumber: tx.details?.blockNumber ?? null,
|
|
112
|
+
direction: tx.direction,
|
|
113
|
+
flowType: null,
|
|
114
|
+
counterPartyAccountId: null,
|
|
115
|
+
};
|
|
116
|
+
});
|
|
117
|
+
const balances = calculateBalances(allTransactionsForBalance, startDate, endDate, snapshotAccount.type);
|
|
118
|
+
// Build all actions into a single batch for efficiency
|
|
119
|
+
const allActions = [];
|
|
120
|
+
// 1. Remove existing transactions
|
|
121
|
+
snapshotAccount.transactions.forEach((tx) => {
|
|
122
|
+
allActions.push(transactionsActions.removeTransaction({ id: tx.id }));
|
|
123
|
+
});
|
|
124
|
+
// 2. Add new transactions
|
|
125
|
+
for (const tx of periodTransactions) {
|
|
126
|
+
const { flowType, counterPartyAccountId } = calculateTransactionFlowInfo(tx.direction, snapshotAccount.type, tx.counterParty, allSnapshotAccounts.length > 0
|
|
127
|
+
? allSnapshotAccounts
|
|
128
|
+
: [snapshotAccount]);
|
|
129
|
+
allActions.push(transactionsActions.addTransaction({
|
|
130
|
+
accountId: snapshotAccount.id,
|
|
131
|
+
id: generateId(),
|
|
132
|
+
transactionId: tx.id,
|
|
133
|
+
counterParty: tx.counterParty || undefined,
|
|
134
|
+
amount: tx.amount,
|
|
135
|
+
datetime: tx.datetime,
|
|
136
|
+
txHash: tx.details?.txHash || "",
|
|
137
|
+
token: tx.details?.token || "",
|
|
138
|
+
blockNumber: tx.details?.blockNumber || undefined,
|
|
139
|
+
direction: tx.direction,
|
|
140
|
+
flowType: flowType,
|
|
141
|
+
counterPartyAccountId: counterPartyAccountId || undefined,
|
|
142
|
+
}));
|
|
143
|
+
}
|
|
144
|
+
// 3. Remove existing starting balances
|
|
145
|
+
snapshotAccount.startingBalances.forEach((b) => {
|
|
146
|
+
allActions.push(balancesActions.removeStartingBalance({
|
|
147
|
+
accountId: snapshotAccount.id,
|
|
148
|
+
balanceId: b.id,
|
|
149
|
+
}));
|
|
150
|
+
});
|
|
151
|
+
// 4. Add new starting balances
|
|
152
|
+
balances.forEach((balance) => {
|
|
153
|
+
allActions.push(balancesActions.setStartingBalance({
|
|
154
|
+
accountId: snapshotAccount.id,
|
|
155
|
+
balanceId: generateId(),
|
|
156
|
+
token: balance.token,
|
|
157
|
+
amount: balance.opening,
|
|
158
|
+
}));
|
|
159
|
+
});
|
|
160
|
+
// 5. Remove existing ending balances
|
|
161
|
+
snapshotAccount.endingBalances.forEach((b) => {
|
|
162
|
+
allActions.push(balancesActions.removeEndingBalance({
|
|
163
|
+
accountId: snapshotAccount.id,
|
|
164
|
+
balanceId: b.id,
|
|
165
|
+
}));
|
|
166
|
+
});
|
|
167
|
+
// 6. Add new ending balances
|
|
168
|
+
balances.forEach((balance) => {
|
|
169
|
+
allActions.push(balancesActions.setEndingBalance({
|
|
170
|
+
accountId: snapshotAccount.id,
|
|
171
|
+
balanceId: generateId(),
|
|
172
|
+
token: balance.token,
|
|
173
|
+
amount: balance.closing,
|
|
174
|
+
}));
|
|
175
|
+
});
|
|
176
|
+
// Dispatch all actions in a single batch if we have a document ID
|
|
177
|
+
if (snapshotDocumentId && allActions.length > 0) {
|
|
178
|
+
await dispatchActions(allActions, snapshotDocumentId);
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
// Fallback to individual dispatches if no document ID
|
|
182
|
+
allActions.forEach((action) => dispatch(action));
|
|
183
|
+
}
|
|
184
|
+
return {
|
|
185
|
+
success: true,
|
|
186
|
+
message: `Synced ${periodTransactions.length} transactions and updated balances`,
|
|
187
|
+
transactionsAdded: periodTransactions.length,
|
|
188
|
+
documentId: accountTransactionsDocId,
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
catch (error) {
|
|
192
|
+
console.error("[useSyncSnapshotAccount] Error syncing account:", error);
|
|
193
|
+
return {
|
|
194
|
+
success: false,
|
|
195
|
+
message: `Error: ${error instanceof Error ? error.message : "Unknown error"}`,
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* Sync a non-Internal account by deriving transactions from Internal accounts
|
|
201
|
+
*/
|
|
202
|
+
const syncNonInternalAccount = async (snapshotAccount, startDate, endDate, dispatch, allSnapshotAccounts, snapshotDocumentId) => {
|
|
203
|
+
try {
|
|
204
|
+
// Get Internal accounts with their transactions
|
|
205
|
+
const internalAccounts = allSnapshotAccounts.filter((acc) => acc.type === "Internal");
|
|
206
|
+
if (internalAccounts.length === 0) {
|
|
207
|
+
return {
|
|
208
|
+
success: false,
|
|
209
|
+
message: "No Internal accounts found. Import Internal accounts first to derive transactions.",
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
// Derive transactions from Internal accounts
|
|
213
|
+
const derivedTransactions = deriveTransactionsForAccount(snapshotAccount, internalAccounts);
|
|
214
|
+
// Filter to period for snapshot
|
|
215
|
+
const start = new Date(startDate);
|
|
216
|
+
const end = new Date(endDate);
|
|
217
|
+
const periodTransactions = derivedTransactions.filter((tx) => {
|
|
218
|
+
const txDate = new Date(tx.datetime);
|
|
219
|
+
return txDate >= start && txDate <= end;
|
|
220
|
+
});
|
|
221
|
+
// Check if transactions have changed before updating
|
|
222
|
+
const existingTransactionIds = new Set(snapshotAccount.transactions.map((tx) => tx.transactionId));
|
|
223
|
+
const newTransactionIds = new Set(periodTransactions.map((tx) => tx.transactionId));
|
|
224
|
+
const hasChanges = existingTransactionIds.size !== newTransactionIds.size ||
|
|
225
|
+
[...existingTransactionIds].some((id) => !newTransactionIds.has(id)) ||
|
|
226
|
+
[...newTransactionIds].some((id) => !existingTransactionIds.has(id));
|
|
227
|
+
if (!hasChanges) {
|
|
228
|
+
return {
|
|
229
|
+
success: true,
|
|
230
|
+
message: "No changes detected - already in sync",
|
|
231
|
+
transactionsAdded: snapshotAccount.transactions.length,
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
// Calculate balances using ALL derived transactions (not just period)
|
|
235
|
+
const allTransactionsForBalance = derivedTransactions.map((tx) => ({
|
|
236
|
+
id: tx.id,
|
|
237
|
+
transactionId: tx.transactionId,
|
|
238
|
+
counterParty: tx.counterParty,
|
|
239
|
+
amount: tx.amount,
|
|
240
|
+
datetime: tx.datetime,
|
|
241
|
+
txHash: tx.txHash,
|
|
242
|
+
token: tx.token,
|
|
243
|
+
blockNumber: tx.blockNumber,
|
|
244
|
+
direction: tx.direction,
|
|
245
|
+
flowType: tx.flowType,
|
|
246
|
+
counterPartyAccountId: tx.counterPartyAccountId,
|
|
247
|
+
}));
|
|
248
|
+
const balances = calculateBalances(allTransactionsForBalance, startDate, endDate, snapshotAccount.type);
|
|
249
|
+
// Build all actions into a single batch for efficiency
|
|
250
|
+
const allActions = [];
|
|
251
|
+
// 1. Remove existing transactions
|
|
252
|
+
snapshotAccount.transactions.forEach((tx) => {
|
|
253
|
+
allActions.push(transactionsActions.removeTransaction({ id: tx.id }));
|
|
254
|
+
});
|
|
255
|
+
// 2. Add derived transactions
|
|
256
|
+
for (const tx of periodTransactions) {
|
|
257
|
+
allActions.push(transactionsActions.addTransaction({
|
|
258
|
+
accountId: snapshotAccount.id,
|
|
259
|
+
id: tx.id,
|
|
260
|
+
transactionId: tx.transactionId,
|
|
261
|
+
counterParty: tx.counterParty,
|
|
262
|
+
amount: tx.amount,
|
|
263
|
+
datetime: tx.datetime,
|
|
264
|
+
txHash: tx.txHash,
|
|
265
|
+
token: tx.token,
|
|
266
|
+
blockNumber: tx.blockNumber ?? undefined,
|
|
267
|
+
direction: tx.direction,
|
|
268
|
+
flowType: tx.flowType,
|
|
269
|
+
counterPartyAccountId: tx.counterPartyAccountId,
|
|
270
|
+
}));
|
|
271
|
+
}
|
|
272
|
+
// 3. Remove existing starting balances
|
|
273
|
+
snapshotAccount.startingBalances.forEach((b) => {
|
|
274
|
+
allActions.push(balancesActions.removeStartingBalance({
|
|
275
|
+
accountId: snapshotAccount.id,
|
|
276
|
+
balanceId: b.id,
|
|
277
|
+
}));
|
|
278
|
+
});
|
|
279
|
+
// 4. Add new starting balances
|
|
280
|
+
balances.forEach((balance) => {
|
|
281
|
+
allActions.push(balancesActions.setStartingBalance({
|
|
282
|
+
accountId: snapshotAccount.id,
|
|
283
|
+
balanceId: generateId(),
|
|
284
|
+
token: balance.token,
|
|
285
|
+
amount: balance.opening,
|
|
286
|
+
}));
|
|
287
|
+
});
|
|
288
|
+
// 5. Remove existing ending balances
|
|
289
|
+
snapshotAccount.endingBalances.forEach((b) => {
|
|
290
|
+
allActions.push(balancesActions.removeEndingBalance({
|
|
291
|
+
accountId: snapshotAccount.id,
|
|
292
|
+
balanceId: b.id,
|
|
293
|
+
}));
|
|
294
|
+
});
|
|
295
|
+
// 6. Add new ending balances
|
|
296
|
+
balances.forEach((balance) => {
|
|
297
|
+
allActions.push(balancesActions.setEndingBalance({
|
|
298
|
+
accountId: snapshotAccount.id,
|
|
299
|
+
balanceId: generateId(),
|
|
300
|
+
token: balance.token,
|
|
301
|
+
amount: balance.closing,
|
|
302
|
+
}));
|
|
303
|
+
});
|
|
304
|
+
// Dispatch all actions in a single batch if we have a document ID
|
|
305
|
+
if (snapshotDocumentId && allActions.length > 0) {
|
|
306
|
+
await dispatchActions(allActions, snapshotDocumentId);
|
|
307
|
+
}
|
|
308
|
+
else {
|
|
309
|
+
// Fallback to individual dispatches if no document ID
|
|
310
|
+
allActions.forEach((action) => dispatch(action));
|
|
311
|
+
}
|
|
312
|
+
return {
|
|
313
|
+
success: true,
|
|
314
|
+
message: `Derived ${periodTransactions.length} transactions from Internal accounts`,
|
|
315
|
+
transactionsAdded: periodTransactions.length,
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
catch (error) {
|
|
319
|
+
console.error("[useSyncSnapshotAccount] Error syncing non-Internal account:", error);
|
|
320
|
+
return {
|
|
321
|
+
success: false,
|
|
322
|
+
message: `Error: ${error instanceof Error ? error.message : "Unknown error"}`,
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
return { syncAccount };
|
|
327
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../editors/snapshot-report-editor/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGnD,eAAO,MAAM,oBAAoB,EAAE,YAOlC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility functions for calculating opening and closing balances
|
|
3
|
+
* from transactions in snapshot reports
|
|
4
|
+
*/
|
|
5
|
+
import type { SnapshotTransaction } from "../../../document-models/snapshot-report/gen/types.js";
|
|
6
|
+
import type { Scalars, AccountType } from "../../../document-models/snapshot-report/gen/schema/types.js";
|
|
7
|
+
export type Amount_Currency = Scalars["Amount_Currency"]["output"];
|
|
8
|
+
export interface TokenBalance {
|
|
9
|
+
token: string;
|
|
10
|
+
opening: Amount_Currency;
|
|
11
|
+
closing: Amount_Currency;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Calculate opening and closing balances for all tokens from transactions
|
|
15
|
+
* @param transactions - All transactions for the account
|
|
16
|
+
* @param startDate - Period start date (ISO string)
|
|
17
|
+
* @param endDate - Period end date (ISO string)
|
|
18
|
+
* @param accountType - Optional account type for type-specific balance logic
|
|
19
|
+
* @returns Map of token to balance information
|
|
20
|
+
*/
|
|
21
|
+
export declare function calculateBalances(transactions: SnapshotTransaction[], startDate: string, endDate: string, accountType?: AccountType): Map<string, TokenBalance>;
|
|
22
|
+
/**
|
|
23
|
+
* Format balance amount for display
|
|
24
|
+
*/
|
|
25
|
+
export declare function formatBalance(amount: Amount_Currency): string;
|
|
26
|
+
//# sourceMappingURL=balanceCalculations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"balanceCalculations.d.ts","sourceRoot":"","sources":["../../../../editors/snapshot-report-editor/utils/balanceCalculations.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uDAAuD,CAAC;AACjG,OAAO,KAAK,EACV,OAAO,EACP,WAAW,EACZ,MAAM,8DAA8D,CAAC;AAEtE,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,CAAC;AAEnE,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,eAAe,CAAC;IACzB,OAAO,EAAE,eAAe,CAAC;CAC1B;AA8BD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EAAE,mBAAmB,EAAE,EACnC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,WAAW,CAAC,EAAE,WAAW,GACxB,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAiE3B;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,CAO7D"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility functions for calculating opening and closing balances
|
|
3
|
+
* from transactions in snapshot reports
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Calculate the effect of a transaction on balance based on account type
|
|
7
|
+
*
|
|
8
|
+
* - Internal accounts: Standard balance (INFLOW +, OUTFLOW -)
|
|
9
|
+
* - Source accounts: Track "cumulative provided" (OUTFLOW = funds sent to team = positive)
|
|
10
|
+
* - Destination accounts: Track "cumulative received" (INFLOW = funds received from team = positive)
|
|
11
|
+
* - External accounts: Net flows with team (standard balance)
|
|
12
|
+
*/
|
|
13
|
+
function getTransactionEffect(direction, amountValue, accountType) {
|
|
14
|
+
// For Source accounts: OUTFLOW means funds provided (positive)
|
|
15
|
+
if (accountType === "Source") {
|
|
16
|
+
return direction === "OUTFLOW" ? amountValue : -amountValue;
|
|
17
|
+
}
|
|
18
|
+
// For Destination accounts: INFLOW means funds received (positive)
|
|
19
|
+
if (accountType === "Destination") {
|
|
20
|
+
return direction === "INFLOW" ? amountValue : -amountValue;
|
|
21
|
+
}
|
|
22
|
+
// For Internal and External accounts: Standard balance
|
|
23
|
+
// INFLOW = positive, OUTFLOW = negative
|
|
24
|
+
return direction === "INFLOW" ? amountValue : -amountValue;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Calculate opening and closing balances for all tokens from transactions
|
|
28
|
+
* @param transactions - All transactions for the account
|
|
29
|
+
* @param startDate - Period start date (ISO string)
|
|
30
|
+
* @param endDate - Period end date (ISO string)
|
|
31
|
+
* @param accountType - Optional account type for type-specific balance logic
|
|
32
|
+
* @returns Map of token to balance information
|
|
33
|
+
*/
|
|
34
|
+
export function calculateBalances(transactions, startDate, endDate, accountType) {
|
|
35
|
+
const balances = new Map();
|
|
36
|
+
const start = new Date(startDate);
|
|
37
|
+
const end = new Date(endDate);
|
|
38
|
+
// Process all transactions
|
|
39
|
+
transactions.forEach((tx) => {
|
|
40
|
+
const txDate = new Date(tx.datetime);
|
|
41
|
+
const token = tx.token;
|
|
42
|
+
// Initialize balance for this token if not exists
|
|
43
|
+
if (!balances.has(token)) {
|
|
44
|
+
balances.set(token, {
|
|
45
|
+
token,
|
|
46
|
+
opening: { value: "0", unit: token },
|
|
47
|
+
closing: { value: "0", unit: token },
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
const balance = balances.get(token);
|
|
51
|
+
let amountStr;
|
|
52
|
+
const txAmount = tx.amount;
|
|
53
|
+
if (typeof txAmount === "object" && txAmount?.value !== undefined) {
|
|
54
|
+
amountStr = txAmount.value;
|
|
55
|
+
}
|
|
56
|
+
else if (typeof txAmount === "string") {
|
|
57
|
+
amountStr = txAmount.split(" ")[0] || "0";
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
amountStr = "0";
|
|
61
|
+
}
|
|
62
|
+
const amountValue = parseFloat(amountStr);
|
|
63
|
+
const effect = getTransactionEffect(tx.direction, amountValue, accountType);
|
|
64
|
+
// Calculate opening balance (transactions before period start)
|
|
65
|
+
if (txDate < start) {
|
|
66
|
+
const currentOpening = parseFloat(balance.opening.value || "0");
|
|
67
|
+
balance.opening.value = (currentOpening + effect).toString();
|
|
68
|
+
}
|
|
69
|
+
// Calculate period change (transactions during period)
|
|
70
|
+
if (txDate >= start && txDate <= end) {
|
|
71
|
+
const currentClosing = parseFloat(balance.closing.value || "0");
|
|
72
|
+
balance.closing.value = (currentClosing + effect).toString();
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
// Finalize closing balances (opening + period changes)
|
|
76
|
+
// Fix floating-point precision errors (e.g., -0.0000001 → 0)
|
|
77
|
+
const fixPrecision = (value) => {
|
|
78
|
+
// Only fix values very close to zero (floating-point errors)
|
|
79
|
+
// Allow real negative balances for non-Internal accounts
|
|
80
|
+
if (Math.abs(value) < 1e-10)
|
|
81
|
+
return 0;
|
|
82
|
+
return value;
|
|
83
|
+
};
|
|
84
|
+
balances.forEach((balance) => {
|
|
85
|
+
const openingValue = parseFloat(balance.opening.value || "0");
|
|
86
|
+
const periodChange = parseFloat(balance.closing.value || "0");
|
|
87
|
+
const closingValue = openingValue + periodChange;
|
|
88
|
+
balance.opening.value = fixPrecision(openingValue).toString();
|
|
89
|
+
balance.closing.value = fixPrecision(closingValue).toString();
|
|
90
|
+
});
|
|
91
|
+
return balances;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Format balance amount for display
|
|
95
|
+
*/
|
|
96
|
+
export function formatBalance(amount) {
|
|
97
|
+
if (typeof amount === "object" && amount?.value !== undefined) {
|
|
98
|
+
const value = parseFloat(amount.value);
|
|
99
|
+
return `${value.toFixed(6)} ${amount.unit || ""}`.trim();
|
|
100
|
+
}
|
|
101
|
+
// Amount_Currency should always be an object with value/unit
|
|
102
|
+
return "0";
|
|
103
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility for deriving transactions for non-Internal accounts
|
|
3
|
+
* from Internal account transactions where they appear as counter-parties.
|
|
4
|
+
*
|
|
5
|
+
* This allows Source/Destination/External accounts to show their interactions
|
|
6
|
+
* with Internal accounts without requiring their own AccountTransactions documents.
|
|
7
|
+
*/
|
|
8
|
+
import type { SnapshotAccount, TransactionFlowType } from "../../../document-models/snapshot-report/gen/schema/types.js";
|
|
9
|
+
/**
|
|
10
|
+
* Derived transaction ready to be added to a snapshot account
|
|
11
|
+
*/
|
|
12
|
+
export interface DerivedTransactionInput {
|
|
13
|
+
id: string;
|
|
14
|
+
transactionId: string;
|
|
15
|
+
counterParty: string;
|
|
16
|
+
counterPartyAccountId: string;
|
|
17
|
+
amount: {
|
|
18
|
+
value: string;
|
|
19
|
+
unit: string;
|
|
20
|
+
};
|
|
21
|
+
datetime: string;
|
|
22
|
+
txHash: string;
|
|
23
|
+
token: string;
|
|
24
|
+
blockNumber: number | null;
|
|
25
|
+
direction: "INFLOW" | "OUTFLOW";
|
|
26
|
+
flowType: TransactionFlowType;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Derive transactions for a non-Internal account by scanning Internal account transactions
|
|
30
|
+
*
|
|
31
|
+
* @param account - The Source/Destination/External account to derive transactions for
|
|
32
|
+
* @param internalAccounts - All Internal accounts with their transactions
|
|
33
|
+
* @returns Array of derived transactions from the account's perspective
|
|
34
|
+
*/
|
|
35
|
+
export declare function deriveTransactionsForAccount(account: SnapshotAccount, internalAccounts: SnapshotAccount[]): DerivedTransactionInput[];
|
|
36
|
+
/**
|
|
37
|
+
* Derive transactions for all non-Internal accounts in the snapshot
|
|
38
|
+
*
|
|
39
|
+
* @param snapshotAccounts - All accounts in the snapshot
|
|
40
|
+
* @returns Map of account ID to derived transactions
|
|
41
|
+
*/
|
|
42
|
+
export declare function deriveTransactionsForAllNonInternalAccounts(snapshotAccounts: SnapshotAccount[]): Map<string, DerivedTransactionInput[]>;
|
|
43
|
+
/**
|
|
44
|
+
* Check if an account should have derived transactions (non-Internal types)
|
|
45
|
+
*/
|
|
46
|
+
export declare function shouldDeriveTransactions(accountType: string): boolean;
|
|
47
|
+
//# sourceMappingURL=deriveTransactions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deriveTransactions.d.ts","sourceRoot":"","sources":["../../../../editors/snapshot-report-editor/utils/deriveTransactions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACpB,MAAM,8DAA8D,CAAC;AAGtE;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,QAAQ,GAAG,SAAS,CAAC;IAChC,QAAQ,EAAE,mBAAmB,CAAC;CAC/B;AAUD;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,eAAe,EACxB,gBAAgB,EAAE,eAAe,EAAE,GAClC,uBAAuB,EAAE,CAuD3B;AAED;;;;;GAKG;AACH,wBAAgB,2CAA2C,CACzD,gBAAgB,EAAE,eAAe,EAAE,GAClC,GAAG,CAAC,MAAM,EAAE,uBAAuB,EAAE,CAAC,CAgBxC;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAErE"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility for deriving transactions for non-Internal accounts
|
|
3
|
+
* from Internal account transactions where they appear as counter-parties.
|
|
4
|
+
*
|
|
5
|
+
* This allows Source/Destination/External accounts to show their interactions
|
|
6
|
+
* with Internal accounts without requiring their own AccountTransactions documents.
|
|
7
|
+
*/
|
|
8
|
+
import { generateId } from "document-model/core";
|
|
9
|
+
import { calculateFlowType } from "./flowTypeCalculations.js";
|
|
10
|
+
/**
|
|
11
|
+
* Invert the direction of a transaction
|
|
12
|
+
* When deriving from Internal account's perspective to the counter-party's perspective
|
|
13
|
+
*/
|
|
14
|
+
function invertDirection(direction) {
|
|
15
|
+
return direction === "INFLOW" ? "OUTFLOW" : "INFLOW";
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Derive transactions for a non-Internal account by scanning Internal account transactions
|
|
19
|
+
*
|
|
20
|
+
* @param account - The Source/Destination/External account to derive transactions for
|
|
21
|
+
* @param internalAccounts - All Internal accounts with their transactions
|
|
22
|
+
* @returns Array of derived transactions from the account's perspective
|
|
23
|
+
*/
|
|
24
|
+
export function deriveTransactionsForAccount(account, internalAccounts) {
|
|
25
|
+
const derivedTransactions = [];
|
|
26
|
+
const accountAddressLower = account.accountAddress.toLowerCase();
|
|
27
|
+
// Scan all Internal accounts
|
|
28
|
+
for (const internalAccount of internalAccounts) {
|
|
29
|
+
// Find transactions where the counter-party is our target account
|
|
30
|
+
for (const tx of internalAccount.transactions) {
|
|
31
|
+
if (tx.counterParty?.toLowerCase() === accountAddressLower) {
|
|
32
|
+
// Derive the transaction from the non-Internal account's perspective
|
|
33
|
+
const invertedDirection = invertDirection(tx.direction);
|
|
34
|
+
// Calculate flow type from the derived account's perspective
|
|
35
|
+
const flowType = calculateFlowType(invertedDirection, account.type, internalAccount.type);
|
|
36
|
+
// Parse amount
|
|
37
|
+
const txAmount = tx.amount;
|
|
38
|
+
let amount;
|
|
39
|
+
if (typeof txAmount === "object" && txAmount.value !== undefined) {
|
|
40
|
+
amount = { value: txAmount.value, unit: txAmount.unit || tx.token };
|
|
41
|
+
}
|
|
42
|
+
else if (typeof txAmount === "string") {
|
|
43
|
+
amount = { value: txAmount.split(" ")[0] || "0", unit: tx.token };
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
amount = { value: "0", unit: tx.token };
|
|
47
|
+
}
|
|
48
|
+
derivedTransactions.push({
|
|
49
|
+
id: generateId(),
|
|
50
|
+
transactionId: tx.transactionId, // Reference to original transaction
|
|
51
|
+
counterParty: internalAccount.accountAddress, // The Internal account is now the counter-party
|
|
52
|
+
counterPartyAccountId: internalAccount.id,
|
|
53
|
+
amount,
|
|
54
|
+
datetime: tx.datetime,
|
|
55
|
+
txHash: tx.txHash,
|
|
56
|
+
token: tx.token,
|
|
57
|
+
blockNumber: tx.blockNumber ?? null,
|
|
58
|
+
direction: invertedDirection,
|
|
59
|
+
flowType,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
// Sort by datetime
|
|
65
|
+
derivedTransactions.sort((a, b) => new Date(a.datetime).getTime() - new Date(b.datetime).getTime());
|
|
66
|
+
return derivedTransactions;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Derive transactions for all non-Internal accounts in the snapshot
|
|
70
|
+
*
|
|
71
|
+
* @param snapshotAccounts - All accounts in the snapshot
|
|
72
|
+
* @returns Map of account ID to derived transactions
|
|
73
|
+
*/
|
|
74
|
+
export function deriveTransactionsForAllNonInternalAccounts(snapshotAccounts) {
|
|
75
|
+
const internalAccounts = snapshotAccounts.filter((acc) => acc.type === "Internal");
|
|
76
|
+
const nonInternalAccounts = snapshotAccounts.filter((acc) => acc.type !== "Internal");
|
|
77
|
+
const derivedByAccount = new Map();
|
|
78
|
+
for (const account of nonInternalAccounts) {
|
|
79
|
+
const derived = deriveTransactionsForAccount(account, internalAccounts);
|
|
80
|
+
derivedByAccount.set(account.id, derived);
|
|
81
|
+
}
|
|
82
|
+
return derivedByAccount;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Check if an account should have derived transactions (non-Internal types)
|
|
86
|
+
*/
|
|
87
|
+
export function shouldDeriveTransactions(accountType) {
|
|
88
|
+
return accountType !== "Internal";
|
|
89
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { SnapshotAccount, TransactionFlowType } from "../../../document-models/snapshot-report/gen/schema/types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Calculate the flow type for a transaction based on account types
|
|
4
|
+
* @param direction - Transaction direction (INFLOW or OUTFLOW)
|
|
5
|
+
* @param accountType - Type of the account the transaction belongs to
|
|
6
|
+
* @param counterPartyType - Type of the counter-party account (if found)
|
|
7
|
+
* @returns The calculated flow type
|
|
8
|
+
*/
|
|
9
|
+
export declare function calculateFlowType(direction: string, accountType: string, counterPartyType: string | null): TransactionFlowType;
|
|
10
|
+
/**
|
|
11
|
+
* Find a counter-party account by address in the snapshot accounts
|
|
12
|
+
* @param counterPartyAddress - The ethereum address of the counter-party
|
|
13
|
+
* @param snapshotAccounts - Array of snapshot accounts to search
|
|
14
|
+
* @returns The matching account or undefined
|
|
15
|
+
*/
|
|
16
|
+
export declare function findCounterPartyAccount(counterPartyAddress: string | null | undefined, snapshotAccounts: SnapshotAccount[]): SnapshotAccount | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Calculate flow type and counter-party account ID for a transaction
|
|
19
|
+
* @param direction - Transaction direction
|
|
20
|
+
* @param accountType - Type of the account
|
|
21
|
+
* @param counterPartyAddress - Counter-party ethereum address
|
|
22
|
+
* @param snapshotAccounts - All snapshot accounts for lookup
|
|
23
|
+
* @returns Object with flowType and counterPartyAccountId
|
|
24
|
+
*/
|
|
25
|
+
export declare function calculateTransactionFlowInfo(direction: string, accountType: string, counterPartyAddress: string | null | undefined, snapshotAccounts: SnapshotAccount[]): {
|
|
26
|
+
flowType: TransactionFlowType;
|
|
27
|
+
counterPartyAccountId: string | null;
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=flowTypeCalculations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flowTypeCalculations.d.ts","sourceRoot":"","sources":["../../../../editors/snapshot-report-editor/utils/flowTypeCalculations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACpB,MAAM,8DAA8D,CAAC;AAEtE;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,gBAAgB,EAAE,MAAM,GAAG,IAAI,GAC9B,mBAAmB,CAyBrB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,mBAAmB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC9C,gBAAgB,EAAE,eAAe,EAAE,GAClC,eAAe,GAAG,SAAS,CAS7B;AAED;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,mBAAmB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC9C,gBAAgB,EAAE,eAAe,EAAE,GAClC;IACD,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC,CAgBA"}
|