@fas-core/shared-types 1.0.53 → 1.0.74
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.mts +216 -51
- package/dist/index.d.ts +216 -51
- package/dist/index.js +134 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +134 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +40 -40
package/dist/index.d.mts
CHANGED
|
@@ -62,15 +62,26 @@ interface IPrice {
|
|
|
62
62
|
}
|
|
63
63
|
interface ILinePricing {
|
|
64
64
|
quantity: number;
|
|
65
|
+
baseUnitPrice?: number;
|
|
65
66
|
unitPrice: number;
|
|
66
67
|
totalAmount: number;
|
|
67
68
|
currencyCode: string;
|
|
68
69
|
}
|
|
70
|
+
interface IAppliedFee {
|
|
71
|
+
name: string;
|
|
72
|
+
amount: number;
|
|
73
|
+
description?: string;
|
|
74
|
+
pricingType?: "PERCENTAGE" | "FIXED";
|
|
75
|
+
value?: number;
|
|
76
|
+
appliesTo?: "SUBTOTAL" | "TOTAL";
|
|
77
|
+
}
|
|
69
78
|
interface ISummaryPricing {
|
|
70
79
|
subTotalAmount: number;
|
|
71
80
|
discountAmount: number;
|
|
72
81
|
taxAmount: number;
|
|
73
82
|
shippingAmount: number;
|
|
83
|
+
feesAmount?: number;
|
|
84
|
+
appliedFees?: IAppliedFee[];
|
|
74
85
|
totalAmount: number;
|
|
75
86
|
currencyCode: string;
|
|
76
87
|
}
|
|
@@ -133,6 +144,7 @@ interface IStore extends BaseEntity {
|
|
|
133
144
|
slug: string;
|
|
134
145
|
domain: string;
|
|
135
146
|
isPrimarySite: boolean;
|
|
147
|
+
parent?: IStore | string | null;
|
|
136
148
|
currencies: ICurrency[];
|
|
137
149
|
defaultCurrency: ICurrency;
|
|
138
150
|
settings: IStoreSettings;
|
|
@@ -178,7 +190,8 @@ interface ICategory extends BaseEntity {
|
|
|
178
190
|
slug: string;
|
|
179
191
|
description: string;
|
|
180
192
|
parent: ICategory;
|
|
181
|
-
|
|
193
|
+
stores: (IStore | string)[];
|
|
194
|
+
childOnly?: boolean;
|
|
182
195
|
image: string;
|
|
183
196
|
sortOrder: number;
|
|
184
197
|
status: boolean;
|
|
@@ -192,7 +205,7 @@ interface IStock extends BaseEntity {
|
|
|
192
205
|
sku: string;
|
|
193
206
|
product: IProduct;
|
|
194
207
|
variant?: IVariant | null;
|
|
195
|
-
store
|
|
208
|
+
store?: IStore | string | null;
|
|
196
209
|
quantity: number;
|
|
197
210
|
reserved: number;
|
|
198
211
|
available: number;
|
|
@@ -200,11 +213,8 @@ interface IStock extends BaseEntity {
|
|
|
200
213
|
lowStockThreshold: number;
|
|
201
214
|
}
|
|
202
215
|
|
|
203
|
-
/** Out-of-stock selling policy for a product/variant. */
|
|
204
216
|
declare const InventoryPolicyEnum: {
|
|
205
|
-
/** Hard-stop at available stock (no oversell). */
|
|
206
217
|
readonly DENY: "deny";
|
|
207
|
-
/** Allow backorder / oversell past available stock. */
|
|
208
218
|
readonly CONTINUE: "continue";
|
|
209
219
|
};
|
|
210
220
|
type InventoryPolicy = (typeof InventoryPolicyEnum)[keyof typeof InventoryPolicyEnum];
|
|
@@ -217,7 +227,8 @@ interface IProductVariantFields {
|
|
|
217
227
|
quantity: number;
|
|
218
228
|
inventoryPolicy: InventoryPolicy;
|
|
219
229
|
brand: IBrand;
|
|
220
|
-
|
|
230
|
+
stores: (IStore | string)[];
|
|
231
|
+
childOnly?: boolean;
|
|
221
232
|
stock: IStock;
|
|
222
233
|
category: ICategory;
|
|
223
234
|
categories: ICategory[];
|
|
@@ -284,21 +295,16 @@ interface IVariant extends BaseEntity, IProductVariantFields {
|
|
|
284
295
|
variantOptionMode?: VariantOptionMode;
|
|
285
296
|
}
|
|
286
297
|
|
|
287
|
-
/**
|
|
288
|
-
* A globally-defined relation group: named buckets that products assign SKUs
|
|
289
|
-
* into. `addable` distinguishes groups whose items can be added to the order
|
|
290
|
-
* (Accessories, Tool Kits, Parts) from display-only cross-sell (Similar Products).
|
|
291
|
-
*/
|
|
292
298
|
interface IRelationGroup extends BaseEntity {
|
|
293
299
|
name: string;
|
|
294
300
|
key: string;
|
|
295
301
|
description: string;
|
|
302
|
+
stores: (IStore | string)[];
|
|
296
303
|
addable: boolean;
|
|
297
304
|
sortOrder: number;
|
|
298
305
|
isVisible: boolean;
|
|
299
306
|
status: boolean;
|
|
300
307
|
}
|
|
301
|
-
/** Per-product assignment of SKUs into a relation group (referenced by group key). */
|
|
302
308
|
interface IProductRelationGroup {
|
|
303
309
|
group: string;
|
|
304
310
|
skus: string[];
|
|
@@ -347,10 +353,20 @@ declare const PaymentMethodEnum: {
|
|
|
347
353
|
readonly STRIPE: "STRIPE";
|
|
348
354
|
readonly CHECK: "CHECK";
|
|
349
355
|
readonly APPLE_PAY: "APPLE_PAY";
|
|
356
|
+
readonly PURCHASE_ORDER: "PURCHASE_ORDER";
|
|
350
357
|
};
|
|
351
358
|
type PaymentMethodEnum = (typeof PaymentMethodEnum)[keyof typeof PaymentMethodEnum];
|
|
352
|
-
declare const PAYMENT_METHOD_VALUES: ("CREDIT_CARD" | "PAYPAL" | "STRIPE" | "CHECK" | "APPLE_PAY")[];
|
|
359
|
+
declare const PAYMENT_METHOD_VALUES: ("CREDIT_CARD" | "PAYPAL" | "STRIPE" | "CHECK" | "APPLE_PAY" | "PURCHASE_ORDER")[];
|
|
353
360
|
declare const paymentMethodColorMap: Record<PaymentMethodEnum, string>;
|
|
361
|
+
declare const PaymentGatewayEnum: {
|
|
362
|
+
readonly STRIPE: "STRIPE";
|
|
363
|
+
readonly PAYPAL: "PAYPAL";
|
|
364
|
+
readonly BRAINTREE: "BRAINTREE";
|
|
365
|
+
readonly MANUAL: "MANUAL";
|
|
366
|
+
};
|
|
367
|
+
type PaymentGatewayEnum = (typeof PaymentGatewayEnum)[keyof typeof PaymentGatewayEnum];
|
|
368
|
+
declare const PAYMENT_GATEWAY_VALUES: ("MANUAL" | "PAYPAL" | "STRIPE" | "BRAINTREE")[];
|
|
369
|
+
declare const paymentGatewayColorMap: Record<PaymentGatewayEnum, string>;
|
|
354
370
|
declare const TransactionTypeEnum: {
|
|
355
371
|
readonly ORDER: "ORDER";
|
|
356
372
|
readonly REFUND: "REFUND";
|
|
@@ -365,6 +381,7 @@ interface ITransactionBase extends BaseEntity {
|
|
|
365
381
|
amount: number;
|
|
366
382
|
status: PaymentStatusEnum;
|
|
367
383
|
paymentMethod: PaymentMethodEnum;
|
|
384
|
+
gateway?: PaymentGatewayEnum;
|
|
368
385
|
gatewayId?: string;
|
|
369
386
|
metaData?: Metadata;
|
|
370
387
|
comment?: string;
|
|
@@ -407,6 +424,12 @@ interface IOrder extends BaseEntity {
|
|
|
407
424
|
status: OrderStatusEnum;
|
|
408
425
|
paymentStatus: PaymentStatusEnum;
|
|
409
426
|
paymentMethod: PaymentMethodEnum;
|
|
427
|
+
paymentGateway?: PaymentGatewayEnum;
|
|
428
|
+
shippingAddress: IAddress;
|
|
429
|
+
billingAddress: IAddress;
|
|
430
|
+
shippingMethod?: string;
|
|
431
|
+
acceptedTermsAt?: Date;
|
|
432
|
+
customerNote?: string;
|
|
410
433
|
metaData: Metadata;
|
|
411
434
|
orderTransactions: IOrderTransaction[];
|
|
412
435
|
refundTransactions: IRefundTransaction[];
|
|
@@ -536,11 +559,17 @@ interface IProductTechnicalSpecTable extends BaseEntity {
|
|
|
536
559
|
status: boolean;
|
|
537
560
|
}
|
|
538
561
|
|
|
539
|
-
|
|
562
|
+
declare const PricingTypeEnum: {
|
|
563
|
+
readonly PERCENTAGE: "PERCENTAGE";
|
|
564
|
+
readonly FIXED: "FIXED";
|
|
565
|
+
};
|
|
566
|
+
type PricingType = (typeof PricingTypeEnum)[keyof typeof PricingTypeEnum];
|
|
567
|
+
declare const PRICING_TYPE_VALUES: ("PERCENTAGE" | "FIXED")[];
|
|
540
568
|
interface IAddonConfig extends BaseEntity {
|
|
541
569
|
name: string;
|
|
542
570
|
key: string;
|
|
543
571
|
description: string;
|
|
572
|
+
stores: (IStore | string)[];
|
|
544
573
|
price: number;
|
|
545
574
|
pricingType: PricingType;
|
|
546
575
|
quantity: number;
|
|
@@ -559,74 +588,141 @@ interface IAddonGroup extends BaseEntity {
|
|
|
559
588
|
status: boolean;
|
|
560
589
|
}
|
|
561
590
|
|
|
591
|
+
declare const FeeAppliesToEnum: {
|
|
592
|
+
readonly SUBTOTAL: "SUBTOTAL";
|
|
593
|
+
readonly TOTAL: "TOTAL";
|
|
594
|
+
};
|
|
595
|
+
type FeeAppliesToEnum = (typeof FeeAppliesToEnum)[keyof typeof FeeAppliesToEnum];
|
|
596
|
+
declare const FEE_APPLIES_TO_VALUES: ("SUBTOTAL" | "TOTAL")[];
|
|
597
|
+
interface IStoreFee extends BaseEntity {
|
|
598
|
+
stores: (IStore | string)[];
|
|
599
|
+
name: string;
|
|
600
|
+
key: string;
|
|
601
|
+
description?: string;
|
|
602
|
+
pricingType: PricingType;
|
|
603
|
+
value: number;
|
|
604
|
+
appliesTo: FeeAppliesToEnum;
|
|
605
|
+
enabled: boolean;
|
|
606
|
+
isVisible: boolean;
|
|
607
|
+
sortOrder: number;
|
|
608
|
+
status: boolean;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
declare const EmailTemplateEventEnum: {
|
|
612
|
+
readonly ORDER_RECEIVED: "ORDER_RECEIVED";
|
|
613
|
+
readonly ORDER_CANCELLED: "ORDER_CANCELLED";
|
|
614
|
+
readonly WELCOME: "WELCOME";
|
|
615
|
+
readonly PASSWORD_RESET: "PASSWORD_RESET";
|
|
616
|
+
readonly QUOTE: "QUOTE";
|
|
617
|
+
readonly INVOICE: "INVOICE";
|
|
618
|
+
readonly PROMOTIONAL: "PROMOTIONAL";
|
|
619
|
+
readonly CONTACT_US: "CONTACT_US";
|
|
620
|
+
readonly NOTIFICATION: "NOTIFICATION";
|
|
621
|
+
};
|
|
622
|
+
type EmailTemplateEventEnum = (typeof EmailTemplateEventEnum)[keyof typeof EmailTemplateEventEnum];
|
|
623
|
+
declare const EMAIL_TEMPLATE_EVENT_VALUES: ("ORDER_RECEIVED" | "ORDER_CANCELLED" | "WELCOME" | "PASSWORD_RESET" | "QUOTE" | "INVOICE" | "PROMOTIONAL" | "CONTACT_US" | "NOTIFICATION")[];
|
|
624
|
+
interface IEmailTemplate extends BaseEntity {
|
|
625
|
+
stores: (IStore | string)[];
|
|
626
|
+
name: string;
|
|
627
|
+
key: string;
|
|
628
|
+
event: EmailTemplateEventEnum;
|
|
629
|
+
subject: string;
|
|
630
|
+
headerHtml: string;
|
|
631
|
+
bodyHtml: string;
|
|
632
|
+
footerHtml: string;
|
|
633
|
+
variables: string[];
|
|
634
|
+
isVisible: boolean;
|
|
635
|
+
status: boolean;
|
|
636
|
+
}
|
|
637
|
+
|
|
562
638
|
type RedirectTargetType = "product" | "variant" | "category" | "url";
|
|
563
|
-
|
|
639
|
+
interface IRedirectSuggestion {
|
|
640
|
+
targetType: RedirectTargetType;
|
|
641
|
+
targetRef?: string | null;
|
|
642
|
+
targetUrl?: string | null;
|
|
643
|
+
slug?: string;
|
|
644
|
+
name?: string;
|
|
645
|
+
score: number;
|
|
646
|
+
}
|
|
564
647
|
interface IRedirect extends BaseEntity {
|
|
565
648
|
fromPath: string;
|
|
566
649
|
targetType: RedirectTargetType;
|
|
567
|
-
/** Catalog reference id when targetType is product/variant/category. */
|
|
568
650
|
targetRef?: string | null;
|
|
569
|
-
/** Raw destination path/URL when targetType is "url". */
|
|
570
651
|
targetUrl?: string | null;
|
|
652
|
+
stores: (IStore | string)[];
|
|
571
653
|
statusCode: number;
|
|
572
|
-
/** Append the incoming query string to the destination. */
|
|
573
654
|
preserveQuery: boolean;
|
|
574
655
|
status: boolean;
|
|
575
656
|
hits: number;
|
|
576
657
|
lastHitAt?: Date | null;
|
|
577
658
|
}
|
|
578
|
-
/** A captured 404 (unmatched path) surfaced in admin to find missing redirects. */
|
|
579
659
|
interface IUnmatched404 extends BaseEntity {
|
|
580
660
|
path: string;
|
|
581
661
|
count: number;
|
|
582
662
|
lastSeenAt: Date;
|
|
583
663
|
referrer?: string | null;
|
|
584
664
|
resolved: boolean;
|
|
665
|
+
stores?: (IStore | string)[];
|
|
666
|
+
suggestions?: IRedirectSuggestion[];
|
|
585
667
|
}
|
|
586
668
|
|
|
587
|
-
/**
|
|
588
|
-
* Normalizes a URL or path into a canonical, lookup-stable path so old-site URLs
|
|
589
|
-
* match reliably regardless of how they were entered (full URL, casing, trailing
|
|
590
|
-
* slash, query/hash, encoding). Shared by the backend (storing `fromPath`) and
|
|
591
|
-
* the storefront proxy (matching incoming paths) so the two can never drift.
|
|
592
|
-
*
|
|
593
|
-
* Examples:
|
|
594
|
-
* "https://old.com/Shop/Item/?x=1#a" -> "/shop/item"
|
|
595
|
-
* "Foo//Bar/" -> "/foo/bar"
|
|
596
|
-
* "" -> "/"
|
|
597
|
-
*/
|
|
598
669
|
declare const normalizePath: (input: string) => string;
|
|
599
670
|
|
|
600
|
-
/**
|
|
601
|
-
* Canonical cart pricing primitives, shared by the backend (authoritative —
|
|
602
|
-
* what the customer is charged) and the storefront configurator (live preview)
|
|
603
|
-
* so the two engines can never drift by a cent. Pure functions, no IO.
|
|
604
|
-
*
|
|
605
|
-
* Money is rounded to 2 decimals with a `Number.EPSILON` nudge so exact
|
|
606
|
-
* half-cent boundaries (e.g. 1.005) round half-up consistently across engines.
|
|
607
|
-
*/
|
|
608
|
-
/** Rounds a monetary amount to 2 decimals (half-up, float-noise-safe). */
|
|
609
671
|
declare const roundMoney: (amount: number) => number;
|
|
610
|
-
|
|
672
|
+
declare const formatMoney: (value: number, currencyCode?: string) => string;
|
|
611
673
|
declare const normalizeLineQuantity: (quantity: number) => number;
|
|
612
|
-
/** A single add-on priced against a base unit (selection resolved to its values). */
|
|
613
674
|
interface AddonAmountInput {
|
|
614
675
|
price: number;
|
|
615
676
|
pricingType: PricingType;
|
|
616
677
|
quantity: number;
|
|
617
678
|
}
|
|
618
|
-
/**
|
|
619
|
-
* One add-on's per-(base-)unit contribution, **rounded to a cent**: a FIXED
|
|
620
|
-
* add-on contributes its price; a PERCENTAGE add-on contributes that percent of
|
|
621
|
-
* the base unit price — each times the add-on's own quantity.
|
|
622
|
-
*
|
|
623
|
-
* Per-add-on rounding is the canon (not rounding the summed total once), so each
|
|
624
|
-
* add-on's displayed price is exactly what it adds to the line.
|
|
625
|
-
*/
|
|
626
679
|
declare const addonUnitAmount: (addon: AddonAmountInput, baseUnitPrice: number) => number;
|
|
627
|
-
/** Total add-on contribution per base unit: per-add-on rounding, then summed. */
|
|
628
680
|
declare const addonsUnitAmount: (addons: AddonAmountInput[], baseUnitPrice: number) => number;
|
|
629
681
|
|
|
682
|
+
declare const OrderLogTypeEnum: {
|
|
683
|
+
readonly ORDER_PLACED: "ORDER_PLACED";
|
|
684
|
+
readonly PAYMENT_PENDING: "PAYMENT_PENDING";
|
|
685
|
+
readonly PAYMENT_SUCCEEDED: "PAYMENT_SUCCEEDED";
|
|
686
|
+
readonly PAYMENT_FAILED: "PAYMENT_FAILED";
|
|
687
|
+
readonly PAYMENT_CANCELLED: "PAYMENT_CANCELLED";
|
|
688
|
+
readonly ORDER_STATUS: "ORDER_STATUS";
|
|
689
|
+
readonly REFUND: "REFUND";
|
|
690
|
+
readonly EMAIL: "EMAIL";
|
|
691
|
+
readonly NOTE: "NOTE";
|
|
692
|
+
};
|
|
693
|
+
type OrderLogTypeEnum = (typeof OrderLogTypeEnum)[keyof typeof OrderLogTypeEnum];
|
|
694
|
+
declare const ORDER_LOG_TYPE_VALUES: ("REFUND" | "ORDER_PLACED" | "PAYMENT_PENDING" | "PAYMENT_SUCCEEDED" | "PAYMENT_FAILED" | "PAYMENT_CANCELLED" | "ORDER_STATUS" | "EMAIL" | "NOTE")[];
|
|
695
|
+
declare const orderLogTypeColorMap: Record<OrderLogTypeEnum, string>;
|
|
696
|
+
interface IOrderLog extends BaseEntity {
|
|
697
|
+
order: IOrder | string;
|
|
698
|
+
type: OrderLogTypeEnum;
|
|
699
|
+
message: string;
|
|
700
|
+
actor?: string;
|
|
701
|
+
meta?: Metadata;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
declare const PaymentLinkStatusEnum: {
|
|
705
|
+
readonly PENDING: "PENDING";
|
|
706
|
+
readonly PAID: "PAID";
|
|
707
|
+
readonly EXPIRED: "EXPIRED";
|
|
708
|
+
readonly CANCELLED: "CANCELLED";
|
|
709
|
+
};
|
|
710
|
+
type PaymentLinkStatusEnum = (typeof PaymentLinkStatusEnum)[keyof typeof PaymentLinkStatusEnum];
|
|
711
|
+
declare const PAYMENT_LINK_STATUS_VALUES: ("PENDING" | "CANCELLED" | "PAID" | "EXPIRED")[];
|
|
712
|
+
declare const paymentLinkStatusColorMap: Record<PaymentLinkStatusEnum, string>;
|
|
713
|
+
interface IPaymentLink extends BaseEntity {
|
|
714
|
+
order: IOrder | string;
|
|
715
|
+
token: string;
|
|
716
|
+
amount: number;
|
|
717
|
+
currencyCode: string;
|
|
718
|
+
gateway: PaymentGatewayEnum;
|
|
719
|
+
status: PaymentLinkStatusEnum;
|
|
720
|
+
expiresAt?: string | Date;
|
|
721
|
+
paidAt?: string | Date;
|
|
722
|
+
transaction?: string;
|
|
723
|
+
createdBy?: string;
|
|
724
|
+
}
|
|
725
|
+
|
|
630
726
|
interface ICartItem extends BaseEntity {
|
|
631
727
|
cart: ICart;
|
|
632
728
|
product: IProduct;
|
|
@@ -645,4 +741,73 @@ interface ICart extends BaseEntity {
|
|
|
645
741
|
pricing: ISummaryPricing;
|
|
646
742
|
}
|
|
647
743
|
|
|
648
|
-
|
|
744
|
+
interface CheckoutAddressInput {
|
|
745
|
+
addressLine1: string;
|
|
746
|
+
addressLine2?: string;
|
|
747
|
+
city: string;
|
|
748
|
+
zipCode: string;
|
|
749
|
+
firstName: string;
|
|
750
|
+
lastName: string;
|
|
751
|
+
email: string;
|
|
752
|
+
phoneNumber: string;
|
|
753
|
+
state?: string;
|
|
754
|
+
country?: string;
|
|
755
|
+
}
|
|
756
|
+
interface CheckoutPayload {
|
|
757
|
+
store: string;
|
|
758
|
+
email: string;
|
|
759
|
+
shippingAddress: CheckoutAddressInput;
|
|
760
|
+
useSameAddress: boolean;
|
|
761
|
+
billingAddress?: CheckoutAddressInput;
|
|
762
|
+
paymentMethod: PaymentMethodEnum;
|
|
763
|
+
paymentGateway: PaymentGatewayEnum;
|
|
764
|
+
shippingMethod?: string;
|
|
765
|
+
acceptedTerms: boolean;
|
|
766
|
+
customerNote?: string;
|
|
767
|
+
}
|
|
768
|
+
interface CheckoutResult {
|
|
769
|
+
order: IOrder;
|
|
770
|
+
redirectUrl?: string;
|
|
771
|
+
clientToken?: string;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
declare const ProductEventTypeEnum: {
|
|
775
|
+
readonly VIEW: "view";
|
|
776
|
+
readonly ADD_TO_CART: "add_to_cart";
|
|
777
|
+
readonly PURCHASE: "purchase";
|
|
778
|
+
};
|
|
779
|
+
type ProductEventTypeEnum = (typeof ProductEventTypeEnum)[keyof typeof ProductEventTypeEnum];
|
|
780
|
+
declare const PRODUCT_EVENT_TYPE_VALUES: ("view" | "add_to_cart" | "purchase")[];
|
|
781
|
+
interface IProductDailyStat extends BaseEntity {
|
|
782
|
+
product: IProduct | string;
|
|
783
|
+
store?: IStore | string | null;
|
|
784
|
+
date: string;
|
|
785
|
+
views: number;
|
|
786
|
+
addToCarts: number;
|
|
787
|
+
purchases: number;
|
|
788
|
+
revenue: number;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
declare const NotificationTypeEnum: {
|
|
792
|
+
readonly ORDER_RECEIVED: "ORDER_RECEIVED";
|
|
793
|
+
readonly PAYMENT_SUCCEEDED: "PAYMENT_SUCCEEDED";
|
|
794
|
+
readonly PAYMENT_FAILED: "PAYMENT_FAILED";
|
|
795
|
+
readonly REFUND: "REFUND";
|
|
796
|
+
readonly ORDER_CANCELLED: "ORDER_CANCELLED";
|
|
797
|
+
readonly ORDER_STATUS: "ORDER_STATUS";
|
|
798
|
+
};
|
|
799
|
+
type NotificationTypeEnum = (typeof NotificationTypeEnum)[keyof typeof NotificationTypeEnum];
|
|
800
|
+
declare const NOTIFICATION_TYPE_VALUES: ("REFUND" | "ORDER_RECEIVED" | "ORDER_CANCELLED" | "PAYMENT_SUCCEEDED" | "PAYMENT_FAILED" | "ORDER_STATUS")[];
|
|
801
|
+
declare const notificationTypeColorMap: Record<NotificationTypeEnum, string>;
|
|
802
|
+
interface INotification extends BaseEntity {
|
|
803
|
+
type: NotificationTypeEnum;
|
|
804
|
+
title: string;
|
|
805
|
+
message: string;
|
|
806
|
+
order?: IOrder | string | null;
|
|
807
|
+
store?: IStore | string | null;
|
|
808
|
+
read: boolean;
|
|
809
|
+
readAt?: Date | null;
|
|
810
|
+
meta?: Metadata;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
export { ADMIN_ROLES, type AddonAmountInput, type ApiResponse, type BaseEntity, type CheckoutAddressInput, type CheckoutPayload, type CheckoutResult, DiscountTypeEnum, EMAIL_TEMPLATE_EVENT_VALUES, EmailTemplateEventEnum, FEE_APPLIES_TO_VALUES, FeeAppliesToEnum, type IAddonConfig, type IAddonGroup, type IAddress, type IAdmin, type IAdminCreate, type IAdminRoleType, type IAdminSafe, type IAdminUpdate, type IAppliedFee, type IBrand, type ICart, type ICartItem, type ICategory, type ICompliance, type IContact, type IContent, type ICountry, type ICoupon, type ICurrency, type ICustomer, type IDiscountType, type IDocumentation, type IEmailTemplate, type IKeyValue, type ILinePricing, type IMediaAsset, INVENTORY_POLICY_VALUES, type INotification, type IOrder, type IOrderItem, type IOrderLog, type IOrderTransaction, type IPaymentLink, type IPrice, type IProduct, type IProductDailyStat, type IProductOptionGroup, type IProductOptionValue, type IProductRelationGroup, type IProductTechnicalSpec, type IProductTechnicalSpecTable, type IProductVariantFields, type IProductVariantOptionGroup, type IProductVariantOptionMatrix, type IProductVariantOptionValue, type IRedirect, type IRedirectSuggestion, type IRefundTransaction, type IRelationGroup, type ISEOMetaData, type IShipping, type IState, type IStock, type IStore, type IStoreFee, type IStoreSettings, type ISummaryPricing, type ITechSpec, type ITechnicalSpecColumn, type ITechnicalSpecGroup, type ITransactionBase, type IUnmatched404, type IVariant, type IVariantOptionSelection, type InventoryPolicy, InventoryPolicyEnum, type Metadata, NOTIFICATION_TYPE_VALUES, NotificationTypeEnum, ORDER_LOG_TYPE_VALUES, ORDER_STATUS_VALUES, OrderLogTypeEnum, OrderStatusEnum, PAYMENT_GATEWAY_VALUES, PAYMENT_LINK_STATUS_VALUES, PAYMENT_METHOD_VALUES, PAYMENT_STATUS_VALUES, PRICING_TYPE_VALUES, PRODUCT_EVENT_TYPE_VALUES, type Paginated, PaymentGatewayEnum, PaymentLinkStatusEnum, PaymentMethodEnum, PaymentStatusEnum, type PricingType, PricingTypeEnum, ProductEventTypeEnum, type ProductVariantType, type RedirectTargetType, type SoftDeleteFilter, type StockStatus, TRANSACTION_TYPE_VALUES, TransactionTypeEnum, type VariantOptionMode, addonUnitAmount, addonsUnitAmount, formatMoney, normalizeLineQuantity, normalizePath, notificationTypeColorMap, orderLogTypeColorMap, paymentGatewayColorMap, paymentLinkStatusColorMap, paymentMethodColorMap, paymentStatusColorMap, roundMoney, statusColors, typeColorMap };
|