import type { GetAppInstallationParams } from '../../common-types'; import type { AppAccessTokenProps, CreateAppAccessTokenProps } from '../../entities/app-access-token'; import type { OptionalDefaults } from '../wrappers/wrap'; export type AppAccessTokenPlainClientAPI = { /** * Issue a token for an app installation in a space environment * @param params space, environment, and app definition IDs * @param payload the JWT to be used to issue the token * @returns the issued token, which can be cached until it expires * @throws if the request fails * @example * ```javascript * import { sign } from 'jsonwebtoken' * * const signOptions = { algorithm: 'RS256', issuer: '', expiresIn: '10m' } * * const { token } = await client.appAccessToken.create( * { * spaceId: '', * environmentId: '', * appDefinitionId: '', * }, { * jwt: sign({}, '', signOptions) * } * ); * ``` */ create(params: OptionalDefaults, payload: CreateAppAccessTokenProps): Promise; };