@launchedla/snacktime
Advanced tools
Comparing version 0.0.22 to 0.0.23
@@ -183,2 +183,19 @@ "use strict"; | ||
}); | ||
test('CampaignAddOnVariantsAdded', async () => { | ||
expect(await snacktime.recordAction({ bundleId: 123, customerId: 123 }, { | ||
label: 'CampaignAddOnVariantsAdded', | ||
campaignId: 'test-campaign-id', | ||
bundleType: 'Diaper', | ||
bundleId: '123456789', | ||
variantIds: [123, 456], | ||
})).toBe(true); | ||
}); | ||
test('AddQuickAddOn', async () => { | ||
expect(await snacktime.recordAction({ bundleId: 123, customerId: 123 }, { | ||
label: 'AddQuickAddOn', | ||
bundleType: 'Diaper', | ||
bundleId: '123456789', | ||
variantIds: [123, 456], | ||
})).toBe(true); | ||
}); | ||
}); | ||
@@ -185,0 +202,0 @@ describe('getActions', () => { |
@@ -50,2 +50,6 @@ interface CommonProps { | ||
} | ||
interface RedeemedBirthdayGiftAction extends CommonProps { | ||
label: 'RedeemedBirthdayGift'; | ||
variantId: string; | ||
} | ||
interface AcceptedCancellationSaveAction extends CommonProps { | ||
@@ -83,3 +87,16 @@ label: 'AcceptedCancellationSave'; | ||
} | ||
export declare type Action = UpdatedBundleAction | CronSwappedPatternsAction | ChangedShipDateAction | CancelledBundleAction | RedeemedOfferAction | RedeemedLoyaltyKeyAction | AcceptedCancellationSaveAction | OrderNowAction | SwapOutOfStockPatternsReportAction | RemoveOOSAddOnsReportAction | ExamineInsufficientInventoryErrorsReportAction; | ||
interface CampaignAddOnVariantsAdded extends CommonProps { | ||
label: 'CampaignAddOnVariantsAdded'; | ||
campaignId: string; | ||
bundleType: string; | ||
bundleId: string; | ||
variantIds: number[]; | ||
} | ||
interface AddQuickAddOn extends CommonProps { | ||
label: 'AddQuickAddOn'; | ||
bundleType: string; | ||
bundleId: string; | ||
variantIds: number[]; | ||
} | ||
export declare type Action = UpdatedBundleAction | CronSwappedPatternsAction | ChangedShipDateAction | CancelledBundleAction | RedeemedOfferAction | RedeemedLoyaltyKeyAction | RedeemedBirthdayGiftAction | AcceptedCancellationSaveAction | OrderNowAction | SwapOutOfStockPatternsReportAction | RemoveOOSAddOnsReportAction | ExamineInsufficientInventoryErrorsReportAction | CampaignAddOnVariantsAdded | AddQuickAddOn; | ||
export interface RecordActionRequiredProps { | ||
@@ -86,0 +103,0 @@ customerId?: number; |
{ | ||
"name": "@launchedla/snacktime", | ||
"version": "0.0.22", | ||
"version": "0.0.23", | ||
"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", |
@@ -249,2 +249,31 @@ import Snacktime from './' | ||
}) | ||
test('CampaignAddOnVariantsAdded', async () => { | ||
expect( | ||
await snacktime.recordAction( | ||
{ bundleId: 123, customerId: 123 }, | ||
{ | ||
label: 'CampaignAddOnVariantsAdded', | ||
campaignId: 'test-campaign-id', | ||
bundleType: 'Diaper', | ||
bundleId: '123456789', | ||
variantIds: [123, 456], | ||
} | ||
) | ||
).toBe(true) | ||
}) | ||
test('AddQuickAddOn', async () => { | ||
expect( | ||
await snacktime.recordAction( | ||
{ bundleId: 123, customerId: 123 }, | ||
{ | ||
label: 'AddQuickAddOn', | ||
bundleType: 'Diaper', | ||
bundleId: '123456789', | ||
variantIds: [123, 456], | ||
} | ||
) | ||
).toBe(true) | ||
}) | ||
}) | ||
@@ -251,0 +280,0 @@ |
@@ -59,2 +59,7 @@ interface CommonProps { | ||
interface RedeemedBirthdayGiftAction extends CommonProps { | ||
label: 'RedeemedBirthdayGift' | ||
variantId: string | ||
} | ||
interface AcceptedCancellationSaveAction extends CommonProps { | ||
@@ -98,2 +103,17 @@ label: 'AcceptedCancellationSave' | ||
interface CampaignAddOnVariantsAdded extends CommonProps { | ||
label: 'CampaignAddOnVariantsAdded' | ||
campaignId: string | ||
bundleType: string | ||
bundleId: string | ||
variantIds: number[] | ||
} | ||
interface AddQuickAddOn extends CommonProps { | ||
label: 'AddQuickAddOn' | ||
bundleType: string | ||
bundleId: string | ||
variantIds: number[] | ||
} | ||
export type Action = | ||
@@ -106,2 +126,3 @@ | UpdatedBundleAction | ||
| RedeemedLoyaltyKeyAction | ||
| RedeemedBirthdayGiftAction | ||
| AcceptedCancellationSaveAction | ||
@@ -112,2 +133,4 @@ | OrderNowAction | ||
| ExamineInsufficientInventoryErrorsReportAction | ||
| CampaignAddOnVariantsAdded | ||
| AddQuickAddOn | ||
@@ -114,0 +137,0 @@ export interface RecordActionRequiredProps { |
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
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
43
762614
1316
1