@suprsend/web-sdk 4.0.4 → 4.1.0
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/README.md +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/es/index.js +124 -118
- package/dist/es/index.js.map +1 -1
- package/dist/types/interface.d.ts +6 -0
- package/dist/types/preferences.d.ts +6 -16
- package/package.json +1 -1
|
@@ -174,4 +174,10 @@ export interface IFeedData extends Omit<INotificationStore, '_firstFetchedTimeSt
|
|
|
174
174
|
export interface IInboxFetchOptions {
|
|
175
175
|
pageSize?: number;
|
|
176
176
|
}
|
|
177
|
+
export interface IPreferenceConfig {
|
|
178
|
+
tenantId?: string;
|
|
179
|
+
showOptOutChannels?: boolean;
|
|
180
|
+
tags?: string | Dictionary;
|
|
181
|
+
locale?: string;
|
|
182
|
+
}
|
|
177
183
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as SuprSend } from './main';
|
|
2
|
-
import { Dictionary, PreferenceData, PreferenceOptions, ChannelLevelPreferenceOptions } from './interface';
|
|
2
|
+
import { Dictionary, PreferenceData, PreferenceOptions, ChannelLevelPreferenceOptions, IPreferenceConfig } from './interface';
|
|
3
3
|
|
|
4
4
|
export default class Preferences {
|
|
5
5
|
private config;
|
|
@@ -16,11 +16,7 @@ export default class Preferences {
|
|
|
16
16
|
/**
|
|
17
17
|
* Used to get user's whole preferences data.
|
|
18
18
|
*/
|
|
19
|
-
getPreferences(args?:
|
|
20
|
-
tenantId?: string;
|
|
21
|
-
showOptOutChannels?: boolean;
|
|
22
|
-
tags?: string | Dictionary;
|
|
23
|
-
}): Promise<import('./interface').ApiResponse>;
|
|
19
|
+
getPreferences(args?: IPreferenceConfig): Promise<import('./interface').ApiResponse>;
|
|
24
20
|
/**
|
|
25
21
|
* Used to get user's preference of all categories.
|
|
26
22
|
*/
|
|
@@ -28,6 +24,7 @@ export default class Preferences {
|
|
|
28
24
|
tenantId?: string;
|
|
29
25
|
showOptOutChannels?: boolean;
|
|
30
26
|
tags?: string | Dictionary;
|
|
27
|
+
locale?: string;
|
|
31
28
|
limit?: number;
|
|
32
29
|
offset?: number;
|
|
33
30
|
}): Promise<import('./interface').ApiResponse>;
|
|
@@ -37,6 +34,7 @@ export default class Preferences {
|
|
|
37
34
|
getCategory(category: string, args?: {
|
|
38
35
|
tenantId?: string;
|
|
39
36
|
showOptOutChannels?: boolean;
|
|
37
|
+
locale?: string;
|
|
40
38
|
}): Promise<import('./interface').ApiResponse>;
|
|
41
39
|
/**
|
|
42
40
|
* Used to get user's all channel level preference.
|
|
@@ -47,19 +45,11 @@ export default class Preferences {
|
|
|
47
45
|
/**
|
|
48
46
|
* Used to update user's category level preference.
|
|
49
47
|
*/
|
|
50
|
-
updateCategoryPreference(category: string, preference: PreferenceOptions, args?:
|
|
51
|
-
tenantId?: string;
|
|
52
|
-
showOptOutChannels?: boolean;
|
|
53
|
-
tags?: string | Dictionary;
|
|
54
|
-
}): Promise<import('./interface').ApiResponse>;
|
|
48
|
+
updateCategoryPreference(category: string, preference: PreferenceOptions, args?: IPreferenceConfig): Promise<import('./interface').ApiResponse>;
|
|
55
49
|
/**
|
|
56
50
|
* Used to update user's category level channel preference.
|
|
57
51
|
*/
|
|
58
|
-
updateChannelPreferenceInCategory(channel: string, preference: PreferenceOptions, category: string, args?:
|
|
59
|
-
tenantId?: string;
|
|
60
|
-
showOptOutChannels?: boolean;
|
|
61
|
-
tags?: string | Dictionary;
|
|
62
|
-
}): Promise<import('./interface').ApiResponse>;
|
|
52
|
+
updateChannelPreferenceInCategory(channel: string, preference: PreferenceOptions, category: string, args?: IPreferenceConfig): Promise<import('./interface').ApiResponse>;
|
|
63
53
|
/**
|
|
64
54
|
* Used to update user's channel level preference.
|
|
65
55
|
*/
|