import type { AsanaNamedResource } from '../models/AsanaNamedResource'; import type { UserCompact } from '../models/UserCompact'; import type { UserResponse } from '../models/UserResponse'; import type { CancelablePromise } from '../core/CancelablePromise'; import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export declare class UsersService { readonly httpRequest: BaseHttpRequest; constructor(httpRequest: BaseHttpRequest); /** * Get multiple users * Returns the user records for all users in all workspaces and organizations accessible to the authenticated user. Accepts an optional workspace ID parameter. * Results are sorted by user ID. * @returns any Successfully retrieved the requested user records. * @throws ApiError */ getUsers({ workspace, team, optPretty, optFields, limit, offset, }: { /** * The workspace or organization ID to filter users on. */ workspace?: string; /** * The team ID to filter users on. */ team?: string; /** * Provides “pretty” output. * Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. */ optPretty?: boolean; /** * Defines fields to return. * Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. * The id of included objects will always be returned, regardless of the field options. */ optFields?: Array; /** * Results per page. * The number of objects to return per page. The value must be between 1 and 100. */ limit?: number; /** * Offset token. * An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. * 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' */ offset?: string; }): CancelablePromise<{ data?: Array; }>; /** * Get a user * Returns the full user record for the single user with the provided ID. * @returns any Returns the user specified. * @throws ApiError */ getUser({ userGid, optPretty, optFields, }: { /** * A string identifying a user. This can either be the string "me", an email, or the gid of a user. */ userGid: string; /** * Provides “pretty” output. * Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. */ optPretty?: boolean; /** * Defines fields to return. * Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. * The id of included objects will always be returned, regardless of the field options. */ optFields?: Array; }): CancelablePromise<{ data?: UserResponse; }>; /** * Get a user's favorites * Returns all of a user's favorites in the given workspace, of the given type. * Results are given in order (The same order as Asana's sidebar). * @returns any Returns the specified user's favorites. * @throws ApiError */ getFavoritesForUser({ userGid, workspace, optPretty, optFields, resourceType, }: { /** * A string identifying a user. This can either be the string "me", an email, or the gid of a user. */ userGid: string; /** * The workspace in which to get favorites. */ workspace: string; /** * Provides “pretty” output. * Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. */ optPretty?: boolean; /** * Defines fields to return. * Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. * The id of included objects will always be returned, regardless of the field options. */ optFields?: Array; /** * The resource type of favorites to be returned. */ resourceType?: 'portfolio' | 'project' | 'tag' | 'task' | 'user' | 'project_template'; }): CancelablePromise<{ data?: Array; }>; /** * Get users in a team * Returns the compact records for all users that are members of the team. * Results are sorted alphabetically and limited to 2000. For more results use the `/users` endpoint. * @returns any Returns the user records for all the members of the team, including guests and limited access users * @throws ApiError */ getUsersForTeam({ teamGid, optPretty, optFields, offset, }: { /** * Globally unique identifier for the team. */ teamGid: string; /** * Provides “pretty” output. * Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. */ optPretty?: boolean; /** * Defines fields to return. * Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. * The id of included objects will always be returned, regardless of the field options. */ optFields?: Array; /** * Offset token. * An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. * 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' */ offset?: string; }): CancelablePromise<{ data?: Array; }>; /** * Get users in a workspace or organization * Returns the compact records for all users in the specified workspace or organization. * Results are sorted alphabetically and limited to 2000. For more results use the `/users` endpoint. * @returns any Return the users in the specified workspace or org. * @throws ApiError */ getUsersForWorkspace({ workspaceGid, optPretty, optFields, offset, }: { /** * Globally unique identifier for the workspace or organization. */ workspaceGid: string; /** * Provides “pretty” output. * Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. */ optPretty?: boolean; /** * Defines fields to return. * Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. * The id of included objects will always be returned, regardless of the field options. */ optFields?: Array; /** * Offset token. * An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. * 'Note: You can only pass in an offset that was returned to you via a previously paginated request.' */ offset?: string; }): CancelablePromise<{ data?: Array; }>; }