@infuro/cms-core 1.0.28 → 1.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,8 +1,9 @@
1
- import { C as CompanyDetails, T as TemplateContext, E as EmailTemplateResult, a as EmailTemplateName, O as OrderPlacedLineItem, S as StorageService, b as EntityMap$2 } from './index-CI6J9dxr.cjs';
2
- export { A as AnalyticsHandlerConfig, c as AuthHandlersConfig, B as BlogBySlugConfig, d as ChangePasswordConfig, e as ChatPublicConfig, f as CmsApiHandlerConfig, g as CmsGetter, h as CrudHandlerOptions, D as DashboardStatsConfig, i as EcommerceAnalyticsConfig, F as ForgotPasswordConfig, j as FormBySlugConfig, G as GetPublicSettingsGroupConfig, k as GetPublicSettingsGroupDataSource, I as InviteAcceptConfig, L as LlmAgentKnowledgeApiConfig, l as LlmAgentValidationRulesJson, P as ParsedLlmAgentValidation, m as SetPasswordConfig, n as SettingsApiConfig, o as SocialLinkItem, p as StorefrontApiConfig, q as StorefrontOtpFlags, U as UploadHandlerConfig, r as UserAuthApiConfig, s as UserAvatarConfig, t as UserProfileConfig, u as UsersApiConfig, v as createAnalyticsHandlers, w as createBlogBySlugHandler, x as createChangePasswordHandler, y as createCmsApiHandler, z as createCrudByIdHandler, H as createCrudHandler, J as createDashboardStatsHandler, K as createEcommerceAnalyticsHandler, M as createForgotPasswordHandler, N as createFormBySlugHandler, Q as createInviteAcceptHandler, R as createLlmAgentKnowledgeHandlers, V as createMediaZipExtractHandler, W as createSetPasswordHandler, X as createSettingsApiHandlers, Y as createStorefrontApiHandler, Z as createUploadHandler, _ as createUserAuthApiRouter, $ as createUserAvatarHandler, a0 as createUserProfileHandler, a1 as createUsersApiHandlers, a2 as getCompanyDetailsFromSettings, a3 as getPublicSettingsGroup, a4 as mergeEmailLayoutCompanyDetails, a5 as mergeGuardrailsIntoSystemPrompt, a6 as parseLlmAgentValidationRules, a7 as simpleDecrypt, a8 as simpleEncrypt, a9 as validateUserMessageAgainstAgentRules, aa as validateUserMessageAgainstStructuredRules } from './index-CI6J9dxr.cjs';
3
- import { ClassValue } from 'clsx';
1
+ import { C as CompanyDetails, T as TemplateContext, E as EmailTemplateResult, a as EmailTemplateName, O as OrderPlacedLineItem, S as StorageService, b as EntityMap$2 } from './index-BPQSXgXF.cjs';
2
+ export { A as AnalyticsHandlerConfig, c as AuthHandlersConfig, B as BlogBySlugConfig, d as ChangePasswordConfig, e as ChatPublicConfig, f as CmsApiHandlerConfig, g as CmsGetter, h as CrudHandlerOptions, D as DashboardStatsConfig, i as EcommerceAnalyticsConfig, F as ForgotPasswordConfig, j as FormBySlugConfig, G as GetPublicSettingsGroupConfig, k as GetPublicSettingsGroupDataSource, I as InviteAcceptConfig, J as JobScheduleApiConfig, L as LlmAgentKnowledgeApiConfig, l as LlmAgentValidationRulesJson, P as ParsedLlmAgentValidation, m as SetPasswordConfig, n as SettingsApiConfig, o as SocialLinkItem, p as StorefrontApiConfig, q as StorefrontOtpFlags, U as UploadHandlerConfig, r as UserAuthApiConfig, s as UserAvatarConfig, t as UserProfileConfig, u as UsersApiConfig, v as createAnalyticsHandlers, w as createBlogBySlugHandler, x as createChangePasswordHandler, y as createCmsApiHandler, z as createCrudByIdHandler, H as createCrudHandler, K as createDashboardStatsHandler, M as createEcommerceAnalyticsHandler, N as createForgotPasswordHandler, Q as createFormBySlugHandler, R as createInviteAcceptHandler, V as createJobScheduleHandlers, W as createLlmAgentKnowledgeHandlers, X as createMediaZipExtractHandler, Y as createSetPasswordHandler, Z as createSettingsApiHandlers, _ as createStorefrontApiHandler, $ as createUploadHandler, a0 as createUserAuthApiRouter, a1 as createUserAvatarHandler, a2 as createUserProfileHandler, a3 as createUsersApiHandlers, a4 as getCompanyDetailsFromSettings, a5 as getPublicSettingsGroup, a6 as mergeEmailLayoutCompanyDetails, a7 as mergeGuardrailsIntoSystemPrompt, a8 as parseLlmAgentValidationRules, a9 as simpleDecrypt, aa as simpleEncrypt, ab as validateUserMessageAgainstAgentRules, ac as validateUserMessageAgainstStructuredRules } from './index-BPQSXgXF.cjs';
3
+ import PgBoss from 'pg-boss';
4
4
  import * as typeorm from 'typeorm';
5
5
  import { DataSource, EntityTarget, ObjectLiteral } from 'typeorm';
6
+ import { ClassValue } from 'clsx';
6
7
  import { Metadata } from 'next';
7
8
  import { N as NavbarConfig, F as FooterConfig } from './types-D34wmivy.cjs';
8
9
  import { E as EntityCrudAction } from './helpers-dlrF_49e.cjs';
@@ -123,7 +124,7 @@ declare class ERPSubmissionService {
123
124
  }[]): ContactFormData | null;
124
125
  }
125
126
 
126
- interface CmsAppLike$2 {
127
+ interface CmsAppLike$3 {
127
128
  getPlugin(name: string): unknown;
128
129
  }
129
130
  type ErpJobPayload = {
@@ -142,8 +143,8 @@ type ErpJobPayload = {
142
143
  kind: 'productUpsert';
143
144
  product: Record<string, unknown>;
144
145
  };
145
- declare function queueErp(cms: CmsAppLike$2, payload: ErpJobPayload): Promise<void>;
146
- declare function registerErpQueueProcessor(cms: CmsAppLike$2): void;
146
+ declare function queueErp(cms: CmsAppLike$3, payload: ErpJobPayload): Promise<void>;
147
+ declare function registerErpQueueProcessor(cms: CmsAppLike$3): void;
147
148
 
148
149
  /**
149
150
  * Duck-typed DataSource so host apps (e.g. Next) can pass their own TypeORM instance
@@ -164,7 +165,7 @@ type ErpPaidOrderEntityMap = Record<string, unknown>;
164
165
  * Enqueues ERP `order.created` only when the order has at least one **completed** payment.
165
166
  * Include `payments` in the payload.
166
167
  */
167
- declare function queueErpPaidOrderForOrderId(cms: CmsAppLike$2, dataSource: ErpPaidOrderDataSource, entityMap: ErpPaidOrderEntityMap, orderId: number): Promise<void>;
168
+ declare function queueErpPaidOrderForOrderId(cms: CmsAppLike$3, dataSource: ErpPaidOrderDataSource, entityMap: ErpPaidOrderEntityMap, orderId: number): Promise<void>;
168
169
 
169
170
  interface ErpContactSyncInput {
170
171
  name: string;
@@ -180,7 +181,7 @@ interface ErpContactSyncInput {
180
181
  * When ERP is enabled and plugin loaded, enqueue `create-contact` (non-fatal on failure).
181
182
  * Used for admin CRUD and storefront contact paths — not form submissions (those use lead/opportunity).
182
183
  */
183
- declare function queueErpCreateContactIfEnabled(cms: CmsAppLike$2, dataSource: ErpPaidOrderDataSource, entityMap: ErpPaidOrderEntityMap, input: ErpContactSyncInput): Promise<void>;
184
+ declare function queueErpCreateContactIfEnabled(cms: CmsAppLike$3, dataSource: ErpPaidOrderDataSource, entityMap: ErpPaidOrderEntityMap, input: ErpContactSyncInput): Promise<void>;
184
185
 
185
186
  interface ERPPluginConfig {
186
187
  webhookUrl: string;
@@ -280,7 +281,7 @@ declare function renderLayout(options: {
280
281
  companyDetails: CompanyDetails;
281
282
  }): string;
282
283
 
283
- interface CmsAppLike$1 {
284
+ interface CmsAppLike$2 {
284
285
  getPlugin(name: string): unknown;
285
286
  }
286
287
  /** Context for template rendering: at least companyDetails; template-specific fields (formName, etc.) are allowed. */
@@ -294,8 +295,8 @@ interface EmailJobPayload {
294
295
  html?: string;
295
296
  text?: string;
296
297
  }
297
- declare function registerEmailQueueProcessor(cms: CmsAppLike$1): void;
298
- declare function queueEmail(cms: CmsAppLike$1, payload: EmailJobPayload): Promise<void>;
298
+ declare function registerEmailQueueProcessor(cms: CmsAppLike$2): void;
299
+ declare function queueEmail(cms: CmsAppLike$2, payload: EmailJobPayload): Promise<void>;
299
300
  interface OrderPlacedEmailPayload {
300
301
  orderNumber: string;
301
302
  total?: string | number;
@@ -313,7 +314,7 @@ interface OrderPlacedEmailPayload {
313
314
  shippingAddress?: Record<string, string>;
314
315
  }
315
316
  /** Queues one `orderPlaced` email per recipient (customer + each unique sales address; skips sales if same as customer). */
316
- declare function queueOrderPlacedEmails(cms: CmsAppLike$1, payload: OrderPlacedEmailPayload): Promise<void>;
317
+ declare function queueOrderPlacedEmails(cms: CmsAppLike$2, payload: OrderPlacedEmailPayload): Promise<void>;
317
318
 
318
319
  interface EmailPluginConfig {
319
320
  type: 'AWS' | 'SMTP' | 'GMAIL' | 'SENDGRID';
@@ -421,7 +422,7 @@ interface SmsServiceConfig {
421
422
  webhookSecret?: string;
422
423
  }
423
424
 
424
- interface CmsAppLike {
425
+ interface CmsAppLike$1 {
425
426
  getPlugin(name: string): unknown;
426
427
  }
427
428
  interface SmsJobPayload {
@@ -432,8 +433,8 @@ interface SmsJobPayload {
432
433
  variables?: Record<string, string>;
433
434
  otpCode?: string;
434
435
  }
435
- declare function registerSmsQueueProcessor(cms: CmsAppLike): void;
436
- declare function queueSms(cms: CmsAppLike, payload: SmsJobPayload): Promise<void>;
436
+ declare function registerSmsQueueProcessor(cms: CmsAppLike$1): void;
437
+ declare function queueSms(cms: CmsAppLike$1, payload: SmsJobPayload): Promise<void>;
437
438
 
438
439
  interface SmsPluginConfig extends Partial<SmsServiceConfig> {
439
440
  /** Load admin settings group `sms` (enabled, smsProvider). Secrets typically stay in env. */
@@ -653,6 +654,95 @@ interface QueuePluginConfig {
653
654
  }
654
655
  declare function queuePlugin(config?: QueuePluginConfig): CmsPlugin<QueueService>;
655
656
 
657
+ declare const JOB_RUNNER_QUEUE = "job-runner";
658
+ type JobRunnerPayload = {
659
+ scheduleId: string;
660
+ triggeredBy?: 'schedule' | 'manual';
661
+ };
662
+ declare class PgBossService {
663
+ private readonly boss;
664
+ private started;
665
+ private readonly workRegistered;
666
+ constructor(connectionString: string, schema?: string);
667
+ start(): Promise<void>;
668
+ stop(): Promise<void>;
669
+ get raw(): PgBoss;
670
+ ensureQueue(name: string): Promise<void>;
671
+ send(queue: string, data: object): Promise<string | null>;
672
+ schedule(name: string, cron: string, data: object, options?: {
673
+ tz?: string;
674
+ }): Promise<void>;
675
+ unschedule(name: string): Promise<void>;
676
+ registerWork<T extends object>(queue: string, handler: (data: T) => Promise<void>): Promise<void>;
677
+ }
678
+
679
+ interface PgBossPluginConfig {
680
+ /** Postgres connection string; defaults to context.config.DATABASE_URL */
681
+ connectionString?: string;
682
+ schema?: string;
683
+ }
684
+ declare function pgBossPlugin(config?: PgBossPluginConfig): CmsPlugin<PgBossService | undefined>;
685
+
686
+ interface CmsAppLike {
687
+ getPlugin(name: string): unknown;
688
+ }
689
+ interface JobRunnerDeps {
690
+ dataSource: DataSource;
691
+ entityMap: EntityMap$2;
692
+ config?: Record<string, string>;
693
+ }
694
+ declare function registerJobRunnerWorker(cms: CmsAppLike, deps: JobRunnerDeps): void;
695
+ /** Re-register work for a queue after API updates a schedule. */
696
+ declare function ensureScheduleQueueWorker(cms: CmsAppLike, queueName: string): Promise<void>;
697
+
698
+ declare class JobScheduleRun {
699
+ id: string;
700
+ scheduleId: string;
701
+ schedule: JobSchedule;
702
+ startedAt: Date;
703
+ finishedAt: Date | null;
704
+ status: string;
705
+ error: string | null;
706
+ result: Record<string, unknown> | null;
707
+ triggeredBy: string;
708
+ createdAt: Date;
709
+ }
710
+
711
+ type JobScheduleMode = 'interval' | 'daily' | 'weekly' | 'cron';
712
+ type JobScheduleType = 'blog_generate';
713
+ declare class JobSchedule {
714
+ id: string;
715
+ name: string;
716
+ jobType: JobScheduleType;
717
+ enabled: boolean;
718
+ scheduleMode: JobScheduleMode;
719
+ intervalMinutes: number | null;
720
+ runAtTime: string | null;
721
+ runOnDays: number[] | null;
722
+ timezone: string;
723
+ cronExpression: string | null;
724
+ payload: Record<string, unknown>;
725
+ authorId: number | null;
726
+ pgBossScheduleName: string;
727
+ lastRunAt: Date | null;
728
+ lastRunStatus: string | null;
729
+ lastRunError: string | null;
730
+ nextRunAt: Date | null;
731
+ runs: JobScheduleRun[];
732
+ createdAt: Date;
733
+ updatedAt: Date;
734
+ }
735
+
736
+ interface CmsPgBossLike {
737
+ getPlugin(name: string): unknown;
738
+ }
739
+ declare function syncJobScheduleToPgBoss(cms: CmsPgBossLike, schedule: JobSchedule, onRegisterQueue?: (queueName: string) => Promise<void>): Promise<void>;
740
+ declare function queueJobScheduleNow(cms: CmsPgBossLike, scheduleId: string): Promise<void>;
741
+
742
+ declare function pgBossScheduleNameForId(scheduleId: string): string;
743
+ declare function buildCronFromSchedule(schedule: Pick<JobSchedule, 'scheduleMode' | 'intervalMinutes' | 'runAtTime' | 'runOnDays' | 'cronExpression'>): string;
744
+ declare function validateScheduleInput(schedule: Pick<JobSchedule, 'scheduleMode' | 'intervalMinutes' | 'runAtTime' | 'cronExpression'>): string | null;
745
+
656
746
  type CaptchaProviderId = 'turnstile' | 'recaptcha_v3';
657
747
  interface CaptchaPublicConfig {
658
748
  enabled: boolean;
@@ -1859,4 +1949,4 @@ declare class RssFeed {
1859
1949
  /** Map API resource segment (e.g. "blogs", "form_submissions") to entity. Used by CRUD handler. */
1860
1950
  declare const CMS_ENTITY_MAP: Record<string, EntityTarget<typeorm.ObjectLiteral>>;
1861
1951
 
1862
- export { Address, type AnalyticsPluginConfig, Attribute, BLOG_GENERATOR_AGENT_NAME, BLOG_GENERATOR_DEFAULT_SYSTEM_INSTRUCTION, BLOG_GENERATOR_DEFAULT_VALIDATION_RULES, BLOG_GENERATOR_LLM_AGENT_SLUG, BLOG_GENERATOR_MARKDOWN_ARTICLE_SEPARATOR, BLOG_METADATA_ENRICHER_AGENT_NAME, BLOG_METADATA_ENRICHER_DEFAULT_SYSTEM_INSTRUCTION, BLOG_METADATA_ENRICHER_DEFAULT_VALIDATION_RULES, BLOG_METADATA_ENRICHER_LLM_AGENT_SLUG, Blog, type BlogGeneratorBlogDraft, type BlogGeneratorDraftParseMode, type BlogGeneratorPluginConfig, type BlogGeneratorSeoDraft, BlogGeneratorService, Brand, CMS_ENTITY_MAP, type CachePluginConfig, type CacheService, type CaptchaProviderId, type CaptchaPublicConfig, CaptchaService, type CaptchaVerifyResult, Cart, CartItem, Category, ChatConversation, ChatMessage, type CmsApp, type CmsPlugin, Collection, Comment, CompanyDetails, Config, Contact, type CreateCmsAppOptions, type DataSourceManager, type ERPPluginConfig, type ERPPluginInstance, ERPSubmissionService, type EmailData, type EmailJobPayload, type EmailPluginConfig, EmailService, type EmailServiceInterface, EmailTemplateName, EmailTemplateResult, EntityCrudAction, EntityMap$2 as EntityMap, type ErpContactSyncInput, type ErpCreateContactPayload, type ErpJobPayload, type ErpPaidOrderDataSource, type ErpPaidOrderEntityMap, type ExtraPublicWriteRule, type FacebookMeAccountsResponse, type FacebookPageAccount, Form, FormField, FormSubmission, KnowledgeBaseChunk, KnowledgeBaseDocument, type LatestArticleFromFeed, LlmAgent, type LlmAgentOptions, type LlmChatOptions, type LlmEmbeddingProvider, type LlmMessage, type LlmPluginConfig, LlmService, type LlmServiceEmbedOptions, type LlmServiceInterface, type LocalStoragePluginConfig, type Logger, Media, MessageTemplate, type MetaGraphMutationResponse, Order, OrderItem, type OrderPlacedEmailPayload, OrderPlacedLineItem, OtpChallenge, type OtpChannel, type OtpPurpose, Page, PasswordResetToken, Payment, type PaymentIntent, type PaymentPluginConfig, type PaymentServiceInterface, Permission, type PipelineNames, type PluginContext, Product, ProductAttribute, ProductCategory, ProductTax, type PublicThemeSettingsPayload, type QueuePluginConfig, type QueueService, type RenderEmailOptions, type RenderedEmail, RssArticle, RssFeed, type S3StoragePluginConfig, Seo, type SeoLike, type SeoMetadataOverrides, type SmsJobPayload, type SmsPluginConfig, type SmsProviderChoice, type SmsProviderId, type SmsServiceConfig, type SmsServiceInterface, type SocialMediaPluginConfig, StorageService, Tag, Tax, TemplateContext, User, UserGroup, Wishlist, WishlistItem, ZIP_MIME_TYPES, allowRateLimit, analyticsPlugin, assertCaptchaOk, blogGeneratorPlugin, buildBlogMetadataUserPrompt, buildCaptchaPublicConfig, buildRssUserPromptFromFeeds, cachePlugin, captchaPlugin, cn, countRecentOtpSends, createCmsApp, createDataSourceManager, createOtpChallenge, createSocialMediaHandlers, emailPlugin, emailTemplates, erpPlugin, fetchSeoBySlug, formatDate, formatDateOnly, formatDateTime, generateNumericOtp, generateSlug, getRssArticleSummaryFromItem, hashOtpCode, isZipMedia, joinRecipientsForSend, linkUnclaimedContactToUser, llmAgentToChatAgentOptions, llmPlugin, loadPublicThemeSettings, localStoragePlugin, mergeSeoBySlug, metaFetchUserManagedPages, metaPostPageFeed, metaPostPagePhoto, metaResolvePageAccessToken, normalizePhoneE164, parseBlogGeneratorAgentContent, parseBlogGeneratorModelOutput, parseBlogMetadataEnrichmentJson, parseEmailRecipientsFromConfig, parseHfInferenceEmbeddingBody, paymentPlugin, queueEmail, queueErp, queueErpCreateContactIfEnabled, queueErpPaidOrderForOrderId, queueOrderPlacedEmails, queuePlugin, queueSms, rateLimitCheckoutPost, rateLimitKeyForApiRequest, rateLimitPublicApiIfNeeded, registerEmailQueueProcessor, registerErpQueueProcessor, registerSmsQueueProcessor, relativePathFromMediaParentId, renderEmail, renderLayout, resolveBlogCategoryIdByName, resolvePublicMetadata, s3StoragePlugin, sanitizeMediaFolderPath, sanitizeStorageSegment, seedDefaultAdmin, sendOrderPlacedEmailsAfterConfirmation, serializeEmailRecipients, shouldRateLimitPublicWrite, smsPlugin, socialMediaPlugin, truncateText, validateSlug, verifyAndConsumeOtpChallenge, verifyOtpCodeHash };
1952
+ export { Address, type AnalyticsPluginConfig, Attribute, BLOG_GENERATOR_AGENT_NAME, BLOG_GENERATOR_DEFAULT_SYSTEM_INSTRUCTION, BLOG_GENERATOR_DEFAULT_VALIDATION_RULES, BLOG_GENERATOR_LLM_AGENT_SLUG, BLOG_GENERATOR_MARKDOWN_ARTICLE_SEPARATOR, BLOG_METADATA_ENRICHER_AGENT_NAME, BLOG_METADATA_ENRICHER_DEFAULT_SYSTEM_INSTRUCTION, BLOG_METADATA_ENRICHER_DEFAULT_VALIDATION_RULES, BLOG_METADATA_ENRICHER_LLM_AGENT_SLUG, Blog, type BlogGeneratorBlogDraft, type BlogGeneratorDraftParseMode, type BlogGeneratorPluginConfig, type BlogGeneratorSeoDraft, BlogGeneratorService, Brand, CMS_ENTITY_MAP, type CachePluginConfig, type CacheService, type CaptchaProviderId, type CaptchaPublicConfig, CaptchaService, type CaptchaVerifyResult, Cart, CartItem, Category, ChatConversation, ChatMessage, type CmsApp, type CmsPlugin, Collection, Comment, CompanyDetails, Config, Contact, type CreateCmsAppOptions, type DataSourceManager, type ERPPluginConfig, type ERPPluginInstance, ERPSubmissionService, type EmailData, type EmailJobPayload, type EmailPluginConfig, EmailService, type EmailServiceInterface, EmailTemplateName, EmailTemplateResult, EntityCrudAction, EntityMap$2 as EntityMap, type ErpContactSyncInput, type ErpCreateContactPayload, type ErpJobPayload, type ErpPaidOrderDataSource, type ErpPaidOrderEntityMap, type ExtraPublicWriteRule, type FacebookMeAccountsResponse, type FacebookPageAccount, Form, FormField, FormSubmission, JOB_RUNNER_QUEUE, type CmsAppLike as JobRunnerCmsAppLike, type JobRunnerDeps, type JobRunnerPayload, JobSchedule, JobScheduleRun, KnowledgeBaseChunk, KnowledgeBaseDocument, type LatestArticleFromFeed, LlmAgent, type LlmAgentOptions, type LlmChatOptions, type LlmEmbeddingProvider, type LlmMessage, type LlmPluginConfig, LlmService, type LlmServiceEmbedOptions, type LlmServiceInterface, type LocalStoragePluginConfig, type Logger, Media, MessageTemplate, type MetaGraphMutationResponse, Order, OrderItem, type OrderPlacedEmailPayload, OrderPlacedLineItem, OtpChallenge, type OtpChannel, type OtpPurpose, Page, PasswordResetToken, Payment, type PaymentIntent, type PaymentPluginConfig, type PaymentServiceInterface, Permission, type PgBossPluginConfig, PgBossService, type PipelineNames, type PluginContext, Product, ProductAttribute, ProductCategory, ProductTax, type PublicThemeSettingsPayload, type QueuePluginConfig, type QueueService, type RenderEmailOptions, type RenderedEmail, RssArticle, RssFeed, type S3StoragePluginConfig, Seo, type SeoLike, type SeoMetadataOverrides, type SmsJobPayload, type SmsPluginConfig, type SmsProviderChoice, type SmsProviderId, type SmsServiceConfig, type SmsServiceInterface, type SocialMediaPluginConfig, StorageService, Tag, Tax, TemplateContext, User, UserGroup, Wishlist, WishlistItem, ZIP_MIME_TYPES, allowRateLimit, analyticsPlugin, assertCaptchaOk, blogGeneratorPlugin, buildBlogMetadataUserPrompt, buildCaptchaPublicConfig, buildCronFromSchedule, buildRssUserPromptFromFeeds, cachePlugin, captchaPlugin, cn, countRecentOtpSends, createCmsApp, createDataSourceManager, createOtpChallenge, createSocialMediaHandlers, emailPlugin, emailTemplates, ensureScheduleQueueWorker, erpPlugin, fetchSeoBySlug, formatDate, formatDateOnly, formatDateTime, generateNumericOtp, generateSlug, getRssArticleSummaryFromItem, hashOtpCode, isZipMedia, joinRecipientsForSend, linkUnclaimedContactToUser, llmAgentToChatAgentOptions, llmPlugin, loadPublicThemeSettings, localStoragePlugin, mergeSeoBySlug, metaFetchUserManagedPages, metaPostPageFeed, metaPostPagePhoto, metaResolvePageAccessToken, normalizePhoneE164, parseBlogGeneratorAgentContent, parseBlogGeneratorModelOutput, parseBlogMetadataEnrichmentJson, parseEmailRecipientsFromConfig, parseHfInferenceEmbeddingBody, paymentPlugin, pgBossPlugin, pgBossScheduleNameForId, queueEmail, queueErp, queueErpCreateContactIfEnabled, queueErpPaidOrderForOrderId, queueJobScheduleNow, queueOrderPlacedEmails, queuePlugin, queueSms, rateLimitCheckoutPost, rateLimitKeyForApiRequest, rateLimitPublicApiIfNeeded, registerEmailQueueProcessor, registerErpQueueProcessor, registerJobRunnerWorker, registerSmsQueueProcessor, relativePathFromMediaParentId, renderEmail, renderLayout, resolveBlogCategoryIdByName, resolvePublicMetadata, s3StoragePlugin, sanitizeMediaFolderPath, sanitizeStorageSegment, seedDefaultAdmin, sendOrderPlacedEmailsAfterConfirmation, serializeEmailRecipients, shouldRateLimitPublicWrite, smsPlugin, socialMediaPlugin, syncJobScheduleToPgBoss, truncateText, validateScheduleInput, validateSlug, verifyAndConsumeOtpChallenge, verifyOtpCodeHash };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
- import { C as CompanyDetails, T as TemplateContext, E as EmailTemplateResult, a as EmailTemplateName, O as OrderPlacedLineItem, S as StorageService, b as EntityMap$2 } from './index-CMJZ5Fpr.js';
2
- export { A as AnalyticsHandlerConfig, c as AuthHandlersConfig, B as BlogBySlugConfig, d as ChangePasswordConfig, e as ChatPublicConfig, f as CmsApiHandlerConfig, g as CmsGetter, h as CrudHandlerOptions, D as DashboardStatsConfig, i as EcommerceAnalyticsConfig, F as ForgotPasswordConfig, j as FormBySlugConfig, G as GetPublicSettingsGroupConfig, k as GetPublicSettingsGroupDataSource, I as InviteAcceptConfig, L as LlmAgentKnowledgeApiConfig, l as LlmAgentValidationRulesJson, P as ParsedLlmAgentValidation, m as SetPasswordConfig, n as SettingsApiConfig, o as SocialLinkItem, p as StorefrontApiConfig, q as StorefrontOtpFlags, U as UploadHandlerConfig, r as UserAuthApiConfig, s as UserAvatarConfig, t as UserProfileConfig, u as UsersApiConfig, v as createAnalyticsHandlers, w as createBlogBySlugHandler, x as createChangePasswordHandler, y as createCmsApiHandler, z as createCrudByIdHandler, H as createCrudHandler, J as createDashboardStatsHandler, K as createEcommerceAnalyticsHandler, M as createForgotPasswordHandler, N as createFormBySlugHandler, Q as createInviteAcceptHandler, R as createLlmAgentKnowledgeHandlers, V as createMediaZipExtractHandler, W as createSetPasswordHandler, X as createSettingsApiHandlers, Y as createStorefrontApiHandler, Z as createUploadHandler, _ as createUserAuthApiRouter, $ as createUserAvatarHandler, a0 as createUserProfileHandler, a1 as createUsersApiHandlers, a2 as getCompanyDetailsFromSettings, a3 as getPublicSettingsGroup, a4 as mergeEmailLayoutCompanyDetails, a5 as mergeGuardrailsIntoSystemPrompt, a6 as parseLlmAgentValidationRules, a7 as simpleDecrypt, a8 as simpleEncrypt, a9 as validateUserMessageAgainstAgentRules, aa as validateUserMessageAgainstStructuredRules } from './index-CMJZ5Fpr.js';
3
- import { ClassValue } from 'clsx';
1
+ import { C as CompanyDetails, T as TemplateContext, E as EmailTemplateResult, a as EmailTemplateName, O as OrderPlacedLineItem, S as StorageService, b as EntityMap$2 } from './index-D9SdaDJ0.js';
2
+ export { A as AnalyticsHandlerConfig, c as AuthHandlersConfig, B as BlogBySlugConfig, d as ChangePasswordConfig, e as ChatPublicConfig, f as CmsApiHandlerConfig, g as CmsGetter, h as CrudHandlerOptions, D as DashboardStatsConfig, i as EcommerceAnalyticsConfig, F as ForgotPasswordConfig, j as FormBySlugConfig, G as GetPublicSettingsGroupConfig, k as GetPublicSettingsGroupDataSource, I as InviteAcceptConfig, J as JobScheduleApiConfig, L as LlmAgentKnowledgeApiConfig, l as LlmAgentValidationRulesJson, P as ParsedLlmAgentValidation, m as SetPasswordConfig, n as SettingsApiConfig, o as SocialLinkItem, p as StorefrontApiConfig, q as StorefrontOtpFlags, U as UploadHandlerConfig, r as UserAuthApiConfig, s as UserAvatarConfig, t as UserProfileConfig, u as UsersApiConfig, v as createAnalyticsHandlers, w as createBlogBySlugHandler, x as createChangePasswordHandler, y as createCmsApiHandler, z as createCrudByIdHandler, H as createCrudHandler, K as createDashboardStatsHandler, M as createEcommerceAnalyticsHandler, N as createForgotPasswordHandler, Q as createFormBySlugHandler, R as createInviteAcceptHandler, V as createJobScheduleHandlers, W as createLlmAgentKnowledgeHandlers, X as createMediaZipExtractHandler, Y as createSetPasswordHandler, Z as createSettingsApiHandlers, _ as createStorefrontApiHandler, $ as createUploadHandler, a0 as createUserAuthApiRouter, a1 as createUserAvatarHandler, a2 as createUserProfileHandler, a3 as createUsersApiHandlers, a4 as getCompanyDetailsFromSettings, a5 as getPublicSettingsGroup, a6 as mergeEmailLayoutCompanyDetails, a7 as mergeGuardrailsIntoSystemPrompt, a8 as parseLlmAgentValidationRules, a9 as simpleDecrypt, aa as simpleEncrypt, ab as validateUserMessageAgainstAgentRules, ac as validateUserMessageAgainstStructuredRules } from './index-D9SdaDJ0.js';
3
+ import PgBoss from 'pg-boss';
4
4
  import * as typeorm from 'typeorm';
5
5
  import { DataSource, EntityTarget, ObjectLiteral } from 'typeorm';
6
+ import { ClassValue } from 'clsx';
6
7
  import { Metadata } from 'next';
7
8
  import { N as NavbarConfig, F as FooterConfig } from './types-D34wmivy.js';
8
9
  import { E as EntityCrudAction } from './helpers-dlrF_49e.js';
@@ -123,7 +124,7 @@ declare class ERPSubmissionService {
123
124
  }[]): ContactFormData | null;
124
125
  }
125
126
 
126
- interface CmsAppLike$2 {
127
+ interface CmsAppLike$3 {
127
128
  getPlugin(name: string): unknown;
128
129
  }
129
130
  type ErpJobPayload = {
@@ -142,8 +143,8 @@ type ErpJobPayload = {
142
143
  kind: 'productUpsert';
143
144
  product: Record<string, unknown>;
144
145
  };
145
- declare function queueErp(cms: CmsAppLike$2, payload: ErpJobPayload): Promise<void>;
146
- declare function registerErpQueueProcessor(cms: CmsAppLike$2): void;
146
+ declare function queueErp(cms: CmsAppLike$3, payload: ErpJobPayload): Promise<void>;
147
+ declare function registerErpQueueProcessor(cms: CmsAppLike$3): void;
147
148
 
148
149
  /**
149
150
  * Duck-typed DataSource so host apps (e.g. Next) can pass their own TypeORM instance
@@ -164,7 +165,7 @@ type ErpPaidOrderEntityMap = Record<string, unknown>;
164
165
  * Enqueues ERP `order.created` only when the order has at least one **completed** payment.
165
166
  * Include `payments` in the payload.
166
167
  */
167
- declare function queueErpPaidOrderForOrderId(cms: CmsAppLike$2, dataSource: ErpPaidOrderDataSource, entityMap: ErpPaidOrderEntityMap, orderId: number): Promise<void>;
168
+ declare function queueErpPaidOrderForOrderId(cms: CmsAppLike$3, dataSource: ErpPaidOrderDataSource, entityMap: ErpPaidOrderEntityMap, orderId: number): Promise<void>;
168
169
 
169
170
  interface ErpContactSyncInput {
170
171
  name: string;
@@ -180,7 +181,7 @@ interface ErpContactSyncInput {
180
181
  * When ERP is enabled and plugin loaded, enqueue `create-contact` (non-fatal on failure).
181
182
  * Used for admin CRUD and storefront contact paths — not form submissions (those use lead/opportunity).
182
183
  */
183
- declare function queueErpCreateContactIfEnabled(cms: CmsAppLike$2, dataSource: ErpPaidOrderDataSource, entityMap: ErpPaidOrderEntityMap, input: ErpContactSyncInput): Promise<void>;
184
+ declare function queueErpCreateContactIfEnabled(cms: CmsAppLike$3, dataSource: ErpPaidOrderDataSource, entityMap: ErpPaidOrderEntityMap, input: ErpContactSyncInput): Promise<void>;
184
185
 
185
186
  interface ERPPluginConfig {
186
187
  webhookUrl: string;
@@ -280,7 +281,7 @@ declare function renderLayout(options: {
280
281
  companyDetails: CompanyDetails;
281
282
  }): string;
282
283
 
283
- interface CmsAppLike$1 {
284
+ interface CmsAppLike$2 {
284
285
  getPlugin(name: string): unknown;
285
286
  }
286
287
  /** Context for template rendering: at least companyDetails; template-specific fields (formName, etc.) are allowed. */
@@ -294,8 +295,8 @@ interface EmailJobPayload {
294
295
  html?: string;
295
296
  text?: string;
296
297
  }
297
- declare function registerEmailQueueProcessor(cms: CmsAppLike$1): void;
298
- declare function queueEmail(cms: CmsAppLike$1, payload: EmailJobPayload): Promise<void>;
298
+ declare function registerEmailQueueProcessor(cms: CmsAppLike$2): void;
299
+ declare function queueEmail(cms: CmsAppLike$2, payload: EmailJobPayload): Promise<void>;
299
300
  interface OrderPlacedEmailPayload {
300
301
  orderNumber: string;
301
302
  total?: string | number;
@@ -313,7 +314,7 @@ interface OrderPlacedEmailPayload {
313
314
  shippingAddress?: Record<string, string>;
314
315
  }
315
316
  /** Queues one `orderPlaced` email per recipient (customer + each unique sales address; skips sales if same as customer). */
316
- declare function queueOrderPlacedEmails(cms: CmsAppLike$1, payload: OrderPlacedEmailPayload): Promise<void>;
317
+ declare function queueOrderPlacedEmails(cms: CmsAppLike$2, payload: OrderPlacedEmailPayload): Promise<void>;
317
318
 
318
319
  interface EmailPluginConfig {
319
320
  type: 'AWS' | 'SMTP' | 'GMAIL' | 'SENDGRID';
@@ -421,7 +422,7 @@ interface SmsServiceConfig {
421
422
  webhookSecret?: string;
422
423
  }
423
424
 
424
- interface CmsAppLike {
425
+ interface CmsAppLike$1 {
425
426
  getPlugin(name: string): unknown;
426
427
  }
427
428
  interface SmsJobPayload {
@@ -432,8 +433,8 @@ interface SmsJobPayload {
432
433
  variables?: Record<string, string>;
433
434
  otpCode?: string;
434
435
  }
435
- declare function registerSmsQueueProcessor(cms: CmsAppLike): void;
436
- declare function queueSms(cms: CmsAppLike, payload: SmsJobPayload): Promise<void>;
436
+ declare function registerSmsQueueProcessor(cms: CmsAppLike$1): void;
437
+ declare function queueSms(cms: CmsAppLike$1, payload: SmsJobPayload): Promise<void>;
437
438
 
438
439
  interface SmsPluginConfig extends Partial<SmsServiceConfig> {
439
440
  /** Load admin settings group `sms` (enabled, smsProvider). Secrets typically stay in env. */
@@ -653,6 +654,95 @@ interface QueuePluginConfig {
653
654
  }
654
655
  declare function queuePlugin(config?: QueuePluginConfig): CmsPlugin<QueueService>;
655
656
 
657
+ declare const JOB_RUNNER_QUEUE = "job-runner";
658
+ type JobRunnerPayload = {
659
+ scheduleId: string;
660
+ triggeredBy?: 'schedule' | 'manual';
661
+ };
662
+ declare class PgBossService {
663
+ private readonly boss;
664
+ private started;
665
+ private readonly workRegistered;
666
+ constructor(connectionString: string, schema?: string);
667
+ start(): Promise<void>;
668
+ stop(): Promise<void>;
669
+ get raw(): PgBoss;
670
+ ensureQueue(name: string): Promise<void>;
671
+ send(queue: string, data: object): Promise<string | null>;
672
+ schedule(name: string, cron: string, data: object, options?: {
673
+ tz?: string;
674
+ }): Promise<void>;
675
+ unschedule(name: string): Promise<void>;
676
+ registerWork<T extends object>(queue: string, handler: (data: T) => Promise<void>): Promise<void>;
677
+ }
678
+
679
+ interface PgBossPluginConfig {
680
+ /** Postgres connection string; defaults to context.config.DATABASE_URL */
681
+ connectionString?: string;
682
+ schema?: string;
683
+ }
684
+ declare function pgBossPlugin(config?: PgBossPluginConfig): CmsPlugin<PgBossService | undefined>;
685
+
686
+ interface CmsAppLike {
687
+ getPlugin(name: string): unknown;
688
+ }
689
+ interface JobRunnerDeps {
690
+ dataSource: DataSource;
691
+ entityMap: EntityMap$2;
692
+ config?: Record<string, string>;
693
+ }
694
+ declare function registerJobRunnerWorker(cms: CmsAppLike, deps: JobRunnerDeps): void;
695
+ /** Re-register work for a queue after API updates a schedule. */
696
+ declare function ensureScheduleQueueWorker(cms: CmsAppLike, queueName: string): Promise<void>;
697
+
698
+ declare class JobScheduleRun {
699
+ id: string;
700
+ scheduleId: string;
701
+ schedule: JobSchedule;
702
+ startedAt: Date;
703
+ finishedAt: Date | null;
704
+ status: string;
705
+ error: string | null;
706
+ result: Record<string, unknown> | null;
707
+ triggeredBy: string;
708
+ createdAt: Date;
709
+ }
710
+
711
+ type JobScheduleMode = 'interval' | 'daily' | 'weekly' | 'cron';
712
+ type JobScheduleType = 'blog_generate';
713
+ declare class JobSchedule {
714
+ id: string;
715
+ name: string;
716
+ jobType: JobScheduleType;
717
+ enabled: boolean;
718
+ scheduleMode: JobScheduleMode;
719
+ intervalMinutes: number | null;
720
+ runAtTime: string | null;
721
+ runOnDays: number[] | null;
722
+ timezone: string;
723
+ cronExpression: string | null;
724
+ payload: Record<string, unknown>;
725
+ authorId: number | null;
726
+ pgBossScheduleName: string;
727
+ lastRunAt: Date | null;
728
+ lastRunStatus: string | null;
729
+ lastRunError: string | null;
730
+ nextRunAt: Date | null;
731
+ runs: JobScheduleRun[];
732
+ createdAt: Date;
733
+ updatedAt: Date;
734
+ }
735
+
736
+ interface CmsPgBossLike {
737
+ getPlugin(name: string): unknown;
738
+ }
739
+ declare function syncJobScheduleToPgBoss(cms: CmsPgBossLike, schedule: JobSchedule, onRegisterQueue?: (queueName: string) => Promise<void>): Promise<void>;
740
+ declare function queueJobScheduleNow(cms: CmsPgBossLike, scheduleId: string): Promise<void>;
741
+
742
+ declare function pgBossScheduleNameForId(scheduleId: string): string;
743
+ declare function buildCronFromSchedule(schedule: Pick<JobSchedule, 'scheduleMode' | 'intervalMinutes' | 'runAtTime' | 'runOnDays' | 'cronExpression'>): string;
744
+ declare function validateScheduleInput(schedule: Pick<JobSchedule, 'scheduleMode' | 'intervalMinutes' | 'runAtTime' | 'cronExpression'>): string | null;
745
+
656
746
  type CaptchaProviderId = 'turnstile' | 'recaptcha_v3';
657
747
  interface CaptchaPublicConfig {
658
748
  enabled: boolean;
@@ -1859,4 +1949,4 @@ declare class RssFeed {
1859
1949
  /** Map API resource segment (e.g. "blogs", "form_submissions") to entity. Used by CRUD handler. */
1860
1950
  declare const CMS_ENTITY_MAP: Record<string, EntityTarget<typeorm.ObjectLiteral>>;
1861
1951
 
1862
- export { Address, type AnalyticsPluginConfig, Attribute, BLOG_GENERATOR_AGENT_NAME, BLOG_GENERATOR_DEFAULT_SYSTEM_INSTRUCTION, BLOG_GENERATOR_DEFAULT_VALIDATION_RULES, BLOG_GENERATOR_LLM_AGENT_SLUG, BLOG_GENERATOR_MARKDOWN_ARTICLE_SEPARATOR, BLOG_METADATA_ENRICHER_AGENT_NAME, BLOG_METADATA_ENRICHER_DEFAULT_SYSTEM_INSTRUCTION, BLOG_METADATA_ENRICHER_DEFAULT_VALIDATION_RULES, BLOG_METADATA_ENRICHER_LLM_AGENT_SLUG, Blog, type BlogGeneratorBlogDraft, type BlogGeneratorDraftParseMode, type BlogGeneratorPluginConfig, type BlogGeneratorSeoDraft, BlogGeneratorService, Brand, CMS_ENTITY_MAP, type CachePluginConfig, type CacheService, type CaptchaProviderId, type CaptchaPublicConfig, CaptchaService, type CaptchaVerifyResult, Cart, CartItem, Category, ChatConversation, ChatMessage, type CmsApp, type CmsPlugin, Collection, Comment, CompanyDetails, Config, Contact, type CreateCmsAppOptions, type DataSourceManager, type ERPPluginConfig, type ERPPluginInstance, ERPSubmissionService, type EmailData, type EmailJobPayload, type EmailPluginConfig, EmailService, type EmailServiceInterface, EmailTemplateName, EmailTemplateResult, EntityCrudAction, EntityMap$2 as EntityMap, type ErpContactSyncInput, type ErpCreateContactPayload, type ErpJobPayload, type ErpPaidOrderDataSource, type ErpPaidOrderEntityMap, type ExtraPublicWriteRule, type FacebookMeAccountsResponse, type FacebookPageAccount, Form, FormField, FormSubmission, KnowledgeBaseChunk, KnowledgeBaseDocument, type LatestArticleFromFeed, LlmAgent, type LlmAgentOptions, type LlmChatOptions, type LlmEmbeddingProvider, type LlmMessage, type LlmPluginConfig, LlmService, type LlmServiceEmbedOptions, type LlmServiceInterface, type LocalStoragePluginConfig, type Logger, Media, MessageTemplate, type MetaGraphMutationResponse, Order, OrderItem, type OrderPlacedEmailPayload, OrderPlacedLineItem, OtpChallenge, type OtpChannel, type OtpPurpose, Page, PasswordResetToken, Payment, type PaymentIntent, type PaymentPluginConfig, type PaymentServiceInterface, Permission, type PipelineNames, type PluginContext, Product, ProductAttribute, ProductCategory, ProductTax, type PublicThemeSettingsPayload, type QueuePluginConfig, type QueueService, type RenderEmailOptions, type RenderedEmail, RssArticle, RssFeed, type S3StoragePluginConfig, Seo, type SeoLike, type SeoMetadataOverrides, type SmsJobPayload, type SmsPluginConfig, type SmsProviderChoice, type SmsProviderId, type SmsServiceConfig, type SmsServiceInterface, type SocialMediaPluginConfig, StorageService, Tag, Tax, TemplateContext, User, UserGroup, Wishlist, WishlistItem, ZIP_MIME_TYPES, allowRateLimit, analyticsPlugin, assertCaptchaOk, blogGeneratorPlugin, buildBlogMetadataUserPrompt, buildCaptchaPublicConfig, buildRssUserPromptFromFeeds, cachePlugin, captchaPlugin, cn, countRecentOtpSends, createCmsApp, createDataSourceManager, createOtpChallenge, createSocialMediaHandlers, emailPlugin, emailTemplates, erpPlugin, fetchSeoBySlug, formatDate, formatDateOnly, formatDateTime, generateNumericOtp, generateSlug, getRssArticleSummaryFromItem, hashOtpCode, isZipMedia, joinRecipientsForSend, linkUnclaimedContactToUser, llmAgentToChatAgentOptions, llmPlugin, loadPublicThemeSettings, localStoragePlugin, mergeSeoBySlug, metaFetchUserManagedPages, metaPostPageFeed, metaPostPagePhoto, metaResolvePageAccessToken, normalizePhoneE164, parseBlogGeneratorAgentContent, parseBlogGeneratorModelOutput, parseBlogMetadataEnrichmentJson, parseEmailRecipientsFromConfig, parseHfInferenceEmbeddingBody, paymentPlugin, queueEmail, queueErp, queueErpCreateContactIfEnabled, queueErpPaidOrderForOrderId, queueOrderPlacedEmails, queuePlugin, queueSms, rateLimitCheckoutPost, rateLimitKeyForApiRequest, rateLimitPublicApiIfNeeded, registerEmailQueueProcessor, registerErpQueueProcessor, registerSmsQueueProcessor, relativePathFromMediaParentId, renderEmail, renderLayout, resolveBlogCategoryIdByName, resolvePublicMetadata, s3StoragePlugin, sanitizeMediaFolderPath, sanitizeStorageSegment, seedDefaultAdmin, sendOrderPlacedEmailsAfterConfirmation, serializeEmailRecipients, shouldRateLimitPublicWrite, smsPlugin, socialMediaPlugin, truncateText, validateSlug, verifyAndConsumeOtpChallenge, verifyOtpCodeHash };
1952
+ export { Address, type AnalyticsPluginConfig, Attribute, BLOG_GENERATOR_AGENT_NAME, BLOG_GENERATOR_DEFAULT_SYSTEM_INSTRUCTION, BLOG_GENERATOR_DEFAULT_VALIDATION_RULES, BLOG_GENERATOR_LLM_AGENT_SLUG, BLOG_GENERATOR_MARKDOWN_ARTICLE_SEPARATOR, BLOG_METADATA_ENRICHER_AGENT_NAME, BLOG_METADATA_ENRICHER_DEFAULT_SYSTEM_INSTRUCTION, BLOG_METADATA_ENRICHER_DEFAULT_VALIDATION_RULES, BLOG_METADATA_ENRICHER_LLM_AGENT_SLUG, Blog, type BlogGeneratorBlogDraft, type BlogGeneratorDraftParseMode, type BlogGeneratorPluginConfig, type BlogGeneratorSeoDraft, BlogGeneratorService, Brand, CMS_ENTITY_MAP, type CachePluginConfig, type CacheService, type CaptchaProviderId, type CaptchaPublicConfig, CaptchaService, type CaptchaVerifyResult, Cart, CartItem, Category, ChatConversation, ChatMessage, type CmsApp, type CmsPlugin, Collection, Comment, CompanyDetails, Config, Contact, type CreateCmsAppOptions, type DataSourceManager, type ERPPluginConfig, type ERPPluginInstance, ERPSubmissionService, type EmailData, type EmailJobPayload, type EmailPluginConfig, EmailService, type EmailServiceInterface, EmailTemplateName, EmailTemplateResult, EntityCrudAction, EntityMap$2 as EntityMap, type ErpContactSyncInput, type ErpCreateContactPayload, type ErpJobPayload, type ErpPaidOrderDataSource, type ErpPaidOrderEntityMap, type ExtraPublicWriteRule, type FacebookMeAccountsResponse, type FacebookPageAccount, Form, FormField, FormSubmission, JOB_RUNNER_QUEUE, type CmsAppLike as JobRunnerCmsAppLike, type JobRunnerDeps, type JobRunnerPayload, JobSchedule, JobScheduleRun, KnowledgeBaseChunk, KnowledgeBaseDocument, type LatestArticleFromFeed, LlmAgent, type LlmAgentOptions, type LlmChatOptions, type LlmEmbeddingProvider, type LlmMessage, type LlmPluginConfig, LlmService, type LlmServiceEmbedOptions, type LlmServiceInterface, type LocalStoragePluginConfig, type Logger, Media, MessageTemplate, type MetaGraphMutationResponse, Order, OrderItem, type OrderPlacedEmailPayload, OrderPlacedLineItem, OtpChallenge, type OtpChannel, type OtpPurpose, Page, PasswordResetToken, Payment, type PaymentIntent, type PaymentPluginConfig, type PaymentServiceInterface, Permission, type PgBossPluginConfig, PgBossService, type PipelineNames, type PluginContext, Product, ProductAttribute, ProductCategory, ProductTax, type PublicThemeSettingsPayload, type QueuePluginConfig, type QueueService, type RenderEmailOptions, type RenderedEmail, RssArticle, RssFeed, type S3StoragePluginConfig, Seo, type SeoLike, type SeoMetadataOverrides, type SmsJobPayload, type SmsPluginConfig, type SmsProviderChoice, type SmsProviderId, type SmsServiceConfig, type SmsServiceInterface, type SocialMediaPluginConfig, StorageService, Tag, Tax, TemplateContext, User, UserGroup, Wishlist, WishlistItem, ZIP_MIME_TYPES, allowRateLimit, analyticsPlugin, assertCaptchaOk, blogGeneratorPlugin, buildBlogMetadataUserPrompt, buildCaptchaPublicConfig, buildCronFromSchedule, buildRssUserPromptFromFeeds, cachePlugin, captchaPlugin, cn, countRecentOtpSends, createCmsApp, createDataSourceManager, createOtpChallenge, createSocialMediaHandlers, emailPlugin, emailTemplates, ensureScheduleQueueWorker, erpPlugin, fetchSeoBySlug, formatDate, formatDateOnly, formatDateTime, generateNumericOtp, generateSlug, getRssArticleSummaryFromItem, hashOtpCode, isZipMedia, joinRecipientsForSend, linkUnclaimedContactToUser, llmAgentToChatAgentOptions, llmPlugin, loadPublicThemeSettings, localStoragePlugin, mergeSeoBySlug, metaFetchUserManagedPages, metaPostPageFeed, metaPostPagePhoto, metaResolvePageAccessToken, normalizePhoneE164, parseBlogGeneratorAgentContent, parseBlogGeneratorModelOutput, parseBlogMetadataEnrichmentJson, parseEmailRecipientsFromConfig, parseHfInferenceEmbeddingBody, paymentPlugin, pgBossPlugin, pgBossScheduleNameForId, queueEmail, queueErp, queueErpCreateContactIfEnabled, queueErpPaidOrderForOrderId, queueJobScheduleNow, queueOrderPlacedEmails, queuePlugin, queueSms, rateLimitCheckoutPost, rateLimitKeyForApiRequest, rateLimitPublicApiIfNeeded, registerEmailQueueProcessor, registerErpQueueProcessor, registerJobRunnerWorker, registerSmsQueueProcessor, relativePathFromMediaParentId, renderEmail, renderLayout, resolveBlogCategoryIdByName, resolvePublicMetadata, s3StoragePlugin, sanitizeMediaFolderPath, sanitizeStorageSegment, seedDefaultAdmin, sendOrderPlacedEmailsAfterConfirmation, serializeEmailRecipients, shouldRateLimitPublicWrite, smsPlugin, socialMediaPlugin, syncJobScheduleToPgBoss, truncateText, validateScheduleInput, validateSlug, verifyAndConsumeOtpChallenge, verifyOtpCodeHash };