import type { CollectionProp, GetAppDefinitionParams, QueryParams } from '../../common-types'; import type { AppKeyProps, CreateAppKeyProps } from '../../entities/app-key'; import type { OptionalDefaults } from '../wrappers/wrap'; export type AppKeyPlainClientAPI = { /** * Creates an App Key * @param params entity IDs to identify the App that the Key belongs to * @param payload options for Key creation, see example for details * @returns the App Key and its metadata * @throws if the request fails, the App or Key is not found, or the payload is malformed * @example * ```javascript * // create an App Key by generating a new private key * const key = await client.appKey.create({ * organizationId: '', * appDefinitionId: '', * }, { * generate: true * }) * * // create an App Key by specifying an existing private key * const keyFromExistingJWK = await client.appKey.create({ * organizationId: '', * appDefinitionId: '', * }, { * jwk: '' * }) * ``` */ create(params: OptionalDefaults, payload: CreateAppKeyProps): Promise; /** * Fetches the App Key with the given fingerprint * @param params entity IDs to identify the App Key * @returns the App Key * @throws if the request fails, or the App or the Key is not found * @example * ```javascript * const key = await client.appKey.get({ * organizationId: '', * appDefinitionId: '', * fingerprint: '', * }) * ``` */ get(params: OptionalDefaults & { fingerprint: string; }): Promise; /** * Fetches all Keys for the given App * @param params entity IDs to identify the App * @param payload optional pagination query, see example for details * @returns the App Keys * @throws if the request fails, or the App is not found * @example * ```javascript * // with default pagination * const keys = await client.appKey.getMany({ * organizationId: '', * appDefinitionId: '', * }) * * // with explicit pagination * const paginatedKeys = await client.appKey.getMany({ * organizationId: '', * appDefinitionId: '', * }, { * query: { * skip: '', * limit: '', * } * }) * ``` */ getMany(params: OptionalDefaults & QueryParams): Promise>; /** * Removes the App Key with the given fingerprint * @param params entity IDs to identify the App Key * @throws if the request fails, or the App or the Key is not found * @example * ```javascript * await client.appKey.delete({ * organizationId: '', * appDefinitionId: '', * fingerprint: '', * }) * ``` */ delete(params: OptionalDefaults & { fingerprint: string; }): Promise; };