/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { introspectionGetInfo } from "../funcs/introspectionGetInfo.js"; import { introspectionOauthAccessToken } from "../funcs/introspectionOauthAccessToken.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import { GetV1TokenInfoRequest, GetV1TokenInfoResponse, } from "../models/operations/getv1tokeninfo.js"; import { OauthAccessTokenRequest, OauthAccessTokenResponse, } from "../models/operations/oauthaccesstoken.js"; import { unwrapAsync } from "../types/fp.js"; export class Introspection extends ClientSDK { /** * Get info about the current access token * * @remarks * Returns scope and resource information associated with the current access token. Use this endpoint to verify the following for the current access token: * * Resource (company, employee, contractor, or application) and resource owner * * Access level */ async getInfo( request: GetV1TokenInfoRequest, options?: RequestOptions, ): Promise { return unwrapAsync(introspectionGetInfo( this, request, options, )); } /** * Create a System Access Token or Refresh an Access Token * * @remarks * Creates a system access token or refreshes an oauth access token */ async oauthAccessToken( request: OauthAccessTokenRequest, options?: RequestOptions, ): Promise { return unwrapAsync(introspectionOauthAccessToken( this, request, options, )); } }