(()=>{function e(i,a,e,t){var n=a.cleanFields,o="audit/auditRecords",r={headers:a.contentHeaders("auditRecord")},c={WARNING:"WARNING",MINOR:"MINOR",MAJOR:"MAJOR",CRITICAL:"CRITICAL"},s=_.keys(c),l=["id","self","creationTime"],u=l,t={Alarm:t("Alarm"),Application:t("Application"),BulkOperation:t("Bulk operation"),CepModule:t("Event processing"),Connector:t("Data broker connector"),DataHub:t("DataHub"),DevicesAvailabilityMonitoring:t("Devices availability monitoring"),Event:t("Event"),Inventory:t("Inventory"),InventoryRole:t("Inventory role"),Operation:t("Operation"),Option:t("Option"),Group:t("Global role"),Report:t("Report"),SingleSignOn:t("Single sign-on"),SmartRule:t("Smart rule"),SYSTEM:t("System"),Tenant:t("Tenant"),TenantAuthConfig:t("Tenant auth configuration"),TrustedCertificates:t("Trusted certificate"),TenantCertificateAuthority:t("Tenant certificate authority"),User:t("User"),UserAuthentication:t("User login")};return e.enhanceWithKeysUtil({target:{types:t,typeicons:{Alarm:"bell",Application:"c8y-atom",BulkOperation:"c8y-energy",CepModule:"c8y-event-processing",Connector:"sitemap",DataHub:"c8y-data-hub",DevicesAvailabilityMonitoring:"desktop",Event:"online1",Inventory:"c8y-modules",InventoryRole:"insurance-agent",Operation:"c8y-energy",Option:"sliders",Group:"connected-people",SingleSignOn:"sign-in",SmartRule:"c8y-smart-rules",SYSTEM:"server",Tenant:"c8y-sub-tenants",TenantAuthConfig:"shield",TrustedCertificates:"certificate",TenantCertificateAuthority:"contract",User:"c8y-user",UserAuthentication:"id-badge"},list:function e(t){var n=a.url(o);t=a.pageSizeNoTotalFilter(t);t.revert&&(r=a.timeOrderFilter({}),t.dateFrom=t.dateFrom||r.dateFrom,t.dateTo=t.dateTo||r.dateTo);var r={params:t};t=a.cleanListCallback("auditRecords",e,t);return i.get(n,r).then(t)},detail:function(e){e=(e=>(e=e.id||e,a.url("".concat(o,"/").concat(e))))(e);return i.get(e)},create:function(e){var t=a.url(o),e=n(e,u);return i.post(t,e,r)},severity:c,severityList:s},reservedKeys:l,standardKeys:{}})}e.$inject=["$http","c8yBase","c8yUtil","gettext"],angular.module("c8y.core").factory("c8yAudits",e)})();