@infuro/cms-core 1.0.58 → 1.0.60
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/admin.cjs +442 -37
- package/dist/admin.js +443 -38
- package/dist/api.cjs +41 -37
- package/dist/api.d.cts +2 -1
- package/dist/api.d.ts +2 -1
- package/dist/api.js +5 -5
- package/dist/auth.cjs +51 -51
- package/dist/auth.js +3 -3
- package/dist/{chunk-3EOM4V2M.cjs → chunk-4U6DATGZ.cjs} +7 -7
- package/dist/{chunk-BNKZNLEX.js → chunk-6DBDJ4VD.js} +2 -2
- package/dist/{chunk-UQWZUZ5X.cjs → chunk-73WVHINE.cjs} +30 -6
- package/dist/{chunk-UCKN4BBY.cjs → chunk-77I3KS7V.cjs} +4 -1
- package/dist/{chunk-BHUEXLD2.cjs → chunk-BSLNXKV2.cjs} +415 -131
- package/dist/{chunk-77NUXO6A.cjs → chunk-J7FMZK66.cjs} +10 -2
- package/dist/{chunk-AGU3B5JW.js → chunk-JAEUYYGA.js} +335 -52
- package/dist/{chunk-BC22I7C7.cjs → chunk-KM2I6AFP.cjs} +9 -9
- package/dist/{chunk-JIWUVQ6B.js → chunk-MVHDC3XF.js} +10 -2
- package/dist/{chunk-RK5ETF2I.js → chunk-NR44CK5E.js} +1 -1
- package/dist/{chunk-MXIWUFBP.js → chunk-O2642WVS.js} +28 -4
- package/dist/{chunk-HCIRL37O.js → chunk-T3HPSF7K.js} +4 -1
- package/dist/{chunk-HYW3MUXT.js → chunk-URN7GS23.js} +30 -16
- package/dist/{chunk-HXLC56ZK.cjs → chunk-YSYX4GUD.cjs} +32 -18
- package/dist/{emit-order-notification-trigger-HZQPPSFB.js → emit-order-notification-trigger-CZU3V2WE.js} +2 -2
- package/dist/{emit-order-notification-trigger-NR3VN6C6.cjs → emit-order-notification-trigger-TNEZOYEE.cjs} +4 -4
- package/dist/index.cjs +342 -300
- package/dist/index.d.cts +33 -1
- package/dist/index.d.ts +33 -1
- package/dist/index.js +54 -16
- package/dist/migrations/1782800000000-AddPaymentSuccessFailedRefundTriggers.ts +32 -0
- package/dist/migrations/1782900000000-AddEnableTurnstileToForms.ts +29 -0
- package/dist/{order-notification-dispatcher-2FCZFZUD.cjs → order-notification-dispatcher-KJVGLK5E.cjs} +5 -5
- package/dist/{order-notification-dispatcher-64WDCHHG.js → order-notification-dispatcher-ZSFKEYMP.js} +2 -2
- package/dist/{rbac-debug-db-6EMIVMGF.js → rbac-debug-db-5R6XFPSV.js} +1 -1
- package/dist/{rbac-debug-db-6PWTLBEL.cjs → rbac-debug-db-JKK2MCWF.cjs} +2 -2
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -966,6 +966,7 @@ declare function deductInventoryForConfirmedOrder(ds: EmOrDs$1, entityMap: Entit
|
|
|
966
966
|
declare function restoreInventoryForCancelledOrder(ds: EmOrDs$1, entityMap: EntityMapLike$3, lines: InventoryOrderLine[]): Promise<string | null>;
|
|
967
967
|
|
|
968
968
|
type EntityMap$2 = Record<string, typeorm.EntityTarget<typeorm.ObjectLiteral>>;
|
|
969
|
+
declare function autoExpireOrderIfPaymentTimeExceeded(dataSource: typeorm.DataSource, entityMap: Record<string, unknown>, order: Record<string, unknown> | null | undefined): Promise<Record<string, unknown> | null | undefined>;
|
|
969
970
|
interface CrudHandlerOptions {
|
|
970
971
|
requireAuth: (req: Request) => Promise<Response | null>;
|
|
971
972
|
json: (body: unknown, init?: {
|
|
@@ -2635,6 +2636,7 @@ declare class Form {
|
|
|
2635
2636
|
campaign: string | null;
|
|
2636
2637
|
slug: string;
|
|
2637
2638
|
published: boolean;
|
|
2639
|
+
enableTurnstile: boolean;
|
|
2638
2640
|
createdAt: Date;
|
|
2639
2641
|
updatedAt: Date;
|
|
2640
2642
|
deletedAt: Date | null;
|
|
@@ -2832,6 +2834,9 @@ declare function resendOrderNotification(triggerKey: string, orderId: number, de
|
|
|
2832
2834
|
declare const KNOWN_NOTIFICATION_TRIGGERS: {
|
|
2833
2835
|
readonly ORDER_PLACED: "order_placed";
|
|
2834
2836
|
readonly ORDER_CANCELLED: "order_cancelled";
|
|
2837
|
+
readonly PAYMENT_SUCCESS: "payment_success";
|
|
2838
|
+
readonly PAYMENT_FAILED: "payment_failed";
|
|
2839
|
+
readonly PAYMENT_REFUND_INITIATED: "payment_refund_initiated";
|
|
2835
2840
|
};
|
|
2836
2841
|
interface OrderTriggerPayload {
|
|
2837
2842
|
orderId: number;
|
|
@@ -2863,6 +2868,24 @@ declare const DEFAULT_ORDER_NOTIFICATION_TRIGGER_SEEDS: readonly [{
|
|
|
2863
2868
|
readonly description: "Fires when an order is cancelled (includes refund amount when applicable).";
|
|
2864
2869
|
readonly category: "order";
|
|
2865
2870
|
readonly sortOrder: 2;
|
|
2871
|
+
}, {
|
|
2872
|
+
readonly triggerKey: "payment_success";
|
|
2873
|
+
readonly label: "Payment success";
|
|
2874
|
+
readonly description: "Fires when order is placed and payment status is paid.";
|
|
2875
|
+
readonly category: "order";
|
|
2876
|
+
readonly sortOrder: 3;
|
|
2877
|
+
}, {
|
|
2878
|
+
readonly triggerKey: "payment_failed";
|
|
2879
|
+
readonly label: "Payment failed";
|
|
2880
|
+
readonly description: "Fires when payment status is pending, unpaid, or failed, or when order is cancelled without payment.";
|
|
2881
|
+
readonly category: "order";
|
|
2882
|
+
readonly sortOrder: 4;
|
|
2883
|
+
}, {
|
|
2884
|
+
readonly triggerKey: "payment_refund_initiated";
|
|
2885
|
+
readonly label: "Payment refund initiated";
|
|
2886
|
+
readonly description: "Fires when order is cancelled and its payment status is paid (refund initiated).";
|
|
2887
|
+
readonly category: "order";
|
|
2888
|
+
readonly sortOrder: 5;
|
|
2866
2889
|
}];
|
|
2867
2890
|
|
|
2868
2891
|
/** @deprecated Use DB catalog `order_notification_triggers`; kept for type hints. */
|
|
@@ -2872,6 +2895,15 @@ declare const ORDER_NOTIFICATION_TRIGGERS: readonly [{
|
|
|
2872
2895
|
}, {
|
|
2873
2896
|
readonly key: "order_cancelled";
|
|
2874
2897
|
readonly label: "Order cancelled";
|
|
2898
|
+
}, {
|
|
2899
|
+
readonly key: "payment_success";
|
|
2900
|
+
readonly label: "Payment success";
|
|
2901
|
+
}, {
|
|
2902
|
+
readonly key: "payment_failed";
|
|
2903
|
+
readonly label: "Payment failed";
|
|
2904
|
+
}, {
|
|
2905
|
+
readonly key: "payment_refund_initiated";
|
|
2906
|
+
readonly label: "Payment refund initiated";
|
|
2875
2907
|
}];
|
|
2876
2908
|
type OrderNotificationTriggerKey = (typeof ORDER_NOTIFICATION_TRIGGERS)[number]['key'];
|
|
2877
2909
|
|
|
@@ -4412,4 +4444,4 @@ type CreateCmsAppWithMessagingOptions = CreateCmsAppOptions & EnsureMessagingPlu
|
|
|
4412
4444
|
/** `createCmsApp` + messaging plugins + queue processor registration. */
|
|
4413
4445
|
declare function createCmsAppWithMessaging(options: CreateCmsAppWithMessagingOptions): Promise<CmsApp>;
|
|
4414
4446
|
|
|
4415
|
-
export { ADMIN_GROUP_NAME, AUTH_PROVIDERS_SETTINGS_GROUP, Address, type AdminNavItem, type AnalyticsHandlerConfig, type AnalyticsPluginConfig, type AppliedDiscountUsage, Attendee, Attribute, type AuthHandlersConfig, type AuthHelpers, type AuthProvidersDataSource, type AuthProvidersEntityMap, type AuthorizeOtpInput, 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 BlogBySlugConfig, type BlogGeneratorBlogDraft, type BlogGeneratorDraftParseMode, type BlogGeneratorPluginConfig, type BlogGeneratorSeoDraft, BlogGeneratorService, Brand, type BuildNextAuthOptionsConfig, CMS_ENTITY_MAP, type CachePluginConfig, type CacheService, type CaptchaProviderId, type CaptchaPublicConfig, CaptchaService, type CaptchaVerifyResult, Cart, CartItem, Category, type ChangePasswordConfig, ChatConversation, ChatMessage, type ChatPublicConfig, type CmsApiHandlerConfig, type CmsApp, type CmsGetter, type CmsMiddlewareConfig, type CmsMiddlewareRequest, type CmsPlugin, Collection, Combo, ComboItem, Comment, type CompanyDetails, Config, Contact, type CreateCmsAppOptions, type CreateCmsAppWithMessagingOptions, type CreateGoogleCustomerDataSource, type CreateGoogleCustomerEntityMap, type CreateGoogleCustomerInput, type CrudHandlerOptions, Currency, CurrencyExchange, Customer, Customer_Contacts, DEFAULT_ADMIN_NAV, DEFAULT_ORDER_NOTIFICATION_TRIGGER_SEEDS, type DashboardStatsConfig, type DataSourceManager, Discount, DiscountRules, type DiscountUsageEntityMap, type ERPPluginConfig, type ERPPluginInstance, ERPSubmissionService, EVENT_ORDER_MESSAGE_TEMPLATE_DEFAULTS, EVENT_ORDER_TEMPLATE_KEY, EVENT_ORDER_TEMPLATE_VARIABLES, type EcommerceAnalyticsConfig, type EmailAttachment, type EmailData, type EmailJobPayload, type EmailPluginConfig, type EmailQueueProcessorOptions, EmailService, type EmailServiceInterface, type EmailTemplateName, type EmailTemplateResult, type EmitOrderNotificationTriggerDeps, type EnsureCustomerRecordInput, type EnsureCustomerUserInput, type EnsureMessagingPluginsOptions, type EnsureVendorCustomerDetails, type EntityCrudAction, type EntityMap$2 as EntityMap, type EntityPermissionFlags, type ErpContactSyncInput, type ErpCreateContactPayload, type ErpJobPayload, type ErpPaidOrderDataSource, type ErpPaidOrderEntityMap, Event, type EventApprovalStatus, type EventOrderMessageTemplateHandlersConfig, type EventOrderNotificationChannel, type EventOrderNotificationTemplates, type EventOrderTemplateOverride, EventProduct, type ExtraPublicWriteRule, type FacebookMeAccountsResponse, type FacebookPageAccount, type ForgotPasswordConfig, Form, type FormBySlugConfig, FormField, FormSubmission, type GetPublicSettingsGroupConfig, type GetPublicSettingsGroupDataSource, type GetSession, type GoogleAuthConfig, INVOICE_TEMPLATE_IDS, INVOICE_TEMPLATE_OPTIONS, type InventoryOrderLine, type InviteAcceptConfig, type InvoiceAddress, type InvoiceCompany, type InvoiceLineItem, type InvoicePdfInput, type InvoiceTemplateId, JOB_RUNNER_QUEUE, type CmsAppLike as JobRunnerCmsAppLike, type JobRunnerDeps, type JobRunnerPayload, JobSchedule, type JobScheduleApiConfig, JobScheduleRun, KNOWN_NOTIFICATION_TRIGGERS, KnowledgeBaseChunk, KnowledgeBaseDocument, type LatestArticleFromFeed, LlmAgent, type LlmAgentKnowledgeApiConfig, LlmAgentKnowledgeDocument, type LlmAgentOptions, type LlmAgentValidationRulesJson, type LlmChatOptions, type LlmEmbeddingProvider, type LlmMessage, type LlmPluginConfig, LlmService, type LlmServiceEmbedOptions, type LlmServiceInterface, type LocalStoragePluginConfig, type Logger, Media, MessageTemplate, type MetaGraphMutationResponse, type NextAuthOptionsConfig, type NextAuthUser, OPEN_ENDPOINTS, ORDER_NOTIFICATION_TRIGGERS, Order, OrderAddresses, OrderDiscounts, type OrderInventorySnapshot, OrderItem, OrderNotificationBinding, OrderNotificationTrigger, type OrderNotificationTriggerKey, type OrderPlacedEmailPayload, type OrderPlacedLineItem, type OrderTriggerPayload, OtpChallenge, type OtpChannel, type OtpPurpose, PERMISSION_REQUIRED_ENDPOINTS, Page, type ParsedLlmAgentValidation, PasswordResetToken, Payment, type PaymentIntent, type PaymentPluginConfig, type PaymentServiceInterface, Permission, type PgBossPluginConfig, PgBossService, type PipelineNames, type PluginContext, Product, type ProductApprovalStatus, ProductAttribute, ProductCategory, ProductConfig, ProductVariant, type PublicThemeSettingsPayload, type QueuePluginConfig, type QueueService, RBAC_ADMIN_ONLY_ENTITIES, type RefundCalculationResult, RefundPolicy, type RefundPolicyLike, type RefundPolicyTier, RefundRequest, type RenderEmailOptions, type RenderedEmail, type ResolveGoogleAuthConfigInput, type ResolveOrderInvoicePdfError, type ResolvedOrderInvoicePdf, RssArticle, RssFeed, type S3StoragePluginConfig, SUPER_ADMIN_GROUP_ID, type SendVendorOnboardEmailInput, Seo, type SeoLike, type SeoMetadataOverrides, type SessionUser, type SetPasswordConfig, type SettingsApiConfig, type SmsJobPayload, type SmsPluginConfig, type SmsProviderChoice, type SmsProviderId, type SmsServiceConfig, type SmsServiceInterface, type SocialLinkItem, type SocialMediaPluginConfig, type StorageService, type StorefrontApiConfig, type StorefrontOtpFlags, Tag, Tax, type TemplateContext, type UploadHandlerConfig, User, type UserAuthApiConfig, type UserAvatarConfig, UserDeviceToken, UserGroup, type UserInviteStatus, type UserProfileConfig, type UsersApiConfig, VENDOR_ADMIN_GROUP_ID, VENDOR_GROUP_NAME, VENDOR_OWNER_GROUP_NAME, VENDOR_SCOPED_STORE_ENTITIES, VENDOR_STORE_RBAC_ENTITIES, Vendor, type VendorCatalogCreateFlags, VendorCustomer, type VendorDashboardConfig, type VendorOnboardHandlersConfig, type VendorOwnerActivation, VendorRole, VendorRolePermission, VendorUser, VendorUserProfile, type WhatsAppJobPayload, type WhatsAppPluginConfig, type WhatsAppServiceConfig, type WhatsAppServiceInterface, Wishlist, WishlistItem, ZIP_MIME_TYPES, activeUniqueValueExists, allowRateLimit, analyticsPlugin, applyApprovalStatusSideEffects, applyEventApprovalStatusSideEffects, applyRotatingVendorInvite, applyVendorCustomersContactFilter, applyVendorEventCreateApproval, applyVendorProductCreateApproval, assertCaptchaOk, assertContactAllowedForVendorOrder, assertEventApprovalUpdate, assertProductApprovalUpdate, blogGeneratorPlugin, buildBlogMetadataUserPrompt, buildCaptchaPublicConfig, buildCronFromSchedule, buildEventOrderTemplateVariables, buildLocalInvoicePdfForOrder, buildNextAuthOptions, buildRssUserPromptFromFeeds, buildStorefrontNextAuthOptions, buildUserInviteLink, buildVendorInviteLink, cachePlugin, calculateOrderRefundPreview, calculateRefundFromPolicy, canManageRoles, canManageVendorRoles, canManageVendorTeam, canOnboardVendors, captchaPlugin, checkAndIncrementDiscountUsage, checkEventsEnabled, checkMultiVendorEnabled, cn, completeUserInviteAccept, consumeAppliedDiscountUsages, contactIsVendorCustomer, countDiscountOrdersForContact, countRecentOtpSends, createAnalyticsHandlers, createAuthHelpers, createBlogBySlugHandler, createChangePasswordHandler, createCmsApiHandler, createCmsApp, createCmsAppWithMessaging, createCmsAuthBundle, createCmsMiddleware, createCrudByIdHandler, createCrudHandler, createCustomerUserFromGoogleOAuth, createDashboardStatsHandler, createDataSourceManager, createEcommerceAnalyticsHandler, createEventOrderMessageTemplateHandlers, createForgotPasswordHandler, createFormBySlugHandler, createInviteAcceptHandler, createJobScheduleHandlers, createLlmAgentKnowledgeHandlers, createMediaZipExtractHandler, createMessageTemplateRowLoader, createOtpChallenge, createSetPasswordHandler, createSettingsApiHandlers, createSocialMediaHandlers, createStorefrontApiHandler, createUploadHandler, createUserAuthApiRouter, createUserAvatarHandler, createUserProfileHandler, createUsersApiHandlers, createVendorDashboardHandler, createVendorOnboardHandlers, customerPhoneForEmail, customerPhoneForUser, daysBeforeEventStart, decrementDiscountUsage, deductInventoryForConfirmedOrder, defaultPublicApiMethods, describeEventTierPolicy, emailPlugin, emailTemplates, emitOrderNotificationTrigger, enrichUserWithVendorContext, ensureCustomerForUser, ensureCustomerRecord, ensureMessagingPluginsOnCms, ensureScheduleQueueWorker, ensureVendorCustomerForOrderContact, ensureVendorCustomersForOrder, erpPlugin, explainSessionEntityAccess, fetchSeoBySlug, findActiveRefundPolicyForVendor, findUserByInviteToken, findVendorByInviteToken, fireOrderNotificationTrigger, formatDate, formatDateOnly, formatDateTime, formatTierRange, generateLocalInvoicePdf, generateNumericOtp, generateSlug, getCompanyDetailsFromSettings, getNextAuthOptions, getPermissionableEntityKeys, getPublicSettingsGroup, getRequireEventApproval, getRequireProductApproval, getRequiredPermission, getRssArticleSummaryFromItem, getStorefrontNextAuthOptions, getVendorCatalogCreateFlags, googleOAuthRedirectUri, hasEntityPermission, hashOtpCode, hydrateVendorSessionUser, initWhatsappTriggerDispatcher, invalidateEventsCache, invalidateMultiVendorCache, invalidateRequireEventApprovalCache, invalidateRequireProductApprovalCache, invalidateVendorCatalogCreateFlagsCache, isAuthDebugClientEnabled, isAuthDebugEnabled, isCustomerTypeContact, isGoogleAuthPubliclyEnabled, isMaxPerUserUsageReached, isMaxTotalUsageReached, isOpenEndpoint, isOrderEligibleForInvoiceEmail, isPlatformAdministrator, isPublicMethod, isRbacDebugEnabled, isSuperAdmin, isSuperAdminGroupName, isSyntheticCustomerPhone, isVendorAdmin, isVendorGroupName, isVendorOwner, isVendorPortalUser, isVendorStaff, isZipMedia, joinRecipientsForSend, linkUnclaimedContactToUser, llmAgentToChatAgentOptions, llmPlugin, loadPublicThemeSettings, loadSettingsGroupFromDb, loadUserVendorContext, localStoragePlugin, logAuth, logAuthClient, logEntityAccessDecision, logRbac, mergeEmailLayoutCompanyDetails, mergeGuardrailsIntoSystemPrompt, mergeInventoryLines, mergeSeoBySlug, messagingPlugins, metaFetchUserManagedPages, metaPostPageFeed, metaPostPagePhoto, metaResolvePageAccessToken, newUserInviteToken, nextAuthCookieDebugInfo, normalizeCustomerPhone, normalizeInvoiceTemplateId, normalizePhoneE164, normalizeRefundTiers, notificationTriggerEmitter, orderInventorySnapshotFromRow, orderStatusHoldsStock, overlayCmsPlugins, parseBlogGeneratorAgentContent, parseBlogGeneratorModelOutput, parseBlogMetadataEnrichmentJson, parseEmailRecipientsFromConfig, parseHfInferenceEmbeddingBody, parseLlmAgentValidationRules, paymentPlugin, permissionRowsToRecord, pgBossPlugin, pgBossScheduleNameForId, queueEmail, queueErp, queueErpCreateContactIfEnabled, queueErpPaidOrderForOrderId, queueJobScheduleNow, queueOrderPlacedEmails, queuePlugin, queueSms, queueVendorOnboardEmails, queueWhatsApp, rateLimitCheckoutPost, rateLimitKeyForApiRequest, rateLimitPublicApiIfNeeded, reconcileOrderInventoryBetweenSnapshots, recordDiscountUsage, registerEmailQueueProcessor, registerErpQueueProcessor, registerJobRunnerWorker, registerMessagingQueueProcessors, registerSmsQueueProcessor, registerWhatsAppQueueProcessor, relativePathFromMediaParentId, renderEmail, renderLayout, resendOrderNotification, resolveBlogCategoryIdByName, resolveEventOrderTemplate, resolveGoogleAuthConfig, resolveInvoiceAssetUrl, resolveOrderInvoicePdfBytes, resolvePublicMetadata, resolveSettingsEncryptionKey, resolveVendorIdForContactCheck, resolveVendorScopeFromSessionUser, restoreInventoryForCancelledOrder, retireSoftDeletedUniqueValue, s3StoragePlugin, sanitizeMediaFolderPath, sanitizeStorageSegment, seedAdministratorPermissions, seedDefaultAdmin, sendOrderPlacedEmailsAfterConfirmation, sendVendorOnboardEmails, serializeEmailRecipients, sessionHasEntityAccess, shouldRateLimitPublicWrite, simpleDecrypt, simpleEncrypt, smsPlugin, socialMediaPlugin, streamOrderInvoicePdf, summarizeEntityPerms, summarizeSessionUserForLog, syncJobScheduleToPgBoss, truncateText, validateInventoryForConfirmedOrderLines, validateInventoryForOrderBecomingConfirmed, validateRefundTiers, validateScheduleInput, validateSlug, validateUserMessageAgainstAgentRules, validateUserMessageAgainstStructuredRules, vendorPortalFlagsFromUser, verifyAndConsumeOtpChallenge, verifyOtpCodeHash, whatsappPlugin, withAdminRlsContext, withVendorRlsContext, wrapGetCmsWithMessaging };
|
|
4447
|
+
export { ADMIN_GROUP_NAME, AUTH_PROVIDERS_SETTINGS_GROUP, Address, type AdminNavItem, type AnalyticsHandlerConfig, type AnalyticsPluginConfig, type AppliedDiscountUsage, Attendee, Attribute, type AuthHandlersConfig, type AuthHelpers, type AuthProvidersDataSource, type AuthProvidersEntityMap, type AuthorizeOtpInput, 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 BlogBySlugConfig, type BlogGeneratorBlogDraft, type BlogGeneratorDraftParseMode, type BlogGeneratorPluginConfig, type BlogGeneratorSeoDraft, BlogGeneratorService, Brand, type BuildNextAuthOptionsConfig, CMS_ENTITY_MAP, type CachePluginConfig, type CacheService, type CaptchaProviderId, type CaptchaPublicConfig, CaptchaService, type CaptchaVerifyResult, Cart, CartItem, Category, type ChangePasswordConfig, ChatConversation, ChatMessage, type ChatPublicConfig, type CmsApiHandlerConfig, type CmsApp, type CmsGetter, type CmsMiddlewareConfig, type CmsMiddlewareRequest, type CmsPlugin, Collection, Combo, ComboItem, Comment, type CompanyDetails, Config, Contact, type CreateCmsAppOptions, type CreateCmsAppWithMessagingOptions, type CreateGoogleCustomerDataSource, type CreateGoogleCustomerEntityMap, type CreateGoogleCustomerInput, type CrudHandlerOptions, Currency, CurrencyExchange, Customer, Customer_Contacts, DEFAULT_ADMIN_NAV, DEFAULT_ORDER_NOTIFICATION_TRIGGER_SEEDS, type DashboardStatsConfig, type DataSourceManager, Discount, DiscountRules, type DiscountUsageEntityMap, type ERPPluginConfig, type ERPPluginInstance, ERPSubmissionService, EVENT_ORDER_MESSAGE_TEMPLATE_DEFAULTS, EVENT_ORDER_TEMPLATE_KEY, EVENT_ORDER_TEMPLATE_VARIABLES, type EcommerceAnalyticsConfig, type EmailAttachment, type EmailData, type EmailJobPayload, type EmailPluginConfig, type EmailQueueProcessorOptions, EmailService, type EmailServiceInterface, type EmailTemplateName, type EmailTemplateResult, type EmitOrderNotificationTriggerDeps, type EnsureCustomerRecordInput, type EnsureCustomerUserInput, type EnsureMessagingPluginsOptions, type EnsureVendorCustomerDetails, type EntityCrudAction, type EntityMap$2 as EntityMap, type EntityPermissionFlags, type ErpContactSyncInput, type ErpCreateContactPayload, type ErpJobPayload, type ErpPaidOrderDataSource, type ErpPaidOrderEntityMap, Event, type EventApprovalStatus, type EventOrderMessageTemplateHandlersConfig, type EventOrderNotificationChannel, type EventOrderNotificationTemplates, type EventOrderTemplateOverride, EventProduct, type ExtraPublicWriteRule, type FacebookMeAccountsResponse, type FacebookPageAccount, type ForgotPasswordConfig, Form, type FormBySlugConfig, FormField, FormSubmission, type GetPublicSettingsGroupConfig, type GetPublicSettingsGroupDataSource, type GetSession, type GoogleAuthConfig, INVOICE_TEMPLATE_IDS, INVOICE_TEMPLATE_OPTIONS, type InventoryOrderLine, type InviteAcceptConfig, type InvoiceAddress, type InvoiceCompany, type InvoiceLineItem, type InvoicePdfInput, type InvoiceTemplateId, JOB_RUNNER_QUEUE, type CmsAppLike as JobRunnerCmsAppLike, type JobRunnerDeps, type JobRunnerPayload, JobSchedule, type JobScheduleApiConfig, JobScheduleRun, KNOWN_NOTIFICATION_TRIGGERS, KnowledgeBaseChunk, KnowledgeBaseDocument, type LatestArticleFromFeed, LlmAgent, type LlmAgentKnowledgeApiConfig, LlmAgentKnowledgeDocument, type LlmAgentOptions, type LlmAgentValidationRulesJson, type LlmChatOptions, type LlmEmbeddingProvider, type LlmMessage, type LlmPluginConfig, LlmService, type LlmServiceEmbedOptions, type LlmServiceInterface, type LocalStoragePluginConfig, type Logger, Media, MessageTemplate, type MetaGraphMutationResponse, type NextAuthOptionsConfig, type NextAuthUser, OPEN_ENDPOINTS, ORDER_NOTIFICATION_TRIGGERS, Order, OrderAddresses, OrderDiscounts, type OrderInventorySnapshot, OrderItem, OrderNotificationBinding, OrderNotificationTrigger, type OrderNotificationTriggerKey, type OrderPlacedEmailPayload, type OrderPlacedLineItem, type OrderTriggerPayload, OtpChallenge, type OtpChannel, type OtpPurpose, PERMISSION_REQUIRED_ENDPOINTS, Page, type ParsedLlmAgentValidation, PasswordResetToken, Payment, type PaymentIntent, type PaymentPluginConfig, type PaymentServiceInterface, Permission, type PgBossPluginConfig, PgBossService, type PipelineNames, type PluginContext, Product, type ProductApprovalStatus, ProductAttribute, ProductCategory, ProductConfig, ProductVariant, type PublicThemeSettingsPayload, type QueuePluginConfig, type QueueService, RBAC_ADMIN_ONLY_ENTITIES, type RefundCalculationResult, RefundPolicy, type RefundPolicyLike, type RefundPolicyTier, RefundRequest, type RenderEmailOptions, type RenderedEmail, type ResolveGoogleAuthConfigInput, type ResolveOrderInvoicePdfError, type ResolvedOrderInvoicePdf, RssArticle, RssFeed, type S3StoragePluginConfig, SUPER_ADMIN_GROUP_ID, type SendVendorOnboardEmailInput, Seo, type SeoLike, type SeoMetadataOverrides, type SessionUser, type SetPasswordConfig, type SettingsApiConfig, type SmsJobPayload, type SmsPluginConfig, type SmsProviderChoice, type SmsProviderId, type SmsServiceConfig, type SmsServiceInterface, type SocialLinkItem, type SocialMediaPluginConfig, type StorageService, type StorefrontApiConfig, type StorefrontOtpFlags, Tag, Tax, type TemplateContext, type UploadHandlerConfig, User, type UserAuthApiConfig, type UserAvatarConfig, UserDeviceToken, UserGroup, type UserInviteStatus, type UserProfileConfig, type UsersApiConfig, VENDOR_ADMIN_GROUP_ID, VENDOR_GROUP_NAME, VENDOR_OWNER_GROUP_NAME, VENDOR_SCOPED_STORE_ENTITIES, VENDOR_STORE_RBAC_ENTITIES, Vendor, type VendorCatalogCreateFlags, VendorCustomer, type VendorDashboardConfig, type VendorOnboardHandlersConfig, type VendorOwnerActivation, VendorRole, VendorRolePermission, VendorUser, VendorUserProfile, type WhatsAppJobPayload, type WhatsAppPluginConfig, type WhatsAppServiceConfig, type WhatsAppServiceInterface, Wishlist, WishlistItem, ZIP_MIME_TYPES, activeUniqueValueExists, allowRateLimit, analyticsPlugin, applyApprovalStatusSideEffects, applyEventApprovalStatusSideEffects, applyRotatingVendorInvite, applyVendorCustomersContactFilter, applyVendorEventCreateApproval, applyVendorProductCreateApproval, assertCaptchaOk, assertContactAllowedForVendorOrder, assertEventApprovalUpdate, assertProductApprovalUpdate, autoExpireOrderIfPaymentTimeExceeded, blogGeneratorPlugin, buildBlogMetadataUserPrompt, buildCaptchaPublicConfig, buildCronFromSchedule, buildEventOrderTemplateVariables, buildLocalInvoicePdfForOrder, buildNextAuthOptions, buildRssUserPromptFromFeeds, buildStorefrontNextAuthOptions, buildUserInviteLink, buildVendorInviteLink, cachePlugin, calculateOrderRefundPreview, calculateRefundFromPolicy, canManageRoles, canManageVendorRoles, canManageVendorTeam, canOnboardVendors, captchaPlugin, checkAndIncrementDiscountUsage, checkEventsEnabled, checkMultiVendorEnabled, cn, completeUserInviteAccept, consumeAppliedDiscountUsages, contactIsVendorCustomer, countDiscountOrdersForContact, countRecentOtpSends, createAnalyticsHandlers, createAuthHelpers, createBlogBySlugHandler, createChangePasswordHandler, createCmsApiHandler, createCmsApp, createCmsAppWithMessaging, createCmsAuthBundle, createCmsMiddleware, createCrudByIdHandler, createCrudHandler, createCustomerUserFromGoogleOAuth, createDashboardStatsHandler, createDataSourceManager, createEcommerceAnalyticsHandler, createEventOrderMessageTemplateHandlers, createForgotPasswordHandler, createFormBySlugHandler, createInviteAcceptHandler, createJobScheduleHandlers, createLlmAgentKnowledgeHandlers, createMediaZipExtractHandler, createMessageTemplateRowLoader, createOtpChallenge, createSetPasswordHandler, createSettingsApiHandlers, createSocialMediaHandlers, createStorefrontApiHandler, createUploadHandler, createUserAuthApiRouter, createUserAvatarHandler, createUserProfileHandler, createUsersApiHandlers, createVendorDashboardHandler, createVendorOnboardHandlers, customerPhoneForEmail, customerPhoneForUser, daysBeforeEventStart, decrementDiscountUsage, deductInventoryForConfirmedOrder, defaultPublicApiMethods, describeEventTierPolicy, emailPlugin, emailTemplates, emitOrderNotificationTrigger, enrichUserWithVendorContext, ensureCustomerForUser, ensureCustomerRecord, ensureMessagingPluginsOnCms, ensureScheduleQueueWorker, ensureVendorCustomerForOrderContact, ensureVendorCustomersForOrder, erpPlugin, explainSessionEntityAccess, fetchSeoBySlug, findActiveRefundPolicyForVendor, findUserByInviteToken, findVendorByInviteToken, fireOrderNotificationTrigger, formatDate, formatDateOnly, formatDateTime, formatTierRange, generateLocalInvoicePdf, generateNumericOtp, generateSlug, getCompanyDetailsFromSettings, getNextAuthOptions, getPermissionableEntityKeys, getPublicSettingsGroup, getRequireEventApproval, getRequireProductApproval, getRequiredPermission, getRssArticleSummaryFromItem, getStorefrontNextAuthOptions, getVendorCatalogCreateFlags, googleOAuthRedirectUri, hasEntityPermission, hashOtpCode, hydrateVendorSessionUser, initWhatsappTriggerDispatcher, invalidateEventsCache, invalidateMultiVendorCache, invalidateRequireEventApprovalCache, invalidateRequireProductApprovalCache, invalidateVendorCatalogCreateFlagsCache, isAuthDebugClientEnabled, isAuthDebugEnabled, isCustomerTypeContact, isGoogleAuthPubliclyEnabled, isMaxPerUserUsageReached, isMaxTotalUsageReached, isOpenEndpoint, isOrderEligibleForInvoiceEmail, isPlatformAdministrator, isPublicMethod, isRbacDebugEnabled, isSuperAdmin, isSuperAdminGroupName, isSyntheticCustomerPhone, isVendorAdmin, isVendorGroupName, isVendorOwner, isVendorPortalUser, isVendorStaff, isZipMedia, joinRecipientsForSend, linkUnclaimedContactToUser, llmAgentToChatAgentOptions, llmPlugin, loadPublicThemeSettings, loadSettingsGroupFromDb, loadUserVendorContext, localStoragePlugin, logAuth, logAuthClient, logEntityAccessDecision, logRbac, mergeEmailLayoutCompanyDetails, mergeGuardrailsIntoSystemPrompt, mergeInventoryLines, mergeSeoBySlug, messagingPlugins, metaFetchUserManagedPages, metaPostPageFeed, metaPostPagePhoto, metaResolvePageAccessToken, newUserInviteToken, nextAuthCookieDebugInfo, normalizeCustomerPhone, normalizeInvoiceTemplateId, normalizePhoneE164, normalizeRefundTiers, notificationTriggerEmitter, orderInventorySnapshotFromRow, orderStatusHoldsStock, overlayCmsPlugins, parseBlogGeneratorAgentContent, parseBlogGeneratorModelOutput, parseBlogMetadataEnrichmentJson, parseEmailRecipientsFromConfig, parseHfInferenceEmbeddingBody, parseLlmAgentValidationRules, paymentPlugin, permissionRowsToRecord, pgBossPlugin, pgBossScheduleNameForId, queueEmail, queueErp, queueErpCreateContactIfEnabled, queueErpPaidOrderForOrderId, queueJobScheduleNow, queueOrderPlacedEmails, queuePlugin, queueSms, queueVendorOnboardEmails, queueWhatsApp, rateLimitCheckoutPost, rateLimitKeyForApiRequest, rateLimitPublicApiIfNeeded, reconcileOrderInventoryBetweenSnapshots, recordDiscountUsage, registerEmailQueueProcessor, registerErpQueueProcessor, registerJobRunnerWorker, registerMessagingQueueProcessors, registerSmsQueueProcessor, registerWhatsAppQueueProcessor, relativePathFromMediaParentId, renderEmail, renderLayout, resendOrderNotification, resolveBlogCategoryIdByName, resolveEventOrderTemplate, resolveGoogleAuthConfig, resolveInvoiceAssetUrl, resolveOrderInvoicePdfBytes, resolvePublicMetadata, resolveSettingsEncryptionKey, resolveVendorIdForContactCheck, resolveVendorScopeFromSessionUser, restoreInventoryForCancelledOrder, retireSoftDeletedUniqueValue, s3StoragePlugin, sanitizeMediaFolderPath, sanitizeStorageSegment, seedAdministratorPermissions, seedDefaultAdmin, sendOrderPlacedEmailsAfterConfirmation, sendVendorOnboardEmails, serializeEmailRecipients, sessionHasEntityAccess, shouldRateLimitPublicWrite, simpleDecrypt, simpleEncrypt, smsPlugin, socialMediaPlugin, streamOrderInvoicePdf, summarizeEntityPerms, summarizeSessionUserForLog, syncJobScheduleToPgBoss, truncateText, validateInventoryForConfirmedOrderLines, validateInventoryForOrderBecomingConfirmed, validateRefundTiers, validateScheduleInput, validateSlug, validateUserMessageAgainstAgentRules, validateUserMessageAgainstStructuredRules, vendorPortalFlagsFromUser, verifyAndConsumeOtpChallenge, verifyOtpCodeHash, whatsappPlugin, withAdminRlsContext, withVendorRlsContext, wrapGetCmsWithMessaging };
|
package/dist/index.d.ts
CHANGED
|
@@ -966,6 +966,7 @@ declare function deductInventoryForConfirmedOrder(ds: EmOrDs$1, entityMap: Entit
|
|
|
966
966
|
declare function restoreInventoryForCancelledOrder(ds: EmOrDs$1, entityMap: EntityMapLike$3, lines: InventoryOrderLine[]): Promise<string | null>;
|
|
967
967
|
|
|
968
968
|
type EntityMap$2 = Record<string, typeorm.EntityTarget<typeorm.ObjectLiteral>>;
|
|
969
|
+
declare function autoExpireOrderIfPaymentTimeExceeded(dataSource: typeorm.DataSource, entityMap: Record<string, unknown>, order: Record<string, unknown> | null | undefined): Promise<Record<string, unknown> | null | undefined>;
|
|
969
970
|
interface CrudHandlerOptions {
|
|
970
971
|
requireAuth: (req: Request) => Promise<Response | null>;
|
|
971
972
|
json: (body: unknown, init?: {
|
|
@@ -2635,6 +2636,7 @@ declare class Form {
|
|
|
2635
2636
|
campaign: string | null;
|
|
2636
2637
|
slug: string;
|
|
2637
2638
|
published: boolean;
|
|
2639
|
+
enableTurnstile: boolean;
|
|
2638
2640
|
createdAt: Date;
|
|
2639
2641
|
updatedAt: Date;
|
|
2640
2642
|
deletedAt: Date | null;
|
|
@@ -2832,6 +2834,9 @@ declare function resendOrderNotification(triggerKey: string, orderId: number, de
|
|
|
2832
2834
|
declare const KNOWN_NOTIFICATION_TRIGGERS: {
|
|
2833
2835
|
readonly ORDER_PLACED: "order_placed";
|
|
2834
2836
|
readonly ORDER_CANCELLED: "order_cancelled";
|
|
2837
|
+
readonly PAYMENT_SUCCESS: "payment_success";
|
|
2838
|
+
readonly PAYMENT_FAILED: "payment_failed";
|
|
2839
|
+
readonly PAYMENT_REFUND_INITIATED: "payment_refund_initiated";
|
|
2835
2840
|
};
|
|
2836
2841
|
interface OrderTriggerPayload {
|
|
2837
2842
|
orderId: number;
|
|
@@ -2863,6 +2868,24 @@ declare const DEFAULT_ORDER_NOTIFICATION_TRIGGER_SEEDS: readonly [{
|
|
|
2863
2868
|
readonly description: "Fires when an order is cancelled (includes refund amount when applicable).";
|
|
2864
2869
|
readonly category: "order";
|
|
2865
2870
|
readonly sortOrder: 2;
|
|
2871
|
+
}, {
|
|
2872
|
+
readonly triggerKey: "payment_success";
|
|
2873
|
+
readonly label: "Payment success";
|
|
2874
|
+
readonly description: "Fires when order is placed and payment status is paid.";
|
|
2875
|
+
readonly category: "order";
|
|
2876
|
+
readonly sortOrder: 3;
|
|
2877
|
+
}, {
|
|
2878
|
+
readonly triggerKey: "payment_failed";
|
|
2879
|
+
readonly label: "Payment failed";
|
|
2880
|
+
readonly description: "Fires when payment status is pending, unpaid, or failed, or when order is cancelled without payment.";
|
|
2881
|
+
readonly category: "order";
|
|
2882
|
+
readonly sortOrder: 4;
|
|
2883
|
+
}, {
|
|
2884
|
+
readonly triggerKey: "payment_refund_initiated";
|
|
2885
|
+
readonly label: "Payment refund initiated";
|
|
2886
|
+
readonly description: "Fires when order is cancelled and its payment status is paid (refund initiated).";
|
|
2887
|
+
readonly category: "order";
|
|
2888
|
+
readonly sortOrder: 5;
|
|
2866
2889
|
}];
|
|
2867
2890
|
|
|
2868
2891
|
/** @deprecated Use DB catalog `order_notification_triggers`; kept for type hints. */
|
|
@@ -2872,6 +2895,15 @@ declare const ORDER_NOTIFICATION_TRIGGERS: readonly [{
|
|
|
2872
2895
|
}, {
|
|
2873
2896
|
readonly key: "order_cancelled";
|
|
2874
2897
|
readonly label: "Order cancelled";
|
|
2898
|
+
}, {
|
|
2899
|
+
readonly key: "payment_success";
|
|
2900
|
+
readonly label: "Payment success";
|
|
2901
|
+
}, {
|
|
2902
|
+
readonly key: "payment_failed";
|
|
2903
|
+
readonly label: "Payment failed";
|
|
2904
|
+
}, {
|
|
2905
|
+
readonly key: "payment_refund_initiated";
|
|
2906
|
+
readonly label: "Payment refund initiated";
|
|
2875
2907
|
}];
|
|
2876
2908
|
type OrderNotificationTriggerKey = (typeof ORDER_NOTIFICATION_TRIGGERS)[number]['key'];
|
|
2877
2909
|
|
|
@@ -4412,4 +4444,4 @@ type CreateCmsAppWithMessagingOptions = CreateCmsAppOptions & EnsureMessagingPlu
|
|
|
4412
4444
|
/** `createCmsApp` + messaging plugins + queue processor registration. */
|
|
4413
4445
|
declare function createCmsAppWithMessaging(options: CreateCmsAppWithMessagingOptions): Promise<CmsApp>;
|
|
4414
4446
|
|
|
4415
|
-
export { ADMIN_GROUP_NAME, AUTH_PROVIDERS_SETTINGS_GROUP, Address, type AdminNavItem, type AnalyticsHandlerConfig, type AnalyticsPluginConfig, type AppliedDiscountUsage, Attendee, Attribute, type AuthHandlersConfig, type AuthHelpers, type AuthProvidersDataSource, type AuthProvidersEntityMap, type AuthorizeOtpInput, 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 BlogBySlugConfig, type BlogGeneratorBlogDraft, type BlogGeneratorDraftParseMode, type BlogGeneratorPluginConfig, type BlogGeneratorSeoDraft, BlogGeneratorService, Brand, type BuildNextAuthOptionsConfig, CMS_ENTITY_MAP, type CachePluginConfig, type CacheService, type CaptchaProviderId, type CaptchaPublicConfig, CaptchaService, type CaptchaVerifyResult, Cart, CartItem, Category, type ChangePasswordConfig, ChatConversation, ChatMessage, type ChatPublicConfig, type CmsApiHandlerConfig, type CmsApp, type CmsGetter, type CmsMiddlewareConfig, type CmsMiddlewareRequest, type CmsPlugin, Collection, Combo, ComboItem, Comment, type CompanyDetails, Config, Contact, type CreateCmsAppOptions, type CreateCmsAppWithMessagingOptions, type CreateGoogleCustomerDataSource, type CreateGoogleCustomerEntityMap, type CreateGoogleCustomerInput, type CrudHandlerOptions, Currency, CurrencyExchange, Customer, Customer_Contacts, DEFAULT_ADMIN_NAV, DEFAULT_ORDER_NOTIFICATION_TRIGGER_SEEDS, type DashboardStatsConfig, type DataSourceManager, Discount, DiscountRules, type DiscountUsageEntityMap, type ERPPluginConfig, type ERPPluginInstance, ERPSubmissionService, EVENT_ORDER_MESSAGE_TEMPLATE_DEFAULTS, EVENT_ORDER_TEMPLATE_KEY, EVENT_ORDER_TEMPLATE_VARIABLES, type EcommerceAnalyticsConfig, type EmailAttachment, type EmailData, type EmailJobPayload, type EmailPluginConfig, type EmailQueueProcessorOptions, EmailService, type EmailServiceInterface, type EmailTemplateName, type EmailTemplateResult, type EmitOrderNotificationTriggerDeps, type EnsureCustomerRecordInput, type EnsureCustomerUserInput, type EnsureMessagingPluginsOptions, type EnsureVendorCustomerDetails, type EntityCrudAction, type EntityMap$2 as EntityMap, type EntityPermissionFlags, type ErpContactSyncInput, type ErpCreateContactPayload, type ErpJobPayload, type ErpPaidOrderDataSource, type ErpPaidOrderEntityMap, Event, type EventApprovalStatus, type EventOrderMessageTemplateHandlersConfig, type EventOrderNotificationChannel, type EventOrderNotificationTemplates, type EventOrderTemplateOverride, EventProduct, type ExtraPublicWriteRule, type FacebookMeAccountsResponse, type FacebookPageAccount, type ForgotPasswordConfig, Form, type FormBySlugConfig, FormField, FormSubmission, type GetPublicSettingsGroupConfig, type GetPublicSettingsGroupDataSource, type GetSession, type GoogleAuthConfig, INVOICE_TEMPLATE_IDS, INVOICE_TEMPLATE_OPTIONS, type InventoryOrderLine, type InviteAcceptConfig, type InvoiceAddress, type InvoiceCompany, type InvoiceLineItem, type InvoicePdfInput, type InvoiceTemplateId, JOB_RUNNER_QUEUE, type CmsAppLike as JobRunnerCmsAppLike, type JobRunnerDeps, type JobRunnerPayload, JobSchedule, type JobScheduleApiConfig, JobScheduleRun, KNOWN_NOTIFICATION_TRIGGERS, KnowledgeBaseChunk, KnowledgeBaseDocument, type LatestArticleFromFeed, LlmAgent, type LlmAgentKnowledgeApiConfig, LlmAgentKnowledgeDocument, type LlmAgentOptions, type LlmAgentValidationRulesJson, type LlmChatOptions, type LlmEmbeddingProvider, type LlmMessage, type LlmPluginConfig, LlmService, type LlmServiceEmbedOptions, type LlmServiceInterface, type LocalStoragePluginConfig, type Logger, Media, MessageTemplate, type MetaGraphMutationResponse, type NextAuthOptionsConfig, type NextAuthUser, OPEN_ENDPOINTS, ORDER_NOTIFICATION_TRIGGERS, Order, OrderAddresses, OrderDiscounts, type OrderInventorySnapshot, OrderItem, OrderNotificationBinding, OrderNotificationTrigger, type OrderNotificationTriggerKey, type OrderPlacedEmailPayload, type OrderPlacedLineItem, type OrderTriggerPayload, OtpChallenge, type OtpChannel, type OtpPurpose, PERMISSION_REQUIRED_ENDPOINTS, Page, type ParsedLlmAgentValidation, PasswordResetToken, Payment, type PaymentIntent, type PaymentPluginConfig, type PaymentServiceInterface, Permission, type PgBossPluginConfig, PgBossService, type PipelineNames, type PluginContext, Product, type ProductApprovalStatus, ProductAttribute, ProductCategory, ProductConfig, ProductVariant, type PublicThemeSettingsPayload, type QueuePluginConfig, type QueueService, RBAC_ADMIN_ONLY_ENTITIES, type RefundCalculationResult, RefundPolicy, type RefundPolicyLike, type RefundPolicyTier, RefundRequest, type RenderEmailOptions, type RenderedEmail, type ResolveGoogleAuthConfigInput, type ResolveOrderInvoicePdfError, type ResolvedOrderInvoicePdf, RssArticle, RssFeed, type S3StoragePluginConfig, SUPER_ADMIN_GROUP_ID, type SendVendorOnboardEmailInput, Seo, type SeoLike, type SeoMetadataOverrides, type SessionUser, type SetPasswordConfig, type SettingsApiConfig, type SmsJobPayload, type SmsPluginConfig, type SmsProviderChoice, type SmsProviderId, type SmsServiceConfig, type SmsServiceInterface, type SocialLinkItem, type SocialMediaPluginConfig, type StorageService, type StorefrontApiConfig, type StorefrontOtpFlags, Tag, Tax, type TemplateContext, type UploadHandlerConfig, User, type UserAuthApiConfig, type UserAvatarConfig, UserDeviceToken, UserGroup, type UserInviteStatus, type UserProfileConfig, type UsersApiConfig, VENDOR_ADMIN_GROUP_ID, VENDOR_GROUP_NAME, VENDOR_OWNER_GROUP_NAME, VENDOR_SCOPED_STORE_ENTITIES, VENDOR_STORE_RBAC_ENTITIES, Vendor, type VendorCatalogCreateFlags, VendorCustomer, type VendorDashboardConfig, type VendorOnboardHandlersConfig, type VendorOwnerActivation, VendorRole, VendorRolePermission, VendorUser, VendorUserProfile, type WhatsAppJobPayload, type WhatsAppPluginConfig, type WhatsAppServiceConfig, type WhatsAppServiceInterface, Wishlist, WishlistItem, ZIP_MIME_TYPES, activeUniqueValueExists, allowRateLimit, analyticsPlugin, applyApprovalStatusSideEffects, applyEventApprovalStatusSideEffects, applyRotatingVendorInvite, applyVendorCustomersContactFilter, applyVendorEventCreateApproval, applyVendorProductCreateApproval, assertCaptchaOk, assertContactAllowedForVendorOrder, assertEventApprovalUpdate, assertProductApprovalUpdate, blogGeneratorPlugin, buildBlogMetadataUserPrompt, buildCaptchaPublicConfig, buildCronFromSchedule, buildEventOrderTemplateVariables, buildLocalInvoicePdfForOrder, buildNextAuthOptions, buildRssUserPromptFromFeeds, buildStorefrontNextAuthOptions, buildUserInviteLink, buildVendorInviteLink, cachePlugin, calculateOrderRefundPreview, calculateRefundFromPolicy, canManageRoles, canManageVendorRoles, canManageVendorTeam, canOnboardVendors, captchaPlugin, checkAndIncrementDiscountUsage, checkEventsEnabled, checkMultiVendorEnabled, cn, completeUserInviteAccept, consumeAppliedDiscountUsages, contactIsVendorCustomer, countDiscountOrdersForContact, countRecentOtpSends, createAnalyticsHandlers, createAuthHelpers, createBlogBySlugHandler, createChangePasswordHandler, createCmsApiHandler, createCmsApp, createCmsAppWithMessaging, createCmsAuthBundle, createCmsMiddleware, createCrudByIdHandler, createCrudHandler, createCustomerUserFromGoogleOAuth, createDashboardStatsHandler, createDataSourceManager, createEcommerceAnalyticsHandler, createEventOrderMessageTemplateHandlers, createForgotPasswordHandler, createFormBySlugHandler, createInviteAcceptHandler, createJobScheduleHandlers, createLlmAgentKnowledgeHandlers, createMediaZipExtractHandler, createMessageTemplateRowLoader, createOtpChallenge, createSetPasswordHandler, createSettingsApiHandlers, createSocialMediaHandlers, createStorefrontApiHandler, createUploadHandler, createUserAuthApiRouter, createUserAvatarHandler, createUserProfileHandler, createUsersApiHandlers, createVendorDashboardHandler, createVendorOnboardHandlers, customerPhoneForEmail, customerPhoneForUser, daysBeforeEventStart, decrementDiscountUsage, deductInventoryForConfirmedOrder, defaultPublicApiMethods, describeEventTierPolicy, emailPlugin, emailTemplates, emitOrderNotificationTrigger, enrichUserWithVendorContext, ensureCustomerForUser, ensureCustomerRecord, ensureMessagingPluginsOnCms, ensureScheduleQueueWorker, ensureVendorCustomerForOrderContact, ensureVendorCustomersForOrder, erpPlugin, explainSessionEntityAccess, fetchSeoBySlug, findActiveRefundPolicyForVendor, findUserByInviteToken, findVendorByInviteToken, fireOrderNotificationTrigger, formatDate, formatDateOnly, formatDateTime, formatTierRange, generateLocalInvoicePdf, generateNumericOtp, generateSlug, getCompanyDetailsFromSettings, getNextAuthOptions, getPermissionableEntityKeys, getPublicSettingsGroup, getRequireEventApproval, getRequireProductApproval, getRequiredPermission, getRssArticleSummaryFromItem, getStorefrontNextAuthOptions, getVendorCatalogCreateFlags, googleOAuthRedirectUri, hasEntityPermission, hashOtpCode, hydrateVendorSessionUser, initWhatsappTriggerDispatcher, invalidateEventsCache, invalidateMultiVendorCache, invalidateRequireEventApprovalCache, invalidateRequireProductApprovalCache, invalidateVendorCatalogCreateFlagsCache, isAuthDebugClientEnabled, isAuthDebugEnabled, isCustomerTypeContact, isGoogleAuthPubliclyEnabled, isMaxPerUserUsageReached, isMaxTotalUsageReached, isOpenEndpoint, isOrderEligibleForInvoiceEmail, isPlatformAdministrator, isPublicMethod, isRbacDebugEnabled, isSuperAdmin, isSuperAdminGroupName, isSyntheticCustomerPhone, isVendorAdmin, isVendorGroupName, isVendorOwner, isVendorPortalUser, isVendorStaff, isZipMedia, joinRecipientsForSend, linkUnclaimedContactToUser, llmAgentToChatAgentOptions, llmPlugin, loadPublicThemeSettings, loadSettingsGroupFromDb, loadUserVendorContext, localStoragePlugin, logAuth, logAuthClient, logEntityAccessDecision, logRbac, mergeEmailLayoutCompanyDetails, mergeGuardrailsIntoSystemPrompt, mergeInventoryLines, mergeSeoBySlug, messagingPlugins, metaFetchUserManagedPages, metaPostPageFeed, metaPostPagePhoto, metaResolvePageAccessToken, newUserInviteToken, nextAuthCookieDebugInfo, normalizeCustomerPhone, normalizeInvoiceTemplateId, normalizePhoneE164, normalizeRefundTiers, notificationTriggerEmitter, orderInventorySnapshotFromRow, orderStatusHoldsStock, overlayCmsPlugins, parseBlogGeneratorAgentContent, parseBlogGeneratorModelOutput, parseBlogMetadataEnrichmentJson, parseEmailRecipientsFromConfig, parseHfInferenceEmbeddingBody, parseLlmAgentValidationRules, paymentPlugin, permissionRowsToRecord, pgBossPlugin, pgBossScheduleNameForId, queueEmail, queueErp, queueErpCreateContactIfEnabled, queueErpPaidOrderForOrderId, queueJobScheduleNow, queueOrderPlacedEmails, queuePlugin, queueSms, queueVendorOnboardEmails, queueWhatsApp, rateLimitCheckoutPost, rateLimitKeyForApiRequest, rateLimitPublicApiIfNeeded, reconcileOrderInventoryBetweenSnapshots, recordDiscountUsage, registerEmailQueueProcessor, registerErpQueueProcessor, registerJobRunnerWorker, registerMessagingQueueProcessors, registerSmsQueueProcessor, registerWhatsAppQueueProcessor, relativePathFromMediaParentId, renderEmail, renderLayout, resendOrderNotification, resolveBlogCategoryIdByName, resolveEventOrderTemplate, resolveGoogleAuthConfig, resolveInvoiceAssetUrl, resolveOrderInvoicePdfBytes, resolvePublicMetadata, resolveSettingsEncryptionKey, resolveVendorIdForContactCheck, resolveVendorScopeFromSessionUser, restoreInventoryForCancelledOrder, retireSoftDeletedUniqueValue, s3StoragePlugin, sanitizeMediaFolderPath, sanitizeStorageSegment, seedAdministratorPermissions, seedDefaultAdmin, sendOrderPlacedEmailsAfterConfirmation, sendVendorOnboardEmails, serializeEmailRecipients, sessionHasEntityAccess, shouldRateLimitPublicWrite, simpleDecrypt, simpleEncrypt, smsPlugin, socialMediaPlugin, streamOrderInvoicePdf, summarizeEntityPerms, summarizeSessionUserForLog, syncJobScheduleToPgBoss, truncateText, validateInventoryForConfirmedOrderLines, validateInventoryForOrderBecomingConfirmed, validateRefundTiers, validateScheduleInput, validateSlug, validateUserMessageAgainstAgentRules, validateUserMessageAgainstStructuredRules, vendorPortalFlagsFromUser, verifyAndConsumeOtpChallenge, verifyOtpCodeHash, whatsappPlugin, withAdminRlsContext, withVendorRlsContext, wrapGetCmsWithMessaging };
|
|
4447
|
+
export { ADMIN_GROUP_NAME, AUTH_PROVIDERS_SETTINGS_GROUP, Address, type AdminNavItem, type AnalyticsHandlerConfig, type AnalyticsPluginConfig, type AppliedDiscountUsage, Attendee, Attribute, type AuthHandlersConfig, type AuthHelpers, type AuthProvidersDataSource, type AuthProvidersEntityMap, type AuthorizeOtpInput, 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 BlogBySlugConfig, type BlogGeneratorBlogDraft, type BlogGeneratorDraftParseMode, type BlogGeneratorPluginConfig, type BlogGeneratorSeoDraft, BlogGeneratorService, Brand, type BuildNextAuthOptionsConfig, CMS_ENTITY_MAP, type CachePluginConfig, type CacheService, type CaptchaProviderId, type CaptchaPublicConfig, CaptchaService, type CaptchaVerifyResult, Cart, CartItem, Category, type ChangePasswordConfig, ChatConversation, ChatMessage, type ChatPublicConfig, type CmsApiHandlerConfig, type CmsApp, type CmsGetter, type CmsMiddlewareConfig, type CmsMiddlewareRequest, type CmsPlugin, Collection, Combo, ComboItem, Comment, type CompanyDetails, Config, Contact, type CreateCmsAppOptions, type CreateCmsAppWithMessagingOptions, type CreateGoogleCustomerDataSource, type CreateGoogleCustomerEntityMap, type CreateGoogleCustomerInput, type CrudHandlerOptions, Currency, CurrencyExchange, Customer, Customer_Contacts, DEFAULT_ADMIN_NAV, DEFAULT_ORDER_NOTIFICATION_TRIGGER_SEEDS, type DashboardStatsConfig, type DataSourceManager, Discount, DiscountRules, type DiscountUsageEntityMap, type ERPPluginConfig, type ERPPluginInstance, ERPSubmissionService, EVENT_ORDER_MESSAGE_TEMPLATE_DEFAULTS, EVENT_ORDER_TEMPLATE_KEY, EVENT_ORDER_TEMPLATE_VARIABLES, type EcommerceAnalyticsConfig, type EmailAttachment, type EmailData, type EmailJobPayload, type EmailPluginConfig, type EmailQueueProcessorOptions, EmailService, type EmailServiceInterface, type EmailTemplateName, type EmailTemplateResult, type EmitOrderNotificationTriggerDeps, type EnsureCustomerRecordInput, type EnsureCustomerUserInput, type EnsureMessagingPluginsOptions, type EnsureVendorCustomerDetails, type EntityCrudAction, type EntityMap$2 as EntityMap, type EntityPermissionFlags, type ErpContactSyncInput, type ErpCreateContactPayload, type ErpJobPayload, type ErpPaidOrderDataSource, type ErpPaidOrderEntityMap, Event, type EventApprovalStatus, type EventOrderMessageTemplateHandlersConfig, type EventOrderNotificationChannel, type EventOrderNotificationTemplates, type EventOrderTemplateOverride, EventProduct, type ExtraPublicWriteRule, type FacebookMeAccountsResponse, type FacebookPageAccount, type ForgotPasswordConfig, Form, type FormBySlugConfig, FormField, FormSubmission, type GetPublicSettingsGroupConfig, type GetPublicSettingsGroupDataSource, type GetSession, type GoogleAuthConfig, INVOICE_TEMPLATE_IDS, INVOICE_TEMPLATE_OPTIONS, type InventoryOrderLine, type InviteAcceptConfig, type InvoiceAddress, type InvoiceCompany, type InvoiceLineItem, type InvoicePdfInput, type InvoiceTemplateId, JOB_RUNNER_QUEUE, type CmsAppLike as JobRunnerCmsAppLike, type JobRunnerDeps, type JobRunnerPayload, JobSchedule, type JobScheduleApiConfig, JobScheduleRun, KNOWN_NOTIFICATION_TRIGGERS, KnowledgeBaseChunk, KnowledgeBaseDocument, type LatestArticleFromFeed, LlmAgent, type LlmAgentKnowledgeApiConfig, LlmAgentKnowledgeDocument, type LlmAgentOptions, type LlmAgentValidationRulesJson, type LlmChatOptions, type LlmEmbeddingProvider, type LlmMessage, type LlmPluginConfig, LlmService, type LlmServiceEmbedOptions, type LlmServiceInterface, type LocalStoragePluginConfig, type Logger, Media, MessageTemplate, type MetaGraphMutationResponse, type NextAuthOptionsConfig, type NextAuthUser, OPEN_ENDPOINTS, ORDER_NOTIFICATION_TRIGGERS, Order, OrderAddresses, OrderDiscounts, type OrderInventorySnapshot, OrderItem, OrderNotificationBinding, OrderNotificationTrigger, type OrderNotificationTriggerKey, type OrderPlacedEmailPayload, type OrderPlacedLineItem, type OrderTriggerPayload, OtpChallenge, type OtpChannel, type OtpPurpose, PERMISSION_REQUIRED_ENDPOINTS, Page, type ParsedLlmAgentValidation, PasswordResetToken, Payment, type PaymentIntent, type PaymentPluginConfig, type PaymentServiceInterface, Permission, type PgBossPluginConfig, PgBossService, type PipelineNames, type PluginContext, Product, type ProductApprovalStatus, ProductAttribute, ProductCategory, ProductConfig, ProductVariant, type PublicThemeSettingsPayload, type QueuePluginConfig, type QueueService, RBAC_ADMIN_ONLY_ENTITIES, type RefundCalculationResult, RefundPolicy, type RefundPolicyLike, type RefundPolicyTier, RefundRequest, type RenderEmailOptions, type RenderedEmail, type ResolveGoogleAuthConfigInput, type ResolveOrderInvoicePdfError, type ResolvedOrderInvoicePdf, RssArticle, RssFeed, type S3StoragePluginConfig, SUPER_ADMIN_GROUP_ID, type SendVendorOnboardEmailInput, Seo, type SeoLike, type SeoMetadataOverrides, type SessionUser, type SetPasswordConfig, type SettingsApiConfig, type SmsJobPayload, type SmsPluginConfig, type SmsProviderChoice, type SmsProviderId, type SmsServiceConfig, type SmsServiceInterface, type SocialLinkItem, type SocialMediaPluginConfig, type StorageService, type StorefrontApiConfig, type StorefrontOtpFlags, Tag, Tax, type TemplateContext, type UploadHandlerConfig, User, type UserAuthApiConfig, type UserAvatarConfig, UserDeviceToken, UserGroup, type UserInviteStatus, type UserProfileConfig, type UsersApiConfig, VENDOR_ADMIN_GROUP_ID, VENDOR_GROUP_NAME, VENDOR_OWNER_GROUP_NAME, VENDOR_SCOPED_STORE_ENTITIES, VENDOR_STORE_RBAC_ENTITIES, Vendor, type VendorCatalogCreateFlags, VendorCustomer, type VendorDashboardConfig, type VendorOnboardHandlersConfig, type VendorOwnerActivation, VendorRole, VendorRolePermission, VendorUser, VendorUserProfile, type WhatsAppJobPayload, type WhatsAppPluginConfig, type WhatsAppServiceConfig, type WhatsAppServiceInterface, Wishlist, WishlistItem, ZIP_MIME_TYPES, activeUniqueValueExists, allowRateLimit, analyticsPlugin, applyApprovalStatusSideEffects, applyEventApprovalStatusSideEffects, applyRotatingVendorInvite, applyVendorCustomersContactFilter, applyVendorEventCreateApproval, applyVendorProductCreateApproval, assertCaptchaOk, assertContactAllowedForVendorOrder, assertEventApprovalUpdate, assertProductApprovalUpdate, autoExpireOrderIfPaymentTimeExceeded, blogGeneratorPlugin, buildBlogMetadataUserPrompt, buildCaptchaPublicConfig, buildCronFromSchedule, buildEventOrderTemplateVariables, buildLocalInvoicePdfForOrder, buildNextAuthOptions, buildRssUserPromptFromFeeds, buildStorefrontNextAuthOptions, buildUserInviteLink, buildVendorInviteLink, cachePlugin, calculateOrderRefundPreview, calculateRefundFromPolicy, canManageRoles, canManageVendorRoles, canManageVendorTeam, canOnboardVendors, captchaPlugin, checkAndIncrementDiscountUsage, checkEventsEnabled, checkMultiVendorEnabled, cn, completeUserInviteAccept, consumeAppliedDiscountUsages, contactIsVendorCustomer, countDiscountOrdersForContact, countRecentOtpSends, createAnalyticsHandlers, createAuthHelpers, createBlogBySlugHandler, createChangePasswordHandler, createCmsApiHandler, createCmsApp, createCmsAppWithMessaging, createCmsAuthBundle, createCmsMiddleware, createCrudByIdHandler, createCrudHandler, createCustomerUserFromGoogleOAuth, createDashboardStatsHandler, createDataSourceManager, createEcommerceAnalyticsHandler, createEventOrderMessageTemplateHandlers, createForgotPasswordHandler, createFormBySlugHandler, createInviteAcceptHandler, createJobScheduleHandlers, createLlmAgentKnowledgeHandlers, createMediaZipExtractHandler, createMessageTemplateRowLoader, createOtpChallenge, createSetPasswordHandler, createSettingsApiHandlers, createSocialMediaHandlers, createStorefrontApiHandler, createUploadHandler, createUserAuthApiRouter, createUserAvatarHandler, createUserProfileHandler, createUsersApiHandlers, createVendorDashboardHandler, createVendorOnboardHandlers, customerPhoneForEmail, customerPhoneForUser, daysBeforeEventStart, decrementDiscountUsage, deductInventoryForConfirmedOrder, defaultPublicApiMethods, describeEventTierPolicy, emailPlugin, emailTemplates, emitOrderNotificationTrigger, enrichUserWithVendorContext, ensureCustomerForUser, ensureCustomerRecord, ensureMessagingPluginsOnCms, ensureScheduleQueueWorker, ensureVendorCustomerForOrderContact, ensureVendorCustomersForOrder, erpPlugin, explainSessionEntityAccess, fetchSeoBySlug, findActiveRefundPolicyForVendor, findUserByInviteToken, findVendorByInviteToken, fireOrderNotificationTrigger, formatDate, formatDateOnly, formatDateTime, formatTierRange, generateLocalInvoicePdf, generateNumericOtp, generateSlug, getCompanyDetailsFromSettings, getNextAuthOptions, getPermissionableEntityKeys, getPublicSettingsGroup, getRequireEventApproval, getRequireProductApproval, getRequiredPermission, getRssArticleSummaryFromItem, getStorefrontNextAuthOptions, getVendorCatalogCreateFlags, googleOAuthRedirectUri, hasEntityPermission, hashOtpCode, hydrateVendorSessionUser, initWhatsappTriggerDispatcher, invalidateEventsCache, invalidateMultiVendorCache, invalidateRequireEventApprovalCache, invalidateRequireProductApprovalCache, invalidateVendorCatalogCreateFlagsCache, isAuthDebugClientEnabled, isAuthDebugEnabled, isCustomerTypeContact, isGoogleAuthPubliclyEnabled, isMaxPerUserUsageReached, isMaxTotalUsageReached, isOpenEndpoint, isOrderEligibleForInvoiceEmail, isPlatformAdministrator, isPublicMethod, isRbacDebugEnabled, isSuperAdmin, isSuperAdminGroupName, isSyntheticCustomerPhone, isVendorAdmin, isVendorGroupName, isVendorOwner, isVendorPortalUser, isVendorStaff, isZipMedia, joinRecipientsForSend, linkUnclaimedContactToUser, llmAgentToChatAgentOptions, llmPlugin, loadPublicThemeSettings, loadSettingsGroupFromDb, loadUserVendorContext, localStoragePlugin, logAuth, logAuthClient, logEntityAccessDecision, logRbac, mergeEmailLayoutCompanyDetails, mergeGuardrailsIntoSystemPrompt, mergeInventoryLines, mergeSeoBySlug, messagingPlugins, metaFetchUserManagedPages, metaPostPageFeed, metaPostPagePhoto, metaResolvePageAccessToken, newUserInviteToken, nextAuthCookieDebugInfo, normalizeCustomerPhone, normalizeInvoiceTemplateId, normalizePhoneE164, normalizeRefundTiers, notificationTriggerEmitter, orderInventorySnapshotFromRow, orderStatusHoldsStock, overlayCmsPlugins, parseBlogGeneratorAgentContent, parseBlogGeneratorModelOutput, parseBlogMetadataEnrichmentJson, parseEmailRecipientsFromConfig, parseHfInferenceEmbeddingBody, parseLlmAgentValidationRules, paymentPlugin, permissionRowsToRecord, pgBossPlugin, pgBossScheduleNameForId, queueEmail, queueErp, queueErpCreateContactIfEnabled, queueErpPaidOrderForOrderId, queueJobScheduleNow, queueOrderPlacedEmails, queuePlugin, queueSms, queueVendorOnboardEmails, queueWhatsApp, rateLimitCheckoutPost, rateLimitKeyForApiRequest, rateLimitPublicApiIfNeeded, reconcileOrderInventoryBetweenSnapshots, recordDiscountUsage, registerEmailQueueProcessor, registerErpQueueProcessor, registerJobRunnerWorker, registerMessagingQueueProcessors, registerSmsQueueProcessor, registerWhatsAppQueueProcessor, relativePathFromMediaParentId, renderEmail, renderLayout, resendOrderNotification, resolveBlogCategoryIdByName, resolveEventOrderTemplate, resolveGoogleAuthConfig, resolveInvoiceAssetUrl, resolveOrderInvoicePdfBytes, resolvePublicMetadata, resolveSettingsEncryptionKey, resolveVendorIdForContactCheck, resolveVendorScopeFromSessionUser, restoreInventoryForCancelledOrder, retireSoftDeletedUniqueValue, s3StoragePlugin, sanitizeMediaFolderPath, sanitizeStorageSegment, seedAdministratorPermissions, seedDefaultAdmin, sendOrderPlacedEmailsAfterConfirmation, sendVendorOnboardEmails, serializeEmailRecipients, sessionHasEntityAccess, shouldRateLimitPublicWrite, simpleDecrypt, simpleEncrypt, smsPlugin, socialMediaPlugin, streamOrderInvoicePdf, summarizeEntityPerms, summarizeSessionUserForLog, syncJobScheduleToPgBoss, truncateText, validateInventoryForConfirmedOrderLines, validateInventoryForOrderBecomingConfirmed, validateRefundTiers, validateScheduleInput, validateSlug, validateUserMessageAgainstAgentRules, validateUserMessageAgainstStructuredRules, vendorPortalFlagsFromUser, verifyAndConsumeOtpChallenge, verifyOtpCodeHash, whatsappPlugin, withAdminRlsContext, withVendorRlsContext, wrapGetCmsWithMessaging };
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { emitOrderNotificationTrigger, fireOrderNotificationTrigger } from './chunk-
|
|
2
|
-
import { checkMultiVendorEnabled, loadUserVendorContext, getPublicSettingsGroup, BlogGeneratorService } from './chunk-
|
|
3
|
-
export { Address, Attendee, 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, BlogGeneratorService, Brand, CMS_ENTITY_MAP, Cart, CartItem, Category, ChatConversation, ChatMessage, Collection, Combo, ComboItem, Comment, Config, Contact, Currency, CurrencyExchange, Customer, Customer_Contacts, Discount, DiscountRules, Event, EventProduct, Form, FormField, FormSubmission, JobSchedule, JobScheduleRun, KnowledgeBaseChunk, KnowledgeBaseDocument, LlmAgent, LlmAgentKnowledgeDocument, Media, MessageTemplate, Order, OrderAddresses, OrderDiscounts, OrderItem, OrderNotificationBinding, OrderNotificationTrigger, OtpChallenge, Page, PasswordResetToken, Payment, Permission, Product, ProductAttribute, ProductCategory, ProductConfig, ProductVariant, RefundPolicy, RefundRequest, RssArticle, RssFeed, Seo, Tag, Tax, User, UserDeviceToken, UserGroup, Vendor, VendorCustomer, VendorRole, VendorRolePermission, VendorUser, VendorUserProfile, Wishlist, WishlistItem, ZIP_MIME_TYPES, applyApprovalStatusSideEffects, applyEventApprovalStatusSideEffects, applyRotatingVendorInvite, applyVendorCustomersContactFilter, applyVendorEventCreateApproval, applyVendorProductCreateApproval, assertCaptchaOk, assertContactAllowedForVendorOrder, assertEventApprovalUpdate, assertProductApprovalUpdate, buildBlogMetadataUserPrompt, buildCronFromSchedule, buildRssUserPromptFromFeeds, buildUserInviteLink, buildVendorInviteLink, calculateOrderRefundPreview, calculateRefundFromPolicy, checkAndIncrementDiscountUsage, checkEventsEnabled, checkMultiVendorEnabled, completeUserInviteAccept, consumeAppliedDiscountUsages, contactIsVendorCustomer, countDiscountOrdersForContact, countRecentOtpSends, createAnalyticsHandlers, createBlogBySlugHandler, createChangePasswordHandler, createCmsApiHandler, createCmsApp, createCmsAppWithMessaging, createCrudByIdHandler, createCrudHandler, createDashboardStatsHandler, createEcommerceAnalyticsHandler, createEventOrderMessageTemplateHandlers, createForgotPasswordHandler, createFormBySlugHandler, createInviteAcceptHandler, createJobScheduleHandlers, createLlmAgentKnowledgeHandlers, createMediaZipExtractHandler, createMessageTemplateRowLoader, createOtpChallenge, createSetPasswordHandler, createSettingsApiHandlers, createSocialMediaHandlers, createStorefrontApiHandler, createUploadHandler, createUserAuthApiRouter, createUserAvatarHandler, createUserProfileHandler, createUsersApiHandlers, createVendorDashboardHandler, createVendorOnboardHandlers, daysBeforeEventStart, decrementDiscountUsage, describeEventTierPolicy, ensureMessagingPluginsOnCms, ensureScheduleQueueWorker, ensureVendorCustomerForOrderContact, ensureVendorCustomersForOrder, findActiveRefundPolicyForVendor, findUserByInviteToken, findVendorByInviteToken, formatTierRange, generateNumericOtp, getPublicSettingsGroup, getRequireEventApproval, getRequireProductApproval, getRssArticleSummaryFromItem, getVendorCatalogCreateFlags, hashOtpCode, hydrateVendorSessionUser, invalidateEventsCache, invalidateMultiVendorCache, invalidateRequireEventApprovalCache, invalidateRequireProductApprovalCache, invalidateVendorCatalogCreateFlagsCache, isCustomerTypeContact, isMaxPerUserUsageReached, isMaxTotalUsageReached, isZipMedia, llmAgentToChatAgentOptions, loadSettingsGroupFromDb, loadUserVendorContext, mergeGuardrailsIntoSystemPrompt, messagingPlugins, metaFetchUserManagedPages, metaPostPageFeed, metaPostPagePhoto, metaResolvePageAccessToken, newUserInviteToken, normalizePhoneE164, normalizeRefundTiers, overlayCmsPlugins, parseBlogGeneratorAgentContent, parseBlogGeneratorModelOutput, parseBlogMetadataEnrichmentJson, parseLlmAgentValidationRules, pgBossScheduleNameForId, queueErpCreateContactIfEnabled, queueJobScheduleNow, queuePlugin, queueSms, recordDiscountUsage, registerJobRunnerWorker, registerMessagingQueueProcessors, registerSmsQueueProcessor, relativePathFromMediaParentId, resolveBlogCategoryIdByName, resolveSettingsEncryptionKey, resolveVendorIdForContactCheck, sanitizeMediaFolderPath, sanitizeStorageSegment, sendVendorOnboardEmails, simpleDecrypt, simpleEncrypt, syncJobScheduleToPgBoss, validateRefundTiers, validateScheduleInput, validateUserMessageAgainstAgentRules, validateUserMessageAgainstStructuredRules, verifyAndConsumeOtpChallenge, verifyOtpCodeHash, whatsappPlugin, wrapGetCmsWithMessaging } from './chunk-
|
|
1
|
+
export { emitOrderNotificationTrigger, fireOrderNotificationTrigger } from './chunk-O2642WVS.js';
|
|
2
|
+
import { checkMultiVendorEnabled, loadUserVendorContext, getPublicSettingsGroup, BlogGeneratorService } from './chunk-JAEUYYGA.js';
|
|
3
|
+
export { Address, Attendee, 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, BlogGeneratorService, Brand, CMS_ENTITY_MAP, Cart, CartItem, Category, ChatConversation, ChatMessage, Collection, Combo, ComboItem, Comment, Config, Contact, Currency, CurrencyExchange, Customer, Customer_Contacts, Discount, DiscountRules, Event, EventProduct, Form, FormField, FormSubmission, JobSchedule, JobScheduleRun, KnowledgeBaseChunk, KnowledgeBaseDocument, LlmAgent, LlmAgentKnowledgeDocument, Media, MessageTemplate, Order, OrderAddresses, OrderDiscounts, OrderItem, OrderNotificationBinding, OrderNotificationTrigger, OtpChallenge, Page, PasswordResetToken, Payment, Permission, Product, ProductAttribute, ProductCategory, ProductConfig, ProductVariant, RefundPolicy, RefundRequest, RssArticle, RssFeed, Seo, Tag, Tax, User, UserDeviceToken, UserGroup, Vendor, VendorCustomer, VendorRole, VendorRolePermission, VendorUser, VendorUserProfile, Wishlist, WishlistItem, ZIP_MIME_TYPES, applyApprovalStatusSideEffects, applyEventApprovalStatusSideEffects, applyRotatingVendorInvite, applyVendorCustomersContactFilter, applyVendorEventCreateApproval, applyVendorProductCreateApproval, assertCaptchaOk, assertContactAllowedForVendorOrder, assertEventApprovalUpdate, assertProductApprovalUpdate, autoExpireOrderIfPaymentTimeExceeded, buildBlogMetadataUserPrompt, buildCronFromSchedule, buildRssUserPromptFromFeeds, buildUserInviteLink, buildVendorInviteLink, calculateOrderRefundPreview, calculateRefundFromPolicy, checkAndIncrementDiscountUsage, checkEventsEnabled, checkMultiVendorEnabled, completeUserInviteAccept, consumeAppliedDiscountUsages, contactIsVendorCustomer, countDiscountOrdersForContact, countRecentOtpSends, createAnalyticsHandlers, createBlogBySlugHandler, createChangePasswordHandler, createCmsApiHandler, createCmsApp, createCmsAppWithMessaging, createCrudByIdHandler, createCrudHandler, createDashboardStatsHandler, createEcommerceAnalyticsHandler, createEventOrderMessageTemplateHandlers, createForgotPasswordHandler, createFormBySlugHandler, createInviteAcceptHandler, createJobScheduleHandlers, createLlmAgentKnowledgeHandlers, createMediaZipExtractHandler, createMessageTemplateRowLoader, createOtpChallenge, createSetPasswordHandler, createSettingsApiHandlers, createSocialMediaHandlers, createStorefrontApiHandler, createUploadHandler, createUserAuthApiRouter, createUserAvatarHandler, createUserProfileHandler, createUsersApiHandlers, createVendorDashboardHandler, createVendorOnboardHandlers, daysBeforeEventStart, decrementDiscountUsage, describeEventTierPolicy, ensureMessagingPluginsOnCms, ensureScheduleQueueWorker, ensureVendorCustomerForOrderContact, ensureVendorCustomersForOrder, findActiveRefundPolicyForVendor, findUserByInviteToken, findVendorByInviteToken, formatTierRange, generateNumericOtp, getPublicSettingsGroup, getRequireEventApproval, getRequireProductApproval, getRssArticleSummaryFromItem, getVendorCatalogCreateFlags, hashOtpCode, hydrateVendorSessionUser, invalidateEventsCache, invalidateMultiVendorCache, invalidateRequireEventApprovalCache, invalidateRequireProductApprovalCache, invalidateVendorCatalogCreateFlagsCache, isCustomerTypeContact, isMaxPerUserUsageReached, isMaxTotalUsageReached, isZipMedia, llmAgentToChatAgentOptions, loadSettingsGroupFromDb, loadUserVendorContext, mergeGuardrailsIntoSystemPrompt, messagingPlugins, metaFetchUserManagedPages, metaPostPageFeed, metaPostPagePhoto, metaResolvePageAccessToken, newUserInviteToken, normalizePhoneE164, normalizeRefundTiers, overlayCmsPlugins, parseBlogGeneratorAgentContent, parseBlogGeneratorModelOutput, parseBlogMetadataEnrichmentJson, parseLlmAgentValidationRules, pgBossScheduleNameForId, queueErpCreateContactIfEnabled, queueJobScheduleNow, queuePlugin, queueSms, recordDiscountUsage, registerJobRunnerWorker, registerMessagingQueueProcessors, registerSmsQueueProcessor, relativePathFromMediaParentId, resolveBlogCategoryIdByName, resolveSettingsEncryptionKey, resolveVendorIdForContactCheck, sanitizeMediaFolderPath, sanitizeStorageSegment, sendVendorOnboardEmails, simpleDecrypt, simpleEncrypt, syncJobScheduleToPgBoss, validateRefundTiers, validateScheduleInput, validateUserMessageAgainstAgentRules, validateUserMessageAgainstStructuredRules, verifyAndConsumeOtpChallenge, verifyOtpCodeHash, whatsappPlugin, wrapGetCmsWithMessaging } from './chunk-JAEUYYGA.js';
|
|
4
4
|
import { PgBossService } from './chunk-GO7PPYNU.js';
|
|
5
5
|
export { JOB_RUNNER_QUEUE, PgBossService } from './chunk-GO7PPYNU.js';
|
|
6
6
|
export { deductInventoryForConfirmedOrder, mergeInventoryLines, orderInventorySnapshotFromRow, orderStatusHoldsStock, reconcileOrderInventoryBetweenSnapshots, restoreInventoryForCancelledOrder, validateInventoryForConfirmedOrderLines, validateInventoryForOrderBecomingConfirmed } from './chunk-3K5AIEIZ.js';
|
|
7
|
-
import { parseEmailRecipientsFromConfig } from './chunk-
|
|
8
|
-
export { EmailService, buildEventOrderTemplateVariables, emailPlugin, emailTemplates, initWhatsappTriggerDispatcher, joinRecipientsForSend, parseEmailRecipientsFromConfig, queueWhatsApp, registerWhatsAppQueueProcessor, renderEmail, renderLayout, resendOrderNotification, serializeEmailRecipients } from './chunk-
|
|
9
|
-
export { KNOWN_NOTIFICATION_TRIGGERS, notificationTriggerEmitter } from './chunk-
|
|
7
|
+
import { parseEmailRecipientsFromConfig } from './chunk-URN7GS23.js';
|
|
8
|
+
export { EmailService, buildEventOrderTemplateVariables, emailPlugin, emailTemplates, initWhatsappTriggerDispatcher, joinRecipientsForSend, parseEmailRecipientsFromConfig, queueWhatsApp, registerWhatsAppQueueProcessor, renderEmail, renderLayout, resendOrderNotification, serializeEmailRecipients } from './chunk-URN7GS23.js';
|
|
9
|
+
export { KNOWN_NOTIFICATION_TRIGGERS, notificationTriggerEmitter } from './chunk-T3HPSF7K.js';
|
|
10
10
|
import './chunk-JXF23MPG.js';
|
|
11
11
|
import { queueOrderPlacedEmails } from './chunk-L3525VXI.js';
|
|
12
12
|
export { queueEmail, queueOrderPlacedEmails, queueVendorOnboardEmails, registerEmailQueueProcessor } from './chunk-L3525VXI.js';
|
|
@@ -16,11 +16,11 @@ import './chunk-JC6DLWTE.js';
|
|
|
16
16
|
import './chunk-MQBT33IV.js';
|
|
17
17
|
import './chunk-CRFV5WJK.js';
|
|
18
18
|
export { EVENT_ORDER_MESSAGE_TEMPLATE_DEFAULTS, EVENT_ORDER_TEMPLATE_KEY, EVENT_ORDER_TEMPLATE_VARIABLES, resolveEventOrderTemplate } from './chunk-AYERBA7I.js';
|
|
19
|
-
export { AUTH_PROVIDERS_SETTINGS_GROUP, buildNextAuthOptions, buildStorefrontNextAuthOptions, createCustomerUserFromGoogleOAuth, getNextAuthOptions, getStorefrontNextAuthOptions, googleOAuthRedirectUri, isGoogleAuthPubliclyEnabled, resolveGoogleAuthConfig, seedAdministratorPermissions } from './chunk-
|
|
20
|
-
export { OPEN_ENDPOINTS, PERMISSION_REQUIRED_ENDPOINTS, RBAC_ADMIN_ONLY_ENTITIES, canManageRoles, createAuthHelpers, createCmsAuthBundle, customerPhoneForEmail, customerPhoneForUser, ensureCustomerForUser, ensureCustomerRecord, getRequiredPermission, isOpenEndpoint, isPublicMethod, isSyntheticCustomerPhone, linkUnclaimedContactToUser, normalizeCustomerPhone, sessionHasEntityAccess } from './chunk-
|
|
19
|
+
export { AUTH_PROVIDERS_SETTINGS_GROUP, buildNextAuthOptions, buildStorefrontNextAuthOptions, createCustomerUserFromGoogleOAuth, getNextAuthOptions, getStorefrontNextAuthOptions, googleOAuthRedirectUri, isGoogleAuthPubliclyEnabled, resolveGoogleAuthConfig, seedAdministratorPermissions } from './chunk-6DBDJ4VD.js';
|
|
20
|
+
export { OPEN_ENDPOINTS, PERMISSION_REQUIRED_ENDPOINTS, RBAC_ADMIN_ONLY_ENTITIES, canManageRoles, createAuthHelpers, createCmsAuthBundle, customerPhoneForEmail, customerPhoneForUser, ensureCustomerForUser, ensureCustomerRecord, getRequiredPermission, isOpenEndpoint, isPublicMethod, isSyntheticCustomerPhone, linkUnclaimedContactToUser, normalizeCustomerPhone, sessionHasEntityAccess } from './chunk-NR44CK5E.js';
|
|
21
21
|
export { activeUniqueValueExists, retireSoftDeletedUniqueValue } from './chunk-DBPSJYLZ.js';
|
|
22
|
-
import { isSuperAdmin, isVendorGroupName } from './chunk-
|
|
23
|
-
export { ADMIN_GROUP_NAME, SUPER_ADMIN_GROUP_ID, VENDOR_ADMIN_GROUP_ID, VENDOR_GROUP_NAME, VENDOR_OWNER_GROUP_NAME, VENDOR_SCOPED_STORE_ENTITIES, VENDOR_STORE_RBAC_ENTITIES, canManageVendorRoles, canManageVendorTeam, canOnboardVendors, explainSessionEntityAccess, getPermissionableEntityKeys, hasEntityPermission, isPlatformAdministrator, isRbacDebugEnabled, isSuperAdmin, isSuperAdminGroupName, isVendorAdmin, isVendorGroupName, isVendorOwner, isVendorPortalUser, isVendorStaff, logEntityAccessDecision, logRbac, permissionRowsToRecord, resolveVendorScopeFromSessionUser, summarizeEntityPerms, vendorPortalFlagsFromUser } from './chunk-
|
|
22
|
+
import { isSuperAdmin, isVendorGroupName } from './chunk-MVHDC3XF.js';
|
|
23
|
+
export { ADMIN_GROUP_NAME, SUPER_ADMIN_GROUP_ID, VENDOR_ADMIN_GROUP_ID, VENDOR_GROUP_NAME, VENDOR_OWNER_GROUP_NAME, VENDOR_SCOPED_STORE_ENTITIES, VENDOR_STORE_RBAC_ENTITIES, canManageVendorRoles, canManageVendorTeam, canOnboardVendors, explainSessionEntityAccess, getPermissionableEntityKeys, hasEntityPermission, isPlatformAdministrator, isRbacDebugEnabled, isSuperAdmin, isSuperAdminGroupName, isVendorAdmin, isVendorGroupName, isVendorOwner, isVendorPortalUser, isVendorStaff, logEntityAccessDecision, logRbac, permissionRowsToRecord, resolveVendorScopeFromSessionUser, summarizeEntityPerms, vendorPortalFlagsFromUser } from './chunk-MVHDC3XF.js';
|
|
24
24
|
export { createCmsMiddleware, defaultPublicApiMethods, isAuthDebugClientEnabled, isAuthDebugEnabled, logAuth, logAuthClient, nextAuthCookieDebugInfo, summarizeSessionUserForLog } from './chunk-WUQAOTHA.js';
|
|
25
25
|
export { queueErpPaidOrderForOrderId } from './chunk-TDV6EJHV.js';
|
|
26
26
|
import { erpSafeWebhookUrl, logErp, warnErp, errorErp } from './chunk-SYBOCAWB.js';
|
|
@@ -2491,6 +2491,27 @@ var DEFAULT_ORDER_NOTIFICATION_TRIGGER_SEEDS = [
|
|
|
2491
2491
|
description: "Fires when an order is cancelled (includes refund amount when applicable).",
|
|
2492
2492
|
category: "order",
|
|
2493
2493
|
sortOrder: 2
|
|
2494
|
+
},
|
|
2495
|
+
{
|
|
2496
|
+
triggerKey: "payment_success",
|
|
2497
|
+
label: "Payment success",
|
|
2498
|
+
description: "Fires when order is placed and payment status is paid.",
|
|
2499
|
+
category: "order",
|
|
2500
|
+
sortOrder: 3
|
|
2501
|
+
},
|
|
2502
|
+
{
|
|
2503
|
+
triggerKey: "payment_failed",
|
|
2504
|
+
label: "Payment failed",
|
|
2505
|
+
description: "Fires when payment status is pending, unpaid, or failed, or when order is cancelled without payment.",
|
|
2506
|
+
category: "order",
|
|
2507
|
+
sortOrder: 4
|
|
2508
|
+
},
|
|
2509
|
+
{
|
|
2510
|
+
triggerKey: "payment_refund_initiated",
|
|
2511
|
+
label: "Payment refund initiated",
|
|
2512
|
+
description: "Fires when order is cancelled and its payment status is paid (refund initiated).",
|
|
2513
|
+
category: "order",
|
|
2514
|
+
sortOrder: 5
|
|
2494
2515
|
}
|
|
2495
2516
|
];
|
|
2496
2517
|
|
|
@@ -2503,6 +2524,18 @@ var ORDER_NOTIFICATION_TRIGGERS = [
|
|
|
2503
2524
|
{
|
|
2504
2525
|
key: "order_cancelled",
|
|
2505
2526
|
label: "Order cancelled"
|
|
2527
|
+
},
|
|
2528
|
+
{
|
|
2529
|
+
key: "payment_success",
|
|
2530
|
+
label: "Payment success"
|
|
2531
|
+
},
|
|
2532
|
+
{
|
|
2533
|
+
key: "payment_failed",
|
|
2534
|
+
label: "Payment failed"
|
|
2535
|
+
},
|
|
2536
|
+
{
|
|
2537
|
+
key: "payment_refund_initiated",
|
|
2538
|
+
label: "Payment refund initiated"
|
|
2506
2539
|
}
|
|
2507
2540
|
];
|
|
2508
2541
|
function disablePgNative() {
|
|
@@ -2749,13 +2782,18 @@ __name(withAdminRlsContext, "withAdminRlsContext");
|
|
|
2749
2782
|
|
|
2750
2783
|
// src/plugins/captcha/captcha-service.ts
|
|
2751
2784
|
function resolveKeys(config) {
|
|
2752
|
-
const
|
|
2753
|
-
|
|
2754
|
-
|
|
2785
|
+
const isTurnstileDisabled = config.enabled === "false" || config.turnstile_enabled === "false";
|
|
2786
|
+
const turnstileSite = (config.TURNSTILE_SITE_KEY ?? config.siteKey ?? config.site_key ?? "").trim();
|
|
2787
|
+
const turnstileSecret = (config.TURNSTILE_SECRET_KEY ?? config.secretKey ?? config.secret_key ?? "").trim();
|
|
2788
|
+
const turnstile = !isTurnstileDisabled && turnstileSite && turnstileSecret ? {
|
|
2789
|
+
site: turnstileSite,
|
|
2790
|
+
secret: turnstileSecret
|
|
2755
2791
|
} : null;
|
|
2756
|
-
const
|
|
2757
|
-
|
|
2758
|
-
|
|
2792
|
+
const recaptchaSite = (config.RECAPTCHA_SITE_KEY ?? config.recaptchaSiteKey ?? "").trim();
|
|
2793
|
+
const recaptchaSecret = (config.RECAPTCHA_SECRET_KEY ?? config.recaptchaSecretKey ?? "").trim();
|
|
2794
|
+
const recaptcha = recaptchaSite && recaptchaSecret ? {
|
|
2795
|
+
site: recaptchaSite,
|
|
2796
|
+
secret: recaptchaSecret
|
|
2759
2797
|
} : null;
|
|
2760
2798
|
const raw = config.CAPTCHA_PROVIDER?.trim().toLowerCase();
|
|
2761
2799
|
let envDefaultProvider = null;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
+
|
|
3
|
+
/** Add 3 new order notification triggers: payment_success, payment_failed, and payment_refund_initiated. */
|
|
4
|
+
export class AddPaymentSuccessFailedRefundTriggers1782800000000 implements MigrationInterface {
|
|
5
|
+
name = 'AddPaymentSuccessFailedRefundTriggers1782800000000';
|
|
6
|
+
|
|
7
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
8
|
+
await queryRunner.query(`
|
|
9
|
+
INSERT INTO "order_notification_triggers" ("triggerKey", "label", "description", "category", "sortOrder")
|
|
10
|
+
VALUES
|
|
11
|
+
('payment_success', 'Payment success', 'Fires when order is placed and payment status is paid.', 'order', 3),
|
|
12
|
+
('payment_failed', 'Payment failed', 'Fires when payment status is pending, unpaid, or failed, or when order is cancelled without payment.', 'order', 4),
|
|
13
|
+
('payment_refund_initiated', 'Payment refund initiated', 'Fires when order is cancelled and its payment status is paid (refund initiated).', 'order', 5)
|
|
14
|
+
ON CONFLICT ("triggerKey") DO UPDATE SET
|
|
15
|
+
"label" = EXCLUDED."label",
|
|
16
|
+
"description" = EXCLUDED."description",
|
|
17
|
+
"sortOrder" = EXCLUDED."sortOrder",
|
|
18
|
+
"updatedAt" = now();
|
|
19
|
+
`);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
23
|
+
await queryRunner.query(`
|
|
24
|
+
DELETE FROM "order_notification_bindings"
|
|
25
|
+
WHERE "triggerKey" IN ('payment_success', 'payment_failed', 'payment_refund_initiated');
|
|
26
|
+
`);
|
|
27
|
+
await queryRunner.query(`
|
|
28
|
+
DELETE FROM "order_notification_triggers"
|
|
29
|
+
WHERE "triggerKey" IN ('payment_success', 'payment_failed', 'payment_refund_initiated');
|
|
30
|
+
`);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner, TableColumn } from 'typeorm';
|
|
2
|
+
|
|
3
|
+
export class AddEnableTurnstileToForms1782800000000 implements MigrationInterface {
|
|
4
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
5
|
+
const hasTable = await queryRunner.hasTable('forms');
|
|
6
|
+
if (!hasTable) return;
|
|
7
|
+
const hasCol = await queryRunner.hasColumn('forms', 'enable_turnstile');
|
|
8
|
+
if (!hasCol) {
|
|
9
|
+
await queryRunner.addColumn(
|
|
10
|
+
'forms',
|
|
11
|
+
new TableColumn({
|
|
12
|
+
name: 'enable_turnstile',
|
|
13
|
+
type: 'boolean',
|
|
14
|
+
default: false,
|
|
15
|
+
isNullable: true,
|
|
16
|
+
})
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
22
|
+
const hasTable = await queryRunner.hasTable('forms');
|
|
23
|
+
if (!hasTable) return;
|
|
24
|
+
const hasCol = await queryRunner.hasColumn('forms', 'enable_turnstile');
|
|
25
|
+
if (hasCol) {
|
|
26
|
+
await queryRunner.dropColumn('forms', 'enable_turnstile');
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkYSYX4GUD_cjs = require('./chunk-YSYX4GUD.cjs');
|
|
4
|
+
require('./chunk-77I3KS7V.cjs');
|
|
5
5
|
require('./chunk-V25RDUOU.cjs');
|
|
6
6
|
require('./chunk-BXYZDMTZ.cjs');
|
|
7
7
|
require('./chunk-UPLVMVRX.cjs');
|
|
@@ -12,13 +12,13 @@ require('./chunk-USNT2KNT.cjs');
|
|
|
12
12
|
|
|
13
13
|
Object.defineProperty(exports, "getSettingsGroup", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkYSYX4GUD_cjs.getSettingsGroup; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "initWhatsappTriggerDispatcher", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkYSYX4GUD_cjs.initWhatsappTriggerDispatcher; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "resendOrderNotification", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkYSYX4GUD_cjs.resendOrderNotification; }
|
|
24
24
|
});
|
package/dist/{order-notification-dispatcher-64WDCHHG.js → order-notification-dispatcher-ZSFKEYMP.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { getSettingsGroup, initWhatsappTriggerDispatcher, resendOrderNotification } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { getSettingsGroup, initWhatsappTriggerDispatcher, resendOrderNotification } from './chunk-URN7GS23.js';
|
|
2
|
+
import './chunk-T3HPSF7K.js';
|
|
3
3
|
import './chunk-L3525VXI.js';
|
|
4
4
|
import './chunk-2KUCQVAQ.js';
|
|
5
5
|
import './chunk-JC6DLWTE.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkJ7FMZK66_cjs = require('./chunk-J7FMZK66.cjs');
|
|
4
4
|
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
5
5
|
|
|
6
6
|
// src/auth/rbac-debug-db.ts
|
|
@@ -27,7 +27,7 @@ async function loadDbPermissionsForUser(dataSource, userId) {
|
|
|
27
27
|
return {
|
|
28
28
|
groupId,
|
|
29
29
|
groupName,
|
|
30
|
-
dbEntityPerms:
|
|
30
|
+
dbEntityPerms: chunkJ7FMZK66_cjs.summarizeEntityPerms(chunkJ7FMZK66_cjs.permissionRowsToRecord(permRows))
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
chunkUSNT2KNT_cjs.__name(loadDbPermissionsForUser, "loadDbPermissionsForUser");
|