1  |  import { Resource } from "https://deno.land/x/windmill@v1.62.0/mod.ts"   |  
 2  |  import { removeObjectEmptyFields } from "https://deno.land/x/windmill_helpers@v1.0.1/mod.ts";   |  
 3  |  import { SlackAPI } from "https://deno.land/x/deno_slack_api@1.6.0/mod.ts";   |  
 4  |  
   |  
 5  |     |  
 6  |   * @param cursor Paginate the list of users by setting the cursor parameter    |  
 7  |   * to a `next_cursor` attribute returned by a previous request's    |  
 8  |   * `response_metadata`. Default value fetches the first "page" of the users.    |  
 9  |   * Used in conjunction with `limit`.   |  
 10  |   *    |  
 11  |   * @param limit The maximum number of users to return. Fewer than the    |  
 12  |   * requested number of users may be returned, even if the end of the result    |  
 13  |   * list hasn't been reached.    |  
 14  |   * Used in conjunction with `cursor`.   |  
 15  |   */   |  
 16  |  export async function main(   |  
 17  |    auth: Resource<'slack'>,   |  
 18  |    cursor?: string,   |  
 19  |    limit?: number   |  
 20  |  ) {   |  
 21  |    const client = SlackAPI(auth.token)   |  
 22  |    const params = removeObjectEmptyFields({ cursor, limit })   |  
 23  |    return await client.users.list(params)   |  
 24  |  }   |  
 25  |  
   |