@infuro/cms-core 1.0.33 → 1.0.34
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/README.md +9 -6
- package/dist/admin.cjs +980 -801
- package/dist/admin.cjs.map +1 -1
- package/dist/admin.d.cts +7 -2
- package/dist/admin.d.ts +7 -2
- package/dist/admin.js +1021 -842
- package/dist/admin.js.map +1 -1
- package/dist/api.cjs +1858 -848
- package/dist/api.cjs.map +1 -1
- package/dist/api.d.cts +1 -1
- package/dist/api.d.ts +1 -1
- package/dist/api.js +1824 -815
- package/dist/api.js.map +1 -1
- package/dist/auth.cjs +94 -11
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +17 -1
- package/dist/auth.d.ts +17 -1
- package/dist/auth.js +89 -11
- package/dist/auth.js.map +1 -1
- package/dist/cli.cjs +39 -0
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +39 -0
- package/dist/cli.js.map +1 -1
- package/dist/{index-rZTnpK7y.d.cts → index-Bf5GO8fu.d.cts} +3 -2
- package/dist/{index-DWd5Gjc4.d.ts → index-DOiJuMQA.d.ts} +3 -2
- package/dist/index.cjs +2078 -841
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +83 -8
- package/dist/index.d.ts +83 -8
- package/dist/index.js +2013 -786
- package/dist/index.js.map +1 -1
- package/dist/migrations/1778660000004-CreateCustomerAndCustomerContacts.ts +99 -0
- package/dist/migrations/1778660000005-AddCustomerIdToVendorCustomers.ts +39 -0
- package/dist/migrations/1778660000006-UpdateVendorCustomersContactNullable.ts +36 -0
- package/dist/migrations/1778660000007-VendorOwnerCustomerContactsPermission.ts +39 -0
- package/dist/migrations/1779300000000-VendorOwnerContactsPermission.ts +39 -0
- package/dist/migrations/1779400000000-AddCustomerContactIdToOrders.ts +33 -0
- package/package.json +4 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { e as CompanyDetails, T as TemplateContext, h as EmailTemplateResult, g as EmailTemplateName, O as OrderPlacedLineItem, o as StorageService, i as EntityMap$2 } from './index-
|
|
2
|
-
export { A as AnalyticsHandlerConfig, a as AuthHandlersConfig, B as BlogBySlugConfig, C as ChangePasswordConfig, b as ChatPublicConfig, c as CmsApiHandlerConfig, d as CmsGetter, f as CrudHandlerOptions, D as DashboardStatsConfig, E 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, S as SetPasswordConfig, m as SettingsApiConfig, n 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 VendorOnboardHandlersConfig, v as VendorOwnerActivation, w as createAnalyticsHandlers, x as createBlogBySlugHandler, y as createChangePasswordHandler, z as createCmsApiHandler, H as createCrudByIdHandler, K as createCrudHandler, M as createDashboardStatsHandler, N as createEcommerceAnalyticsHandler, Q as createForgotPasswordHandler, R as createFormBySlugHandler, W as createInviteAcceptHandler, X as createJobScheduleHandlers, Y as createLlmAgentKnowledgeHandlers, Z as createMediaZipExtractHandler, _ as createSetPasswordHandler, $ as createSettingsApiHandlers, a0 as createStorefrontApiHandler, a1 as createUploadHandler, a2 as createUserAuthApiRouter, a3 as createUserAvatarHandler, a4 as createUserProfileHandler, a5 as createUsersApiHandlers, a6 as createVendorOnboardHandlers, a7 as getCompanyDetailsFromSettings, a8 as getPublicSettingsGroup, a9 as mergeEmailLayoutCompanyDetails, aa as mergeGuardrailsIntoSystemPrompt, ab as parseLlmAgentValidationRules, ac as simpleDecrypt, ad as simpleEncrypt, ae as validateUserMessageAgainstAgentRules, af as validateUserMessageAgainstStructuredRules } from './index-
|
|
1
|
+
import { e as CompanyDetails, T as TemplateContext, h as EmailTemplateResult, g as EmailTemplateName, O as OrderPlacedLineItem, o as StorageService, i as EntityMap$2 } from './index-Bf5GO8fu.cjs';
|
|
2
|
+
export { A as AnalyticsHandlerConfig, a as AuthHandlersConfig, B as BlogBySlugConfig, C as ChangePasswordConfig, b as ChatPublicConfig, c as CmsApiHandlerConfig, d as CmsGetter, f as CrudHandlerOptions, D as DashboardStatsConfig, E 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, S as SetPasswordConfig, m as SettingsApiConfig, n 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 VendorOnboardHandlersConfig, v as VendorOwnerActivation, w as createAnalyticsHandlers, x as createBlogBySlugHandler, y as createChangePasswordHandler, z as createCmsApiHandler, H as createCrudByIdHandler, K as createCrudHandler, M as createDashboardStatsHandler, N as createEcommerceAnalyticsHandler, Q as createForgotPasswordHandler, R as createFormBySlugHandler, W as createInviteAcceptHandler, X as createJobScheduleHandlers, Y as createLlmAgentKnowledgeHandlers, Z as createMediaZipExtractHandler, _ as createSetPasswordHandler, $ as createSettingsApiHandlers, a0 as createStorefrontApiHandler, a1 as createUploadHandler, a2 as createUserAuthApiRouter, a3 as createUserAvatarHandler, a4 as createUserProfileHandler, a5 as createUsersApiHandlers, a6 as createVendorOnboardHandlers, a7 as getCompanyDetailsFromSettings, a8 as getPublicSettingsGroup, a9 as mergeEmailLayoutCompanyDetails, aa as mergeGuardrailsIntoSystemPrompt, ab as parseLlmAgentValidationRules, ac as simpleDecrypt, ad as simpleEncrypt, ae as validateUserMessageAgainstAgentRules, af as validateUserMessageAgainstStructuredRules } from './index-Bf5GO8fu.cjs';
|
|
3
3
|
import PgBoss from 'pg-boss';
|
|
4
4
|
import * as typeorm from 'typeorm';
|
|
5
5
|
import { DataSource, EntityTarget, ObjectLiteral, SelectQueryBuilder } from 'typeorm';
|
|
6
6
|
import { ClassValue } from 'clsx';
|
|
7
7
|
import { Metadata } from 'next';
|
|
8
8
|
import { NextAuthUser } from './auth.cjs';
|
|
9
|
-
export { AuthorizeOtpInput, CmsMiddlewareConfig, CmsMiddlewareRequest, NextAuthOptionsConfig, createCmsMiddleware, defaultPublicApiMethods, explainSessionEntityAccess, getNextAuthOptions, isAuthDebugClientEnabled, isAuthDebugEnabled, isRbacDebugEnabled, logAuth, logAuthClient, logEntityAccessDecision, logRbac, nextAuthCookieDebugInfo, seedAdministratorPermissions, summarizeEntityPerms, summarizeSessionUserForLog } from './auth.cjs';
|
|
9
|
+
export { AuthorizeOtpInput, CmsMiddlewareConfig, CmsMiddlewareRequest, NextAuthOptionsConfig, SUPER_ADMIN_GROUP_ID, VENDOR_ADMIN_GROUP_ID, createCmsMiddleware, defaultPublicApiMethods, explainSessionEntityAccess, getNextAuthOptions, getStorefrontNextAuthOptions, isAuthDebugClientEnabled, isAuthDebugEnabled, isRbacDebugEnabled, isSuperAdmin, isVendorAdmin, logAuth, logAuthClient, logEntityAccessDecision, logRbac, nextAuthCookieDebugInfo, seedAdministratorPermissions, summarizeEntityPerms, summarizeSessionUserForLog } from './auth.cjs';
|
|
10
10
|
import { E as EntityCrudAction, S as SessionUser, e as VendorScope } from './vendor-scope-DTYhJk_I.cjs';
|
|
11
11
|
export { A as ADMIN_GROUP_NAME, a as AuthHelpers, b as EntityPermissionFlags, G as GetSession, O as OPEN_ENDPOINTS, P as PERMISSION_REQUIRED_ENDPOINTS, R as RBAC_ADMIN_ONLY_ENTITIES, V as VENDOR_OWNER_GROUP_NAME, c as VENDOR_SCOPED_STORE_ENTITIES, d as VENDOR_STORE_RBAC_ENTITIES, f as canManageRoles, g as canManageVendorRoles, h as canManageVendorTeam, i as canOnboardVendors, j as createAuthHelpers, k as createCmsAuthBundle, l as getPermissionableEntityKeys, m as getRequiredPermission, n as hasEntityPermission, o as isOpenEndpoint, p as isPlatformAdministrator, q as isPublicMethod, r as isSuperAdminGroupName, s as isVendorGroupName, t as isVendorOwner, u as isVendorPortalUser, v as isVendorStaff, w as permissionRowsToRecord, x as resolveVendorScopeFromSessionUser, y as sessionHasEntityAccess, z as vendorPortalFlagsFromUser } from './vendor-scope-DTYhJk_I.cjs';
|
|
12
12
|
import { a as NavbarConfig, F as FooterConfig } from './types-DCVaXlPV.cjs';
|
|
@@ -220,6 +220,7 @@ interface EmailPluginConfig$1 {
|
|
|
220
220
|
port?: number;
|
|
221
221
|
secure?: boolean;
|
|
222
222
|
region?: string;
|
|
223
|
+
/** IAM keys for SES API (SendEmail). Not the same as SES SMTP credentials in SMTP_USER/SMTP_PASSWORD. */
|
|
223
224
|
accessKeyId?: string;
|
|
224
225
|
secretAccessKey?: string;
|
|
225
226
|
templateOptions?: RenderEmailOptions;
|
|
@@ -244,6 +245,8 @@ declare class EmailService implements EmailServiceInterface {
|
|
|
244
245
|
private templateOptions?;
|
|
245
246
|
private sesClient?;
|
|
246
247
|
private transporter?;
|
|
248
|
+
/** AWS via SMTP (nodemailer) vs SES API SDK. */
|
|
249
|
+
private awsViaSmtp;
|
|
247
250
|
constructor(config: EmailPluginConfig$1);
|
|
248
251
|
send(emailData: EmailData): Promise<boolean>;
|
|
249
252
|
renderTemplate(templateName: EmailTemplateName, ctx: TemplateContext<unknown>): RenderedEmail;
|
|
@@ -319,6 +322,21 @@ interface OrderPlacedEmailPayload {
|
|
|
319
322
|
}
|
|
320
323
|
/** Queues one `orderPlaced` email per recipient (customer + each unique sales address; skips sales if same as customer). */
|
|
321
324
|
declare function queueOrderPlacedEmails(cms: CmsAppLike$2, payload: OrderPlacedEmailPayload): Promise<void>;
|
|
325
|
+
interface VendorOnboardEmailPayload {
|
|
326
|
+
vendorName: string;
|
|
327
|
+
vendorSlug?: string;
|
|
328
|
+
ownerName: string;
|
|
329
|
+
ownerEmail: string;
|
|
330
|
+
activation: 'invite' | 'password';
|
|
331
|
+
inviteLink?: string;
|
|
332
|
+
signInLink: string;
|
|
333
|
+
kind?: 'vendor_onboard' | 'team_invite';
|
|
334
|
+
notifyEmails: string[];
|
|
335
|
+
companyDetails: CompanyDetails;
|
|
336
|
+
sendToOwner?: boolean;
|
|
337
|
+
}
|
|
338
|
+
/** Queues `vendorOnboarded` email to owner and each unique notify address (sales team settings). */
|
|
339
|
+
declare function queueVendorOnboardEmails(cms: CmsAppLike$2, payload: VendorOnboardEmailPayload): Promise<void>;
|
|
322
340
|
|
|
323
341
|
interface EmailPluginConfig {
|
|
324
342
|
type: 'AWS' | 'SMTP' | 'GMAIL' | 'SENDGRID';
|
|
@@ -1211,19 +1229,47 @@ declare function rateLimitPublicApiIfNeeded(req: Request, method: string, segmen
|
|
|
1211
1229
|
}): Promise<Response | null>;
|
|
1212
1230
|
declare function rateLimitCheckoutPost(req: Request): Promise<Response | null>;
|
|
1213
1231
|
|
|
1214
|
-
interface EntityMapLike {
|
|
1232
|
+
interface EntityMapLike$1 {
|
|
1215
1233
|
configs: unknown;
|
|
1216
1234
|
orders: unknown;
|
|
1217
1235
|
order_items: unknown;
|
|
1218
1236
|
}
|
|
1219
1237
|
interface SendOrderPlacedEmailDeps {
|
|
1220
1238
|
getDataSource: () => Promise<DataSource>;
|
|
1221
|
-
entityMap: EntityMapLike;
|
|
1239
|
+
entityMap: EntityMapLike$1;
|
|
1222
1240
|
getCms: () => Promise<CmsApp>;
|
|
1223
1241
|
}
|
|
1224
1242
|
/** After payment confirmation: email customer + each sales team address from plugin settings. */
|
|
1225
1243
|
declare function sendOrderPlacedEmailsAfterConfirmation(orderId: number, deps: SendOrderPlacedEmailDeps): Promise<void>;
|
|
1226
1244
|
|
|
1245
|
+
type VendorOnboardedActivation = 'invite' | 'password';
|
|
1246
|
+
type VendorOnboardedKind = 'vendor_onboard' | 'team_invite';
|
|
1247
|
+
|
|
1248
|
+
interface EntityMapLike {
|
|
1249
|
+
configs: unknown;
|
|
1250
|
+
}
|
|
1251
|
+
interface SendVendorOnboardEmailInput {
|
|
1252
|
+
vendorName: string;
|
|
1253
|
+
vendorSlug?: string;
|
|
1254
|
+
ownerName: string;
|
|
1255
|
+
ownerEmail: string;
|
|
1256
|
+
activation: VendorOnboardedActivation;
|
|
1257
|
+
inviteLink?: string;
|
|
1258
|
+
signInLink: string;
|
|
1259
|
+
kind?: VendorOnboardedKind;
|
|
1260
|
+
/** When false, skips owner email but still notifies internal recipients. Default true. */
|
|
1261
|
+
sendToOwner?: boolean;
|
|
1262
|
+
}
|
|
1263
|
+
interface SendVendorOnboardEmailDeps {
|
|
1264
|
+
getDataSource: () => Promise<DataSource>;
|
|
1265
|
+
entityMap: EntityMapLike;
|
|
1266
|
+
getCms: () => Promise<CmsAppLike$2>;
|
|
1267
|
+
}
|
|
1268
|
+
/** After vendor onboard / team invite: email owner + platform team from plugin settings. */
|
|
1269
|
+
declare function sendVendorOnboardEmails(input: SendVendorOnboardEmailInput, deps: SendVendorOnboardEmailDeps): Promise<{
|
|
1270
|
+
ownerEmailSent: boolean;
|
|
1271
|
+
}>;
|
|
1272
|
+
|
|
1227
1273
|
interface DataSourceManager {
|
|
1228
1274
|
getDataSource: () => DataSource;
|
|
1229
1275
|
getDataSourceInitialized: () => Promise<DataSource>;
|
|
@@ -1834,6 +1880,30 @@ declare class OrderAddresses {
|
|
|
1834
1880
|
shippingOrders: Order[];
|
|
1835
1881
|
}
|
|
1836
1882
|
|
|
1883
|
+
declare class Customer {
|
|
1884
|
+
id: number;
|
|
1885
|
+
userId: number;
|
|
1886
|
+
user: User | null;
|
|
1887
|
+
name: string;
|
|
1888
|
+
email: string;
|
|
1889
|
+
phone: string;
|
|
1890
|
+
createdAt: Date;
|
|
1891
|
+
updatedAt: Date;
|
|
1892
|
+
deletedAt: Date | null;
|
|
1893
|
+
deleted: boolean;
|
|
1894
|
+
createdBy: number | null;
|
|
1895
|
+
updatedBy: number | null;
|
|
1896
|
+
deletedBy: number | null;
|
|
1897
|
+
}
|
|
1898
|
+
|
|
1899
|
+
declare class Customer_Contacts {
|
|
1900
|
+
id: number;
|
|
1901
|
+
customerId: number;
|
|
1902
|
+
customer: Customer;
|
|
1903
|
+
contactId: number;
|
|
1904
|
+
contact: Contact;
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1837
1907
|
type OrderKind = 'sale' | 'return' | 'replacement';
|
|
1838
1908
|
declare class Order {
|
|
1839
1909
|
id: number;
|
|
@@ -1843,6 +1913,8 @@ declare class Order {
|
|
|
1843
1913
|
orderKind: OrderKind;
|
|
1844
1914
|
parentOrderId: number | null;
|
|
1845
1915
|
contactId: number;
|
|
1916
|
+
/** Junction row linking the account customer to the checkout contact (storefront checkout). */
|
|
1917
|
+
customerContactId: number | null;
|
|
1846
1918
|
billingAddressId: number | null;
|
|
1847
1919
|
shippingAddressId: number | null;
|
|
1848
1920
|
status: 'pending' | 'confirmed' | 'processing' | 'completed' | 'cancelled';
|
|
@@ -1863,6 +1935,7 @@ declare class Order {
|
|
|
1863
1935
|
parentOrder: Order | null;
|
|
1864
1936
|
children: Order[];
|
|
1865
1937
|
contact: Contact;
|
|
1938
|
+
customerContact: Customer_Contacts | null;
|
|
1866
1939
|
billingAddress: OrderAddresses | null;
|
|
1867
1940
|
shippingAddress: OrderAddresses | null;
|
|
1868
1941
|
items: OrderItem[];
|
|
@@ -2211,7 +2284,8 @@ declare class RssFeed {
|
|
|
2211
2284
|
declare class VendorCustomer {
|
|
2212
2285
|
id: number;
|
|
2213
2286
|
vendorId: number;
|
|
2214
|
-
contactId: number;
|
|
2287
|
+
contactId: number | null;
|
|
2288
|
+
customerId: number;
|
|
2215
2289
|
/** Optional vendor-specific notes about this customer. */
|
|
2216
2290
|
notes: string | null;
|
|
2217
2291
|
/** Optional vendor-specific tags/labels. */
|
|
@@ -2219,10 +2293,11 @@ declare class VendorCustomer {
|
|
|
2219
2293
|
createdAt: Date;
|
|
2220
2294
|
updatedAt: Date;
|
|
2221
2295
|
vendor: Vendor;
|
|
2222
|
-
contact: Contact;
|
|
2296
|
+
contact: Contact | null;
|
|
2297
|
+
customer: Customer;
|
|
2223
2298
|
}
|
|
2224
2299
|
|
|
2225
2300
|
/** Map API resource segment (e.g. "blogs", "form_submissions") to entity. Used by CRUD handler. */
|
|
2226
2301
|
declare const CMS_ENTITY_MAP: Record<string, EntityTarget<typeorm.ObjectLiteral>>;
|
|
2227
2302
|
|
|
2228
|
-
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, Currency, CurrencyExchange, type DataSourceManager, Discount, DiscountRules, 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, NextAuthUser, Order, OrderAddresses, OrderDiscounts, 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, SessionUser, type SmsJobPayload, type SmsPluginConfig, type SmsProviderChoice, type SmsProviderId, type SmsServiceConfig, type SmsServiceInterface, type SocialMediaPluginConfig, StorageService, Tag, Tax, TemplateContext, User, UserGroup, Vendor, VendorCustomer, VendorUser, Wishlist, WishlistItem, ZIP_MIME_TYPES, allowRateLimit, analyticsPlugin, applyVendorCustomersContactFilter, assertCaptchaOk, assertContactAllowedForVendorOrder, blogGeneratorPlugin, buildBlogMetadataUserPrompt, buildCaptchaPublicConfig, buildCronFromSchedule, buildRssUserPromptFromFeeds, cachePlugin, captchaPlugin, cn, contactIsVendorCustomer, countRecentOtpSends, createCmsApp, createDataSourceManager, createOtpChallenge, createSocialMediaHandlers, emailPlugin, emailTemplates, enrichUserWithVendorContext, ensureScheduleQueueWorker, erpPlugin, fetchSeoBySlug, formatDate, formatDateOnly, formatDateTime, generateNumericOtp, generateSlug, getRssArticleSummaryFromItem, hashOtpCode, hydrateVendorSessionUser, isCustomerTypeContact, isZipMedia, joinRecipientsForSend, linkUnclaimedContactToUser, llmAgentToChatAgentOptions, llmPlugin, loadPublicThemeSettings, loadUserVendorContext, 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, resolveVendorIdForContactCheck, s3StoragePlugin, sanitizeMediaFolderPath, sanitizeStorageSegment, seedDefaultAdmin, sendOrderPlacedEmailsAfterConfirmation, serializeEmailRecipients, shouldRateLimitPublicWrite, smsPlugin, socialMediaPlugin, syncJobScheduleToPgBoss, truncateText, validateScheduleInput, validateSlug, verifyAndConsumeOtpChallenge, verifyOtpCodeHash, withAdminRlsContext, withVendorRlsContext };
|
|
2303
|
+
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, Currency, CurrencyExchange, Customer, Customer_Contacts, type DataSourceManager, Discount, DiscountRules, 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, NextAuthUser, Order, OrderAddresses, OrderDiscounts, 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, type SendVendorOnboardEmailInput, Seo, type SeoLike, type SeoMetadataOverrides, SessionUser, type SmsJobPayload, type SmsPluginConfig, type SmsProviderChoice, type SmsProviderId, type SmsServiceConfig, type SmsServiceInterface, type SocialMediaPluginConfig, StorageService, Tag, Tax, TemplateContext, User, UserGroup, Vendor, VendorCustomer, VendorUser, Wishlist, WishlistItem, ZIP_MIME_TYPES, allowRateLimit, analyticsPlugin, applyVendorCustomersContactFilter, assertCaptchaOk, assertContactAllowedForVendorOrder, blogGeneratorPlugin, buildBlogMetadataUserPrompt, buildCaptchaPublicConfig, buildCronFromSchedule, buildRssUserPromptFromFeeds, cachePlugin, captchaPlugin, cn, contactIsVendorCustomer, countRecentOtpSends, createCmsApp, createDataSourceManager, createOtpChallenge, createSocialMediaHandlers, emailPlugin, emailTemplates, enrichUserWithVendorContext, ensureScheduleQueueWorker, erpPlugin, fetchSeoBySlug, formatDate, formatDateOnly, formatDateTime, generateNumericOtp, generateSlug, getRssArticleSummaryFromItem, hashOtpCode, hydrateVendorSessionUser, isCustomerTypeContact, isZipMedia, joinRecipientsForSend, linkUnclaimedContactToUser, llmAgentToChatAgentOptions, llmPlugin, loadPublicThemeSettings, loadUserVendorContext, localStoragePlugin, mergeSeoBySlug, metaFetchUserManagedPages, metaPostPageFeed, metaPostPagePhoto, metaResolvePageAccessToken, normalizePhoneE164, parseBlogGeneratorAgentContent, parseBlogGeneratorModelOutput, parseBlogMetadataEnrichmentJson, parseEmailRecipientsFromConfig, parseHfInferenceEmbeddingBody, paymentPlugin, pgBossPlugin, pgBossScheduleNameForId, queueEmail, queueErp, queueErpCreateContactIfEnabled, queueErpPaidOrderForOrderId, queueJobScheduleNow, queueOrderPlacedEmails, queuePlugin, queueSms, queueVendorOnboardEmails, rateLimitCheckoutPost, rateLimitKeyForApiRequest, rateLimitPublicApiIfNeeded, registerEmailQueueProcessor, registerErpQueueProcessor, registerJobRunnerWorker, registerSmsQueueProcessor, relativePathFromMediaParentId, renderEmail, renderLayout, resolveBlogCategoryIdByName, resolvePublicMetadata, resolveVendorIdForContactCheck, s3StoragePlugin, sanitizeMediaFolderPath, sanitizeStorageSegment, seedDefaultAdmin, sendOrderPlacedEmailsAfterConfirmation, sendVendorOnboardEmails, serializeEmailRecipients, shouldRateLimitPublicWrite, smsPlugin, socialMediaPlugin, syncJobScheduleToPgBoss, truncateText, validateScheduleInput, validateSlug, verifyAndConsumeOtpChallenge, verifyOtpCodeHash, withAdminRlsContext, withVendorRlsContext };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { e as CompanyDetails, T as TemplateContext, h as EmailTemplateResult, g as EmailTemplateName, O as OrderPlacedLineItem, o as StorageService, i as EntityMap$2 } from './index-
|
|
2
|
-
export { A as AnalyticsHandlerConfig, a as AuthHandlersConfig, B as BlogBySlugConfig, C as ChangePasswordConfig, b as ChatPublicConfig, c as CmsApiHandlerConfig, d as CmsGetter, f as CrudHandlerOptions, D as DashboardStatsConfig, E 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, S as SetPasswordConfig, m as SettingsApiConfig, n 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 VendorOnboardHandlersConfig, v as VendorOwnerActivation, w as createAnalyticsHandlers, x as createBlogBySlugHandler, y as createChangePasswordHandler, z as createCmsApiHandler, H as createCrudByIdHandler, K as createCrudHandler, M as createDashboardStatsHandler, N as createEcommerceAnalyticsHandler, Q as createForgotPasswordHandler, R as createFormBySlugHandler, W as createInviteAcceptHandler, X as createJobScheduleHandlers, Y as createLlmAgentKnowledgeHandlers, Z as createMediaZipExtractHandler, _ as createSetPasswordHandler, $ as createSettingsApiHandlers, a0 as createStorefrontApiHandler, a1 as createUploadHandler, a2 as createUserAuthApiRouter, a3 as createUserAvatarHandler, a4 as createUserProfileHandler, a5 as createUsersApiHandlers, a6 as createVendorOnboardHandlers, a7 as getCompanyDetailsFromSettings, a8 as getPublicSettingsGroup, a9 as mergeEmailLayoutCompanyDetails, aa as mergeGuardrailsIntoSystemPrompt, ab as parseLlmAgentValidationRules, ac as simpleDecrypt, ad as simpleEncrypt, ae as validateUserMessageAgainstAgentRules, af as validateUserMessageAgainstStructuredRules } from './index-
|
|
1
|
+
import { e as CompanyDetails, T as TemplateContext, h as EmailTemplateResult, g as EmailTemplateName, O as OrderPlacedLineItem, o as StorageService, i as EntityMap$2 } from './index-DOiJuMQA.js';
|
|
2
|
+
export { A as AnalyticsHandlerConfig, a as AuthHandlersConfig, B as BlogBySlugConfig, C as ChangePasswordConfig, b as ChatPublicConfig, c as CmsApiHandlerConfig, d as CmsGetter, f as CrudHandlerOptions, D as DashboardStatsConfig, E 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, S as SetPasswordConfig, m as SettingsApiConfig, n 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 VendorOnboardHandlersConfig, v as VendorOwnerActivation, w as createAnalyticsHandlers, x as createBlogBySlugHandler, y as createChangePasswordHandler, z as createCmsApiHandler, H as createCrudByIdHandler, K as createCrudHandler, M as createDashboardStatsHandler, N as createEcommerceAnalyticsHandler, Q as createForgotPasswordHandler, R as createFormBySlugHandler, W as createInviteAcceptHandler, X as createJobScheduleHandlers, Y as createLlmAgentKnowledgeHandlers, Z as createMediaZipExtractHandler, _ as createSetPasswordHandler, $ as createSettingsApiHandlers, a0 as createStorefrontApiHandler, a1 as createUploadHandler, a2 as createUserAuthApiRouter, a3 as createUserAvatarHandler, a4 as createUserProfileHandler, a5 as createUsersApiHandlers, a6 as createVendorOnboardHandlers, a7 as getCompanyDetailsFromSettings, a8 as getPublicSettingsGroup, a9 as mergeEmailLayoutCompanyDetails, aa as mergeGuardrailsIntoSystemPrompt, ab as parseLlmAgentValidationRules, ac as simpleDecrypt, ad as simpleEncrypt, ae as validateUserMessageAgainstAgentRules, af as validateUserMessageAgainstStructuredRules } from './index-DOiJuMQA.js';
|
|
3
3
|
import PgBoss from 'pg-boss';
|
|
4
4
|
import * as typeorm from 'typeorm';
|
|
5
5
|
import { DataSource, EntityTarget, ObjectLiteral, SelectQueryBuilder } from 'typeorm';
|
|
6
6
|
import { ClassValue } from 'clsx';
|
|
7
7
|
import { Metadata } from 'next';
|
|
8
8
|
import { NextAuthUser } from './auth.js';
|
|
9
|
-
export { AuthorizeOtpInput, CmsMiddlewareConfig, CmsMiddlewareRequest, NextAuthOptionsConfig, createCmsMiddleware, defaultPublicApiMethods, explainSessionEntityAccess, getNextAuthOptions, isAuthDebugClientEnabled, isAuthDebugEnabled, isRbacDebugEnabled, logAuth, logAuthClient, logEntityAccessDecision, logRbac, nextAuthCookieDebugInfo, seedAdministratorPermissions, summarizeEntityPerms, summarizeSessionUserForLog } from './auth.js';
|
|
9
|
+
export { AuthorizeOtpInput, CmsMiddlewareConfig, CmsMiddlewareRequest, NextAuthOptionsConfig, SUPER_ADMIN_GROUP_ID, VENDOR_ADMIN_GROUP_ID, createCmsMiddleware, defaultPublicApiMethods, explainSessionEntityAccess, getNextAuthOptions, getStorefrontNextAuthOptions, isAuthDebugClientEnabled, isAuthDebugEnabled, isRbacDebugEnabled, isSuperAdmin, isVendorAdmin, logAuth, logAuthClient, logEntityAccessDecision, logRbac, nextAuthCookieDebugInfo, seedAdministratorPermissions, summarizeEntityPerms, summarizeSessionUserForLog } from './auth.js';
|
|
10
10
|
import { E as EntityCrudAction, S as SessionUser, e as VendorScope } from './vendor-scope-DTYhJk_I.js';
|
|
11
11
|
export { A as ADMIN_GROUP_NAME, a as AuthHelpers, b as EntityPermissionFlags, G as GetSession, O as OPEN_ENDPOINTS, P as PERMISSION_REQUIRED_ENDPOINTS, R as RBAC_ADMIN_ONLY_ENTITIES, V as VENDOR_OWNER_GROUP_NAME, c as VENDOR_SCOPED_STORE_ENTITIES, d as VENDOR_STORE_RBAC_ENTITIES, f as canManageRoles, g as canManageVendorRoles, h as canManageVendorTeam, i as canOnboardVendors, j as createAuthHelpers, k as createCmsAuthBundle, l as getPermissionableEntityKeys, m as getRequiredPermission, n as hasEntityPermission, o as isOpenEndpoint, p as isPlatformAdministrator, q as isPublicMethod, r as isSuperAdminGroupName, s as isVendorGroupName, t as isVendorOwner, u as isVendorPortalUser, v as isVendorStaff, w as permissionRowsToRecord, x as resolveVendorScopeFromSessionUser, y as sessionHasEntityAccess, z as vendorPortalFlagsFromUser } from './vendor-scope-DTYhJk_I.js';
|
|
12
12
|
import { a as NavbarConfig, F as FooterConfig } from './types-DCVaXlPV.js';
|
|
@@ -220,6 +220,7 @@ interface EmailPluginConfig$1 {
|
|
|
220
220
|
port?: number;
|
|
221
221
|
secure?: boolean;
|
|
222
222
|
region?: string;
|
|
223
|
+
/** IAM keys for SES API (SendEmail). Not the same as SES SMTP credentials in SMTP_USER/SMTP_PASSWORD. */
|
|
223
224
|
accessKeyId?: string;
|
|
224
225
|
secretAccessKey?: string;
|
|
225
226
|
templateOptions?: RenderEmailOptions;
|
|
@@ -244,6 +245,8 @@ declare class EmailService implements EmailServiceInterface {
|
|
|
244
245
|
private templateOptions?;
|
|
245
246
|
private sesClient?;
|
|
246
247
|
private transporter?;
|
|
248
|
+
/** AWS via SMTP (nodemailer) vs SES API SDK. */
|
|
249
|
+
private awsViaSmtp;
|
|
247
250
|
constructor(config: EmailPluginConfig$1);
|
|
248
251
|
send(emailData: EmailData): Promise<boolean>;
|
|
249
252
|
renderTemplate(templateName: EmailTemplateName, ctx: TemplateContext<unknown>): RenderedEmail;
|
|
@@ -319,6 +322,21 @@ interface OrderPlacedEmailPayload {
|
|
|
319
322
|
}
|
|
320
323
|
/** Queues one `orderPlaced` email per recipient (customer + each unique sales address; skips sales if same as customer). */
|
|
321
324
|
declare function queueOrderPlacedEmails(cms: CmsAppLike$2, payload: OrderPlacedEmailPayload): Promise<void>;
|
|
325
|
+
interface VendorOnboardEmailPayload {
|
|
326
|
+
vendorName: string;
|
|
327
|
+
vendorSlug?: string;
|
|
328
|
+
ownerName: string;
|
|
329
|
+
ownerEmail: string;
|
|
330
|
+
activation: 'invite' | 'password';
|
|
331
|
+
inviteLink?: string;
|
|
332
|
+
signInLink: string;
|
|
333
|
+
kind?: 'vendor_onboard' | 'team_invite';
|
|
334
|
+
notifyEmails: string[];
|
|
335
|
+
companyDetails: CompanyDetails;
|
|
336
|
+
sendToOwner?: boolean;
|
|
337
|
+
}
|
|
338
|
+
/** Queues `vendorOnboarded` email to owner and each unique notify address (sales team settings). */
|
|
339
|
+
declare function queueVendorOnboardEmails(cms: CmsAppLike$2, payload: VendorOnboardEmailPayload): Promise<void>;
|
|
322
340
|
|
|
323
341
|
interface EmailPluginConfig {
|
|
324
342
|
type: 'AWS' | 'SMTP' | 'GMAIL' | 'SENDGRID';
|
|
@@ -1211,19 +1229,47 @@ declare function rateLimitPublicApiIfNeeded(req: Request, method: string, segmen
|
|
|
1211
1229
|
}): Promise<Response | null>;
|
|
1212
1230
|
declare function rateLimitCheckoutPost(req: Request): Promise<Response | null>;
|
|
1213
1231
|
|
|
1214
|
-
interface EntityMapLike {
|
|
1232
|
+
interface EntityMapLike$1 {
|
|
1215
1233
|
configs: unknown;
|
|
1216
1234
|
orders: unknown;
|
|
1217
1235
|
order_items: unknown;
|
|
1218
1236
|
}
|
|
1219
1237
|
interface SendOrderPlacedEmailDeps {
|
|
1220
1238
|
getDataSource: () => Promise<DataSource>;
|
|
1221
|
-
entityMap: EntityMapLike;
|
|
1239
|
+
entityMap: EntityMapLike$1;
|
|
1222
1240
|
getCms: () => Promise<CmsApp>;
|
|
1223
1241
|
}
|
|
1224
1242
|
/** After payment confirmation: email customer + each sales team address from plugin settings. */
|
|
1225
1243
|
declare function sendOrderPlacedEmailsAfterConfirmation(orderId: number, deps: SendOrderPlacedEmailDeps): Promise<void>;
|
|
1226
1244
|
|
|
1245
|
+
type VendorOnboardedActivation = 'invite' | 'password';
|
|
1246
|
+
type VendorOnboardedKind = 'vendor_onboard' | 'team_invite';
|
|
1247
|
+
|
|
1248
|
+
interface EntityMapLike {
|
|
1249
|
+
configs: unknown;
|
|
1250
|
+
}
|
|
1251
|
+
interface SendVendorOnboardEmailInput {
|
|
1252
|
+
vendorName: string;
|
|
1253
|
+
vendorSlug?: string;
|
|
1254
|
+
ownerName: string;
|
|
1255
|
+
ownerEmail: string;
|
|
1256
|
+
activation: VendorOnboardedActivation;
|
|
1257
|
+
inviteLink?: string;
|
|
1258
|
+
signInLink: string;
|
|
1259
|
+
kind?: VendorOnboardedKind;
|
|
1260
|
+
/** When false, skips owner email but still notifies internal recipients. Default true. */
|
|
1261
|
+
sendToOwner?: boolean;
|
|
1262
|
+
}
|
|
1263
|
+
interface SendVendorOnboardEmailDeps {
|
|
1264
|
+
getDataSource: () => Promise<DataSource>;
|
|
1265
|
+
entityMap: EntityMapLike;
|
|
1266
|
+
getCms: () => Promise<CmsAppLike$2>;
|
|
1267
|
+
}
|
|
1268
|
+
/** After vendor onboard / team invite: email owner + platform team from plugin settings. */
|
|
1269
|
+
declare function sendVendorOnboardEmails(input: SendVendorOnboardEmailInput, deps: SendVendorOnboardEmailDeps): Promise<{
|
|
1270
|
+
ownerEmailSent: boolean;
|
|
1271
|
+
}>;
|
|
1272
|
+
|
|
1227
1273
|
interface DataSourceManager {
|
|
1228
1274
|
getDataSource: () => DataSource;
|
|
1229
1275
|
getDataSourceInitialized: () => Promise<DataSource>;
|
|
@@ -1834,6 +1880,30 @@ declare class OrderAddresses {
|
|
|
1834
1880
|
shippingOrders: Order[];
|
|
1835
1881
|
}
|
|
1836
1882
|
|
|
1883
|
+
declare class Customer {
|
|
1884
|
+
id: number;
|
|
1885
|
+
userId: number;
|
|
1886
|
+
user: User | null;
|
|
1887
|
+
name: string;
|
|
1888
|
+
email: string;
|
|
1889
|
+
phone: string;
|
|
1890
|
+
createdAt: Date;
|
|
1891
|
+
updatedAt: Date;
|
|
1892
|
+
deletedAt: Date | null;
|
|
1893
|
+
deleted: boolean;
|
|
1894
|
+
createdBy: number | null;
|
|
1895
|
+
updatedBy: number | null;
|
|
1896
|
+
deletedBy: number | null;
|
|
1897
|
+
}
|
|
1898
|
+
|
|
1899
|
+
declare class Customer_Contacts {
|
|
1900
|
+
id: number;
|
|
1901
|
+
customerId: number;
|
|
1902
|
+
customer: Customer;
|
|
1903
|
+
contactId: number;
|
|
1904
|
+
contact: Contact;
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1837
1907
|
type OrderKind = 'sale' | 'return' | 'replacement';
|
|
1838
1908
|
declare class Order {
|
|
1839
1909
|
id: number;
|
|
@@ -1843,6 +1913,8 @@ declare class Order {
|
|
|
1843
1913
|
orderKind: OrderKind;
|
|
1844
1914
|
parentOrderId: number | null;
|
|
1845
1915
|
contactId: number;
|
|
1916
|
+
/** Junction row linking the account customer to the checkout contact (storefront checkout). */
|
|
1917
|
+
customerContactId: number | null;
|
|
1846
1918
|
billingAddressId: number | null;
|
|
1847
1919
|
shippingAddressId: number | null;
|
|
1848
1920
|
status: 'pending' | 'confirmed' | 'processing' | 'completed' | 'cancelled';
|
|
@@ -1863,6 +1935,7 @@ declare class Order {
|
|
|
1863
1935
|
parentOrder: Order | null;
|
|
1864
1936
|
children: Order[];
|
|
1865
1937
|
contact: Contact;
|
|
1938
|
+
customerContact: Customer_Contacts | null;
|
|
1866
1939
|
billingAddress: OrderAddresses | null;
|
|
1867
1940
|
shippingAddress: OrderAddresses | null;
|
|
1868
1941
|
items: OrderItem[];
|
|
@@ -2211,7 +2284,8 @@ declare class RssFeed {
|
|
|
2211
2284
|
declare class VendorCustomer {
|
|
2212
2285
|
id: number;
|
|
2213
2286
|
vendorId: number;
|
|
2214
|
-
contactId: number;
|
|
2287
|
+
contactId: number | null;
|
|
2288
|
+
customerId: number;
|
|
2215
2289
|
/** Optional vendor-specific notes about this customer. */
|
|
2216
2290
|
notes: string | null;
|
|
2217
2291
|
/** Optional vendor-specific tags/labels. */
|
|
@@ -2219,10 +2293,11 @@ declare class VendorCustomer {
|
|
|
2219
2293
|
createdAt: Date;
|
|
2220
2294
|
updatedAt: Date;
|
|
2221
2295
|
vendor: Vendor;
|
|
2222
|
-
contact: Contact;
|
|
2296
|
+
contact: Contact | null;
|
|
2297
|
+
customer: Customer;
|
|
2223
2298
|
}
|
|
2224
2299
|
|
|
2225
2300
|
/** Map API resource segment (e.g. "blogs", "form_submissions") to entity. Used by CRUD handler. */
|
|
2226
2301
|
declare const CMS_ENTITY_MAP: Record<string, EntityTarget<typeorm.ObjectLiteral>>;
|
|
2227
2302
|
|
|
2228
|
-
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, Currency, CurrencyExchange, type DataSourceManager, Discount, DiscountRules, 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, NextAuthUser, Order, OrderAddresses, OrderDiscounts, 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, SessionUser, type SmsJobPayload, type SmsPluginConfig, type SmsProviderChoice, type SmsProviderId, type SmsServiceConfig, type SmsServiceInterface, type SocialMediaPluginConfig, StorageService, Tag, Tax, TemplateContext, User, UserGroup, Vendor, VendorCustomer, VendorUser, Wishlist, WishlistItem, ZIP_MIME_TYPES, allowRateLimit, analyticsPlugin, applyVendorCustomersContactFilter, assertCaptchaOk, assertContactAllowedForVendorOrder, blogGeneratorPlugin, buildBlogMetadataUserPrompt, buildCaptchaPublicConfig, buildCronFromSchedule, buildRssUserPromptFromFeeds, cachePlugin, captchaPlugin, cn, contactIsVendorCustomer, countRecentOtpSends, createCmsApp, createDataSourceManager, createOtpChallenge, createSocialMediaHandlers, emailPlugin, emailTemplates, enrichUserWithVendorContext, ensureScheduleQueueWorker, erpPlugin, fetchSeoBySlug, formatDate, formatDateOnly, formatDateTime, generateNumericOtp, generateSlug, getRssArticleSummaryFromItem, hashOtpCode, hydrateVendorSessionUser, isCustomerTypeContact, isZipMedia, joinRecipientsForSend, linkUnclaimedContactToUser, llmAgentToChatAgentOptions, llmPlugin, loadPublicThemeSettings, loadUserVendorContext, 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, resolveVendorIdForContactCheck, s3StoragePlugin, sanitizeMediaFolderPath, sanitizeStorageSegment, seedDefaultAdmin, sendOrderPlacedEmailsAfterConfirmation, serializeEmailRecipients, shouldRateLimitPublicWrite, smsPlugin, socialMediaPlugin, syncJobScheduleToPgBoss, truncateText, validateScheduleInput, validateSlug, verifyAndConsumeOtpChallenge, verifyOtpCodeHash, withAdminRlsContext, withVendorRlsContext };
|
|
2303
|
+
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, Currency, CurrencyExchange, Customer, Customer_Contacts, type DataSourceManager, Discount, DiscountRules, 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, NextAuthUser, Order, OrderAddresses, OrderDiscounts, 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, type SendVendorOnboardEmailInput, Seo, type SeoLike, type SeoMetadataOverrides, SessionUser, type SmsJobPayload, type SmsPluginConfig, type SmsProviderChoice, type SmsProviderId, type SmsServiceConfig, type SmsServiceInterface, type SocialMediaPluginConfig, StorageService, Tag, Tax, TemplateContext, User, UserGroup, Vendor, VendorCustomer, VendorUser, Wishlist, WishlistItem, ZIP_MIME_TYPES, allowRateLimit, analyticsPlugin, applyVendorCustomersContactFilter, assertCaptchaOk, assertContactAllowedForVendorOrder, blogGeneratorPlugin, buildBlogMetadataUserPrompt, buildCaptchaPublicConfig, buildCronFromSchedule, buildRssUserPromptFromFeeds, cachePlugin, captchaPlugin, cn, contactIsVendorCustomer, countRecentOtpSends, createCmsApp, createDataSourceManager, createOtpChallenge, createSocialMediaHandlers, emailPlugin, emailTemplates, enrichUserWithVendorContext, ensureScheduleQueueWorker, erpPlugin, fetchSeoBySlug, formatDate, formatDateOnly, formatDateTime, generateNumericOtp, generateSlug, getRssArticleSummaryFromItem, hashOtpCode, hydrateVendorSessionUser, isCustomerTypeContact, isZipMedia, joinRecipientsForSend, linkUnclaimedContactToUser, llmAgentToChatAgentOptions, llmPlugin, loadPublicThemeSettings, loadUserVendorContext, localStoragePlugin, mergeSeoBySlug, metaFetchUserManagedPages, metaPostPageFeed, metaPostPagePhoto, metaResolvePageAccessToken, normalizePhoneE164, parseBlogGeneratorAgentContent, parseBlogGeneratorModelOutput, parseBlogMetadataEnrichmentJson, parseEmailRecipientsFromConfig, parseHfInferenceEmbeddingBody, paymentPlugin, pgBossPlugin, pgBossScheduleNameForId, queueEmail, queueErp, queueErpCreateContactIfEnabled, queueErpPaidOrderForOrderId, queueJobScheduleNow, queueOrderPlacedEmails, queuePlugin, queueSms, queueVendorOnboardEmails, rateLimitCheckoutPost, rateLimitKeyForApiRequest, rateLimitPublicApiIfNeeded, registerEmailQueueProcessor, registerErpQueueProcessor, registerJobRunnerWorker, registerSmsQueueProcessor, relativePathFromMediaParentId, renderEmail, renderLayout, resolveBlogCategoryIdByName, resolvePublicMetadata, resolveVendorIdForContactCheck, s3StoragePlugin, sanitizeMediaFolderPath, sanitizeStorageSegment, seedDefaultAdmin, sendOrderPlacedEmailsAfterConfirmation, sendVendorOnboardEmails, serializeEmailRecipients, shouldRateLimitPublicWrite, smsPlugin, socialMediaPlugin, syncJobScheduleToPgBoss, truncateText, validateScheduleInput, validateSlug, verifyAndConsumeOtpChallenge, verifyOtpCodeHash, withAdminRlsContext, withVendorRlsContext };
|