@fas-core/shared-types 1.0.103 → 1.0.106

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 CHANGED
@@ -391,8 +391,6 @@ interface IAddonConfig extends BaseEntity {
391
391
  quantity: number;
392
392
  sortOrder: number;
393
393
  applyToAll: boolean;
394
- appliesFromPrice?: number;
395
- appliesToPrice?: number;
396
394
  isDefault: boolean;
397
395
  isVisible: boolean;
398
396
  status: boolean;
@@ -418,6 +416,14 @@ interface AddonNetsuiteLink {
418
416
  itemName?: string;
419
417
  syncedAt?: Date | string;
420
418
  }
419
+ interface AddonSnapshot {
420
+ groupKey: string;
421
+ addonKey: string;
422
+ name: string;
423
+ price: number;
424
+ pricingType: PricingType;
425
+ quantity: number;
426
+ }
421
427
 
422
428
  interface ProductAddonScope {
423
429
  storeId?: string;
@@ -497,6 +503,13 @@ interface OfferedAddonGroup {
497
503
  name: string;
498
504
  addons: OfferedAddon[];
499
505
  }
506
+ interface OfferedServicePlan {
507
+ planKey: string;
508
+ name: string;
509
+ description: string;
510
+ longDescription: string;
511
+ price: number;
512
+ }
500
513
  declare const CartStatusEnum: {
501
514
  readonly ACTIVE: "ACTIVE";
502
515
  readonly CONVERTED: "CONVERTED";
@@ -684,13 +697,14 @@ declare const OrderStatusEnum: {
684
697
  readonly PARTIALLY_REFUNDED: "PARTIALLY_REFUNDED";
685
698
  readonly QUOTE_REQUESTED: "QUOTE_REQUESTED";
686
699
  readonly QUOTE_OPEN: "QUOTE_OPEN";
700
+ readonly QUOTE_APPROVED: "QUOTE_APPROVED";
687
701
  readonly QUOTE_PROCESSED: "QUOTE_PROCESSED";
688
702
  readonly QUOTE_CLOSED: "QUOTE_CLOSED";
689
703
  readonly QUOTE_VOIDED: "QUOTE_VOIDED";
690
704
  readonly QUOTE_EXPIRED: "QUOTE_EXPIRED";
691
705
  };
692
706
  type OrderStatusEnum = (typeof OrderStatusEnum)[keyof typeof OrderStatusEnum];
693
- declare const ORDER_STATUS_VALUES: ("CANCELLED" | "REFUNDED" | "PARTIALLY_REFUNDED" | "CREATED" | "PAYMENT_FAILED" | "PENDING_APPROVAL" | "PENDING_FULFILLMENT" | "PARTIALLY_FULFILLED" | "PENDING_BILLING" | "BILLED" | "CLOSED" | "PENDING_RECEIPT" | "PENDING_REFUND" | "QUOTE_REQUESTED" | "QUOTE_OPEN" | "QUOTE_PROCESSED" | "QUOTE_CLOSED" | "QUOTE_VOIDED" | "QUOTE_EXPIRED")[];
707
+ declare const ORDER_STATUS_VALUES: ("CANCELLED" | "REFUNDED" | "PARTIALLY_REFUNDED" | "CREATED" | "PAYMENT_FAILED" | "PENDING_APPROVAL" | "PENDING_FULFILLMENT" | "PARTIALLY_FULFILLED" | "PENDING_BILLING" | "BILLED" | "CLOSED" | "PENDING_RECEIPT" | "PENDING_REFUND" | "QUOTE_REQUESTED" | "QUOTE_OPEN" | "QUOTE_APPROVED" | "QUOTE_PROCESSED" | "QUOTE_CLOSED" | "QUOTE_VOIDED" | "QUOTE_EXPIRED")[];
694
708
  declare const statusColors: Record<OrderStatusEnum, string>;
695
709
  declare const PURCHASE_ORDER_STATUSES: OrderStatusEnum[];
696
710
  declare const OPEN_ORDER_STATUSES: OrderStatusEnum[];
@@ -806,6 +820,10 @@ declare const ADMIN_RESOURCE_LIST: readonly [{
806
820
  readonly value: "addon-configs";
807
821
  readonly label: "Addon Configs";
808
822
  readonly group: "Catalog";
823
+ }, {
824
+ readonly value: "service-plans";
825
+ readonly label: "Service Plans";
826
+ readonly group: "Catalog";
809
827
  }, {
810
828
  readonly value: "relation-groups";
811
829
  readonly label: "Relation Groups";
@@ -903,7 +921,7 @@ declare const ADMIN_RESOURCE_LIST: readonly [{
903
921
  readonly label: "Account";
904
922
  readonly group: "Settings";
905
923
  }];
906
- declare const ADMIN_RESOURCES: ("stores" | "categories" | "podcast" | "blog" | "dashboard" | "metrics" | "products" | "brands" | "technical-specs" | "addon-configs" | "relation-groups" | "configurators" | "orders" | "quotes" | "carts" | "transactions" | "coupons" | "store-fees" | "tax-rates" | "customers" | "contact-us" | "subscribers" | "faqs" | "email-templates" | "notifications" | "campaigns" | "currencies" | "redirects" | "cache" | "admins" | "account")[];
924
+ declare const ADMIN_RESOURCES: ("stores" | "categories" | "podcast" | "blog" | "dashboard" | "metrics" | "products" | "brands" | "technical-specs" | "addon-configs" | "service-plans" | "relation-groups" | "configurators" | "orders" | "quotes" | "carts" | "transactions" | "coupons" | "store-fees" | "tax-rates" | "customers" | "contact-us" | "subscribers" | "faqs" | "email-templates" | "notifications" | "campaigns" | "currencies" | "redirects" | "cache" | "admins" | "account")[];
907
925
  type IAdminResource = (typeof ADMIN_RESOURCE_LIST)[number]['value'];
908
926
  declare const ADMIN_ACTIONS: readonly ["read", "write", "delete"];
909
927
  type IAdminBaseAction = (typeof ADMIN_ACTIONS)[number];
@@ -1005,6 +1023,43 @@ interface IContact extends BaseEntity {
1005
1023
  resolvedAt?: Date;
1006
1024
  }
1007
1025
 
1026
+ declare const SERVICE_PLAN_ELIGIBILITY_FIELD = "custitem520";
1027
+
1028
+ interface IServicePlan extends BaseEntity {
1029
+ key: string;
1030
+ name: string;
1031
+ description: string;
1032
+ longDescription: string;
1033
+ price: number;
1034
+ appliesFromPrice?: number;
1035
+ appliesToPrice?: number;
1036
+ sortOrder: number;
1037
+ isVisible: boolean;
1038
+ status: boolean;
1039
+ stores: IStore[];
1040
+ netsuite?: ServicePlanNetsuiteLink | null;
1041
+ }
1042
+ interface ServicePlanNetsuiteLink {
1043
+ itemId: string;
1044
+ itemName?: string;
1045
+ syncedAt?: Date;
1046
+ }
1047
+ interface ICartServicePlanSnapshot {
1048
+ id: string;
1049
+ key: string;
1050
+ name: string;
1051
+ description: string;
1052
+ price: number;
1053
+ netsuiteItemId?: string;
1054
+ }
1055
+
1056
+ interface ProductServicePlanScope {
1057
+ storeId?: string;
1058
+ productPrice?: number;
1059
+ productFlags?: Record<string, boolean | undefined>;
1060
+ }
1061
+ declare const resolveProductServicePlans: (plans: IServicePlan[], scope?: ProductServicePlanScope, requiresField?: string) => IServicePlan[];
1062
+
1008
1063
  interface ITechnicalSpecColumn extends BaseEntity {
1009
1064
  name: string;
1010
1065
  key: string;
@@ -1113,6 +1168,17 @@ interface IEmailTemplate extends BaseEntity {
1113
1168
  isVisible: boolean;
1114
1169
  status: boolean;
1115
1170
  }
1171
+ declare const EmailParamMismatchKindEnum: {
1172
+ readonly MISSING: "missing";
1173
+ readonly UNDECLARED: "undeclared";
1174
+ readonly UNLISTED: "unlisted";
1175
+ };
1176
+ type EmailParamMismatchKindEnum = (typeof EmailParamMismatchKindEnum)[keyof typeof EmailParamMismatchKindEnum];
1177
+ declare const EMAIL_PARAM_MISMATCH_KIND_VALUES: ("missing" | "undeclared" | "unlisted")[];
1178
+ interface EmailParamMismatch {
1179
+ kind: EmailParamMismatchKindEnum;
1180
+ token: string;
1181
+ }
1116
1182
 
1117
1183
  declare const ConfiguratorSelectModeEnum: {
1118
1184
  readonly SINGLE: "SINGLE";
@@ -1305,6 +1371,12 @@ interface IUnmatched404 extends BaseEntity {
1305
1371
  stores?: (IStore | string)[];
1306
1372
  suggestions?: IRedirectSuggestion[];
1307
1373
  }
1374
+ interface MatchResult {
1375
+ best: IRedirectSuggestion | null;
1376
+ score: number;
1377
+ autoLink: boolean;
1378
+ suggestions: IRedirectSuggestion[];
1379
+ }
1308
1380
 
1309
1381
  declare const normalizePath: (input: string) => string;
1310
1382
  declare const canonicalizeSlug: (input: string) => string;
@@ -1327,6 +1399,13 @@ interface PricedLineLike {
1327
1399
  };
1328
1400
  metaData?: unknown;
1329
1401
  }
1402
+ interface LineChargeInput extends AddonAmountInput {
1403
+ key: string;
1404
+ name: string;
1405
+ kind: "addon" | "servicePlan";
1406
+ netsuiteItemId?: string;
1407
+ }
1408
+ declare const chargesOfLine: (line: PricedLineLike) => LineChargeInput[];
1330
1409
  declare const addonsOfLine: (line: PricedLineLike) => AddonAmountInput[];
1331
1410
  declare const baseUnitPriceOfLine: (line: PricedLineLike) => number | null;
1332
1411
  declare const feeHint: (fee: IAppliedFee) => string;
@@ -2156,7 +2235,7 @@ declare const RELATION_FIELDS: {
2156
2235
  readonly target: "relationGroups.models-available";
2157
2236
  readonly policy: "seed";
2158
2237
  readonly pending: true;
2159
- readonly note: "Populated on 1,365 items. No relation group is seeded for it yet.";
2238
+ readonly note: string;
2160
2239
  };
2161
2240
  };
2162
2241
 
@@ -2528,13 +2607,6 @@ declare const addonFields: NetsuiteFieldProvider<{
2528
2607
  readonly conditional: true;
2529
2608
  readonly note: string;
2530
2609
  };
2531
- readonly priceBand: {
2532
- readonly before: "featureddescription";
2533
- readonly target: "appliesFromPrice / appliesToPrice";
2534
- readonly policy: "always";
2535
- readonly conditional: true;
2536
- readonly note: string;
2537
- };
2538
2610
  readonly eligibilityGate: {
2539
2611
  readonly before: "custitem520";
2540
2612
  readonly target: "AddonGroup.netsuite.requiresField";
@@ -2542,6 +2614,92 @@ declare const addonFields: NetsuiteFieldProvider<{
2542
2614
  readonly note: string;
2543
2615
  };
2544
2616
  }>;
2617
+ declare const servicePlanFields: NetsuiteFieldProvider<{
2618
+ readonly netsuiteItemId: {
2619
+ readonly before: "item.id";
2620
+ readonly target: "netsuite.itemId";
2621
+ readonly policy: "always";
2622
+ readonly conditional: true;
2623
+ readonly note: string;
2624
+ };
2625
+ readonly netsuiteItemName: {
2626
+ readonly before: "item.itemid";
2627
+ readonly target: "netsuite.itemName";
2628
+ readonly policy: "always";
2629
+ readonly conditional: true;
2630
+ readonly note: "A native NetSuite item field, not a SuiteCommerce one, so it survives the cutover.";
2631
+ };
2632
+ readonly key: {
2633
+ readonly before: "urlcomponent";
2634
+ readonly target: "key";
2635
+ readonly policy: "always";
2636
+ readonly identity: true;
2637
+ readonly note: string;
2638
+ readonly caution: "Changing urlcomponent in NetSuite orphans the existing plan and creates a new one.";
2639
+ };
2640
+ readonly name: {
2641
+ readonly before: "storedisplayname";
2642
+ readonly target: "name";
2643
+ readonly policy: "always";
2644
+ readonly conditional: true;
2645
+ readonly note: "A native NetSuite item field, not a SuiteCommerce one, so it survives the cutover.";
2646
+ };
2647
+ readonly webVisible: {
2648
+ readonly before: "isonline";
2649
+ readonly target: "isVisible";
2650
+ readonly policy: "always";
2651
+ readonly conditional: true;
2652
+ readonly note: string;
2653
+ };
2654
+ readonly active: {
2655
+ readonly before: "isinactive";
2656
+ readonly target: "status";
2657
+ readonly policy: "always";
2658
+ readonly conditional: true;
2659
+ readonly note: string;
2660
+ };
2661
+ readonly price: {
2662
+ readonly before: "itemprice at price level 1";
2663
+ readonly target: "price";
2664
+ readonly policy: "always";
2665
+ readonly conditional: true;
2666
+ readonly note: string;
2667
+ };
2668
+ readonly sellingPoints: {
2669
+ readonly before: "salesdescription";
2670
+ readonly target: "description";
2671
+ readonly policy: "always";
2672
+ readonly conditional: true;
2673
+ readonly note: string;
2674
+ };
2675
+ readonly detail: {
2676
+ readonly before: "storedetaileddescription";
2677
+ readonly target: "longDescription";
2678
+ readonly policy: "always";
2679
+ readonly conditional: true;
2680
+ readonly note: string;
2681
+ };
2682
+ readonly bandFrom: {
2683
+ readonly before: "featureddescription";
2684
+ readonly target: "appliesFromPrice";
2685
+ readonly policy: "always";
2686
+ readonly conditional: true;
2687
+ readonly note: "NetSuite states the applicable range in prose — \"for select tools between $600 and $1,200\" — so that prose is the source. Read into a half-open range (from <= price < to) so neighbouring tiers cannot both match. Stating no range means the plan applies at any price, which is how NIST CERT and Pre-set are offered.";
2688
+ };
2689
+ readonly bandTo: {
2690
+ readonly before: "featureddescription";
2691
+ readonly target: "appliesToPrice";
2692
+ readonly policy: "always";
2693
+ readonly conditional: true;
2694
+ readonly note: "NetSuite states the applicable range in prose — \"for select tools between $600 and $1,200\" — so that prose is the source. Read into a half-open range (from <= price < to) so neighbouring tiers cannot both match. Stating no range means the plan applies at any price, which is how NIST CERT and Pre-set are offered.";
2695
+ };
2696
+ readonly sortOrder: {
2697
+ readonly before: "storedisplayname (ordering)";
2698
+ readonly target: "sortOrder";
2699
+ readonly policy: "always";
2700
+ readonly note: string;
2701
+ };
2702
+ }>;
2545
2703
  declare const brandFields: NetsuiteFieldProvider<{
2546
2704
  readonly name: {
2547
2705
  readonly before: "commercecategory.name";
@@ -3663,19 +3821,97 @@ declare const PROVIDERS: readonly [NetsuiteFieldProvider<{
3663
3821
  readonly conditional: true;
3664
3822
  readonly note: string;
3665
3823
  };
3666
- readonly priceBand: {
3667
- readonly before: "featureddescription";
3668
- readonly target: "appliesFromPrice / appliesToPrice";
3669
- readonly policy: "always";
3670
- readonly conditional: true;
3671
- readonly note: string;
3672
- };
3673
3824
  readonly eligibilityGate: {
3674
3825
  readonly before: "custitem520";
3675
3826
  readonly target: "AddonGroup.netsuite.requiresField";
3676
3827
  readonly policy: "seed";
3677
3828
  readonly note: string;
3678
3829
  };
3830
+ }>, NetsuiteFieldProvider<{
3831
+ readonly netsuiteItemId: {
3832
+ readonly before: "item.id";
3833
+ readonly target: "netsuite.itemId";
3834
+ readonly policy: "always";
3835
+ readonly conditional: true;
3836
+ readonly note: string;
3837
+ };
3838
+ readonly netsuiteItemName: {
3839
+ readonly before: "item.itemid";
3840
+ readonly target: "netsuite.itemName";
3841
+ readonly policy: "always";
3842
+ readonly conditional: true;
3843
+ readonly note: "A native NetSuite item field, not a SuiteCommerce one, so it survives the cutover.";
3844
+ };
3845
+ readonly key: {
3846
+ readonly before: "urlcomponent";
3847
+ readonly target: "key";
3848
+ readonly policy: "always";
3849
+ readonly identity: true;
3850
+ readonly note: string;
3851
+ readonly caution: "Changing urlcomponent in NetSuite orphans the existing plan and creates a new one.";
3852
+ };
3853
+ readonly name: {
3854
+ readonly before: "storedisplayname";
3855
+ readonly target: "name";
3856
+ readonly policy: "always";
3857
+ readonly conditional: true;
3858
+ readonly note: "A native NetSuite item field, not a SuiteCommerce one, so it survives the cutover.";
3859
+ };
3860
+ readonly webVisible: {
3861
+ readonly before: "isonline";
3862
+ readonly target: "isVisible";
3863
+ readonly policy: "always";
3864
+ readonly conditional: true;
3865
+ readonly note: string;
3866
+ };
3867
+ readonly active: {
3868
+ readonly before: "isinactive";
3869
+ readonly target: "status";
3870
+ readonly policy: "always";
3871
+ readonly conditional: true;
3872
+ readonly note: string;
3873
+ };
3874
+ readonly price: {
3875
+ readonly before: "itemprice at price level 1";
3876
+ readonly target: "price";
3877
+ readonly policy: "always";
3878
+ readonly conditional: true;
3879
+ readonly note: string;
3880
+ };
3881
+ readonly sellingPoints: {
3882
+ readonly before: "salesdescription";
3883
+ readonly target: "description";
3884
+ readonly policy: "always";
3885
+ readonly conditional: true;
3886
+ readonly note: string;
3887
+ };
3888
+ readonly detail: {
3889
+ readonly before: "storedetaileddescription";
3890
+ readonly target: "longDescription";
3891
+ readonly policy: "always";
3892
+ readonly conditional: true;
3893
+ readonly note: string;
3894
+ };
3895
+ readonly bandFrom: {
3896
+ readonly before: "featureddescription";
3897
+ readonly target: "appliesFromPrice";
3898
+ readonly policy: "always";
3899
+ readonly conditional: true;
3900
+ readonly note: "NetSuite states the applicable range in prose — \"for select tools between $600 and $1,200\" — so that prose is the source. Read into a half-open range (from <= price < to) so neighbouring tiers cannot both match. Stating no range means the plan applies at any price, which is how NIST CERT and Pre-set are offered.";
3901
+ };
3902
+ readonly bandTo: {
3903
+ readonly before: "featureddescription";
3904
+ readonly target: "appliesToPrice";
3905
+ readonly policy: "always";
3906
+ readonly conditional: true;
3907
+ readonly note: "NetSuite states the applicable range in prose — \"for select tools between $600 and $1,200\" — so that prose is the source. Read into a half-open range (from <= price < to) so neighbouring tiers cannot both match. Stating no range means the plan applies at any price, which is how NIST CERT and Pre-set are offered.";
3908
+ };
3909
+ readonly sortOrder: {
3910
+ readonly before: "storedisplayname (ordering)";
3911
+ readonly target: "sortOrder";
3912
+ readonly policy: "always";
3913
+ readonly note: string;
3914
+ };
3679
3915
  }>, NetsuiteFieldProvider<{
3680
3916
  readonly name: {
3681
3917
  readonly before: "commercecategory.name";
@@ -3926,7 +4162,7 @@ declare const PROVIDERS: readonly [NetsuiteFieldProvider<{
3926
4162
  readonly target: "relationGroups.models-available";
3927
4163
  readonly policy: "seed";
3928
4164
  readonly pending: true;
3929
- readonly note: "Populated on 1,365 items. No relation group is seeded for it yet.";
4165
+ readonly note: string;
3930
4166
  };
3931
4167
  }>, NetsuiteFieldProvider<{
3932
4168
  netsuiteId: {
@@ -4844,13 +5080,6 @@ declare const BY_ENTITY: {
4844
5080
  readonly conditional: true;
4845
5081
  readonly note: string;
4846
5082
  };
4847
- readonly priceBand: {
4848
- readonly before: "featureddescription";
4849
- readonly target: "appliesFromPrice / appliesToPrice";
4850
- readonly policy: "always";
4851
- readonly conditional: true;
4852
- readonly note: string;
4853
- };
4854
5083
  readonly eligibilityGate: {
4855
5084
  readonly before: "custitem520";
4856
5085
  readonly target: "AddonGroup.netsuite.requiresField";
@@ -4858,6 +5087,92 @@ declare const BY_ENTITY: {
4858
5087
  readonly note: string;
4859
5088
  };
4860
5089
  }>;
5090
+ readonly 'service-plan': NetsuiteFieldProvider<{
5091
+ readonly netsuiteItemId: {
5092
+ readonly before: "item.id";
5093
+ readonly target: "netsuite.itemId";
5094
+ readonly policy: "always";
5095
+ readonly conditional: true;
5096
+ readonly note: string;
5097
+ };
5098
+ readonly netsuiteItemName: {
5099
+ readonly before: "item.itemid";
5100
+ readonly target: "netsuite.itemName";
5101
+ readonly policy: "always";
5102
+ readonly conditional: true;
5103
+ readonly note: "A native NetSuite item field, not a SuiteCommerce one, so it survives the cutover.";
5104
+ };
5105
+ readonly key: {
5106
+ readonly before: "urlcomponent";
5107
+ readonly target: "key";
5108
+ readonly policy: "always";
5109
+ readonly identity: true;
5110
+ readonly note: string;
5111
+ readonly caution: "Changing urlcomponent in NetSuite orphans the existing plan and creates a new one.";
5112
+ };
5113
+ readonly name: {
5114
+ readonly before: "storedisplayname";
5115
+ readonly target: "name";
5116
+ readonly policy: "always";
5117
+ readonly conditional: true;
5118
+ readonly note: "A native NetSuite item field, not a SuiteCommerce one, so it survives the cutover.";
5119
+ };
5120
+ readonly webVisible: {
5121
+ readonly before: "isonline";
5122
+ readonly target: "isVisible";
5123
+ readonly policy: "always";
5124
+ readonly conditional: true;
5125
+ readonly note: string;
5126
+ };
5127
+ readonly active: {
5128
+ readonly before: "isinactive";
5129
+ readonly target: "status";
5130
+ readonly policy: "always";
5131
+ readonly conditional: true;
5132
+ readonly note: string;
5133
+ };
5134
+ readonly price: {
5135
+ readonly before: "itemprice at price level 1";
5136
+ readonly target: "price";
5137
+ readonly policy: "always";
5138
+ readonly conditional: true;
5139
+ readonly note: string;
5140
+ };
5141
+ readonly sellingPoints: {
5142
+ readonly before: "salesdescription";
5143
+ readonly target: "description";
5144
+ readonly policy: "always";
5145
+ readonly conditional: true;
5146
+ readonly note: string;
5147
+ };
5148
+ readonly detail: {
5149
+ readonly before: "storedetaileddescription";
5150
+ readonly target: "longDescription";
5151
+ readonly policy: "always";
5152
+ readonly conditional: true;
5153
+ readonly note: string;
5154
+ };
5155
+ readonly bandFrom: {
5156
+ readonly before: "featureddescription";
5157
+ readonly target: "appliesFromPrice";
5158
+ readonly policy: "always";
5159
+ readonly conditional: true;
5160
+ readonly note: "NetSuite states the applicable range in prose — \"for select tools between $600 and $1,200\" — so that prose is the source. Read into a half-open range (from <= price < to) so neighbouring tiers cannot both match. Stating no range means the plan applies at any price, which is how NIST CERT and Pre-set are offered.";
5161
+ };
5162
+ readonly bandTo: {
5163
+ readonly before: "featureddescription";
5164
+ readonly target: "appliesToPrice";
5165
+ readonly policy: "always";
5166
+ readonly conditional: true;
5167
+ readonly note: "NetSuite states the applicable range in prose — \"for select tools between $600 and $1,200\" — so that prose is the source. Read into a half-open range (from <= price < to) so neighbouring tiers cannot both match. Stating no range means the plan applies at any price, which is how NIST CERT and Pre-set are offered.";
5168
+ };
5169
+ readonly sortOrder: {
5170
+ readonly before: "storedisplayname (ordering)";
5171
+ readonly target: "sortOrder";
5172
+ readonly policy: "always";
5173
+ readonly note: string;
5174
+ };
5175
+ }>;
4861
5176
  readonly brand: NetsuiteFieldProvider<{
4862
5177
  readonly name: {
4863
5178
  readonly before: "commercecategory.name";
@@ -5639,6 +5954,216 @@ declare const NETSUITE_RELATION_GROUPS: readonly string[];
5639
5954
  */
5640
5955
  declare const syncOwnerFor: (entity: NetsuiteOwnedEntity) => string;
5641
5956
 
5957
+ declare const NetsuiteEventStateEnum: {
5958
+ readonly APPLIED: "applied";
5959
+ readonly DEFERRED: "deferred";
5960
+ readonly FAILED: "failed";
5961
+ readonly SKIPPED: "skipped";
5962
+ };
5963
+ type NetsuiteEventStateEnum = (typeof NetsuiteEventStateEnum)[keyof typeof NetsuiteEventStateEnum];
5964
+ declare const NETSUITE_EVENT_STATE_VALUES: ("applied" | "deferred" | "failed" | "skipped")[];
5965
+ interface INetsuiteEvent extends BaseEntity {
5966
+ eventId: string;
5967
+ recordType: string;
5968
+ recordId: string;
5969
+ action?: string;
5970
+ sourceId?: string;
5971
+ orderId?: string;
5972
+ state: NetsuiteEventStateEnum;
5973
+ detail?: string;
5974
+ receivedAt: Date;
5975
+ appliedAt?: Date;
5976
+ attempts?: number;
5977
+ lastAttemptAt?: Date;
5978
+ }
5979
+ interface INetsuiteQueueEntry {
5980
+ key: string;
5981
+ label: string;
5982
+ state: "queued" | "running";
5983
+ runsInSeconds: number | null;
5984
+ runningForSeconds: number | null;
5985
+ }
5986
+
5987
+ declare const TaxRateSourceEnum: {
5988
+ readonly GROUP: "group";
5989
+ readonly ORDERS: "orders";
5990
+ };
5991
+ type TaxRateSourceEnum = (typeof TaxRateSourceEnum)[keyof typeof TaxRateSourceEnum];
5992
+ declare const TAX_RATE_SOURCE_VALUES: ("orders" | "group")[];
5993
+ interface ITaxRate extends BaseEntity {
5994
+ key: string;
5995
+ city: string;
5996
+ zip: string;
5997
+ state: string;
5998
+ county?: string;
5999
+ rate: number;
6000
+ netsuiteGroupId: string;
6001
+ netsuiteGroupName: string;
6002
+ source: TaxRateSourceEnum;
6003
+ syncedAt: Date;
6004
+ }
6005
+
6006
+ interface TaxSyncResult {
6007
+ groups: number;
6008
+ rates: number;
6009
+ overlaps: number;
6010
+ observed: number;
6011
+ corrected: number;
6012
+ removed: number;
6013
+ states: string[];
6014
+ }
6015
+ interface PromotionSyncResult {
6016
+ found: number;
6017
+ written: number;
6018
+ codes: string[];
6019
+ skipped: Array<{
6020
+ code: string;
6021
+ name: string;
6022
+ reason: string;
6023
+ }>;
6024
+ deactivated: string[];
6025
+ }
6026
+ interface CategoryImportSummary {
6027
+ received: number;
6028
+ created: number;
6029
+ existing: number;
6030
+ linked: number;
6031
+ skipped: number;
6032
+ missingParents: string[];
6033
+ }
6034
+ interface NetsuiteLinkResult {
6035
+ key: string;
6036
+ netsuiteId: string;
6037
+ created: boolean;
6038
+ }
6039
+
6040
+ declare const PushCheckStatusEnum: {
6041
+ readonly PASS: "pass";
6042
+ readonly WARN: "warn";
6043
+ readonly FAIL: "fail";
6044
+ };
6045
+ type PushCheckStatusEnum = (typeof PushCheckStatusEnum)[keyof typeof PushCheckStatusEnum];
6046
+ declare const PUSH_CHECK_STATUS_VALUES: ("pass" | "warn" | "fail")[];
6047
+ interface PushCheck {
6048
+ key: string;
6049
+ label: string;
6050
+ status: PushCheckStatusEnum;
6051
+ detail?: string;
6052
+ fixable?: boolean;
6053
+ }
6054
+ interface PushField {
6055
+ label: string;
6056
+ value: string;
6057
+ note?: string;
6058
+ }
6059
+ interface NetsuitePreviewLine {
6060
+ kind: "item" | "fee" | "addon";
6061
+ name: string;
6062
+ sku?: string;
6063
+ netsuiteItemId?: string;
6064
+ matchedBy?: "stored id" | "SKU lookup";
6065
+ quantity: number;
6066
+ rate: number;
6067
+ amount: number;
6068
+ problem?: string;
6069
+ }
6070
+ interface NetsuiteReceipt {
6071
+ id: string;
6072
+ recordType: string;
6073
+ externalId: string;
6074
+ tranId?: string;
6075
+ statusText?: string;
6076
+ total?: number;
6077
+ entityId?: string;
6078
+ entityLabel?: string;
6079
+ createdDate?: string;
6080
+ httpStatus?: number;
6081
+ recordUrl?: string;
6082
+ pushedAt: Date;
6083
+ sentLines?: Array<{
6084
+ kind: "item" | "fee" | "addon";
6085
+ sku?: string;
6086
+ name: string;
6087
+ netsuiteItemId?: string;
6088
+ quantity: number;
6089
+ amount: number;
6090
+ }>;
6091
+ totalMismatch?: {
6092
+ charged: number;
6093
+ landed: number;
6094
+ drift: number;
6095
+ };
6096
+ }
6097
+ interface NetsuiteOrderPreview {
6098
+ orderId: string;
6099
+ recordType: "salesOrder" | "estimate";
6100
+ recordLabel: string;
6101
+ alreadyPushed?: NetsuiteReceipt;
6102
+ lastError?: {
6103
+ message: string;
6104
+ failedAt?: string;
6105
+ recordType?: string;
6106
+ };
6107
+ connection: {
6108
+ configured: boolean;
6109
+ missing: string[];
6110
+ writesEnabled: boolean;
6111
+ account: string;
6112
+ };
6113
+ writesEnabled: boolean;
6114
+ customer: {
6115
+ email: string;
6116
+ netsuiteId?: string;
6117
+ label?: string;
6118
+ willCreate: boolean;
6119
+ };
6120
+ lines: NetsuitePreviewLine[];
6121
+ fields?: PushField[];
6122
+ totals: {
6123
+ netsuite: number;
6124
+ order: number;
6125
+ matches: boolean;
6126
+ currencyCode: string;
6127
+ };
6128
+ checks: PushCheck[];
6129
+ canSend: boolean;
6130
+ warnings: string[];
6131
+ blockers: string[];
6132
+ }
6133
+ interface NetsuiteSyncDefinition {
6134
+ key: string;
6135
+ label: string;
6136
+ recordTypes: string[];
6137
+ supportsSingle: boolean;
6138
+ supportsFull: boolean;
6139
+ heavy: boolean;
6140
+ fields: string[];
6141
+ source: string;
6142
+ }
6143
+
6144
+ interface RevalidationResult {
6145
+ domain: string;
6146
+ url: string;
6147
+ ok: boolean;
6148
+ error: string | null;
6149
+ durationMs: number;
6150
+ at: string;
6151
+ }
6152
+ interface CacheStoreTarget {
6153
+ id: string;
6154
+ name: string;
6155
+ domain: string;
6156
+ reachable: boolean;
6157
+ lastResult: RevalidationResult | null;
6158
+ }
6159
+ interface CacheStatus {
6160
+ secretConfigured: boolean;
6161
+ urlOverride: string | null;
6162
+ urlTemplate: string | null;
6163
+ tags: string[];
6164
+ stores: CacheStoreTarget[];
6165
+ }
6166
+
5642
6167
  interface CheckoutAddressInput {
5643
6168
  addressLine1: string;
5644
6169
  addressLine2?: string;
@@ -5719,4 +6244,4 @@ interface IWishlist extends BaseEntity {
5719
6244
  items: IWishlistItem[];
5720
6245
  }
5721
6246
 
5722
- export { ACTIVE_SUBSCRIPTION_CHANNELS, ADMIN_ACTIONS, ADMIN_AUDIT_ACTIONS, ADMIN_RESOURCES, ADMIN_RESOURCE_LIST, ALL_STORES, AWAITING_PAYMENT_STATUSES, type AddonAmountInput, type AddonGroupNetsuiteLink, type AddonNetsuiteLink, type AddonSelectionRef, type ApiResponse, type AppliedTax, BRAND_FIELDS, type BaseEntity, CAMPAIGN_RECIPIENT_STATUS_VALUES, CAMPAIGN_STATUS_VALUES, CART_STATUS_VALUES, CATEGORY_FIELDS, CONFIGURATOR_CONDITION_TYPE_VALUES, CONFIGURATOR_EFFECT_TYPE_VALUES, CONFIGURATOR_SELECT_MODE_VALUES, CONFIGURATOR_SOURCE_VALUES, CampaignRecipientStatusEnum, CampaignStatusEnum, type CartIssue, type CartIssueType, CartIssueTypes, CartStatusEnum, type CartValidation, type CheckoutAddressInput, type CheckoutPayload, type CheckoutResult, ConfiguratorConditionTypeEnum, ConfiguratorEffectTypeEnum, ConfiguratorErrorCodeEnum, type ConfiguratorEvalContext, type ConfiguratorEvalError, type ConfiguratorEvalResult, ConfiguratorSelectModeEnum, type ConfiguratorSelections, ConfiguratorSourceEnum, type CouponNetsuiteLink, DEFAULT_SUBSCRIPTION_TOPICS, DISCOUNT_TYPE_VALUES, DiscountTypeEnum, EMAIL_TEMPLATE_EVENT_VALUES, EMAIL_TEMPLATE_VARIABLES_BY_EVENT, EMPTY_ACCESS, type EffectiveAccess, EmailTemplateEventEnum, FEE_APPLIES_TO_VALUES, FeeAppliesToEnum, type FieldMap, type FieldMapping, type FieldSource, type IAddonConfig, type IAddonGroup, type IAddress, type IAdmin, type IAdminAction, type IAdminAuditAction, type IAdminAuditLog, type IAdminBaseAction, type IAdminPermission, type IAdminResource, type IAdminRole, type IAdminRoleCreate, type IAdminSafe, type IAdminStoreAccess, type IAppliedFee, type IBannerSlide, type IBlogAuthor, type IBlogCategory, type IBlogPost, type IBrand, type ICampaign, type ICampaignRecipient, type ICampaignStats, type ICart, type ICartItem, type ICategory, type ICategorySubcategory, type IConfigurator, type IConfiguratorCondition, type IConfiguratorEffect, type IConfiguratorFacet, type IConfiguratorFacetValue, type IConfiguratorOption, type IConfiguratorPriceAdjustment, type IConfiguratorQuery, type IConfiguratorRule, type IConfiguratorSection, type IConfiguratorStep, type IConfiguratorTarget, type IContact, type ICountry, type ICoupon, type ICurrency, type ICustomer, type IDiscountType, type IEmailTemplate, type IFaq, type IFaqCategory, type IKeyValue, type ILinePricing, type IMediaAsset, INVENTORY_POLICY_VALUES, type INetsuiteOrderLink, type INotification, type IOrder, type IOrderItem, type IOrderLog, type IOrderShipment, type IOrderTransaction, type IPaymentLink, type IPodcastEpisode, type IPrice, type IProduct, type IProductDailyStat, 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 ISelectableFee, type IShipFromAddress, type IShipping, type IShippingRate, type IState, type IStock, type IStore, type IStoreFee, type IStoreSettings, type ISubscriber, type ISubscriberConsent, type ISubscription, type ISummaryPricing, type ITechnicalSpecColumn, type ITechnicalSpecGroup, type ITransactionBase, type IUnmatched404, type IVariant, type IVariantOptionSelection, type IWishlist, type IWishlistItem, type Id, type InventoryPolicy, InventoryPolicyEnum, type Metadata, NETSUITE_OWNED_FIELDS, NETSUITE_RELATION_GROUPS, NOTIFICATION_TYPE_VALUES, NetsuiteFieldProvider, type NetsuiteOwnedEntity, type NetsuiteRelationSource, NotificationTypeEnum, OPEN_ORDER_STATUSES, ORDER_LOG_TYPE_VALUES, ORDER_STATUS_VALUES, type OfferedAddon, type OfferedAddonGroup, OrderLogTypeEnum, OrderStatusEnum, PAYMENT_GATEWAY_VALUES, PAYMENT_LINK_STATUS_VALUES, PAYMENT_METHOD_VALUES, PAYMENT_STATUS_VALUES, PRICING_TYPE_VALUES, PRODUCT_FIELDS, PRODUCT_VARIANT_TYPE_VALUES, PROVIDERS, PURCHASE_ORDER_STATUSES, PaymentGatewayEnum, PaymentLinkStatusEnum, PaymentMethodEnum, PaymentStatusEnum, type PricedLineLike, type PricingType, PricingTypeEnum, type ProductAddonScope, ProductEventTypeEnum, type ProductVariantType, ProductVariantTypeEnum, QUOTE_ORDER_STATUSES, RELATION_FIELDS, RESOURCE_OPERATIONS, RETIRED_CART_STATUSES, type RedirectTargetType, type ResolveAccessInput, type ResolvedAddonSelection, SALE_TYPE_VALUES, SUBSCRIPTION_CHANNEL_VALUES, SUBSCRIPTION_TOPIC_LABELS, SUBSCRIPTION_TOPIC_VALUES, type SaleType, SaleTypeEnum, type SaleTypedLike, type SelectedShippingMethod, type StockDemandLine, type StockStatus, StockStatusEnum, type StockVerdict, StockVerdictEnum, type StoreAccessCheckInput, type StoreScopeInput, SubscriptionChannelEnum, SubscriptionTopicEnum, type SyncPolicy, type SyncRisk, TRANSACTION_TYPE_VALUES, TransactionTypeEnum, type VariantOptionMode, WIRED_EMAIL_TEMPLATE_EVENTS, actionsForResource, addonFields, addonUnitAmount, addonsOfLine, addonsUnitAmount, adjustmentsFor, applyPriceAdjustments, baseUnitPriceOfLine, blogAuthorFields, blogCategoryFields, blogPostFields, brandFields, can, canAny, canonicalizePath, canonicalizeSlug, categoryFields, conditionHolds, couponFields, demandByKey, evaluateConfigurator, feeHint, formatMoney, grantedPermissions, groupHasDefaultAddon, hasStoreAccess, isConfigurationValid, isNetsuiteOwned, isNonEmptyString, isQuoteOnlyItem, isValidAction, isValidEmail, missingGrants, netsuiteFieldCaution, netsuiteFieldConditional, netsuiteFieldNote, netsuiteFieldRisk, netsuiteFieldSource, netsuiteRelationSource, normalizeLineQuantity, normalizeNumber, normalizePath, orderLogTypeColorMap, paymentLinkStatusColorMap, paymentMethodColorMap, paymentStatusColorMap, podcastFields, productFields, readMapped, resolveAddonSelections, resolveEffectivePermissions, resolveProductAddonGroups, resolveStoreScope, roundMoney, saleTypeOf, statusColors, stockVerdict, syncOwnerFor, toIdString, typeColorMap };
6247
+ export { ACTIVE_SUBSCRIPTION_CHANNELS, ADMIN_ACTIONS, ADMIN_AUDIT_ACTIONS, ADMIN_RESOURCES, ADMIN_RESOURCE_LIST, ALL_STORES, AWAITING_PAYMENT_STATUSES, type AddonAmountInput, type AddonGroupNetsuiteLink, type AddonNetsuiteLink, type AddonSelectionRef, type AddonSnapshot, type ApiResponse, type AppliedTax, BRAND_FIELDS, type BaseEntity, CAMPAIGN_RECIPIENT_STATUS_VALUES, CAMPAIGN_STATUS_VALUES, CART_STATUS_VALUES, CATEGORY_FIELDS, CONFIGURATOR_CONDITION_TYPE_VALUES, CONFIGURATOR_EFFECT_TYPE_VALUES, CONFIGURATOR_SELECT_MODE_VALUES, CONFIGURATOR_SOURCE_VALUES, type CacheStatus, type CacheStoreTarget, CampaignRecipientStatusEnum, CampaignStatusEnum, type CartIssue, type CartIssueType, CartIssueTypes, CartStatusEnum, type CartValidation, type CategoryImportSummary, type CheckoutAddressInput, type CheckoutPayload, type CheckoutResult, ConfiguratorConditionTypeEnum, ConfiguratorEffectTypeEnum, ConfiguratorErrorCodeEnum, type ConfiguratorEvalContext, type ConfiguratorEvalError, type ConfiguratorEvalResult, ConfiguratorSelectModeEnum, type ConfiguratorSelections, ConfiguratorSourceEnum, type CouponNetsuiteLink, DEFAULT_SUBSCRIPTION_TOPICS, DISCOUNT_TYPE_VALUES, DiscountTypeEnum, EMAIL_PARAM_MISMATCH_KIND_VALUES, EMAIL_TEMPLATE_EVENT_VALUES, EMAIL_TEMPLATE_VARIABLES_BY_EVENT, EMPTY_ACCESS, type EffectiveAccess, type EmailParamMismatch, EmailParamMismatchKindEnum, EmailTemplateEventEnum, FEE_APPLIES_TO_VALUES, FeeAppliesToEnum, type FieldMap, type FieldMapping, type FieldSource, type IAddonConfig, type IAddonGroup, type IAddress, type IAdmin, type IAdminAction, type IAdminAuditAction, type IAdminAuditLog, type IAdminBaseAction, type IAdminPermission, type IAdminResource, type IAdminRole, type IAdminRoleCreate, type IAdminSafe, type IAdminStoreAccess, type IAppliedFee, type IBannerSlide, type IBlogAuthor, type IBlogCategory, type IBlogPost, type IBrand, type ICampaign, type ICampaignRecipient, type ICampaignStats, type ICart, type ICartItem, type ICartServicePlanSnapshot, type ICategory, type ICategorySubcategory, type IConfigurator, type IConfiguratorCondition, type IConfiguratorEffect, type IConfiguratorFacet, type IConfiguratorFacetValue, type IConfiguratorOption, type IConfiguratorPriceAdjustment, type IConfiguratorQuery, type IConfiguratorRule, type IConfiguratorSection, type IConfiguratorStep, type IConfiguratorTarget, type IContact, type ICountry, type ICoupon, type ICurrency, type ICustomer, type IDiscountType, type IEmailTemplate, type IFaq, type IFaqCategory, type IKeyValue, type ILinePricing, type IMediaAsset, INVENTORY_POLICY_VALUES, type INetsuiteEvent, type INetsuiteOrderLink, type INetsuiteQueueEntry, type INotification, type IOrder, type IOrderItem, type IOrderLog, type IOrderShipment, type IOrderTransaction, type IPaymentLink, type IPodcastEpisode, type IPrice, type IProduct, type IProductDailyStat, 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 ISelectableFee, type IServicePlan, type IShipFromAddress, type IShipping, type IShippingRate, type IState, type IStock, type IStore, type IStoreFee, type IStoreSettings, type ISubscriber, type ISubscriberConsent, type ISubscription, type ISummaryPricing, type ITaxRate, type ITechnicalSpecColumn, type ITechnicalSpecGroup, type ITransactionBase, type IUnmatched404, type IVariant, type IVariantOptionSelection, type IWishlist, type IWishlistItem, type Id, type InventoryPolicy, InventoryPolicyEnum, type LineChargeInput, type MatchResult, type Metadata, NETSUITE_EVENT_STATE_VALUES, NETSUITE_OWNED_FIELDS, NETSUITE_RELATION_GROUPS, NOTIFICATION_TYPE_VALUES, NetsuiteEventStateEnum, NetsuiteFieldProvider, type NetsuiteLinkResult, type NetsuiteOrderPreview, type NetsuiteOwnedEntity, type NetsuitePreviewLine, type NetsuiteReceipt, type NetsuiteRelationSource, type NetsuiteSyncDefinition, NotificationTypeEnum, OPEN_ORDER_STATUSES, ORDER_LOG_TYPE_VALUES, ORDER_STATUS_VALUES, type OfferedAddon, type OfferedAddonGroup, type OfferedServicePlan, OrderLogTypeEnum, OrderStatusEnum, PAYMENT_GATEWAY_VALUES, PAYMENT_LINK_STATUS_VALUES, PAYMENT_METHOD_VALUES, PAYMENT_STATUS_VALUES, PRICING_TYPE_VALUES, PRODUCT_FIELDS, PRODUCT_VARIANT_TYPE_VALUES, PROVIDERS, PURCHASE_ORDER_STATUSES, PUSH_CHECK_STATUS_VALUES, PaymentGatewayEnum, PaymentLinkStatusEnum, PaymentMethodEnum, PaymentStatusEnum, type PricedLineLike, type PricingType, PricingTypeEnum, type ProductAddonScope, ProductEventTypeEnum, type ProductServicePlanScope, type ProductVariantType, ProductVariantTypeEnum, type PromotionSyncResult, type PushCheck, PushCheckStatusEnum, type PushField, QUOTE_ORDER_STATUSES, RELATION_FIELDS, RESOURCE_OPERATIONS, RETIRED_CART_STATUSES, type RedirectTargetType, type ResolveAccessInput, type ResolvedAddonSelection, type RevalidationResult, SALE_TYPE_VALUES, SERVICE_PLAN_ELIGIBILITY_FIELD, SUBSCRIPTION_CHANNEL_VALUES, SUBSCRIPTION_TOPIC_LABELS, SUBSCRIPTION_TOPIC_VALUES, type SaleType, SaleTypeEnum, type SaleTypedLike, type SelectedShippingMethod, type ServicePlanNetsuiteLink, type StockDemandLine, type StockStatus, StockStatusEnum, type StockVerdict, StockVerdictEnum, type StoreAccessCheckInput, type StoreScopeInput, SubscriptionChannelEnum, SubscriptionTopicEnum, type SyncPolicy, type SyncRisk, TAX_RATE_SOURCE_VALUES, TRANSACTION_TYPE_VALUES, TaxRateSourceEnum, type TaxSyncResult, TransactionTypeEnum, type VariantOptionMode, WIRED_EMAIL_TEMPLATE_EVENTS, actionsForResource, addonFields, addonUnitAmount, addonsOfLine, addonsUnitAmount, adjustmentsFor, applyPriceAdjustments, baseUnitPriceOfLine, blogAuthorFields, blogCategoryFields, blogPostFields, brandFields, can, canAny, canonicalizePath, canonicalizeSlug, categoryFields, chargesOfLine, conditionHolds, couponFields, demandByKey, evaluateConfigurator, feeHint, formatMoney, grantedPermissions, groupHasDefaultAddon, hasStoreAccess, isConfigurationValid, isNetsuiteOwned, isNonEmptyString, isQuoteOnlyItem, isValidAction, isValidEmail, missingGrants, netsuiteFieldCaution, netsuiteFieldConditional, netsuiteFieldNote, netsuiteFieldRisk, netsuiteFieldSource, netsuiteRelationSource, normalizeLineQuantity, normalizeNumber, normalizePath, orderLogTypeColorMap, paymentLinkStatusColorMap, paymentMethodColorMap, paymentStatusColorMap, podcastFields, productFields, readMapped, resolveAddonSelections, resolveEffectivePermissions, resolveProductAddonGroups, resolveProductServicePlans, resolveStoreScope, roundMoney, saleTypeOf, servicePlanFields, statusColors, stockVerdict, syncOwnerFor, toIdString, typeColorMap };