import { OAuthResponseError } from "./util.js";
import { OAuthBulkActivityResponseSchema, OAuthClientActivityResponseSchema, } from "./types.js";
export async function oauthClientActivity(client, id, days) {
    const resp = await client.get(`/oidc/clients/${encodeURIComponent(id)}/activity${days ? `?days=${days}` : ''}`, OAuthClientActivityResponseSchema);
    if (resp.success) {
        return resp.data;
    }
    throw new OAuthResponseError({ message: resp.message });
}
export async function oauthBulkActivity(client, days) {
    const resp = await client.get(`/oidc/clients/activity${days ? `?days=${days}` : ''}`, OAuthBulkActivityResponseSchema);
    if (resp.success) {
        return resp.data;
    }
    throw new OAuthResponseError({ message: resp.message });
}
//# sourceMappingURL=activity.js.map