@wildberries/databus-service-user
Advanced tools
Comparing version 0.0.7 to 0.0.8-beta.1
@@ -6,2 +6,2 @@ import { FetchPermissionsParamsType, RefreshUserFeaturesType, UserDataType } from './types'; | ||
export declare const setFetchPermissionsEvent: (options: FetchPermissionsParamsType) => void; | ||
export declare const setRefreshUserPermissionsEvent: ({ features, abortRequestId, }: RefreshUserFeaturesType) => void; | ||
export declare const setRefreshUserPermissionsEvent: (options: RefreshUserFeaturesType) => void; |
@@ -33,11 +33,7 @@ "use strict"; | ||
}; | ||
exports.setRefreshUserPermissionsEvent = function (_a) { | ||
var features = _a.features, abortRequestId = _a.abortRequestId; | ||
exports.setRefreshUserPermissionsEvent = function (options) { | ||
new databus_1.Databus({ name: constants_1.REFRESH_PERMISSIONS }).addEvent({ | ||
detail: { | ||
features: features, | ||
abortRequestId: abortRequestId, | ||
}, | ||
detail: options, | ||
}); | ||
databus_1.Databus.dispatchEvent({ eventName: constants_1.REFRESH_PERMISSIONS }); | ||
}; |
@@ -26,9 +26,15 @@ export declare type ListenerType<T> = (params: T) => void; | ||
featureKeys: Array<string>; | ||
key: string; | ||
attributes?: Record<string, any>; | ||
key?: string; | ||
}; | ||
export declare type FormattedUserFeaturesType = { | ||
scope: string; | ||
featureKey: string; | ||
key: string; | ||
attributes?: Record<string, any>; | ||
}; | ||
export declare type RefreshUserFeaturesType = { | ||
features: Array<BatchedUserFeaturesType>; | ||
detailedList?: Array<FormattedUserFeaturesType>; | ||
combinedList?: Array<BatchedUserFeaturesType>; | ||
abortRequestId?: string; | ||
supplierId: string; | ||
}; |
{ | ||
"name": "@wildberries/databus-service-user", | ||
"version": "0.0.7", | ||
"version": "0.0.8-beta.1", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
16684
316