diff --git a/package-lock.json b/package-lock.json index 6a3fa3d..19c2407 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "notificationapi-node-server-sdk", - "version": "1.0.0", + "version": "2.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "notificationapi-node-server-sdk", - "version": "1.0.0", + "version": "2.0.0", "license": "ISC", "dependencies": { "axios": "^0.21.4" diff --git a/package.json b/package.json index efb96aa..d31433d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "notificationapi-node-server-sdk", - "version": "1.0.0", + "version": "2.0.0", "description": "NotificationAPI server-side library for Node.js", "keywords": [ "notificationapi", diff --git a/src/__tests__/notificationapi.test.ts b/src/__tests__/notificationapi.test.ts index edab344..11b86af 100644 --- a/src/__tests__/notificationapi.test.ts +++ b/src/__tests__/notificationapi.test.ts @@ -509,7 +509,7 @@ describe('setUserPreferences without subNotificationId', () => { { notificationId: 'notificationId', channel: Channels.EMAIL, - state: true + delivery: 'instant' } ]; test('makes API calls to the correct end-point', async () => { @@ -541,7 +541,7 @@ describe('setUserPreferences with subNotificationId', () => { { notificationId: 'notificationId', channel: Channels.EMAIL, - state: true, + delivery: 'instant', subNotificationId: 'subNotificationId' } ]; diff --git a/src/interfaces.ts b/src/interfaces.ts index b6afa9c..c73b519 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -86,9 +86,8 @@ export interface SetUserPreferencesRequest { notificationId: string; /** The channel related to the userPreferences. Required.*/ channel: Channels; - /** Determines the . Required.*/ - state: boolean; /** The subNotificationId is used to specify further subcategories within a notification. Required.*/ + delivery: 'off' | 'instant' | 'hourly' | 'daily' | 'weekly' | 'monthly'; subNotificationId?: string; } /** Supporting notification Channels.*/