-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(billing): add support for customer and user management (#18)
- 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.
- Loading branch information
Showing
8 changed files
with
637 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -551,16 +551,15 @@ The control plane emits this event any time it onboards a new tenant. This event | |
|
||
```json | ||
{ | ||
"Source": "sbt-control-plane-api", | ||
"DetailType": "Onboarding", | ||
"Detail": { | ||
"source": "sbt-control-plane-api", | ||
"detail-type": "Onboarding", | ||
"detail": { | ||
"tenantId": "guid string", | ||
"tenantStatus": "see notes", | ||
"tenantName": "tenant name", | ||
"email": "[email protected]", | ||
"isActive": "boolean" | ||
}, | ||
"EventBusName": "sbt-event-bus" | ||
} | ||
} | ||
``` | ||
|
||
|
@@ -576,13 +575,12 @@ Upon successful tenant provisioning, the Serverless SaaS reference architecture | |
|
||
```json | ||
{ | ||
"Source": "sbt-application-plane-api", | ||
"DetailType": "Onboarding", | ||
"Detail": { | ||
"source": "sbt-application-plane-api", | ||
"detail-type": "Onboarding", | ||
"detail": { | ||
"tenantConfig": "json string - see notes", | ||
"tenantStatus": "Complete", | ||
}, | ||
"EventBusName": "sbt-event-bus" | ||
} | ||
} | ||
``` | ||
|
||
|
@@ -594,13 +592,12 @@ The control plane emits this event any time it offboards a tenant. At a minimum | |
|
||
```json | ||
{ | ||
"Source": "sbt-control-plane-api", | ||
"DetailType": "Offboarding", | ||
"Detail": { | ||
"source": "sbt-control-plane-api", | ||
"detail-type": "Offboarding", | ||
"detail": { | ||
"tenantId": "string", | ||
"tier": "string", | ||
}, | ||
"EventBusName": "sbt-event-bus" | ||
} | ||
} | ||
``` | ||
|
||
|
@@ -612,12 +609,11 @@ The application plane emits this event upon completion of offboarding. Similar t | |
|
||
```json | ||
{ | ||
"Source": "sbt-application-plane-api", | ||
"DetailType": "Offboarding", | ||
"Detail": { | ||
"source": "sbt-application-plane-api", | ||
"detail-type": "Offboarding", | ||
"detail": { | ||
"tenantStatus": "Deleted", | ||
}, | ||
"EventBusName": "sbt-event-bus" | ||
} | ||
} | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.