@infuro/cms-core 1.0.14 → 1.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as CompanyDetails, T as TemplateContext, E as EmailTemplateResult, a as EmailTemplateName, O as OrderPlacedLineItem, S as StorageService, b as EntityMap$1 } from './index-Be8NLxu-.cjs';
2
- export { A as AnalyticsHandlerConfig, c as AuthHandlersConfig, B as BlogBySlugConfig, d as ChangePasswordConfig, e as CmsApiHandlerConfig, f as CmsGetter, g as CrudHandlerOptions, D as DashboardStatsConfig, F as ForgotPasswordConfig, h as FormBySlugConfig, G as GetPublicSettingsGroupConfig, i as GetPublicSettingsGroupDataSource, I as InviteAcceptConfig, j as SetPasswordConfig, k as SettingsApiConfig, l as SocialLinkItem, m as StorefrontApiConfig, n as StorefrontOtpFlags, U as UploadHandlerConfig, o as UserAuthApiConfig, p as UserAvatarConfig, q as UserProfileConfig, r as UsersApiConfig, s as createAnalyticsHandlers, t as createBlogBySlugHandler, u as createChangePasswordHandler, v as createCmsApiHandler, w as createCrudByIdHandler, x as createCrudHandler, y as createDashboardStatsHandler, z as createForgotPasswordHandler, H as createFormBySlugHandler, J as createInviteAcceptHandler, K as createSetPasswordHandler, L as createSettingsApiHandlers, M as createStorefrontApiHandler, N as createUploadHandler, P as createUserAuthApiRouter, Q as createUserAvatarHandler, R as createUserProfileHandler, V as createUsersApiHandlers, W as getCompanyDetailsFromSettings, X as getPublicSettingsGroup, Y as mergeEmailLayoutCompanyDetails } from './index-Be8NLxu-.cjs';
1
+ import { C as CompanyDetails, T as TemplateContext, E as EmailTemplateResult, a as EmailTemplateName, O as OrderPlacedLineItem, S as StorageService, b as EntityMap$1 } from './index-BQnqJ7EO.cjs';
2
+ export { A as AnalyticsHandlerConfig, c as AuthHandlersConfig, B as BlogBySlugConfig, d as ChangePasswordConfig, e as CmsApiHandlerConfig, f as CmsGetter, g as CrudHandlerOptions, D as DashboardStatsConfig, F as ForgotPasswordConfig, h as FormBySlugConfig, G as GetPublicSettingsGroupConfig, i as GetPublicSettingsGroupDataSource, I as InviteAcceptConfig, j as SetPasswordConfig, k as SettingsApiConfig, l as SocialLinkItem, m as StorefrontApiConfig, n as StorefrontOtpFlags, U as UploadHandlerConfig, o as UserAuthApiConfig, p as UserAvatarConfig, q as UserProfileConfig, r as UsersApiConfig, s as createAnalyticsHandlers, t as createBlogBySlugHandler, u as createChangePasswordHandler, v as createCmsApiHandler, w as createCrudByIdHandler, x as createCrudHandler, y as createDashboardStatsHandler, z as createForgotPasswordHandler, H as createFormBySlugHandler, J as createInviteAcceptHandler, K as createSetPasswordHandler, L as createSettingsApiHandlers, M as createStorefrontApiHandler, N as createUploadHandler, P as createUserAuthApiRouter, Q as createUserAvatarHandler, R as createUserProfileHandler, V as createUsersApiHandlers, W as getCompanyDetailsFromSettings, X as getPublicSettingsGroup, Y as mergeEmailLayoutCompanyDetails } from './index-BQnqJ7EO.cjs';
3
3
  import { ClassValue } from 'clsx';
4
4
  import * as typeorm from 'typeorm';
5
5
  import { DataSource, EntityTarget, ObjectLiteral } from 'typeorm';
@@ -159,7 +159,7 @@ type ErpPaidOrderDataSource = {
159
159
  type ErpPaidOrderEntityMap = Record<string, unknown>;
160
160
  /**
161
161
  * Enqueues ERP `order.created` only when the order has at least one **completed** payment.
162
- * Include `payments` in the payload per §6 (minor units for typical 2-decimal currencies).
162
+ * Include `payments` in the payload.
163
163
  */
164
164
  declare function queueErpPaidOrderForOrderId(cms: CmsAppLike$2, dataSource: ErpPaidOrderDataSource, entityMap: ErpPaidOrderEntityMap, orderId: number): Promise<void>;
165
165
 
@@ -296,6 +296,8 @@ declare function queueEmail(cms: CmsAppLike$1, payload: EmailJobPayload): Promis
296
296
  interface OrderPlacedEmailPayload {
297
297
  orderNumber: string;
298
298
  total?: string | number;
299
+ subtotal?: string | number;
300
+ tax?: string | number;
299
301
  currency?: string;
300
302
  customerName?: string;
301
303
  /** Customer receipt; omitted if empty */
@@ -304,6 +306,8 @@ interface OrderPlacedEmailPayload {
304
306
  salesTeamEmails: string[];
305
307
  companyDetails: CompanyDetails;
306
308
  lineItems: OrderPlacedLineItem[];
309
+ billingAddress?: Record<string, string>;
310
+ shippingAddress?: Record<string, string>;
307
311
  }
308
312
  /** Queues one `orderPlaced` email per recipient (customer + each unique sales address; skips sales if same as customer). */
309
313
  declare function queueOrderPlacedEmails(cms: CmsAppLike$1, payload: OrderPlacedEmailPayload): Promise<void>;
@@ -1052,6 +1056,9 @@ declare class Product {
1052
1056
  categoryId: number | null;
1053
1057
  sku: string | null;
1054
1058
  hsn: string | null;
1059
+ /** Unit of measure, e.g. pcs, kg, hrs */
1060
+ uom: string | null;
1061
+ type: 'product' | 'service';
1055
1062
  slug: string | null;
1056
1063
  name: string | null;
1057
1064
  price: number;
@@ -1084,6 +1091,13 @@ declare class OrderItem {
1084
1091
  unitPrice: number;
1085
1092
  tax: number;
1086
1093
  total: number;
1094
+ /** Snapshot at order time */
1095
+ hsn: string | null;
1096
+ uom: string | null;
1097
+ productType: string | null;
1098
+ taxRate: number | null;
1099
+ /** Tax slug snapshot (from taxes.slug) */
1100
+ taxCode: string | null;
1087
1101
  metadata: Record<string, unknown> | null;
1088
1102
  createdAt: Date;
1089
1103
  updatedAt: Date;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as CompanyDetails, T as TemplateContext, E as EmailTemplateResult, a as EmailTemplateName, O as OrderPlacedLineItem, S as StorageService, b as EntityMap$1 } from './index-CjBf9dAb.js';
2
- export { A as AnalyticsHandlerConfig, c as AuthHandlersConfig, B as BlogBySlugConfig, d as ChangePasswordConfig, e as CmsApiHandlerConfig, f as CmsGetter, g as CrudHandlerOptions, D as DashboardStatsConfig, F as ForgotPasswordConfig, h as FormBySlugConfig, G as GetPublicSettingsGroupConfig, i as GetPublicSettingsGroupDataSource, I as InviteAcceptConfig, j as SetPasswordConfig, k as SettingsApiConfig, l as SocialLinkItem, m as StorefrontApiConfig, n as StorefrontOtpFlags, U as UploadHandlerConfig, o as UserAuthApiConfig, p as UserAvatarConfig, q as UserProfileConfig, r as UsersApiConfig, s as createAnalyticsHandlers, t as createBlogBySlugHandler, u as createChangePasswordHandler, v as createCmsApiHandler, w as createCrudByIdHandler, x as createCrudHandler, y as createDashboardStatsHandler, z as createForgotPasswordHandler, H as createFormBySlugHandler, J as createInviteAcceptHandler, K as createSetPasswordHandler, L as createSettingsApiHandlers, M as createStorefrontApiHandler, N as createUploadHandler, P as createUserAuthApiRouter, Q as createUserAvatarHandler, R as createUserProfileHandler, V as createUsersApiHandlers, W as getCompanyDetailsFromSettings, X as getPublicSettingsGroup, Y as mergeEmailLayoutCompanyDetails } from './index-CjBf9dAb.js';
1
+ import { C as CompanyDetails, T as TemplateContext, E as EmailTemplateResult, a as EmailTemplateName, O as OrderPlacedLineItem, S as StorageService, b as EntityMap$1 } from './index-BiagwMjV.js';
2
+ export { A as AnalyticsHandlerConfig, c as AuthHandlersConfig, B as BlogBySlugConfig, d as ChangePasswordConfig, e as CmsApiHandlerConfig, f as CmsGetter, g as CrudHandlerOptions, D as DashboardStatsConfig, F as ForgotPasswordConfig, h as FormBySlugConfig, G as GetPublicSettingsGroupConfig, i as GetPublicSettingsGroupDataSource, I as InviteAcceptConfig, j as SetPasswordConfig, k as SettingsApiConfig, l as SocialLinkItem, m as StorefrontApiConfig, n as StorefrontOtpFlags, U as UploadHandlerConfig, o as UserAuthApiConfig, p as UserAvatarConfig, q as UserProfileConfig, r as UsersApiConfig, s as createAnalyticsHandlers, t as createBlogBySlugHandler, u as createChangePasswordHandler, v as createCmsApiHandler, w as createCrudByIdHandler, x as createCrudHandler, y as createDashboardStatsHandler, z as createForgotPasswordHandler, H as createFormBySlugHandler, J as createInviteAcceptHandler, K as createSetPasswordHandler, L as createSettingsApiHandlers, M as createStorefrontApiHandler, N as createUploadHandler, P as createUserAuthApiRouter, Q as createUserAvatarHandler, R as createUserProfileHandler, V as createUsersApiHandlers, W as getCompanyDetailsFromSettings, X as getPublicSettingsGroup, Y as mergeEmailLayoutCompanyDetails } from './index-BiagwMjV.js';
3
3
  import { ClassValue } from 'clsx';
4
4
  import * as typeorm from 'typeorm';
5
5
  import { DataSource, EntityTarget, ObjectLiteral } from 'typeorm';
@@ -159,7 +159,7 @@ type ErpPaidOrderDataSource = {
159
159
  type ErpPaidOrderEntityMap = Record<string, unknown>;
160
160
  /**
161
161
  * Enqueues ERP `order.created` only when the order has at least one **completed** payment.
162
- * Include `payments` in the payload per §6 (minor units for typical 2-decimal currencies).
162
+ * Include `payments` in the payload.
163
163
  */
164
164
  declare function queueErpPaidOrderForOrderId(cms: CmsAppLike$2, dataSource: ErpPaidOrderDataSource, entityMap: ErpPaidOrderEntityMap, orderId: number): Promise<void>;
165
165
 
@@ -296,6 +296,8 @@ declare function queueEmail(cms: CmsAppLike$1, payload: EmailJobPayload): Promis
296
296
  interface OrderPlacedEmailPayload {
297
297
  orderNumber: string;
298
298
  total?: string | number;
299
+ subtotal?: string | number;
300
+ tax?: string | number;
299
301
  currency?: string;
300
302
  customerName?: string;
301
303
  /** Customer receipt; omitted if empty */
@@ -304,6 +306,8 @@ interface OrderPlacedEmailPayload {
304
306
  salesTeamEmails: string[];
305
307
  companyDetails: CompanyDetails;
306
308
  lineItems: OrderPlacedLineItem[];
309
+ billingAddress?: Record<string, string>;
310
+ shippingAddress?: Record<string, string>;
307
311
  }
308
312
  /** Queues one `orderPlaced` email per recipient (customer + each unique sales address; skips sales if same as customer). */
309
313
  declare function queueOrderPlacedEmails(cms: CmsAppLike$1, payload: OrderPlacedEmailPayload): Promise<void>;
@@ -1052,6 +1056,9 @@ declare class Product {
1052
1056
  categoryId: number | null;
1053
1057
  sku: string | null;
1054
1058
  hsn: string | null;
1059
+ /** Unit of measure, e.g. pcs, kg, hrs */
1060
+ uom: string | null;
1061
+ type: 'product' | 'service';
1055
1062
  slug: string | null;
1056
1063
  name: string | null;
1057
1064
  price: number;
@@ -1084,6 +1091,13 @@ declare class OrderItem {
1084
1091
  unitPrice: number;
1085
1092
  tax: number;
1086
1093
  total: number;
1094
+ /** Snapshot at order time */
1095
+ hsn: string | null;
1096
+ uom: string | null;
1097
+ productType: string | null;
1098
+ taxRate: number | null;
1099
+ /** Tax slug snapshot (from taxes.slug) */
1100
+ taxCode: string | null;
1087
1101
  metadata: Record<string, unknown> | null;
1088
1102
  createdAt: Date;
1089
1103
  updatedAt: Date;