UNPKG

@crowdin/crowdin-api-client

Version:
47 lines (46 loc) 2.5 kB
import { CrowdinApi, PaginationOptions, ResponseList, ResponseObject } from '../core'; export declare class SecurityLogs extends CrowdinApi { /** * @param options optional parameters for the request * @see https://support.crowdin.com/enterprise/api/#operation/api.projects.workflow-steps.getMany */ listOrganizationSecurityLogs(options?: SecurityLogsModel.ListOrganizationSecurityLogsParams): Promise<ResponseList<SecurityLogsModel.SecurityLog>>; /** * @param securityLogId security log identifier * @see https://developer.crowdin.com/enterprise/api/v2/#operation/api.security-logs.get */ getOrganizationSecurityLog(securityLogId: number): Promise<ResponseObject<SecurityLogsModel.SecurityLog>>; /** * @param userId user identifier * @param options optional parameters for the request * @see https://developer.crowdin.com/api/v2/#operation/api.users.security-logs.getMany */ listUserSecurityLogs(userId: number, options?: SecurityLogsModel.ListUserSecurityLogsParams): Promise<ResponseList<SecurityLogsModel.SecurityLog>>; /** * @param userId security log identifier * @param securityLogId security log identifier * @see https://developer.crowdin.com/api/v2/#operation/api.users.security-logs.get */ getUserSecurityLog(userId: number, securityLogId: number): Promise<ResponseObject<SecurityLogsModel.SecurityLog>>; } export declare namespace SecurityLogsModel { type Event = 'login' | 'password.set' | 'password.change' | 'email.change' | 'login.change' | 'personal_token.issued' | 'personal_token.revoked' | 'mfa.enabled' | 'mfa.disabled' | 'session.revoke' | 'session.revoke_all' | 'sso.connect' | 'sso.disconnect' | 'user.remove' | 'application.connected' | 'application.disconnected' | 'webauthn.created' | 'webauthn.deleted' | 'trusted_device.remove' | 'trusted_device.remove_all' | 'device_verification.enabled' | 'device_verification.disabled'; interface ListOrganizationSecurityLogsParams extends PaginationOptions { event?: Event; createdAfter?: string; createdBefore?: string; ipAddress?: string; userId?: number; } type ListUserSecurityLogsParams = Omit<ListOrganizationSecurityLogsParams, 'userId'>; interface SecurityLog { id: number; event: string; info: string; userId: number; location: string; ipAddress: string; deviceName: string; createdAt: string; } }