awslabs / sbt-aws

SaaS Builder Toolkit for AWS is a developer toolkit to implement SaaS best practices and increase developer velocity.
Apache License 2.0
90 stars 16 forks source link

feat(billing): add support for customer and user management #18

Closed suhussai closed 3 months ago

suhussai commented 3 months ago

…perations

Issue # (if applicable)

Closes #.

Reason for this change

The billing interface also needs to support the ability to trigger functions based on user lifecycle events.

Description of changes

- Add `createCustomerFunction` and `deleteCustomerFunction` properties
  to the `IBilling` interface, representing functions to create and
delete customers (entities with zero or more users).
- Add optional `createUserFunction` and `deleteUserFunction` properties
  to the `IBilling` interface, representing functions to create and
delete users belonging to a customer.
- Add `IFunctionTrigger` and `IFunctionSchedule` interfaces to support
  triggering functions based on events or schedules, respectively.
- Update the `BillingProvider` construct to create event targets for the
  new customer and user management functions, and to optionally create a
scheduled event for the `putUsageFunction`.
- Update documentation for the `IBilling` interface, `DetailType` enum,
  and other related components.

This change allows for more granular control over customer and user
management in the billing module, enabling integration with
application-specific requirements.

Description of how you validated changes

Checklist


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.