UNPKG

@coveo/platform-client

Version:

The main goal of this package is to provide an easy to configure and straightforward way of querying Coveo Cloud APIs using JavaScript.

50 lines 1.75 kB
import ReadServiceResource from '../ReadServiceResource.js'; export default class UAUsers extends ReadServiceResource { static baseUrl = '/rest/ua/v15/users'; /** * Get the data level filters that apply to a user. * @param userId The unique identifier of a user. * @param params */ listUserFilters(userId, params) { return this.api.get(this.buildPathWithOrg(`${UAUsers.baseUrl}/${userId}/filters`, params)); } /** * Set the filters that will be applied to a user query. * @param userId The unique identifier of a user. * @param filters */ updateUserFilters(userId, filters) { return this.api.put(this.buildPathWithOrg(`${UAUsers.baseUrl}/${userId}/filters`), filters); } /** * Get the reports that a user can access. * @param userId The unique identifier of a user. * @param params */ listUsersReports(userId, params) { return this.api.get(this.buildPathWithOrg(`${UAUsers.baseUrl}/${userId}/reports`, params)); } /** * Set which reports a user can access. * @param userId The unique identifier of a user. * @param reportsIDs */ updateUsersReports(userId, reportsIDs) { return this.api.put(this.buildPathWithOrg(`${UAUsers.baseUrl}/${userId}/reports`), reportsIDs); } /** * Get a user. * @param userId The unique identifier of a user. */ getUser(userId) { return this.api.get(this.buildPathWithOrg(`${UAUsers.baseUrl}/${userId}`)); } checkHealth() { return this.api.get(`${UAUsers.baseUrl}/monitoring/health`); } checkStatus() { return this.api.get(`${UAUsers.baseUrl}/status`); } } //# sourceMappingURL=UAUsers.js.map