Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(api): rewrite entitlements internals and api OM-649 (#1000)
* refactor(api): rewrite entitlements api * fix(api): add grant voiding api * feat(credit): implement calculation engine * feat(credit): restructure packages * feat: write credit connector interfaces * feat: write more connector interfaces * feat: extend entitlement apis * chore: update API docs * feat: re-add entitlements apis and write balance connectors * feat: implement most adapters and db access * feat: usagereset persistence and unified ID handling * feat: add windowed history retrieval * feat: implement entitlement reset * feat(api): add static and boolean entitlements (cherry picked from commit 700b76f) * feat(api): improve (cherry picked from commit 56a7852) * feat(api): improve (cherry picked from commit fce0817) * feat(api): improve (cherry picked from commit 9b20fb9) * feat: update openapi schema * style: address TODOs * feat: add generic transaction management * refactor(api): final api proposal * feat: add transactions and owner exclusive locking * feat: add feature API * feat: pretty dev logging and entitlement APIs * fix: entitlement resp body * fix: balance snapping timing and grant creation * feat: add grant listing api * feat: reset api * feat: add balance history API * feat: add grant listing and voiding * chore: delete old credit pg connector * feat: expoe through openemter package * style: fix lint * chore: update go version and truncate test ts precisions * refactor: rm HighWaterMark from streaming testutils * style: rm comments * style: rm old comments * fix(engine): write populate helper for balance operations and fill the snapshot with grants on reset too * fix: typo update internal/credit/history.go Co-authored-by: Peter Turi <[email protected]> Signed-off-by: Alex Goth <[email protected]> * fix: typo update internal/credit/history.go Co-authored-by: Peter Turi <[email protected]> Signed-off-by: Alex Goth <[email protected]> * chore: fix filename typo * fix: invalidate snapshots after grant voiding * chore: expose handler types * refactor: tidy up api handlers for betterexposability * fix: expose handlers as aliases * fix: expose all entitlement handlers * chore: expose db builder from server package * chore: expose client creation * fix: remove unnecessary return * fix(e2e): fix e2e tests, api types, problems * refactor: rename repos to repos * fix: fix linting and archived-feature entitlement creation * style: use long names * test: sort * fix: e2e tests and capitalization --------- Signed-off-by: Alex Goth <[email protected]> Co-authored-by: Peter Marton <[email protected]> Co-authored-by: Peter Turi <[email protected]>
- Loading branch information