@coursebuilder/core
Version:
Core package for Course Builder
60 lines (57 loc) • 2.34 kB
TypeScript
import { CourseBuilderError } from '../../errors.js';
import { CourseBuilderConfig } from '../../index.js';
import { R as RequestInternal, k as CourseBuilderAction, a as ResponseInternal } from '../../adapters-BjQ3VSch.js';
import '@auth/core';
import 'inngest';
import './logger.js';
import '../../schemas/user-schema.js';
import 'zod';
import '../pricing/format-prices-for-product.js';
import '../../schemas/product-schema.js';
import '../../schemas/purchase-schema.js';
import '@auth/core/adapters';
import '../../schemas/coupon-schema.js';
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/purchase-user-transfer-schema.js';
import '../../schemas/resource-progress-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/providers/nodemailer';
import 'ai';
import 'cookie';
import 'stripe';
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';
/**
* takes a `Request` object and converts it into an internal request object
* that we use throughout the system
* @param req
* @param config
* @returns
*/
declare function toInternalRequest(req: Request, config: CourseBuilderConfig): Promise<RequestInternal | undefined>;
declare function parseActionAndProviderId(pathname: string, base: string): {
action: CourseBuilderAction;
providerId?: string;
};
declare class UnknownAction extends CourseBuilderError {
static type: string;
}
declare function toResponse(res: ResponseInternal): Response;
export { UnknownAction, parseActionAndProviderId, toInternalRequest, toResponse };