export type GetApiV21AccountsAccountIdGroupsGroupIdUsersArgs = {accountId: string, groupId: string, count?: string | undefined, start_position?: string | undefined}; export type GetApiV21AccountsAccountIdGroupsGroupIdUsersOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Gets a list of users in a group. * * GET /v2.1/accounts/{accountId}/groups/{groupId}/users */ export const getApiV21AccountsAccountIdGroupsGroupIdUsers = async (args: GetApiV21AccountsAccountIdGroupsGroupIdUsersArgs, options?: GetApiV21AccountsAccountIdGroupsGroupIdUsersOptions) => { const {baseUrl = "https://www.docusign.net/restapi", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('accept', "*/*") if (args.count != null) query.append("count", String(args.count)) if (args.start_position != null) query.append("start_position", String(args.start_position)) const url = `${baseUrl.replace(/\/+$/, '')}/v2.1/accounts/${encodeURIComponent(String(args.accountId))}/groups/${encodeURIComponent(String(args.groupId))}/users${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return res.blob() };