UNPKG

@coursebuilder/core

Version:

Core package for Course Builder

162 lines (159 loc) 5.89 kB
import { I as InternalOptions } from '../../adapters-BjQ3VSch.js'; import '@auth/core/adapters'; import '../../schemas/coupon-schema.js'; import 'zod'; import '../../schemas/merchant-coupon-schema.js'; import '../../schemas/merchant-customer-schema.js'; import '../../schemas/merchant-product-schema.js'; import '../../schemas/price-schema.js'; import '../../schemas/product-schema.js'; import '../../schemas/purchase-schema.js'; import '../../schemas/purchase-user-transfer-schema.js'; import '../../schemas/resource-progress-schema.js'; import '../../schemas/user-schema.js'; import '../../schemas/video-resource.js'; import '../../schemas/upgradable-product-schema.js'; import '../../schemas/merchant-charge-schema.js'; import '../../schemas/merchant-price-schema.js'; import '../../schemas/content-resource-schema.js'; import '../../schemas/merchant-account-schema.js'; import '../../schemas/merchant-session.js'; import '../../schemas/merchant-subscription.js'; import '../../schemas/organization-member.js'; import '../../schemas/organization-schema.js'; import '../../schemas/subscription.js'; import '@auth/core'; import '@auth/core/providers/nodemailer'; import 'ai'; import 'cookie'; import 'inngest'; import 'stripe'; import '../utils/logger.js'; import '@auth/core/providers'; import '../../schemas/subscriber-schema.js'; import '../../providers/partykit.js'; import '../../providers/slack.js'; import '../../schemas/purchase-info.js'; import '../../schemas/subscription-info.js'; declare function updatePurchaseStatus({ status, stripeChargeId, options, }: { options: InternalOptions<'payment'>; stripeChargeId: string; status: 'Refunded' | 'Disputed' | 'Banned'; }): Promise<{ id: string; createdAt: Date; fields: Record<string, any>; status: string; productId: string; totalAmount: number; organizationId?: string | null | undefined; userId?: string | null | undefined; product?: { type: "live" | "self-paced" | "membership" | "cohort"; name: string; id: string; createdAt: Date | null; fields: { slug: string; action: string | null; state: "draft" | "published" | "archived" | "deleted"; visibility: "public" | "private" | "unlisted"; body?: string | null | undefined; description?: string | null | undefined; image?: { url: string; alt?: string | null | undefined; width?: number | null | undefined; height?: number | null | undefined; } | null | undefined; }; status: number; resources: { createdAt: Date | null; productId: string; resourceId: string; position: number; metadata: Record<string, any> | null; updatedAt: Date | null; deletedAt: Date | null; resource?: any; product?: any; }[] | null; quantityAvailable: number; organizationId?: string | null | undefined; key?: string | null | undefined; price?: { id: string; createdAt: Date | null; fields: Record<string, any>; status: number; unitAmount: number; organizationId?: string | null | undefined; productId?: string | null | undefined; nickname?: string | null | undefined; } | null | undefined; } | null | undefined; state?: string | null | undefined; user?: { id: string; role: "user" | "admin"; email: string; memberships: { id: string; organizationId: string; }[] | null; roles: { name: string; id: string; description: string | null; active: boolean; createdAt?: Date | null | undefined; updatedAt?: Date | null | undefined; deletedAt?: Date | null | undefined; }[]; organizationRoles: { name: string; id: string; organizationId: string; description: string | null; active: boolean; createdAt?: Date | null | undefined; updatedAt?: Date | null | undefined; deletedAt?: Date | null | undefined; }[]; name?: string | null | undefined; createdAt?: Date | null | undefined; image?: string | null | undefined; emailVerified?: Date | null | undefined; } | null | undefined; ipAddress?: string | null | undefined; city?: string | null | undefined; country?: string | null | undefined; couponId?: string | null | undefined; merchantChargeId?: string | null | undefined; upgradedFromId?: string | null | undefined; bulkCouponId?: string | null | undefined; merchantSessionId?: string | null | undefined; redeemedBulkCouponId?: string | null | undefined; bulkCoupon?: { id: string; createdAt: Date | null; expires: Date | null; fields: Record<string, any>; maxUses: number; default: boolean; status: number; usedCount: number; percentageDiscount: number; bulkPurchases: any[]; redeemedBulkCouponPurchases: any[]; code?: string | null | undefined; merchantCouponId?: string | null | undefined; restrictedToProductId?: string | null | undefined; bulkPurchaseId?: string | null | undefined; organizationId?: string | null | undefined; } | null | undefined; purchasedByorganizationMembershipId?: string | null | undefined; } | undefined>; declare function processStripeWebhook(event: any, options: InternalOptions<'payment'>): Promise<void>; export { processStripeWebhook, updatePurchaseStatus };