import EnvoyAPI from '../base/EnvoyAPI'; import { AgreementPageModel } from '../resources/AgreementPageResource'; import { AgreementModel } from '../resources/AgreementResource'; import { CompanyModel } from '../resources/CompanyResource'; import { EmployeeFilterFields, EmployeeModel, EmployeeSortFields } from '../resources/EmployeeResource'; import { FlowFilterFields, FlowModel, FlowSortFields } from '../resources/FlowResource'; import { LocationFilterFields, LocationModel, LocationSortFields } from '../resources/LocationResource'; import { SignInFieldPageModel } from '../resources/SignInFieldPageResource'; import { SignInFieldModel } from '../resources/SignInFieldResource'; import JSONAPIPaginationParams from '../util/json-api/JSONAPIPaginationParams'; import { InviteCreationModel, InviteFilterFields, InviteModel, InviteSortFields } from '../resources/InviteResource'; import { UserModel } from '../resources/UserResource'; import { EnvoyMetaAuth } from './EnvoyMeta'; import { ReservationCreationAttributes, ReservationModel } from '../resources/ReservationResource'; export declare type EnvoyUserAPIScope = 'flows.read' | 'entries.read' | 'entries.write' | 'invites.read' | 'invites.write' | 'invites.attest' | 'locations.read' | 'companies.read' | 'agreements.read' | 'agreements.write' | 'sign-in-field-pages.read' | 'sign-in-fields.read' | 'sign-in-fields.write' | 'employees.read' | 'employees.write' | 'badges.read' | 'blacklist-filters.read' | 'blacklist-filters.write' | 'tickets.read' | 'tickets.write' | 'spaces.read' | 'reservations.read' | 'reservations.write' | string; /** * API endpoints for *user-scoped* tokens. * To access Envoy resources, this is the API you'd want. * * @category API * @category Request Object */ export default class EnvoyUserAPI extends EnvoyAPI { /** * * {@link AgreementPageModel} */ getAgreementPage(id: string, include?: string): Promise; /** * Requires `agreements.read` scope. */ getAgreement(id: string, include?: string): Promise; /** * Requires `companies.read` scope. */ getCompany(id: string, include?: string): Promise; /** * Requires `employees.read` scope. */ getEmployee(id: string, include?: string): Promise; /** * Requires `flows.read` scope. */ getFlow(id: string, include?: string): Promise; /** * Requires `locations.read` scope. */ getLocation(id: string, include?: string): Promise; /** * Requires `sign-in-field-pages.read` scope. */ getSignInFieldPage(id: string, include?: string): Promise; /** * Requires `sign-in-fields.read` scope. */ getSignInField(id: string, include?: string): Promise; /** * Requires `employees.read` scope. */ getEmployeeByEmail(email: string, include?: string): Promise; /** * Requires `employees.read` scope. */ getEmployees(params?: JSONAPIPaginationParams): Promise>; /** * Requires `flows.read` scope. */ getFlows(params?: JSONAPIPaginationParams): Promise>; /** * Requires `locations.read` scope. */ getLocations(params?: JSONAPIPaginationParams): Promise>; /** * Requires `sign-in-fields.read` scope. */ getSignInFields(signInFieldPageId: string): Promise>; /** * Requires `invites.read` scope. */ getInvites(params?: JSONAPIPaginationParams): Promise>; me(): Promise; /** * Requires `invites.write` scope. * May also require `invites.attest` scope if setting `attested: true`. */ createInvite(invite: InviteCreationModel): Promise; createReservation(reservationDetails: ReservationCreationAttributes): Promise; /** * Requires `invites.write` scope. */ updateInvite(inviteId: string, invite: InviteCreationModel): Promise; /** * Requires `invites.write` scope. */ partialUpdateInvite(inviteId: string, invite: InviteCreationModel): Promise; /** * Requires `invites.write` scope. */ removeInvite(inviteId: string): Promise; /** * Builds the authorize URL to redirect a user to initiate the auth code oauth2 flow. * * Upon completion, they will be redirected to `redirectURL`, with a `code` query param in the url. * * Use the {@link loginAsUserWithCode} method to exchange that code for an access token. */ static getAuthorizeURL(redirectURL: string, scope: Array, clientId?: string): string; /** * Gets a user access token using `password` as the grant type (discouraged - use {@link loginAsUserWithCode} below). */ static loginAsUserWithPassword(username: string, password: string, scope: Array, clientId?: string, clientSecret?: string): Promise; /** * Gets a user access token using `code` as the grant type. */ static loginAsUserWithCode(code: string, scope: Array, clientId?: string, clientSecret?: string): Promise; /** * Gets a user access token using `plugin_install` as the grant type. */ static loginAsPluginInstaller(installId: string, clientId?: string, clientSecret?: string): Promise; } //# sourceMappingURL=EnvoyUserAPI.d.ts.map