/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { accessControlCreate } from "../funcs/accessControlCreate.js"; import { accessControlDelete } from "../funcs/accessControlDelete.js"; import { accessControlGet } from "../funcs/accessControlGet.js"; import { accessControlGetAll } from "../funcs/accessControlGetAll.js"; import { accessControlUpdate } from "../funcs/accessControlUpdate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class AccessControl extends ClientSDK { /** * Create a signing key * * @remarks * The publicKey is a representation of the public key, encoded as base 64 and is passed as a string, and the privateKey is displayed only on creation. This is the only moment where the client can save the private key, otherwise it will be lost. Remember to decode your string when signing JWTs. * Up to 10 signing keys can be generated, after that you must delete at least one signing key to create a new one. */ async create( options?: RequestOptions, ): Promise { return unwrapAsync(accessControlCreate( this, options, )); } /** * Retrieves signing keys */ async getAll( options?: RequestOptions, ): Promise { return unwrapAsync(accessControlGetAll( this, options, )); } /** * Delete Signing Key */ async delete( keyId: string, options?: RequestOptions, ): Promise { return unwrapAsync(accessControlDelete( this, keyId, options, )); } /** * Retrieves a signing key */ async get( keyId: string, options?: RequestOptions, ): Promise { return unwrapAsync(accessControlGet( this, keyId, options, )); } /** * Update a signing key */ async update( requestBody: operations.UpdateSigningKeyRequestBody, keyId: string, options?: RequestOptions, ): Promise { return unwrapAsync(accessControlUpdate( this, requestBody, keyId, options, )); } }