Skip to content

BeforeEvent

type BeforeEvent =
| {
actor: | Actor
| null;
customer: string;
previous?: Subscription;
subscription: Subscription;
type: "subscription.upsert";
}
| {
actor: | Actor
| null;
customer: string;
subscriptionId: string;
type: "subscription.remove";
}
| {
actor: | Actor
| null;
customer: string;
grant: Grant;
type: "grant.create";
}
| {
actor: | Actor
| null;
customer: string;
grantId: string;
type: "grant.revoke";
}
| {
actor: | Actor
| null;
customer: string;
override: Override;
type: "override.create";
}
| {
actor: | Actor
| null;
customer: string;
overrideId: string;
type: "override.remove";
}
| {
actor: | Actor
| null;
customer: string;
feature: string;
type: "usage.reset";
}
| {
actor: | Actor
| null;
customer: string;
feature: string;
type: "usage.set";
value: number;
}
| {
actor: | Actor
| null;
customer: string;
type: "customer.update";
}
| {
actor: | Actor
| null;
customer: string;
type: "customer.delete";
};

Defined in: src/hooks/contract.ts:25

Events delivered to before hooks (the mutation has not happened yet).