@launchedla/snacktime
Advanced tools
Comparing version 0.0.19 to 0.0.21
@@ -52,2 +52,9 @@ import { Action } from '.'; | ||
} | ||
export interface APIOrderNowAction extends CommonProps { | ||
actionType: 'ORDER_NOW'; | ||
bundleType: string; | ||
originalProcessedAt: number; | ||
daysDiff: number; | ||
subtotal: number; | ||
} | ||
export interface APISwapOutOfStockPatternsReportAction extends CommonProps { | ||
@@ -70,4 +77,4 @@ actionType: 'SWAP_OUT_OF_STOCK_PATTERNS_REPORT'; | ||
} | ||
export declare type APIAction = APIBundleUpdateAction | APIShipDateChangedAction | APICancelledAction | APIRedeemedOfferAction | APIRedeemedLoyaltyKeyAction | APIAcceptedCancellationSaveAction | APISwapOutOfStockPatternsReportAction | APIRemoveOOSAddOnsReportAction | APIExamineInsufficientInventoryErrorsReportAction; | ||
export declare type APIAction = APIBundleUpdateAction | APIShipDateChangedAction | APICancelledAction | APIRedeemedOfferAction | APIRedeemedLoyaltyKeyAction | APIAcceptedCancellationSaveAction | APIOrderNowAction | APISwapOutOfStockPatternsReportAction | APIRemoveOOSAddOnsReportAction | APIExamineInsufficientInventoryErrorsReportAction; | ||
export declare function convertActionsForGraph(actions: Action[]): APIAction[]; | ||
export {}; |
@@ -202,2 +202,11 @@ "use strict"; | ||
} | ||
if (snacktimeAction.label === 'OrderNow') | ||
return { | ||
actionType: 'ORDER_NOW', | ||
createdAt: new Date(snacktimeAction.createdAt), | ||
bundleType: snacktimeAction.bundleType, | ||
originalProcessedAt: snacktimeAction.originalProcessedAt, | ||
daysDiff: snacktimeAction.daysDiff, | ||
subtotal: snacktimeAction.subtotal, | ||
}; | ||
return { | ||
@@ -204,0 +213,0 @@ actionType: snacktimeAction.label === 'UpdatedBundle' ? 'BUNDLE_UPDATED' : 'PATTERNS_SWAPPED', |
@@ -61,2 +61,9 @@ interface CommonProps { | ||
} | ||
interface OrderNowAction extends CommonProps { | ||
label: 'OrderNow'; | ||
bundleType: string; | ||
originalProcessedAt: number; | ||
daysDiff: number; | ||
subtotal: number; | ||
} | ||
interface SwapOutOfStockPatternsReportAction extends CommonProps { | ||
@@ -76,3 +83,3 @@ label: 'SwapOutOfStockPatternsReport'; | ||
} | ||
export declare type Action = UpdatedBundleAction | CronSwappedPatternsAction | ChangedShipDateAction | CancelledBundleAction | RedeemedOfferAction | RedeemedLoyaltyKeyAction | AcceptedCancellationSaveAction | SwapOutOfStockPatternsReportAction | RemoveOOSAddOnsReportAction | ExamineInsufficientInventoryErrorsReportAction; | ||
export declare type Action = UpdatedBundleAction | CronSwappedPatternsAction | ChangedShipDateAction | CancelledBundleAction | RedeemedOfferAction | RedeemedLoyaltyKeyAction | AcceptedCancellationSaveAction | OrderNowAction | SwapOutOfStockPatternsReportAction | RemoveOOSAddOnsReportAction | ExamineInsufficientInventoryErrorsReportAction; | ||
export interface RecordActionRequiredProps { | ||
@@ -79,0 +86,0 @@ customerId?: number; |
{ | ||
"name": "@launchedla/snacktime", | ||
"version": "0.0.19", | ||
"version": "0.0.21", | ||
"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", |
@@ -186,2 +186,10 @@ import gql from 'graphql-tag' | ||
export interface APIOrderNowAction extends CommonProps { | ||
actionType: 'ORDER_NOW' | ||
bundleType: string | ||
originalProcessedAt: number | ||
daysDiff: number | ||
subtotal: number | ||
} | ||
export interface APISwapOutOfStockPatternsReportAction extends CommonProps { | ||
@@ -211,2 +219,3 @@ actionType: 'SWAP_OUT_OF_STOCK_PATTERNS_REPORT' | ||
| APIAcceptedCancellationSaveAction | ||
| APIOrderNowAction | ||
| APISwapOutOfStockPatternsReportAction | ||
@@ -294,2 +303,12 @@ | APIRemoveOOSAddOnsReportAction | ||
if (snacktimeAction.label === 'OrderNow') | ||
return { | ||
actionType: 'ORDER_NOW', | ||
createdAt: new Date(snacktimeAction.createdAt), | ||
bundleType: snacktimeAction.bundleType, | ||
originalProcessedAt: snacktimeAction.originalProcessedAt, | ||
daysDiff: snacktimeAction.daysDiff, | ||
subtotal: snacktimeAction.subtotal, | ||
} | ||
return { | ||
@@ -296,0 +315,0 @@ actionType: snacktimeAction.label === 'UpdatedBundle' ? 'BUNDLE_UPDATED' : 'PATTERNS_SWAPPED', |
@@ -72,2 +72,10 @@ interface CommonProps { | ||
interface OrderNowAction extends CommonProps { | ||
label: 'OrderNow' | ||
bundleType: string | ||
originalProcessedAt: number | ||
daysDiff: number | ||
subtotal: number | ||
} | ||
interface SwapOutOfStockPatternsReportAction extends CommonProps { | ||
@@ -98,2 +106,3 @@ label: 'SwapOutOfStockPatternsReport' | ||
| AcceptedCancellationSaveAction | ||
| OrderNowAction | ||
| SwapOutOfStockPatternsReportAction | ||
@@ -100,0 +109,0 @@ | RemoveOOSAddOnsReportAction |
Sorry, the diff of this file is not supported yet
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
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
892418
2258