/** * This file was auto-generated by Fern from our API Definition. */ import * as environments from "../../../../environments"; import * as core from "../../../../core"; import * as PetstoreApi from "../../.."; export declare namespace User { interface Options { environment?: core.Supplier; token?: core.Supplier; apiKey: core.Supplier; } interface RequestOptions { timeoutInSeconds?: number; maxRetries?: number; } } /** * Operations about user */ export declare class User { protected readonly _options: User.Options; constructor(_options: User.Options); /** * This can only be done by the logged in user. * * @example * await petstoreApi.user.createUser({ * id: 1, * username: "theUser", * firstName: "John", * lastName: "James", * email: "john@email.com", * userStatus: 1 * }) */ createUser(request: PetstoreApi.User, requestOptions?: User.RequestOptions): Promise; /** * Creates list of users with given input array * * @example * await petstoreApi.user.createUsersWithListInput([{ * id: 1, * username: "theUser", * firstName: "John", * lastName: "James", * email: "john@email.com", * userStatus: 1 * }]) */ createUsersWithListInput(request: PetstoreApi.User[], requestOptions?: User.RequestOptions): Promise; /** * * @throws {@link PetstoreApi.BadRequestError} * * @example * await petstoreApi.user.loginUser({}) */ loginUser(request?: PetstoreApi.LoginUserRequest, requestOptions?: User.RequestOptions): Promise; /** * * * @example * await petstoreApi.user.logoutUser() */ logoutUser(requestOptions?: User.RequestOptions): Promise; /** * * @throws {@link PetstoreApi.BadRequestError} * @throws {@link PetstoreApi.NotFoundError} * * @example * await petstoreApi.user.getUserByName("username") */ getUserByName(username: string, requestOptions?: User.RequestOptions): Promise; /** * This can only be done by the logged in user. * * @example * await petstoreApi.user.updateUser("username", { * id: 1, * username: "theUser", * firstName: "John", * lastName: "James", * email: "john@email.com", * userStatus: 1 * }) */ updateUser(username: string, request: PetstoreApi.User, requestOptions?: User.RequestOptions): Promise; /** * This can only be done by the logged in user. * @throws {@link PetstoreApi.BadRequestError} * @throws {@link PetstoreApi.NotFoundError} * * @example * await petstoreApi.user.deleteUser("username") */ deleteUser(username: string, requestOptions?: User.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; }