UNPKG

@abp/ng.permission-management

Version:

ABP Framework is a complete open-source infrastructure to create modern web applications by following the best practices and conventions of software development. This package is a part of the [ABP Framework](https://abp.io) and contains client-side files.

78 lines (74 loc) 4.21 kB
import { RestService } from '@abp/ng.core'; import * as i0 from '@angular/core'; import { inject, Injectable } from '@angular/core'; class PermissionsService { constructor() { this.restService = inject(RestService); this.apiName = 'AbpPermissionManagement'; this.deleteResource = (resourceName, resourceKey, providerName, providerKey, config) => this.restService.request({ method: 'DELETE', url: '/api/permission-management/permissions/resource', params: { resourceName, resourceKey, providerName, providerKey }, }, { apiName: this.apiName, ...config }); this.get = (providerName, providerKey, config) => this.restService.request({ method: 'GET', url: '/api/permission-management/permissions', params: { providerName, providerKey }, }, { apiName: this.apiName, ...config }); this.getByGroup = (groupName, providerName, providerKey, config) => this.restService.request({ method: 'GET', url: '/api/permission-management/permissions/by-group', params: { groupName, providerName, providerKey }, }, { apiName: this.apiName, ...config }); this.getResource = (resourceName, resourceKey, config) => this.restService.request({ method: 'GET', url: '/api/permission-management/permissions/resource', params: { resourceName, resourceKey }, }, { apiName: this.apiName, ...config }); this.getResourceByProvider = (resourceName, resourceKey, providerName, providerKey, config) => this.restService.request({ method: 'GET', url: '/api/permission-management/permissions/resource/by-provider', params: { resourceName, resourceKey, providerName, providerKey }, }, { apiName: this.apiName, ...config }); this.getResourceDefinitions = (resourceName, config) => this.restService.request({ method: 'GET', url: '/api/permission-management/permissions/resource-definitions', params: { resourceName }, }, { apiName: this.apiName, ...config }); this.getResourceProviderKeyLookupServices = (resourceName, config) => this.restService.request({ method: 'GET', url: '/api/permission-management/permissions/resource-provider-key-lookup-services', params: { resourceName }, }, { apiName: this.apiName, ...config }); this.searchResourceProviderKey = (resourceName, serviceName, filter, page, config) => this.restService.request({ method: 'GET', url: '/api/permission-management/permissions/search-resource-provider-keys', params: { resourceName, serviceName, filter, page }, }, { apiName: this.apiName, ...config }); this.update = (providerName, providerKey, input, config) => this.restService.request({ method: 'PUT', url: '/api/permission-management/permissions', params: { providerName, providerKey }, body: input, }, { apiName: this.apiName, ...config }); this.updateResource = (resourceName, resourceKey, input, config) => this.restService.request({ method: 'PUT', url: '/api/permission-management/permissions/resource', params: { resourceName, resourceKey }, body: input, }, { apiName: this.apiName, ...config }); } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PermissionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); } static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PermissionsService, providedIn: 'root' }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: PermissionsService, decorators: [{ type: Injectable, args: [{ providedIn: 'root', }] }] }); /** * Generated bundle index. Do not edit. */ export { PermissionsService }; //# sourceMappingURL=abp-ng.permission-management-proxy.mjs.map