@launchedla/snacktime
Advanced tools
Comparing version 0.0.31 to 0.0.32
@@ -1,34 +0,16 @@ | ||
interface CommonProps { | ||
storeCustomer: string; | ||
bundleChargeTime: string; | ||
createdAt: string; | ||
didExport: 0 | 1; | ||
export interface RecordActionRequiredProps { | ||
customerId?: number; | ||
bundleId?: number; | ||
chargeId?: number; | ||
} | ||
export declare type BundleUpdate = { | ||
label: 'DeletedSubscription' | 'CreatedSubscription'; | ||
subscriptionId: number; | ||
variantId: number; | ||
variantTitle: string; | ||
productId: number; | ||
productTitle: string; | ||
quantity: number; | ||
} | { | ||
label: 'ChangedQuantity'; | ||
subscriptionId: number; | ||
variantId: number; | ||
variantTitle: string; | ||
productId: number; | ||
productTitle: string; | ||
oldQuantity: number; | ||
newQuantity: number; | ||
}; | ||
interface UpdatedBundleAction extends CommonProps { | ||
export declare type Action = UpdatedBundleAction | CronSwappedPatternsAction | CronSwappedAddOnsAction | ChangedShipDateAction | RedeemedOfferAction | RedeemedLoyaltyKeyAction | RedeemedBirthdayGiftAction | AcceptedCancellationSaveAction | CancelledBundleAction | CancellationDeflectedAction | OrderNowAction | SwapOutOfStockPatternsReportAction | RemoveOOSAddOnsReportAction | ExamineInsufficientInventoryErrorsReportAction | CampaignAddOnVariantsAddedAction | AddQuickAddOnAction | ChargeFailedAction | ShipmentNotificationSentAction | RepairedBundleAction | RepairedBundlesReportAction; | ||
export interface UpdatedBundleAction extends CommonProps { | ||
label: 'UpdatedBundle'; | ||
updates: BundleUpdate[]; | ||
} | ||
interface CronSwappedPatternsAction extends CommonProps { | ||
export interface CronSwappedPatternsAction extends CommonProps { | ||
label: 'CronSwappedPatterns'; | ||
updates: BundleUpdate[]; | ||
} | ||
interface CronSwappedAddOnsAction extends CommonProps { | ||
export interface CronSwappedAddOnsAction extends CommonProps { | ||
label: 'CronSwappedAddons'; | ||
@@ -41,3 +23,3 @@ replacedVariantId: number; | ||
} | ||
interface ChangedShipDateAction extends CommonProps { | ||
export interface ChangedShipDateAction extends CommonProps { | ||
label: 'ChangedShipDate'; | ||
@@ -48,3 +30,3 @@ subscriptionIds: number[]; | ||
} | ||
interface RedeemedOfferAction extends CommonProps { | ||
export interface RedeemedOfferAction extends CommonProps { | ||
label: 'RedeemedOffer'; | ||
@@ -55,3 +37,3 @@ offer: string; | ||
} | ||
interface RedeemedLoyaltyKeyAction extends CommonProps { | ||
export interface RedeemedLoyaltyKeyAction extends CommonProps { | ||
label: 'RedeemedLoyaltyKey'; | ||
@@ -61,18 +43,24 @@ key: string; | ||
} | ||
interface RedeemedBirthdayGiftAction extends CommonProps { | ||
export interface RedeemedBirthdayGiftAction extends CommonProps { | ||
label: 'RedeemedBirthdayGift'; | ||
variantId: number; | ||
} | ||
interface AcceptedCancellationSaveAction extends CommonProps { | ||
export interface AcceptedCancellationSaveAction extends CommonProps { | ||
label: 'AcceptedCancellationSave'; | ||
reason: string; | ||
save: string; | ||
cancelFlowSource: CancelFlowSource; | ||
decisionIsFromBrightback?: boolean; | ||
} | ||
interface CancelledBundleAction extends CommonProps { | ||
label: 'CancelledBundle'; | ||
reason: string; | ||
comments: string; | ||
scheduledAt: string; | ||
export declare type CancelledBundleAction = CancelledBundleActionWithReason | CancelledBundleActionWithOtherReason; | ||
export interface CancellationDeflectedAction extends CommonProps { | ||
label: 'CancellationDeflected'; | ||
cancelFlowSource: CancelFlowSource; | ||
reason?: string; | ||
/** Present only when the deflectionType is "accepted_offer" */ | ||
save?: string; | ||
deflectionType?: 'nevermind' | 'accepted_offer'; | ||
decisionIsFromBrightback?: boolean; | ||
} | ||
interface OrderNowAction extends CommonProps { | ||
export interface OrderNowAction extends CommonProps { | ||
label: 'OrderNow'; | ||
@@ -84,3 +72,3 @@ bundleType: string; | ||
} | ||
interface SwapOutOfStockPatternsReportAction extends CommonProps { | ||
export interface SwapOutOfStockPatternsReportAction extends CommonProps { | ||
label: 'SwapOutOfStockPatternsReport'; | ||
@@ -91,7 +79,7 @@ numChargesModified: number; | ||
} | ||
interface RemoveOOSAddOnsReportAction extends CommonProps { | ||
export interface RemoveOOSAddOnsReportAction extends CommonProps { | ||
label: 'RemoveOOSAddOnsReport'; | ||
numSubscriptionsCancelled: number; | ||
} | ||
interface ExamineInsufficientInventoryErrorsReportAction extends CommonProps { | ||
export interface ExamineInsufficientInventoryErrorsReportAction extends CommonProps { | ||
label: 'ExamineInsufficientInventoryErrorsReport'; | ||
@@ -101,3 +89,3 @@ /** report format is [num occurences, error string] */ | ||
} | ||
interface CampaignAddOnVariantsAdded extends CommonProps { | ||
export interface CampaignAddOnVariantsAddedAction extends CommonProps { | ||
label: 'CampaignAddOnVariantsAdded'; | ||
@@ -108,3 +96,3 @@ campaignId: string; | ||
} | ||
interface AddQuickAddOn extends CommonProps { | ||
export interface AddQuickAddOnAction extends CommonProps { | ||
label: 'AddQuickAddOn'; | ||
@@ -114,3 +102,3 @@ bundleType: string; | ||
} | ||
interface ChargeFailedAction extends CommonProps { | ||
export interface ChargeFailedAction extends CommonProps { | ||
label: 'ChargeFailed'; | ||
@@ -125,3 +113,3 @@ errorType: 'inventory' | 'payment' | 'other' | 'max_retries'; | ||
} | ||
interface ShipmentNotificationSentAction extends CommonProps { | ||
export interface ShipmentNotificationSentAction extends CommonProps { | ||
label: 'ShipmentNotificationSent'; | ||
@@ -140,8 +128,2 @@ notificationType: 'customer' | 'internal' | 'customer_and_internal'; | ||
} | ||
export declare type Action = UpdatedBundleAction | CronSwappedPatternsAction | ChangedShipDateAction | CancelledBundleAction | RedeemedOfferAction | RedeemedLoyaltyKeyAction | RedeemedBirthdayGiftAction | AcceptedCancellationSaveAction | OrderNowAction | SwapOutOfStockPatternsReportAction | RemoveOOSAddOnsReportAction | ExamineInsufficientInventoryErrorsReportAction | CampaignAddOnVariantsAdded | AddQuickAddOn | CronSwappedAddOnsAction | ChargeFailedAction | RepairedBundleAction | RepairedBundlesReportAction | ShipmentNotificationSentAction; | ||
export interface RecordActionRequiredProps { | ||
customerId?: number; | ||
bundleId?: number; | ||
chargeId?: number; | ||
} | ||
export interface RepairedBundleAction extends CommonProps { | ||
@@ -177,2 +159,45 @@ label: 'RepairedBundle'; | ||
} | ||
/** @todo does this need to be exported? It can be accessed via UpdatedBundleAction['updates'][number] */ | ||
export declare type BundleUpdate = { | ||
label: 'DeletedSubscription' | 'CreatedSubscription'; | ||
subscriptionId: number; | ||
variantId: number; | ||
variantTitle: string; | ||
productId: number; | ||
productTitle: string; | ||
quantity: number; | ||
} | { | ||
label: 'ChangedQuantity'; | ||
subscriptionId: number; | ||
variantId: number; | ||
variantTitle: string; | ||
productId: number; | ||
productTitle: string; | ||
oldQuantity: number; | ||
newQuantity: number; | ||
}; | ||
interface CommonProps { | ||
storeCustomer: string; | ||
bundleChargeTime: string; | ||
createdAt: string; | ||
didExport: 0 | 1; | ||
} | ||
interface CancelledBundleActionBase extends CommonProps { | ||
label: 'CancelledBundle'; | ||
comments: string; | ||
scheduledAt: string; | ||
cancelFlowSource: CancelFlowSource; | ||
reason?: string; | ||
otherReason?: string; | ||
decisionIsFromBrightback?: boolean; | ||
} | ||
interface CancelledBundleActionWithReason extends CancelledBundleActionBase { | ||
reason: string; | ||
otherReason?: never; | ||
} | ||
interface CancelledBundleActionWithOtherReason extends CancelledBundleActionBase { | ||
otherReason: string; | ||
reason?: never; | ||
} | ||
declare type CancelFlowSource = 'hello_bello' | 'brightback' | 'customer_service'; | ||
export {}; |
{ | ||
"name": "@launchedla/snacktime", | ||
"version": "0.0.31", | ||
"version": "0.0.32", | ||
"description": "Snacktime is a wrapper for the Launched LA internal database that will replicate into Snowflake. It is a replacement for Shopify metafields and an enhanced place to store event-driven data.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
177
src/types.ts
@@ -1,30 +0,30 @@ | ||
interface CommonProps { | ||
storeCustomer: string | ||
bundleChargeTime: string | ||
createdAt: string | ||
didExport: 0 | 1 | ||
export interface RecordActionRequiredProps { | ||
customerId?: number | ||
bundleId?: number | ||
chargeId?: number | ||
} | ||
export type BundleUpdate = | ||
| { | ||
label: 'DeletedSubscription' | 'CreatedSubscription' | ||
subscriptionId: number | ||
variantId: number | ||
variantTitle: string | ||
productId: number | ||
productTitle: string | ||
quantity: number | ||
} | ||
| { | ||
label: 'ChangedQuantity' | ||
subscriptionId: number | ||
variantId: number | ||
variantTitle: string | ||
productId: number | ||
productTitle: string | ||
oldQuantity: number | ||
newQuantity: number | ||
} | ||
export type Action = | ||
| UpdatedBundleAction | ||
| CronSwappedPatternsAction | ||
| CronSwappedAddOnsAction | ||
| ChangedShipDateAction | ||
| RedeemedOfferAction | ||
| RedeemedLoyaltyKeyAction | ||
| RedeemedBirthdayGiftAction | ||
| AcceptedCancellationSaveAction | ||
| CancelledBundleAction | ||
| CancellationDeflectedAction | ||
| OrderNowAction | ||
| SwapOutOfStockPatternsReportAction | ||
| RemoveOOSAddOnsReportAction | ||
| ExamineInsufficientInventoryErrorsReportAction | ||
| CampaignAddOnVariantsAddedAction | ||
| AddQuickAddOnAction | ||
| ChargeFailedAction | ||
| ShipmentNotificationSentAction | ||
| RepairedBundleAction | ||
| RepairedBundlesReportAction | ||
interface UpdatedBundleAction extends CommonProps { | ||
export interface UpdatedBundleAction extends CommonProps { | ||
label: 'UpdatedBundle' | ||
@@ -34,3 +34,3 @@ updates: BundleUpdate[] | ||
interface CronSwappedPatternsAction extends CommonProps { | ||
export interface CronSwappedPatternsAction extends CommonProps { | ||
label: 'CronSwappedPatterns' | ||
@@ -40,3 +40,3 @@ updates: BundleUpdate[] | ||
interface CronSwappedAddOnsAction extends CommonProps { | ||
export interface CronSwappedAddOnsAction extends CommonProps { | ||
label: 'CronSwappedAddons' | ||
@@ -50,3 +50,3 @@ replacedVariantId: number | ||
interface ChangedShipDateAction extends CommonProps { | ||
export interface ChangedShipDateAction extends CommonProps { | ||
label: 'ChangedShipDate' | ||
@@ -58,3 +58,3 @@ subscriptionIds: number[] | ||
interface RedeemedOfferAction extends CommonProps { | ||
export interface RedeemedOfferAction extends CommonProps { | ||
label: 'RedeemedOffer' | ||
@@ -66,3 +66,3 @@ offer: string | ||
interface RedeemedLoyaltyKeyAction extends CommonProps { | ||
export interface RedeemedLoyaltyKeyAction extends CommonProps { | ||
label: 'RedeemedLoyaltyKey' | ||
@@ -73,3 +73,3 @@ key: string | ||
interface RedeemedBirthdayGiftAction extends CommonProps { | ||
export interface RedeemedBirthdayGiftAction extends CommonProps { | ||
label: 'RedeemedBirthdayGift' | ||
@@ -79,16 +79,23 @@ variantId: number | ||
interface AcceptedCancellationSaveAction extends CommonProps { | ||
export interface AcceptedCancellationSaveAction extends CommonProps { | ||
label: 'AcceptedCancellationSave' | ||
reason: string | ||
save: string | ||
cancelFlowSource: CancelFlowSource | ||
decisionIsFromBrightback?: boolean | ||
} | ||
interface CancelledBundleAction extends CommonProps { | ||
label: 'CancelledBundle' | ||
reason: string | ||
comments: string | ||
scheduledAt: string | ||
export type CancelledBundleAction = CancelledBundleActionWithReason | CancelledBundleActionWithOtherReason | ||
export interface CancellationDeflectedAction extends CommonProps { | ||
label: 'CancellationDeflected' | ||
cancelFlowSource: CancelFlowSource | ||
reason?: string | ||
/** Present only when the deflectionType is "accepted_offer" */ | ||
save?: string | ||
deflectionType?: 'nevermind' | 'accepted_offer' | ||
decisionIsFromBrightback?: boolean | ||
} | ||
interface OrderNowAction extends CommonProps { | ||
export interface OrderNowAction extends CommonProps { | ||
label: 'OrderNow' | ||
@@ -101,3 +108,3 @@ bundleType: string | ||
interface SwapOutOfStockPatternsReportAction extends CommonProps { | ||
export interface SwapOutOfStockPatternsReportAction extends CommonProps { | ||
label: 'SwapOutOfStockPatternsReport' | ||
@@ -109,3 +116,3 @@ numChargesModified: number | ||
interface RemoveOOSAddOnsReportAction extends CommonProps { | ||
export interface RemoveOOSAddOnsReportAction extends CommonProps { | ||
label: 'RemoveOOSAddOnsReport' | ||
@@ -115,3 +122,3 @@ numSubscriptionsCancelled: number | ||
interface ExamineInsufficientInventoryErrorsReportAction extends CommonProps { | ||
export interface ExamineInsufficientInventoryErrorsReportAction extends CommonProps { | ||
label: 'ExamineInsufficientInventoryErrorsReport' | ||
@@ -122,3 +129,3 @@ /** report format is [num occurences, error string] */ | ||
interface CampaignAddOnVariantsAdded extends CommonProps { | ||
export interface CampaignAddOnVariantsAddedAction extends CommonProps { | ||
label: 'CampaignAddOnVariantsAdded' | ||
@@ -130,3 +137,3 @@ campaignId: string | ||
interface AddQuickAddOn extends CommonProps { | ||
export interface AddQuickAddOnAction extends CommonProps { | ||
label: 'AddQuickAddOn' | ||
@@ -137,3 +144,3 @@ bundleType: string | ||
interface ChargeFailedAction extends CommonProps { | ||
export interface ChargeFailedAction extends CommonProps { | ||
label: 'ChargeFailed' | ||
@@ -149,3 +156,3 @@ errorType: 'inventory' | 'payment' | 'other' | 'max_retries' | ||
interface ShipmentNotificationSentAction extends CommonProps { | ||
export interface ShipmentNotificationSentAction extends CommonProps { | ||
label: 'ShipmentNotificationSent' | ||
@@ -165,29 +172,2 @@ notificationType: 'customer' | 'internal' | 'customer_and_internal' | ||
export type Action = | ||
| UpdatedBundleAction | ||
| CronSwappedPatternsAction | ||
| ChangedShipDateAction | ||
| CancelledBundleAction | ||
| RedeemedOfferAction | ||
| RedeemedLoyaltyKeyAction | ||
| RedeemedBirthdayGiftAction | ||
| AcceptedCancellationSaveAction | ||
| OrderNowAction | ||
| SwapOutOfStockPatternsReportAction | ||
| RemoveOOSAddOnsReportAction | ||
| ExamineInsufficientInventoryErrorsReportAction | ||
| CampaignAddOnVariantsAdded | ||
| AddQuickAddOn | ||
| CronSwappedAddOnsAction | ||
| ChargeFailedAction | ||
| RepairedBundleAction | ||
| RepairedBundlesReportAction | ||
| ShipmentNotificationSentAction | ||
export interface RecordActionRequiredProps { | ||
customerId?: number | ||
bundleId?: number | ||
chargeId?: number | ||
} | ||
export interface RepairedBundleAction extends CommonProps { | ||
@@ -230,1 +210,52 @@ label: 'RepairedBundle' | ||
} | ||
/** @todo does this need to be exported? It can be accessed via UpdatedBundleAction['updates'][number] */ | ||
export type BundleUpdate = | ||
| { | ||
label: 'DeletedSubscription' | 'CreatedSubscription' | ||
subscriptionId: number | ||
variantId: number | ||
variantTitle: string | ||
productId: number | ||
productTitle: string | ||
quantity: number | ||
} | ||
| { | ||
label: 'ChangedQuantity' | ||
subscriptionId: number | ||
variantId: number | ||
variantTitle: string | ||
productId: number | ||
productTitle: string | ||
oldQuantity: number | ||
newQuantity: number | ||
} | ||
interface CommonProps { | ||
storeCustomer: string | ||
bundleChargeTime: string | ||
createdAt: string | ||
didExport: 0 | 1 | ||
} | ||
interface CancelledBundleActionBase extends CommonProps { | ||
label: 'CancelledBundle' | ||
comments: string | ||
scheduledAt: string | ||
cancelFlowSource: CancelFlowSource | ||
reason?: string | ||
otherReason?: string | ||
decisionIsFromBrightback?: boolean | ||
} | ||
interface CancelledBundleActionWithReason extends CancelledBundleActionBase { | ||
reason: string | ||
otherReason?: never | ||
} | ||
interface CancelledBundleActionWithOtherReason extends CancelledBundleActionBase { | ||
otherReason: string | ||
reason?: never | ||
} | ||
type CancelFlowSource = 'hello_bello' | 'brightback' | 'customer_service' |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
781363
36
1945
1