@vercel/sdk
Version:
<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>
138 lines • 5.35 kB
JavaScript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { kmsActivateKmsSigningKey } from "../funcs/kmsActivateKmsSigningKey.js";
import { kmsCreateKmsIssuer } from "../funcs/kmsCreateKmsIssuer.js";
import { kmsCreateKmsIssuerPolicy } from "../funcs/kmsCreateKmsIssuerPolicy.js";
import { kmsCreateKmsSigningKey } from "../funcs/kmsCreateKmsSigningKey.js";
import { kmsDeleteKmsIssuer } from "../funcs/kmsDeleteKmsIssuer.js";
import { kmsDeleteKmsIssuerPolicy } from "../funcs/kmsDeleteKmsIssuerPolicy.js";
import { kmsGetKmsIssuer } from "../funcs/kmsGetKmsIssuer.js";
import { kmsListKmsIssuers } from "../funcs/kmsListKmsIssuers.js";
import { kmsRevokeKmsSigningKey } from "../funcs/kmsRevokeKmsSigningKey.js";
import { kmsSignKmsMessage } from "../funcs/kmsSignKmsMessage.js";
import { kmsSignKmsToken } from "../funcs/kmsSignKmsToken.js";
import { kmsUpdateKmsIssuer } from "../funcs/kmsUpdateKmsIssuer.js";
import { kmsUpdateKmsIssuerPolicy } from "../funcs/kmsUpdateKmsIssuerPolicy.js";
import { ClientSDK } from "../lib/sdks.js";
import { unwrapAsync } from "../types/fp.js";
export class Kms extends ClientSDK {
/**
* List issuers
*
* @remarks
* Retrieve the list of KMS issuers that belong to the authenticated team. The results are paginated.
*/
async listKmsIssuers(request, options) {
return unwrapAsync(kmsListKmsIssuers(this, request, options));
}
/**
* Create an issuer
*
* @remarks
* Create a new KMS issuer for the authenticated team. An issuer owns the asymmetric signing keys that are used to sign tokens and messages.
*/
async createKmsIssuer(request, options) {
return unwrapAsync(kmsCreateKmsIssuer(this, request, options));
}
/**
* Sign a message
*
* @remarks
* Sign a raw message with a KMS issuer's active signing key. Authenticate the request with a Vercel OIDC token in the `Authorization: Bearer` header; the issuer's policies decide which workloads are allowed to sign.
*/
async signKmsMessage(request, options) {
return unwrapAsync(kmsSignKmsMessage(this, request, options));
}
/**
* Sign a token
*
* @remarks
* Sign a JWT with a KMS issuer's active signing key. Authenticate the request with a Vercel OIDC token in the `Authorization: Bearer` header; the issuer's policies decide which workloads are allowed to sign.
*/
async signKmsToken(request, options) {
return unwrapAsync(kmsSignKmsToken(this, request, options));
}
/**
* Create a signing key
*
* @remarks
* Create a new signing key for a KMS issuer. Depending on the activation mode, the key is activated automatically once its public key has propagated, or manually via the activate endpoint.
*/
async createKmsSigningKey(request, options) {
return unwrapAsync(kmsCreateKmsSigningKey(this, request, options));
}
/**
* Activate a signing key
*
* @remarks
* Activate a pending signing key so the issuer starts signing with it.
*/
async activateKmsSigningKey(request, options) {
return unwrapAsync(kmsActivateKmsSigningKey(this, request, options));
}
/**
* Revoke a signing key
*
* @remarks
* Immediately revoke a signing key that is already scheduled for revocation.
*/
async revokeKmsSigningKey(request, options) {
return unwrapAsync(kmsRevokeKmsSigningKey(this, request, options));
}
/**
* Get an issuer
*
* @remarks
* Retrieve a single KMS issuer by its ID. Accepts either a team bearer token (existing path) or an OIDC token authorized by one of the issuer's policies (e.g. a connex-grant token). The OIDC path returns the issuer without policies, since a policy token only proves signing access, not management access.
*/
async getKmsIssuer(request, options) {
return unwrapAsync(kmsGetKmsIssuer(this, request, options));
}
/**
* Update an issuer
*
* @remarks
* Update a KMS issuer's name or claims schema.
*/
async updateKmsIssuer(request, options) {
return unwrapAsync(kmsUpdateKmsIssuer(this, request, options));
}
/**
* Delete an issuer
*
* @remarks
* Delete a KMS issuer and its signing keys.
*/
async deleteKmsIssuer(request, options) {
return unwrapAsync(kmsDeleteKmsIssuer(this, request, options));
}
/**
* Create an issuer policy
*
* @remarks
* Attach a policy to a KMS issuer that grants a project's deployments permission to sign with it.
*/
async createKmsIssuerPolicy(request, options) {
return unwrapAsync(kmsCreateKmsIssuerPolicy(this, request, options));
}
/**
* Update an issuer policy
*
* @remarks
* Update an existing KMS issuer policy's environments or token claims.
*/
async updateKmsIssuerPolicy(request, options) {
return unwrapAsync(kmsUpdateKmsIssuerPolicy(this, request, options));
}
/**
* Delete an issuer policy
*
* @remarks
* Remove a policy from a KMS issuer.
*/
async deleteKmsIssuerPolicy(request, options) {
return unwrapAsync(kmsDeleteKmsIssuerPolicy(this, request, options));
}
}
//# sourceMappingURL=kms.js.map