@fas-core/shared-types 1.0.106 → 1.0.108
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 +82 -1
- package/dist/index.d.ts +82 -1
- package/dist/index.js +60 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +60 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -82,6 +82,7 @@ interface ISummaryPricing {
|
|
|
82
82
|
discountAmount: number;
|
|
83
83
|
taxAmount: number;
|
|
84
84
|
shippingAmount: number;
|
|
85
|
+
handlingAmount?: number;
|
|
85
86
|
feesAmount?: number;
|
|
86
87
|
appliedFees?: IAppliedFee[];
|
|
87
88
|
totalAmount: number;
|
|
@@ -134,6 +135,25 @@ interface IShippingRate {
|
|
|
134
135
|
deliveryDays: number | null;
|
|
135
136
|
estimatedDelivery: string | null;
|
|
136
137
|
}
|
|
138
|
+
interface RateAddress {
|
|
139
|
+
addressee?: string;
|
|
140
|
+
addr1?: string;
|
|
141
|
+
addr2?: string;
|
|
142
|
+
city?: string;
|
|
143
|
+
state?: string;
|
|
144
|
+
zip?: string;
|
|
145
|
+
countryCode?: string;
|
|
146
|
+
isResidential?: boolean;
|
|
147
|
+
}
|
|
148
|
+
interface RatedShippingMethod {
|
|
149
|
+
id: string;
|
|
150
|
+
name: string;
|
|
151
|
+
shipping: number;
|
|
152
|
+
handling: number;
|
|
153
|
+
total: number;
|
|
154
|
+
free: boolean;
|
|
155
|
+
estimated: boolean;
|
|
156
|
+
}
|
|
137
157
|
|
|
138
158
|
interface IStoreSettings {
|
|
139
159
|
logo: string;
|
|
@@ -707,8 +727,22 @@ type OrderStatusEnum = (typeof OrderStatusEnum)[keyof typeof OrderStatusEnum];
|
|
|
707
727
|
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")[];
|
|
708
728
|
declare const statusColors: Record<OrderStatusEnum, string>;
|
|
709
729
|
declare const PURCHASE_ORDER_STATUSES: OrderStatusEnum[];
|
|
730
|
+
declare const PLACED_OPEN_ORDER_STATUSES: OrderStatusEnum[];
|
|
731
|
+
declare const UNPLACED_ORDER_STATUSES: OrderStatusEnum[];
|
|
710
732
|
declare const OPEN_ORDER_STATUSES: OrderStatusEnum[];
|
|
711
733
|
declare const QUOTE_ORDER_STATUSES: OrderStatusEnum[];
|
|
734
|
+
declare const StatusToneEnum: {
|
|
735
|
+
readonly DONE: "done";
|
|
736
|
+
readonly MOVING: "moving";
|
|
737
|
+
readonly WAITING: "waiting";
|
|
738
|
+
readonly STOPPED: "stopped";
|
|
739
|
+
readonly CLOSED: "closed";
|
|
740
|
+
};
|
|
741
|
+
type StatusToneEnum = (typeof StatusToneEnum)[keyof typeof StatusToneEnum];
|
|
742
|
+
declare const STATUS_TONE_VALUES: ("done" | "moving" | "waiting" | "stopped" | "closed")[];
|
|
743
|
+
declare const statusTones: Record<OrderStatusEnum, StatusToneEnum>;
|
|
744
|
+
declare const statusTone: (status?: string) => StatusToneEnum;
|
|
745
|
+
declare const netsuiteStatusLabel: (status?: string, netsuiteStatusText?: string) => string;
|
|
712
746
|
interface IOrder extends BaseEntity {
|
|
713
747
|
orderId: string;
|
|
714
748
|
orderItems: IOrderItem[];
|
|
@@ -720,6 +754,11 @@ interface IOrder extends BaseEntity {
|
|
|
720
754
|
sourceQuote?: IOrder | string;
|
|
721
755
|
convertedOrder?: IOrder | string;
|
|
722
756
|
quoteValidUntil?: Date;
|
|
757
|
+
quotePricedAt?: Date;
|
|
758
|
+
quoteApprovedAt?: Date;
|
|
759
|
+
quoteReadyEmailedAt?: Date;
|
|
760
|
+
quoteReadyEmailedTotal?: number;
|
|
761
|
+
quoteReadyEmailedLines?: string;
|
|
723
762
|
paymentStatus: PaymentStatusEnum;
|
|
724
763
|
paymentMethod: PaymentMethodEnum;
|
|
725
764
|
paymentGateway: PaymentGatewayEnum;
|
|
@@ -730,6 +769,7 @@ interface IOrder extends BaseEntity {
|
|
|
730
769
|
tax?: AppliedTax | null;
|
|
731
770
|
acceptedTermsAt: Date;
|
|
732
771
|
customerNote: string;
|
|
772
|
+
poNumber?: string;
|
|
733
773
|
netsuite?: INetsuiteOrderLink | null;
|
|
734
774
|
netsuiteLastError?: {
|
|
735
775
|
message: string;
|
|
@@ -744,6 +784,7 @@ interface IOrder extends BaseEntity {
|
|
|
744
784
|
|
|
745
785
|
interface ICustomer extends BaseEntity {
|
|
746
786
|
netsuiteId: string;
|
|
787
|
+
netsuiteEntityId: string;
|
|
747
788
|
firstName: string;
|
|
748
789
|
lastName: string;
|
|
749
790
|
profileImage: string;
|
|
@@ -1454,6 +1495,9 @@ interface IPaymentLink extends BaseEntity {
|
|
|
1454
1495
|
createdBy?: string;
|
|
1455
1496
|
baseUrl: string;
|
|
1456
1497
|
}
|
|
1498
|
+
interface PaymentLinkView extends IPaymentLink {
|
|
1499
|
+
url: string;
|
|
1500
|
+
}
|
|
1457
1501
|
|
|
1458
1502
|
declare const SubscriptionChannelEnum: {
|
|
1459
1503
|
readonly EMAIL: "EMAIL";
|
|
@@ -6037,6 +6081,12 @@ interface NetsuiteLinkResult {
|
|
|
6037
6081
|
created: boolean;
|
|
6038
6082
|
}
|
|
6039
6083
|
|
|
6084
|
+
declare const NetsuiteRecordTypeEnum: {
|
|
6085
|
+
readonly SALES_ORDER: "salesOrder";
|
|
6086
|
+
readonly ESTIMATE: "estimate";
|
|
6087
|
+
};
|
|
6088
|
+
type NetsuiteRecordTypeEnum = (typeof NetsuiteRecordTypeEnum)[keyof typeof NetsuiteRecordTypeEnum];
|
|
6089
|
+
declare const NETSUITE_RECORD_TYPE_VALUES: ("salesOrder" | "estimate")[];
|
|
6040
6090
|
declare const PushCheckStatusEnum: {
|
|
6041
6091
|
readonly PASS: "pass";
|
|
6042
6092
|
readonly WARN: "warn";
|
|
@@ -6140,6 +6190,36 @@ interface NetsuiteSyncDefinition {
|
|
|
6140
6190
|
fields: string[];
|
|
6141
6191
|
source: string;
|
|
6142
6192
|
}
|
|
6193
|
+
interface NetsuitePushAttempt {
|
|
6194
|
+
attempt: number;
|
|
6195
|
+
status: "ok" | "retrying" | "failed";
|
|
6196
|
+
ms: number;
|
|
6197
|
+
httpStatus?: number;
|
|
6198
|
+
error?: string;
|
|
6199
|
+
}
|
|
6200
|
+
interface NetsuitePushOutcome {
|
|
6201
|
+
orderId: string;
|
|
6202
|
+
recordType: string;
|
|
6203
|
+
netsuiteId?: string;
|
|
6204
|
+
receipt?: NetsuiteReceipt;
|
|
6205
|
+
skipped?: string;
|
|
6206
|
+
payload?: Record<string, unknown>;
|
|
6207
|
+
attempts?: NetsuitePushAttempt[];
|
|
6208
|
+
}
|
|
6209
|
+
interface NetsuiteStatusChange {
|
|
6210
|
+
orderId: string;
|
|
6211
|
+
netsuiteId: string;
|
|
6212
|
+
from?: string;
|
|
6213
|
+
to: string;
|
|
6214
|
+
localStatus?: string;
|
|
6215
|
+
}
|
|
6216
|
+
interface NetsuiteStatusSyncResult {
|
|
6217
|
+
checked: number;
|
|
6218
|
+
changed: number;
|
|
6219
|
+
statusChanges: NetsuiteStatusChange[];
|
|
6220
|
+
shipmentsUpdated: number;
|
|
6221
|
+
fulfillments: number;
|
|
6222
|
+
}
|
|
6143
6223
|
|
|
6144
6224
|
interface RevalidationResult {
|
|
6145
6225
|
domain: string;
|
|
@@ -6188,6 +6268,7 @@ interface CheckoutPayload {
|
|
|
6188
6268
|
shippingMethod?: string;
|
|
6189
6269
|
acceptedTerms: boolean;
|
|
6190
6270
|
customerNote?: string;
|
|
6271
|
+
poNumber?: string;
|
|
6191
6272
|
}
|
|
6192
6273
|
interface CheckoutResult {
|
|
6193
6274
|
order: IOrder;
|
|
@@ -6244,4 +6325,4 @@ interface IWishlist extends BaseEntity {
|
|
|
6244
6325
|
items: IWishlistItem[];
|
|
6245
6326
|
}
|
|
6246
6327
|
|
|
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 };
|
|
6328
|
+
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_RECORD_TYPE_VALUES, NETSUITE_RELATION_GROUPS, NOTIFICATION_TYPE_VALUES, NetsuiteEventStateEnum, NetsuiteFieldProvider, type NetsuiteLinkResult, type NetsuiteOrderPreview, type NetsuiteOwnedEntity, type NetsuitePreviewLine, type NetsuitePushAttempt, type NetsuitePushOutcome, type NetsuiteReceipt, NetsuiteRecordTypeEnum, type NetsuiteRelationSource, type NetsuiteStatusChange, type NetsuiteStatusSyncResult, 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, PLACED_OPEN_ORDER_STATUSES, PRICING_TYPE_VALUES, PRODUCT_FIELDS, PRODUCT_VARIANT_TYPE_VALUES, PROVIDERS, PURCHASE_ORDER_STATUSES, PUSH_CHECK_STATUS_VALUES, PaymentGatewayEnum, PaymentLinkStatusEnum, type PaymentLinkView, 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 RateAddress, type RatedShippingMethod, type RedirectTargetType, type ResolveAccessInput, type ResolvedAddonSelection, type RevalidationResult, SALE_TYPE_VALUES, SERVICE_PLAN_ELIGIBILITY_FIELD, STATUS_TONE_VALUES, SUBSCRIPTION_CHANNEL_VALUES, SUBSCRIPTION_TOPIC_LABELS, SUBSCRIPTION_TOPIC_VALUES, type SaleType, SaleTypeEnum, type SaleTypedLike, type SelectedShippingMethod, type ServicePlanNetsuiteLink, StatusToneEnum, 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, UNPLACED_ORDER_STATUSES, 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, netsuiteStatusLabel, normalizeLineQuantity, normalizeNumber, normalizePath, orderLogTypeColorMap, paymentLinkStatusColorMap, paymentMethodColorMap, paymentStatusColorMap, podcastFields, productFields, readMapped, resolveAddonSelections, resolveEffectivePermissions, resolveProductAddonGroups, resolveProductServicePlans, resolveStoreScope, roundMoney, saleTypeOf, servicePlanFields, statusColors, statusTone, statusTones, stockVerdict, syncOwnerFor, toIdString, typeColorMap };
|
package/dist/index.d.ts
CHANGED
|
@@ -82,6 +82,7 @@ interface ISummaryPricing {
|
|
|
82
82
|
discountAmount: number;
|
|
83
83
|
taxAmount: number;
|
|
84
84
|
shippingAmount: number;
|
|
85
|
+
handlingAmount?: number;
|
|
85
86
|
feesAmount?: number;
|
|
86
87
|
appliedFees?: IAppliedFee[];
|
|
87
88
|
totalAmount: number;
|
|
@@ -134,6 +135,25 @@ interface IShippingRate {
|
|
|
134
135
|
deliveryDays: number | null;
|
|
135
136
|
estimatedDelivery: string | null;
|
|
136
137
|
}
|
|
138
|
+
interface RateAddress {
|
|
139
|
+
addressee?: string;
|
|
140
|
+
addr1?: string;
|
|
141
|
+
addr2?: string;
|
|
142
|
+
city?: string;
|
|
143
|
+
state?: string;
|
|
144
|
+
zip?: string;
|
|
145
|
+
countryCode?: string;
|
|
146
|
+
isResidential?: boolean;
|
|
147
|
+
}
|
|
148
|
+
interface RatedShippingMethod {
|
|
149
|
+
id: string;
|
|
150
|
+
name: string;
|
|
151
|
+
shipping: number;
|
|
152
|
+
handling: number;
|
|
153
|
+
total: number;
|
|
154
|
+
free: boolean;
|
|
155
|
+
estimated: boolean;
|
|
156
|
+
}
|
|
137
157
|
|
|
138
158
|
interface IStoreSettings {
|
|
139
159
|
logo: string;
|
|
@@ -707,8 +727,22 @@ type OrderStatusEnum = (typeof OrderStatusEnum)[keyof typeof OrderStatusEnum];
|
|
|
707
727
|
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")[];
|
|
708
728
|
declare const statusColors: Record<OrderStatusEnum, string>;
|
|
709
729
|
declare const PURCHASE_ORDER_STATUSES: OrderStatusEnum[];
|
|
730
|
+
declare const PLACED_OPEN_ORDER_STATUSES: OrderStatusEnum[];
|
|
731
|
+
declare const UNPLACED_ORDER_STATUSES: OrderStatusEnum[];
|
|
710
732
|
declare const OPEN_ORDER_STATUSES: OrderStatusEnum[];
|
|
711
733
|
declare const QUOTE_ORDER_STATUSES: OrderStatusEnum[];
|
|
734
|
+
declare const StatusToneEnum: {
|
|
735
|
+
readonly DONE: "done";
|
|
736
|
+
readonly MOVING: "moving";
|
|
737
|
+
readonly WAITING: "waiting";
|
|
738
|
+
readonly STOPPED: "stopped";
|
|
739
|
+
readonly CLOSED: "closed";
|
|
740
|
+
};
|
|
741
|
+
type StatusToneEnum = (typeof StatusToneEnum)[keyof typeof StatusToneEnum];
|
|
742
|
+
declare const STATUS_TONE_VALUES: ("done" | "moving" | "waiting" | "stopped" | "closed")[];
|
|
743
|
+
declare const statusTones: Record<OrderStatusEnum, StatusToneEnum>;
|
|
744
|
+
declare const statusTone: (status?: string) => StatusToneEnum;
|
|
745
|
+
declare const netsuiteStatusLabel: (status?: string, netsuiteStatusText?: string) => string;
|
|
712
746
|
interface IOrder extends BaseEntity {
|
|
713
747
|
orderId: string;
|
|
714
748
|
orderItems: IOrderItem[];
|
|
@@ -720,6 +754,11 @@ interface IOrder extends BaseEntity {
|
|
|
720
754
|
sourceQuote?: IOrder | string;
|
|
721
755
|
convertedOrder?: IOrder | string;
|
|
722
756
|
quoteValidUntil?: Date;
|
|
757
|
+
quotePricedAt?: Date;
|
|
758
|
+
quoteApprovedAt?: Date;
|
|
759
|
+
quoteReadyEmailedAt?: Date;
|
|
760
|
+
quoteReadyEmailedTotal?: number;
|
|
761
|
+
quoteReadyEmailedLines?: string;
|
|
723
762
|
paymentStatus: PaymentStatusEnum;
|
|
724
763
|
paymentMethod: PaymentMethodEnum;
|
|
725
764
|
paymentGateway: PaymentGatewayEnum;
|
|
@@ -730,6 +769,7 @@ interface IOrder extends BaseEntity {
|
|
|
730
769
|
tax?: AppliedTax | null;
|
|
731
770
|
acceptedTermsAt: Date;
|
|
732
771
|
customerNote: string;
|
|
772
|
+
poNumber?: string;
|
|
733
773
|
netsuite?: INetsuiteOrderLink | null;
|
|
734
774
|
netsuiteLastError?: {
|
|
735
775
|
message: string;
|
|
@@ -744,6 +784,7 @@ interface IOrder extends BaseEntity {
|
|
|
744
784
|
|
|
745
785
|
interface ICustomer extends BaseEntity {
|
|
746
786
|
netsuiteId: string;
|
|
787
|
+
netsuiteEntityId: string;
|
|
747
788
|
firstName: string;
|
|
748
789
|
lastName: string;
|
|
749
790
|
profileImage: string;
|
|
@@ -1454,6 +1495,9 @@ interface IPaymentLink extends BaseEntity {
|
|
|
1454
1495
|
createdBy?: string;
|
|
1455
1496
|
baseUrl: string;
|
|
1456
1497
|
}
|
|
1498
|
+
interface PaymentLinkView extends IPaymentLink {
|
|
1499
|
+
url: string;
|
|
1500
|
+
}
|
|
1457
1501
|
|
|
1458
1502
|
declare const SubscriptionChannelEnum: {
|
|
1459
1503
|
readonly EMAIL: "EMAIL";
|
|
@@ -6037,6 +6081,12 @@ interface NetsuiteLinkResult {
|
|
|
6037
6081
|
created: boolean;
|
|
6038
6082
|
}
|
|
6039
6083
|
|
|
6084
|
+
declare const NetsuiteRecordTypeEnum: {
|
|
6085
|
+
readonly SALES_ORDER: "salesOrder";
|
|
6086
|
+
readonly ESTIMATE: "estimate";
|
|
6087
|
+
};
|
|
6088
|
+
type NetsuiteRecordTypeEnum = (typeof NetsuiteRecordTypeEnum)[keyof typeof NetsuiteRecordTypeEnum];
|
|
6089
|
+
declare const NETSUITE_RECORD_TYPE_VALUES: ("salesOrder" | "estimate")[];
|
|
6040
6090
|
declare const PushCheckStatusEnum: {
|
|
6041
6091
|
readonly PASS: "pass";
|
|
6042
6092
|
readonly WARN: "warn";
|
|
@@ -6140,6 +6190,36 @@ interface NetsuiteSyncDefinition {
|
|
|
6140
6190
|
fields: string[];
|
|
6141
6191
|
source: string;
|
|
6142
6192
|
}
|
|
6193
|
+
interface NetsuitePushAttempt {
|
|
6194
|
+
attempt: number;
|
|
6195
|
+
status: "ok" | "retrying" | "failed";
|
|
6196
|
+
ms: number;
|
|
6197
|
+
httpStatus?: number;
|
|
6198
|
+
error?: string;
|
|
6199
|
+
}
|
|
6200
|
+
interface NetsuitePushOutcome {
|
|
6201
|
+
orderId: string;
|
|
6202
|
+
recordType: string;
|
|
6203
|
+
netsuiteId?: string;
|
|
6204
|
+
receipt?: NetsuiteReceipt;
|
|
6205
|
+
skipped?: string;
|
|
6206
|
+
payload?: Record<string, unknown>;
|
|
6207
|
+
attempts?: NetsuitePushAttempt[];
|
|
6208
|
+
}
|
|
6209
|
+
interface NetsuiteStatusChange {
|
|
6210
|
+
orderId: string;
|
|
6211
|
+
netsuiteId: string;
|
|
6212
|
+
from?: string;
|
|
6213
|
+
to: string;
|
|
6214
|
+
localStatus?: string;
|
|
6215
|
+
}
|
|
6216
|
+
interface NetsuiteStatusSyncResult {
|
|
6217
|
+
checked: number;
|
|
6218
|
+
changed: number;
|
|
6219
|
+
statusChanges: NetsuiteStatusChange[];
|
|
6220
|
+
shipmentsUpdated: number;
|
|
6221
|
+
fulfillments: number;
|
|
6222
|
+
}
|
|
6143
6223
|
|
|
6144
6224
|
interface RevalidationResult {
|
|
6145
6225
|
domain: string;
|
|
@@ -6188,6 +6268,7 @@ interface CheckoutPayload {
|
|
|
6188
6268
|
shippingMethod?: string;
|
|
6189
6269
|
acceptedTerms: boolean;
|
|
6190
6270
|
customerNote?: string;
|
|
6271
|
+
poNumber?: string;
|
|
6191
6272
|
}
|
|
6192
6273
|
interface CheckoutResult {
|
|
6193
6274
|
order: IOrder;
|
|
@@ -6244,4 +6325,4 @@ interface IWishlist extends BaseEntity {
|
|
|
6244
6325
|
items: IWishlistItem[];
|
|
6245
6326
|
}
|
|
6246
6327
|
|
|
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 };
|
|
6328
|
+
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_RECORD_TYPE_VALUES, NETSUITE_RELATION_GROUPS, NOTIFICATION_TYPE_VALUES, NetsuiteEventStateEnum, NetsuiteFieldProvider, type NetsuiteLinkResult, type NetsuiteOrderPreview, type NetsuiteOwnedEntity, type NetsuitePreviewLine, type NetsuitePushAttempt, type NetsuitePushOutcome, type NetsuiteReceipt, NetsuiteRecordTypeEnum, type NetsuiteRelationSource, type NetsuiteStatusChange, type NetsuiteStatusSyncResult, 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, PLACED_OPEN_ORDER_STATUSES, PRICING_TYPE_VALUES, PRODUCT_FIELDS, PRODUCT_VARIANT_TYPE_VALUES, PROVIDERS, PURCHASE_ORDER_STATUSES, PUSH_CHECK_STATUS_VALUES, PaymentGatewayEnum, PaymentLinkStatusEnum, type PaymentLinkView, 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 RateAddress, type RatedShippingMethod, type RedirectTargetType, type ResolveAccessInput, type ResolvedAddonSelection, type RevalidationResult, SALE_TYPE_VALUES, SERVICE_PLAN_ELIGIBILITY_FIELD, STATUS_TONE_VALUES, SUBSCRIPTION_CHANNEL_VALUES, SUBSCRIPTION_TOPIC_LABELS, SUBSCRIPTION_TOPIC_VALUES, type SaleType, SaleTypeEnum, type SaleTypedLike, type SelectedShippingMethod, type ServicePlanNetsuiteLink, StatusToneEnum, 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, UNPLACED_ORDER_STATUSES, 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, netsuiteStatusLabel, normalizeLineQuantity, normalizeNumber, normalizePath, orderLogTypeColorMap, paymentLinkStatusColorMap, paymentMethodColorMap, paymentStatusColorMap, podcastFields, productFields, readMapped, resolveAddonSelections, resolveEffectivePermissions, resolveProductAddonGroups, resolveProductServicePlans, resolveStoreScope, roundMoney, saleTypeOf, servicePlanFields, statusColors, statusTone, statusTones, stockVerdict, syncOwnerFor, toIdString, typeColorMap };
|
package/dist/index.js
CHANGED
|
@@ -60,10 +60,12 @@ __export(index_exports, {
|
|
|
60
60
|
InventoryPolicyEnum: () => InventoryPolicyEnum,
|
|
61
61
|
NETSUITE_EVENT_STATE_VALUES: () => NETSUITE_EVENT_STATE_VALUES,
|
|
62
62
|
NETSUITE_OWNED_FIELDS: () => NETSUITE_OWNED_FIELDS,
|
|
63
|
+
NETSUITE_RECORD_TYPE_VALUES: () => NETSUITE_RECORD_TYPE_VALUES,
|
|
63
64
|
NETSUITE_RELATION_GROUPS: () => NETSUITE_RELATION_GROUPS,
|
|
64
65
|
NOTIFICATION_TYPE_VALUES: () => NOTIFICATION_TYPE_VALUES,
|
|
65
66
|
NetsuiteEventStateEnum: () => NetsuiteEventStateEnum,
|
|
66
67
|
NetsuiteFieldProvider: () => NetsuiteFieldProvider,
|
|
68
|
+
NetsuiteRecordTypeEnum: () => NetsuiteRecordTypeEnum,
|
|
67
69
|
NotificationTypeEnum: () => NotificationTypeEnum,
|
|
68
70
|
OPEN_ORDER_STATUSES: () => OPEN_ORDER_STATUSES,
|
|
69
71
|
ORDER_LOG_TYPE_VALUES: () => ORDER_LOG_TYPE_VALUES,
|
|
@@ -74,6 +76,7 @@ __export(index_exports, {
|
|
|
74
76
|
PAYMENT_LINK_STATUS_VALUES: () => PAYMENT_LINK_STATUS_VALUES,
|
|
75
77
|
PAYMENT_METHOD_VALUES: () => PAYMENT_METHOD_VALUES,
|
|
76
78
|
PAYMENT_STATUS_VALUES: () => PAYMENT_STATUS_VALUES,
|
|
79
|
+
PLACED_OPEN_ORDER_STATUSES: () => PLACED_OPEN_ORDER_STATUSES,
|
|
77
80
|
PRICING_TYPE_VALUES: () => PRICING_TYPE_VALUES,
|
|
78
81
|
PRODUCT_FIELDS: () => PRODUCT_FIELDS,
|
|
79
82
|
PRODUCT_VARIANT_TYPE_VALUES: () => PRODUCT_VARIANT_TYPE_VALUES,
|
|
@@ -94,10 +97,12 @@ __export(index_exports, {
|
|
|
94
97
|
RETIRED_CART_STATUSES: () => RETIRED_CART_STATUSES,
|
|
95
98
|
SALE_TYPE_VALUES: () => SALE_TYPE_VALUES,
|
|
96
99
|
SERVICE_PLAN_ELIGIBILITY_FIELD: () => SERVICE_PLAN_ELIGIBILITY_FIELD,
|
|
100
|
+
STATUS_TONE_VALUES: () => STATUS_TONE_VALUES,
|
|
97
101
|
SUBSCRIPTION_CHANNEL_VALUES: () => SUBSCRIPTION_CHANNEL_VALUES,
|
|
98
102
|
SUBSCRIPTION_TOPIC_LABELS: () => SUBSCRIPTION_TOPIC_LABELS,
|
|
99
103
|
SUBSCRIPTION_TOPIC_VALUES: () => SUBSCRIPTION_TOPIC_VALUES,
|
|
100
104
|
SaleTypeEnum: () => SaleTypeEnum,
|
|
105
|
+
StatusToneEnum: () => StatusToneEnum,
|
|
101
106
|
StockStatusEnum: () => StockStatusEnum,
|
|
102
107
|
StockVerdictEnum: () => StockVerdictEnum,
|
|
103
108
|
SubscriptionChannelEnum: () => SubscriptionChannelEnum,
|
|
@@ -106,6 +111,7 @@ __export(index_exports, {
|
|
|
106
111
|
TRANSACTION_TYPE_VALUES: () => TRANSACTION_TYPE_VALUES,
|
|
107
112
|
TaxRateSourceEnum: () => TaxRateSourceEnum,
|
|
108
113
|
TransactionTypeEnum: () => TransactionTypeEnum,
|
|
114
|
+
UNPLACED_ORDER_STATUSES: () => UNPLACED_ORDER_STATUSES,
|
|
109
115
|
WIRED_EMAIL_TEMPLATE_EVENTS: () => WIRED_EMAIL_TEMPLATE_EVENTS,
|
|
110
116
|
actionsForResource: () => actionsForResource,
|
|
111
117
|
addonFields: () => addonFields,
|
|
@@ -147,6 +153,7 @@ __export(index_exports, {
|
|
|
147
153
|
netsuiteFieldRisk: () => netsuiteFieldRisk,
|
|
148
154
|
netsuiteFieldSource: () => netsuiteFieldSource,
|
|
149
155
|
netsuiteRelationSource: () => netsuiteRelationSource,
|
|
156
|
+
netsuiteStatusLabel: () => netsuiteStatusLabel,
|
|
150
157
|
normalizeLineQuantity: () => normalizeLineQuantity,
|
|
151
158
|
normalizeNumber: () => normalizeNumber,
|
|
152
159
|
normalizePath: () => normalizePath,
|
|
@@ -166,6 +173,8 @@ __export(index_exports, {
|
|
|
166
173
|
saleTypeOf: () => saleTypeOf,
|
|
167
174
|
servicePlanFields: () => servicePlanFields,
|
|
168
175
|
statusColors: () => statusColors,
|
|
176
|
+
statusTone: () => statusTone,
|
|
177
|
+
statusTones: () => statusTones,
|
|
169
178
|
stockVerdict: () => stockVerdict,
|
|
170
179
|
syncOwnerFor: () => syncOwnerFor,
|
|
171
180
|
toIdString: () => toIdString,
|
|
@@ -2172,6 +2181,16 @@ var PURCHASE_ORDER_STATUSES = [
|
|
|
2172
2181
|
OrderStatusEnum.REFUNDED,
|
|
2173
2182
|
OrderStatusEnum.PARTIALLY_REFUNDED
|
|
2174
2183
|
];
|
|
2184
|
+
var PLACED_OPEN_ORDER_STATUSES = [
|
|
2185
|
+
OrderStatusEnum.PENDING_APPROVAL,
|
|
2186
|
+
OrderStatusEnum.PENDING_FULFILLMENT,
|
|
2187
|
+
OrderStatusEnum.PARTIALLY_FULFILLED,
|
|
2188
|
+
OrderStatusEnum.PENDING_BILLING
|
|
2189
|
+
];
|
|
2190
|
+
var UNPLACED_ORDER_STATUSES = [
|
|
2191
|
+
OrderStatusEnum.CREATED,
|
|
2192
|
+
OrderStatusEnum.PAYMENT_FAILED
|
|
2193
|
+
];
|
|
2175
2194
|
var OPEN_ORDER_STATUSES = [
|
|
2176
2195
|
OrderStatusEnum.CREATED,
|
|
2177
2196
|
OrderStatusEnum.PENDING_APPROVAL,
|
|
@@ -2189,6 +2208,42 @@ var QUOTE_ORDER_STATUSES = [
|
|
|
2189
2208
|
OrderStatusEnum.QUOTE_EXPIRED,
|
|
2190
2209
|
OrderStatusEnum.CANCELLED
|
|
2191
2210
|
];
|
|
2211
|
+
var StatusToneEnum = {
|
|
2212
|
+
DONE: "done",
|
|
2213
|
+
MOVING: "moving",
|
|
2214
|
+
WAITING: "waiting",
|
|
2215
|
+
STOPPED: "stopped",
|
|
2216
|
+
CLOSED: "closed"
|
|
2217
|
+
};
|
|
2218
|
+
var STATUS_TONE_VALUES = Object.values(StatusToneEnum);
|
|
2219
|
+
var statusTones = {
|
|
2220
|
+
[OrderStatusEnum.CREATED]: StatusToneEnum.WAITING,
|
|
2221
|
+
[OrderStatusEnum.PAYMENT_FAILED]: StatusToneEnum.STOPPED,
|
|
2222
|
+
[OrderStatusEnum.PENDING_APPROVAL]: StatusToneEnum.WAITING,
|
|
2223
|
+
[OrderStatusEnum.PENDING_FULFILLMENT]: StatusToneEnum.MOVING,
|
|
2224
|
+
[OrderStatusEnum.PARTIALLY_FULFILLED]: StatusToneEnum.MOVING,
|
|
2225
|
+
[OrderStatusEnum.PENDING_BILLING]: StatusToneEnum.MOVING,
|
|
2226
|
+
[OrderStatusEnum.BILLED]: StatusToneEnum.DONE,
|
|
2227
|
+
[OrderStatusEnum.CLOSED]: StatusToneEnum.CLOSED,
|
|
2228
|
+
[OrderStatusEnum.CANCELLED]: StatusToneEnum.STOPPED,
|
|
2229
|
+
[OrderStatusEnum.PENDING_RECEIPT]: StatusToneEnum.WAITING,
|
|
2230
|
+
[OrderStatusEnum.PENDING_REFUND]: StatusToneEnum.CLOSED,
|
|
2231
|
+
[OrderStatusEnum.REFUNDED]: StatusToneEnum.CLOSED,
|
|
2232
|
+
[OrderStatusEnum.PARTIALLY_REFUNDED]: StatusToneEnum.CLOSED,
|
|
2233
|
+
[OrderStatusEnum.QUOTE_REQUESTED]: StatusToneEnum.WAITING,
|
|
2234
|
+
[OrderStatusEnum.QUOTE_OPEN]: StatusToneEnum.MOVING,
|
|
2235
|
+
[OrderStatusEnum.QUOTE_APPROVED]: StatusToneEnum.DONE,
|
|
2236
|
+
[OrderStatusEnum.QUOTE_PROCESSED]: StatusToneEnum.DONE,
|
|
2237
|
+
[OrderStatusEnum.QUOTE_CLOSED]: StatusToneEnum.STOPPED,
|
|
2238
|
+
[OrderStatusEnum.QUOTE_VOIDED]: StatusToneEnum.STOPPED,
|
|
2239
|
+
[OrderStatusEnum.QUOTE_EXPIRED]: StatusToneEnum.CLOSED
|
|
2240
|
+
};
|
|
2241
|
+
var statusTone = (status) => statusTones[status] ?? StatusToneEnum.WAITING;
|
|
2242
|
+
var netsuiteStatusLabel = (status, netsuiteStatusText) => {
|
|
2243
|
+
const fromNetsuite = (netsuiteStatusText ?? "").trim();
|
|
2244
|
+
if (fromNetsuite) return fromNetsuite;
|
|
2245
|
+
return String(status ?? "").replace(/^QUOTE_/, "").replace(/_/g, " ").trim();
|
|
2246
|
+
};
|
|
2192
2247
|
|
|
2193
2248
|
// src/orderLog/interface.ts
|
|
2194
2249
|
var OrderLogTypeEnum = {
|
|
@@ -2337,6 +2392,11 @@ var TaxRateSourceEnum = {
|
|
|
2337
2392
|
var TAX_RATE_SOURCE_VALUES = Object.values(TaxRateSourceEnum);
|
|
2338
2393
|
|
|
2339
2394
|
// src/netsuitePush/interface.ts
|
|
2395
|
+
var NetsuiteRecordTypeEnum = {
|
|
2396
|
+
SALES_ORDER: "salesOrder",
|
|
2397
|
+
ESTIMATE: "estimate"
|
|
2398
|
+
};
|
|
2399
|
+
var NETSUITE_RECORD_TYPE_VALUES = Object.values(NetsuiteRecordTypeEnum);
|
|
2340
2400
|
var PushCheckStatusEnum = {
|
|
2341
2401
|
PASS: "pass",
|
|
2342
2402
|
WARN: "warn",
|