@fas-core/shared-types 1.0.119 → 1.0.120

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
@@ -1078,21 +1078,115 @@ interface StoreAccessCheckInput extends StoreScopeInput {
1078
1078
  }
1079
1079
  declare const hasStoreAccess: (input: StoreAccessCheckInput) => boolean;
1080
1080
 
1081
+ declare const CaseStatusEnum: {
1082
+ readonly NOT_STARTED: "1";
1083
+ readonly IN_PROGRESS: "2";
1084
+ readonly ESCALATED: "3";
1085
+ readonly REOPENED: "4";
1086
+ readonly CLOSED: "5";
1087
+ };
1088
+ type CaseStatus = (typeof CaseStatusEnum)[keyof typeof CaseStatusEnum];
1089
+ declare const CASE_STATUS_VALUES: CaseStatus[];
1090
+ declare const CASE_STATUS_LABELS: Record<CaseStatus, string>;
1091
+ declare const CASE_STATUS_COLORS: Record<CaseStatus, string>;
1092
+ declare const CasePriorityEnum: {
1093
+ readonly HIGH: "1";
1094
+ readonly MEDIUM: "2";
1095
+ readonly LOW: "3";
1096
+ };
1097
+ type CasePriority = (typeof CasePriorityEnum)[keyof typeof CasePriorityEnum];
1098
+ declare const CASE_PRIORITY_VALUES: CasePriority[];
1099
+ declare const CASE_PRIORITY_LABELS: Record<CasePriority, string>;
1100
+ declare const CaseTypeEnum: {
1101
+ readonly QUESTION: "1";
1102
+ readonly CONCERN: "2";
1103
+ readonly PROBLEM: "3";
1104
+ readonly REQUEST_FOR_QUOTE: "4";
1105
+ };
1106
+ type CaseType = (typeof CaseTypeEnum)[keyof typeof CaseTypeEnum];
1107
+ declare const CASE_TYPE_VALUES: CaseType[];
1108
+ declare const CASE_TYPE_LABELS: Record<CaseType, string>;
1109
+ declare const CaseOriginEnum: {
1110
+ readonly WEB: "-5";
1111
+ readonly EMAIL: "1";
1112
+ readonly PHONE: "2";
1113
+ readonly OTHER: "3";
1114
+ };
1115
+ type CaseOrigin = (typeof CaseOriginEnum)[keyof typeof CaseOriginEnum];
1116
+ declare const CASE_ORIGIN_VALUES: CaseOrigin[];
1117
+ declare const CASE_ORIGIN_LABELS: Record<CaseOrigin, string>;
1118
+ declare const CaseProfileEnum: {
1119
+ readonly CUSTOMER_SERVICE: "1";
1120
+ readonly INSIDE_SALES: "2";
1121
+ readonly ACCOUNTING: "3";
1122
+ readonly SERVICE_DEPARTMENT: "4";
1123
+ readonly SPACEX_HELP_DESK: "5";
1124
+ };
1125
+ type CaseProfile = (typeof CaseProfileEnum)[keyof typeof CaseProfileEnum];
1126
+ declare const CASE_PROFILE_VALUES: CaseProfile[];
1127
+ declare const CASE_PROFILE_LABELS: Record<CaseProfile, string>;
1128
+ declare const CONTACT_PROFILE_OPTIONS: Array<{
1129
+ value: CaseProfile;
1130
+ label: string;
1131
+ }>;
1132
+ declare const isContactProfile: (value: unknown) => value is CaseProfile;
1133
+ declare const caseIsOpen: (status?: CaseStatus | null) => boolean;
1134
+ interface ICaseMessage {
1135
+ id: string;
1136
+ author: string;
1137
+ incoming: boolean;
1138
+ message: string;
1139
+ html?: boolean;
1140
+ sentAt: Date | string;
1141
+ }
1142
+ interface ISupportCase {
1143
+ id: string;
1144
+ caseNumber: string;
1145
+ title: string;
1146
+ status: CaseStatus;
1147
+ priority: CasePriority;
1148
+ caseType?: CaseType;
1149
+ profile?: CaseProfile;
1150
+ origin?: CaseOrigin;
1151
+ email?: string;
1152
+ phone?: string;
1153
+ companyName?: string;
1154
+ createdDate: Date | string;
1155
+ lastMessageDate?: Date | string;
1156
+ spam?: boolean;
1157
+ messages?: ICaseMessage[];
1158
+ }
1159
+ interface INetsuiteCaseLink {
1160
+ id: string;
1161
+ caseNumber?: string;
1162
+ company?: string;
1163
+ recordUrl?: string;
1164
+ statusCheckedAt?: Date | string;
1165
+ pushedAt?: Date | string;
1166
+ }
1167
+ type ISupportCaseListItem = Omit<ISupportCase, "messages">;
1168
+
1081
1169
  interface IContact extends BaseEntity {
1082
1170
  firstName: string;
1083
1171
  lastName: string;
1084
1172
  companyName?: string;
1085
1173
  email: string;
1086
1174
  phone: string;
1087
- category: "sales" | "support" | "orders" | "returns" | "parts" | "other";
1175
+ address?: string;
1176
+ profile: CaseProfile;
1088
1177
  subject: string;
1089
1178
  message: string;
1090
- status: 'new' | 'in-progress' | 'resolved' | 'closed';
1091
- source: 'website' | 'email' | 'phone' | 'chat' | 'other';
1179
+ status: CaseStatus;
1180
+ origin: CaseOrigin;
1092
1181
  caseId: string;
1093
1182
  notes: string;
1094
1183
  store: IStore;
1095
1184
  resolvedAt?: Date;
1185
+ netsuite?: INetsuiteCaseLink | null;
1186
+ netsuiteLastError?: {
1187
+ message: string;
1188
+ failedAt?: Date | string;
1189
+ } | null;
1096
1190
  }
1097
1191
 
1098
1192
  declare const SERVICE_PLAN_ELIGIBILITY_FIELD = "custitem520";
@@ -1495,7 +1589,7 @@ declare const OrderLogTypeEnum: {
1495
1589
  readonly NOTE: "NOTE";
1496
1590
  };
1497
1591
  type OrderLogTypeEnum = (typeof OrderLogTypeEnum)[keyof typeof OrderLogTypeEnum];
1498
- declare const ORDER_LOG_TYPE_VALUES: ("REFUND" | "PAYMENT_FAILED" | "ORDER_PLACED" | "PAYMENT_PENDING" | "PAYMENT_SUCCEEDED" | "PAYMENT_CANCELLED" | "ORDER_STATUS" | "EMAIL" | "NOTE")[];
1592
+ declare const ORDER_LOG_TYPE_VALUES: ("REFUND" | "PAYMENT_FAILED" | "EMAIL" | "ORDER_PLACED" | "PAYMENT_PENDING" | "PAYMENT_SUCCEEDED" | "PAYMENT_CANCELLED" | "ORDER_STATUS" | "NOTE")[];
1499
1593
  declare const orderLogTypeColorMap: Record<OrderLogTypeEnum, string>;
1500
1594
  interface IOrderLog extends BaseEntity {
1501
1595
  order: IOrder | string;
@@ -6414,4 +6508,4 @@ interface IWishlist extends BaseEntity {
6414
6508
  items: IWishlistItem[];
6415
6509
  }
6416
6510
 
6417
- 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 ICategorySequence, type ICategorySubcategory, type ICategoryUrl, 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, canonicalizeUrlSegment, cartAcceptsItem, categoryFields, chargesOfLine, conditionHolds, couponFields, demandByKey, evaluateConfigurator, feeHint, formatMoney, grantedPermissions, groupHasDefaultAddon, hasStoreAccess, isConfigurationValid, isNetsuiteOwned, isNonEmptyString, isQuoteOnlyItem, isValidAction, isValidEmail, missingGrants, netsuiteFieldCaution, netsuiteFieldConditional, netsuiteFieldDerivedFrom, 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 };
6511
+ 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, CASE_ORIGIN_LABELS, CASE_ORIGIN_VALUES, CASE_PRIORITY_LABELS, CASE_PRIORITY_VALUES, CASE_PROFILE_LABELS, CASE_PROFILE_VALUES, CASE_STATUS_COLORS, CASE_STATUS_LABELS, CASE_STATUS_VALUES, CASE_TYPE_LABELS, CASE_TYPE_VALUES, CATEGORY_FIELDS, CONFIGURATOR_CONDITION_TYPE_VALUES, CONFIGURATOR_EFFECT_TYPE_VALUES, CONFIGURATOR_SELECT_MODE_VALUES, CONFIGURATOR_SOURCE_VALUES, CONTACT_PROFILE_OPTIONS, type CacheStatus, type CacheStoreTarget, CampaignRecipientStatusEnum, CampaignStatusEnum, type CartIssue, type CartIssueType, CartIssueTypes, CartStatusEnum, type CartValidation, type CaseOrigin, CaseOriginEnum, type CasePriority, CasePriorityEnum, type CaseProfile, CaseProfileEnum, type CaseStatus, CaseStatusEnum, type CaseType, CaseTypeEnum, 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 ICaseMessage, type ICategory, type ICategorySequence, type ICategorySubcategory, type ICategoryUrl, 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 INetsuiteCaseLink, 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 ISupportCase, type ISupportCaseListItem, 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, canonicalizeUrlSegment, cartAcceptsItem, caseIsOpen, categoryFields, chargesOfLine, conditionHolds, couponFields, demandByKey, evaluateConfigurator, feeHint, formatMoney, grantedPermissions, groupHasDefaultAddon, hasStoreAccess, isConfigurationValid, isContactProfile, isNetsuiteOwned, isNonEmptyString, isQuoteOnlyItem, isValidAction, isValidEmail, missingGrants, netsuiteFieldCaution, netsuiteFieldConditional, netsuiteFieldDerivedFrom, 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
@@ -1078,21 +1078,115 @@ interface StoreAccessCheckInput extends StoreScopeInput {
1078
1078
  }
1079
1079
  declare const hasStoreAccess: (input: StoreAccessCheckInput) => boolean;
1080
1080
 
1081
+ declare const CaseStatusEnum: {
1082
+ readonly NOT_STARTED: "1";
1083
+ readonly IN_PROGRESS: "2";
1084
+ readonly ESCALATED: "3";
1085
+ readonly REOPENED: "4";
1086
+ readonly CLOSED: "5";
1087
+ };
1088
+ type CaseStatus = (typeof CaseStatusEnum)[keyof typeof CaseStatusEnum];
1089
+ declare const CASE_STATUS_VALUES: CaseStatus[];
1090
+ declare const CASE_STATUS_LABELS: Record<CaseStatus, string>;
1091
+ declare const CASE_STATUS_COLORS: Record<CaseStatus, string>;
1092
+ declare const CasePriorityEnum: {
1093
+ readonly HIGH: "1";
1094
+ readonly MEDIUM: "2";
1095
+ readonly LOW: "3";
1096
+ };
1097
+ type CasePriority = (typeof CasePriorityEnum)[keyof typeof CasePriorityEnum];
1098
+ declare const CASE_PRIORITY_VALUES: CasePriority[];
1099
+ declare const CASE_PRIORITY_LABELS: Record<CasePriority, string>;
1100
+ declare const CaseTypeEnum: {
1101
+ readonly QUESTION: "1";
1102
+ readonly CONCERN: "2";
1103
+ readonly PROBLEM: "3";
1104
+ readonly REQUEST_FOR_QUOTE: "4";
1105
+ };
1106
+ type CaseType = (typeof CaseTypeEnum)[keyof typeof CaseTypeEnum];
1107
+ declare const CASE_TYPE_VALUES: CaseType[];
1108
+ declare const CASE_TYPE_LABELS: Record<CaseType, string>;
1109
+ declare const CaseOriginEnum: {
1110
+ readonly WEB: "-5";
1111
+ readonly EMAIL: "1";
1112
+ readonly PHONE: "2";
1113
+ readonly OTHER: "3";
1114
+ };
1115
+ type CaseOrigin = (typeof CaseOriginEnum)[keyof typeof CaseOriginEnum];
1116
+ declare const CASE_ORIGIN_VALUES: CaseOrigin[];
1117
+ declare const CASE_ORIGIN_LABELS: Record<CaseOrigin, string>;
1118
+ declare const CaseProfileEnum: {
1119
+ readonly CUSTOMER_SERVICE: "1";
1120
+ readonly INSIDE_SALES: "2";
1121
+ readonly ACCOUNTING: "3";
1122
+ readonly SERVICE_DEPARTMENT: "4";
1123
+ readonly SPACEX_HELP_DESK: "5";
1124
+ };
1125
+ type CaseProfile = (typeof CaseProfileEnum)[keyof typeof CaseProfileEnum];
1126
+ declare const CASE_PROFILE_VALUES: CaseProfile[];
1127
+ declare const CASE_PROFILE_LABELS: Record<CaseProfile, string>;
1128
+ declare const CONTACT_PROFILE_OPTIONS: Array<{
1129
+ value: CaseProfile;
1130
+ label: string;
1131
+ }>;
1132
+ declare const isContactProfile: (value: unknown) => value is CaseProfile;
1133
+ declare const caseIsOpen: (status?: CaseStatus | null) => boolean;
1134
+ interface ICaseMessage {
1135
+ id: string;
1136
+ author: string;
1137
+ incoming: boolean;
1138
+ message: string;
1139
+ html?: boolean;
1140
+ sentAt: Date | string;
1141
+ }
1142
+ interface ISupportCase {
1143
+ id: string;
1144
+ caseNumber: string;
1145
+ title: string;
1146
+ status: CaseStatus;
1147
+ priority: CasePriority;
1148
+ caseType?: CaseType;
1149
+ profile?: CaseProfile;
1150
+ origin?: CaseOrigin;
1151
+ email?: string;
1152
+ phone?: string;
1153
+ companyName?: string;
1154
+ createdDate: Date | string;
1155
+ lastMessageDate?: Date | string;
1156
+ spam?: boolean;
1157
+ messages?: ICaseMessage[];
1158
+ }
1159
+ interface INetsuiteCaseLink {
1160
+ id: string;
1161
+ caseNumber?: string;
1162
+ company?: string;
1163
+ recordUrl?: string;
1164
+ statusCheckedAt?: Date | string;
1165
+ pushedAt?: Date | string;
1166
+ }
1167
+ type ISupportCaseListItem = Omit<ISupportCase, "messages">;
1168
+
1081
1169
  interface IContact extends BaseEntity {
1082
1170
  firstName: string;
1083
1171
  lastName: string;
1084
1172
  companyName?: string;
1085
1173
  email: string;
1086
1174
  phone: string;
1087
- category: "sales" | "support" | "orders" | "returns" | "parts" | "other";
1175
+ address?: string;
1176
+ profile: CaseProfile;
1088
1177
  subject: string;
1089
1178
  message: string;
1090
- status: 'new' | 'in-progress' | 'resolved' | 'closed';
1091
- source: 'website' | 'email' | 'phone' | 'chat' | 'other';
1179
+ status: CaseStatus;
1180
+ origin: CaseOrigin;
1092
1181
  caseId: string;
1093
1182
  notes: string;
1094
1183
  store: IStore;
1095
1184
  resolvedAt?: Date;
1185
+ netsuite?: INetsuiteCaseLink | null;
1186
+ netsuiteLastError?: {
1187
+ message: string;
1188
+ failedAt?: Date | string;
1189
+ } | null;
1096
1190
  }
1097
1191
 
1098
1192
  declare const SERVICE_PLAN_ELIGIBILITY_FIELD = "custitem520";
@@ -1495,7 +1589,7 @@ declare const OrderLogTypeEnum: {
1495
1589
  readonly NOTE: "NOTE";
1496
1590
  };
1497
1591
  type OrderLogTypeEnum = (typeof OrderLogTypeEnum)[keyof typeof OrderLogTypeEnum];
1498
- declare const ORDER_LOG_TYPE_VALUES: ("REFUND" | "PAYMENT_FAILED" | "ORDER_PLACED" | "PAYMENT_PENDING" | "PAYMENT_SUCCEEDED" | "PAYMENT_CANCELLED" | "ORDER_STATUS" | "EMAIL" | "NOTE")[];
1592
+ declare const ORDER_LOG_TYPE_VALUES: ("REFUND" | "PAYMENT_FAILED" | "EMAIL" | "ORDER_PLACED" | "PAYMENT_PENDING" | "PAYMENT_SUCCEEDED" | "PAYMENT_CANCELLED" | "ORDER_STATUS" | "NOTE")[];
1499
1593
  declare const orderLogTypeColorMap: Record<OrderLogTypeEnum, string>;
1500
1594
  interface IOrderLog extends BaseEntity {
1501
1595
  order: IOrder | string;
@@ -6414,4 +6508,4 @@ interface IWishlist extends BaseEntity {
6414
6508
  items: IWishlistItem[];
6415
6509
  }
6416
6510
 
6417
- 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 ICategorySequence, type ICategorySubcategory, type ICategoryUrl, 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, canonicalizeUrlSegment, cartAcceptsItem, categoryFields, chargesOfLine, conditionHolds, couponFields, demandByKey, evaluateConfigurator, feeHint, formatMoney, grantedPermissions, groupHasDefaultAddon, hasStoreAccess, isConfigurationValid, isNetsuiteOwned, isNonEmptyString, isQuoteOnlyItem, isValidAction, isValidEmail, missingGrants, netsuiteFieldCaution, netsuiteFieldConditional, netsuiteFieldDerivedFrom, 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 };
6511
+ 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, CASE_ORIGIN_LABELS, CASE_ORIGIN_VALUES, CASE_PRIORITY_LABELS, CASE_PRIORITY_VALUES, CASE_PROFILE_LABELS, CASE_PROFILE_VALUES, CASE_STATUS_COLORS, CASE_STATUS_LABELS, CASE_STATUS_VALUES, CASE_TYPE_LABELS, CASE_TYPE_VALUES, CATEGORY_FIELDS, CONFIGURATOR_CONDITION_TYPE_VALUES, CONFIGURATOR_EFFECT_TYPE_VALUES, CONFIGURATOR_SELECT_MODE_VALUES, CONFIGURATOR_SOURCE_VALUES, CONTACT_PROFILE_OPTIONS, type CacheStatus, type CacheStoreTarget, CampaignRecipientStatusEnum, CampaignStatusEnum, type CartIssue, type CartIssueType, CartIssueTypes, CartStatusEnum, type CartValidation, type CaseOrigin, CaseOriginEnum, type CasePriority, CasePriorityEnum, type CaseProfile, CaseProfileEnum, type CaseStatus, CaseStatusEnum, type CaseType, CaseTypeEnum, 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 ICaseMessage, type ICategory, type ICategorySequence, type ICategorySubcategory, type ICategoryUrl, 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 INetsuiteCaseLink, 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 ISupportCase, type ISupportCaseListItem, 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, canonicalizeUrlSegment, cartAcceptsItem, caseIsOpen, categoryFields, chargesOfLine, conditionHolds, couponFields, demandByKey, evaluateConfigurator, feeHint, formatMoney, grantedPermissions, groupHasDefaultAddon, hasStoreAccess, isConfigurationValid, isContactProfile, isNetsuiteOwned, isNonEmptyString, isQuoteOnlyItem, isValidAction, isValidEmail, missingGrants, netsuiteFieldCaution, netsuiteFieldConditional, netsuiteFieldDerivedFrom, 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
@@ -31,15 +31,32 @@ __export(index_exports, {
31
31
  CAMPAIGN_RECIPIENT_STATUS_VALUES: () => CAMPAIGN_RECIPIENT_STATUS_VALUES,
32
32
  CAMPAIGN_STATUS_VALUES: () => CAMPAIGN_STATUS_VALUES,
33
33
  CART_STATUS_VALUES: () => CART_STATUS_VALUES,
34
+ CASE_ORIGIN_LABELS: () => CASE_ORIGIN_LABELS,
35
+ CASE_ORIGIN_VALUES: () => CASE_ORIGIN_VALUES,
36
+ CASE_PRIORITY_LABELS: () => CASE_PRIORITY_LABELS,
37
+ CASE_PRIORITY_VALUES: () => CASE_PRIORITY_VALUES,
38
+ CASE_PROFILE_LABELS: () => CASE_PROFILE_LABELS,
39
+ CASE_PROFILE_VALUES: () => CASE_PROFILE_VALUES,
40
+ CASE_STATUS_COLORS: () => CASE_STATUS_COLORS,
41
+ CASE_STATUS_LABELS: () => CASE_STATUS_LABELS,
42
+ CASE_STATUS_VALUES: () => CASE_STATUS_VALUES,
43
+ CASE_TYPE_LABELS: () => CASE_TYPE_LABELS,
44
+ CASE_TYPE_VALUES: () => CASE_TYPE_VALUES,
34
45
  CATEGORY_FIELDS: () => CATEGORY_FIELDS,
35
46
  CONFIGURATOR_CONDITION_TYPE_VALUES: () => CONFIGURATOR_CONDITION_TYPE_VALUES,
36
47
  CONFIGURATOR_EFFECT_TYPE_VALUES: () => CONFIGURATOR_EFFECT_TYPE_VALUES,
37
48
  CONFIGURATOR_SELECT_MODE_VALUES: () => CONFIGURATOR_SELECT_MODE_VALUES,
38
49
  CONFIGURATOR_SOURCE_VALUES: () => CONFIGURATOR_SOURCE_VALUES,
50
+ CONTACT_PROFILE_OPTIONS: () => CONTACT_PROFILE_OPTIONS,
39
51
  CampaignRecipientStatusEnum: () => CampaignRecipientStatusEnum,
40
52
  CampaignStatusEnum: () => CampaignStatusEnum,
41
53
  CartIssueTypes: () => CartIssueTypes,
42
54
  CartStatusEnum: () => CartStatusEnum,
55
+ CaseOriginEnum: () => CaseOriginEnum,
56
+ CasePriorityEnum: () => CasePriorityEnum,
57
+ CaseProfileEnum: () => CaseProfileEnum,
58
+ CaseStatusEnum: () => CaseStatusEnum,
59
+ CaseTypeEnum: () => CaseTypeEnum,
43
60
  ConfiguratorConditionTypeEnum: () => ConfiguratorConditionTypeEnum,
44
61
  ConfiguratorEffectTypeEnum: () => ConfiguratorEffectTypeEnum,
45
62
  ConfiguratorErrorCodeEnum: () => ConfiguratorErrorCodeEnum,
@@ -131,6 +148,7 @@ __export(index_exports, {
131
148
  canonicalizeSlug: () => canonicalizeSlug,
132
149
  canonicalizeUrlSegment: () => canonicalizeUrlSegment,
133
150
  cartAcceptsItem: () => cartAcceptsItem,
151
+ caseIsOpen: () => caseIsOpen,
134
152
  categoryFields: () => categoryFields,
135
153
  chargesOfLine: () => chargesOfLine,
136
154
  conditionHolds: () => conditionHolds,
@@ -143,6 +161,7 @@ __export(index_exports, {
143
161
  groupHasDefaultAddon: () => groupHasDefaultAddon,
144
162
  hasStoreAccess: () => hasStoreAccess,
145
163
  isConfigurationValid: () => isConfigurationValid,
164
+ isContactProfile: () => isContactProfile,
146
165
  isNetsuiteOwned: () => isNetsuiteOwned,
147
166
  isNonEmptyString: () => isNonEmptyString,
148
167
  isQuoteOnlyItem: () => isQuoteOnlyItem,
@@ -353,6 +372,90 @@ var normalizeNumber = (value, fallback = 0) => {
353
372
  };
354
373
  var isValidEmail = (email) => typeof email === "string" && /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email.trim());
355
374
 
375
+ // src/supportCase/interface.ts
376
+ var CaseStatusEnum = {
377
+ NOT_STARTED: "1",
378
+ IN_PROGRESS: "2",
379
+ ESCALATED: "3",
380
+ REOPENED: "4",
381
+ CLOSED: "5"
382
+ };
383
+ var CASE_STATUS_VALUES = Object.values(CaseStatusEnum);
384
+ var CASE_STATUS_LABELS = {
385
+ [CaseStatusEnum.NOT_STARTED]: "Not Started",
386
+ [CaseStatusEnum.IN_PROGRESS]: "In Progress",
387
+ [CaseStatusEnum.ESCALATED]: "Escalated",
388
+ [CaseStatusEnum.REOPENED]: "Re-Opened",
389
+ [CaseStatusEnum.CLOSED]: "Closed"
390
+ };
391
+ var CASE_STATUS_COLORS = {
392
+ [CaseStatusEnum.NOT_STARTED]: "default",
393
+ [CaseStatusEnum.IN_PROGRESS]: "blue",
394
+ [CaseStatusEnum.ESCALATED]: "red",
395
+ [CaseStatusEnum.REOPENED]: "gold",
396
+ [CaseStatusEnum.CLOSED]: "green"
397
+ };
398
+ var CasePriorityEnum = {
399
+ HIGH: "1",
400
+ MEDIUM: "2",
401
+ LOW: "3"
402
+ };
403
+ var CASE_PRIORITY_VALUES = Object.values(CasePriorityEnum);
404
+ var CASE_PRIORITY_LABELS = {
405
+ [CasePriorityEnum.HIGH]: "High",
406
+ [CasePriorityEnum.MEDIUM]: "Medium",
407
+ [CasePriorityEnum.LOW]: "Low"
408
+ };
409
+ var CaseTypeEnum = {
410
+ QUESTION: "1",
411
+ CONCERN: "2",
412
+ PROBLEM: "3",
413
+ REQUEST_FOR_QUOTE: "4"
414
+ };
415
+ var CASE_TYPE_VALUES = Object.values(CaseTypeEnum);
416
+ var CASE_TYPE_LABELS = {
417
+ [CaseTypeEnum.QUESTION]: "Question",
418
+ [CaseTypeEnum.CONCERN]: "Concern",
419
+ [CaseTypeEnum.PROBLEM]: "Problem",
420
+ [CaseTypeEnum.REQUEST_FOR_QUOTE]: "Request For Quote"
421
+ };
422
+ var CaseOriginEnum = {
423
+ WEB: "-5",
424
+ EMAIL: "1",
425
+ PHONE: "2",
426
+ OTHER: "3"
427
+ };
428
+ var CASE_ORIGIN_VALUES = Object.values(CaseOriginEnum);
429
+ var CASE_ORIGIN_LABELS = {
430
+ [CaseOriginEnum.WEB]: "Web",
431
+ [CaseOriginEnum.EMAIL]: "E-mail",
432
+ [CaseOriginEnum.PHONE]: "Phone",
433
+ [CaseOriginEnum.OTHER]: "Other"
434
+ };
435
+ var CaseProfileEnum = {
436
+ CUSTOMER_SERVICE: "1",
437
+ INSIDE_SALES: "2",
438
+ ACCOUNTING: "3",
439
+ SERVICE_DEPARTMENT: "4",
440
+ SPACEX_HELP_DESK: "5"
441
+ };
442
+ var CASE_PROFILE_VALUES = Object.values(CaseProfileEnum);
443
+ var CASE_PROFILE_LABELS = {
444
+ [CaseProfileEnum.CUSTOMER_SERVICE]: "Customer Service",
445
+ [CaseProfileEnum.INSIDE_SALES]: "Inside Sales",
446
+ [CaseProfileEnum.ACCOUNTING]: "Accounting",
447
+ [CaseProfileEnum.SERVICE_DEPARTMENT]: "Service Department",
448
+ [CaseProfileEnum.SPACEX_HELP_DESK]: "Flexible Assembly - SpaceX Help Desk"
449
+ };
450
+ var CONTACT_PROFILE_OPTIONS = [
451
+ { value: CaseProfileEnum.INSIDE_SALES, label: "Sales & quotes" },
452
+ { value: CaseProfileEnum.SERVICE_DEPARTMENT, label: "Service & calibration" },
453
+ { value: CaseProfileEnum.ACCOUNTING, label: "Billing & accounts" },
454
+ { value: CaseProfileEnum.CUSTOMER_SERVICE, label: "Something else" }
455
+ ];
456
+ var isContactProfile = (value) => CONTACT_PROFILE_OPTIONS.some((option) => option.value === value);
457
+ var caseIsOpen = (status) => Boolean(status) && status !== CaseStatusEnum.CLOSED;
458
+
356
459
  // src/coupon/interface.ts
357
460
  var DiscountTypeEnum = {
358
461
  PERCENTAGE: "PERCENTAGE",