@knocklabs/node 0.4.4 → 0.4.5
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/dist/package.json
CHANGED
|
@@ -17,7 +17,11 @@ export declare class Objects {
|
|
|
17
17
|
unsetChannelData(collection: string, id: string, channelId: string): Promise<any>;
|
|
18
18
|
getMessages(collection: string, objectId: string, filteringOptions?: ListMessagesOptions): Promise<PaginatedResponse<Message>>;
|
|
19
19
|
getAllPreferences(collection: string, objectId: string): Promise<PreferenceSet[]>;
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated Use `objects.getPreferences` instead
|
|
22
|
+
*/
|
|
20
23
|
getPrefences(collection: string, objectId: string, options?: PreferenceOptions): Promise<PreferenceSet>;
|
|
24
|
+
getPreferences(collection: string, objectId: string, options?: PreferenceOptions): Promise<PreferenceSet>;
|
|
21
25
|
setPreferences(collection: string, objectId: string, preferenceSet: SetPreferencesProperties, options?: PreferenceOptions): Promise<PreferenceSet>;
|
|
22
26
|
setChannelTypesPreferences(collection: string, objectId: string, channelTypePreferences: ChannelTypePreferences, options?: PreferenceOptions): Promise<PreferenceSet>;
|
|
23
27
|
setChannelTypePreferences(collection: string, objectId: string, channelType: ChannelType, setting: boolean, options?: PreferenceOptions): Promise<PreferenceSet>;
|
|
@@ -90,7 +90,15 @@ class Objects {
|
|
|
90
90
|
return data;
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* @deprecated Use `objects.getPreferences` instead
|
|
95
|
+
*/
|
|
93
96
|
getPrefences(collection, objectId, options = {}) {
|
|
97
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
return this.getPreferences(collection, objectId, options);
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
getPreferences(collection, objectId, options = {}) {
|
|
94
102
|
return __awaiter(this, void 0, void 0, function* () {
|
|
95
103
|
const preferenceSetId = options.preferenceSet || helpers_1.DEFAULT_PREFERENCE_SET_ID;
|
|
96
104
|
const { data } = yield this.knock.get(`/v1/objects/${collection}/${objectId}/preferences/${preferenceSetId}`);
|
|
@@ -15,7 +15,11 @@ export declare class Users {
|
|
|
15
15
|
merge(toUserId: string, fromUserId: string): Promise<User>;
|
|
16
16
|
getFeed(userId: string, channelId: string, feedOptions?: UserFeedOptions): Promise<any>;
|
|
17
17
|
getAllPreferences(userId: string): Promise<any>;
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Use `users.getPreferences` instead
|
|
20
|
+
*/
|
|
18
21
|
getPrefences(userId: string, options?: PreferenceOptions): Promise<PreferenceSet>;
|
|
22
|
+
getPreferences(userId: string, options?: PreferenceOptions): Promise<PreferenceSet>;
|
|
19
23
|
setPreferences(userId: string, preferenceSet: SetPreferencesProperties, options?: PreferenceOptions): Promise<PreferenceSet>;
|
|
20
24
|
bulkSetPreferences(userIds: string[], preferenceSet: SetPreferencesProperties, options?: PreferenceOptions): Promise<BulkOperation>;
|
|
21
25
|
setChannelTypesPreferences(userId: string, channelTypePreferences: ChannelTypePreferences, options?: PreferenceOptions): Promise<PreferenceSet>;
|
|
@@ -88,7 +88,15 @@ class Users {
|
|
|
88
88
|
return data;
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* @deprecated Use `users.getPreferences` instead
|
|
93
|
+
*/
|
|
91
94
|
getPrefences(userId, options = {}) {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
+
return this.getPreferences(userId, options);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
getPreferences(userId, options = {}) {
|
|
92
100
|
return __awaiter(this, void 0, void 0, function* () {
|
|
93
101
|
const preferenceSetId = options.preferenceSet || helpers_1.DEFAULT_PREFERENCE_SET_ID;
|
|
94
102
|
const { data } = yield this.knock.get(`/v1/users/${userId}/preferences/${preferenceSetId}`);
|