@coursebuilder/core
Version:
Core package for Course Builder
58 lines (57 loc) • 2.8 kB
JavaScript
;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/inngest/stripe/event-customer-subscription-created.ts
var event_customer_subscription_created_exports = {};
__export(event_customer_subscription_created_exports, {
STRIPE_CUSTOMER_SUBSCRIPTION_CREATED_EVENT: () => STRIPE_CUSTOMER_SUBSCRIPTION_CREATED_EVENT,
stripeCustomerSubscriptionCreated: () => stripeCustomerSubscriptionCreated,
stripeCustomerSubscriptionCreatedConfig: () => stripeCustomerSubscriptionCreatedConfig,
stripeCustomerSubscriptionCreatedHandler: () => stripeCustomerSubscriptionCreatedHandler,
stripeCustomerSubscriptionCreatedTrigger: () => stripeCustomerSubscriptionCreatedTrigger
});
module.exports = __toCommonJS(event_customer_subscription_created_exports);
var STRIPE_CUSTOMER_SUBSCRIPTION_CREATED_EVENT = "stripe/customer-subscription-created";
var stripeCustomerSubscriptionCreatedConfig = {
id: "stripe-customer-subscription-created",
name: "Stripe Customer Subscription Created"
};
var stripeCustomerSubscriptionCreatedTrigger = {
event: STRIPE_CUSTOMER_SUBSCRIPTION_CREATED_EVENT
};
var stripeCustomerSubscriptionCreatedHandler = /* @__PURE__ */ __name(async ({ event, step, db }) => {
const subscription = event.data.stripeEvent.data.object;
if (subscription.status !== "active" && subscription.status !== "trialing") {
return;
}
}, "stripeCustomerSubscriptionCreatedHandler");
var stripeCustomerSubscriptionCreated = {
config: stripeCustomerSubscriptionCreatedConfig,
trigger: stripeCustomerSubscriptionCreatedTrigger,
handler: stripeCustomerSubscriptionCreatedHandler
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
STRIPE_CUSTOMER_SUBSCRIPTION_CREATED_EVENT,
stripeCustomerSubscriptionCreated,
stripeCustomerSubscriptionCreatedConfig,
stripeCustomerSubscriptionCreatedHandler,
stripeCustomerSubscriptionCreatedTrigger
});
//# sourceMappingURL=event-customer-subscription-created.cjs.map