@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>
185 lines • 8.24 kB
TypeScript
import * as z from "zod/v3";
import { ClosedEnum } from "../types/enums.js";
import { Result as SafeParseResult } from "../types/fp.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
export type UpdateKmsIssuerRequestBody = {
/**
* The name of the issuer.
*/
name?: string | undefined;
/**
* A JSON Schema used to validate the resolved token claims when signing tokens for this issuer. Pass null to remove it.
*/
claimsSchema?: {
[k: string]: any;
} | null | undefined;
};
export type UpdateKmsIssuerRequest = {
/**
* The ID of the issuer.
*/
issuerId: string;
/**
* The Team identifier to perform the request on behalf of.
*/
teamId?: string | undefined;
/**
* The Team slug to perform the request on behalf of.
*/
slug?: string | undefined;
requestBody?: UpdateKmsIssuerRequestBody | undefined;
};
export declare const UpdateKmsIssuerAlgorithm: {
readonly Es256: "ES256";
readonly Es384: "ES384";
readonly Es512: "ES512";
readonly EdDSA: "EdDSA";
readonly Ps256: "PS256";
readonly Ps384: "PS384";
readonly Ps512: "PS512";
readonly Rs256: "RS256";
readonly Rs384: "RS384";
readonly Rs512: "RS512";
};
export type UpdateKmsIssuerAlgorithm = ClosedEnum<typeof UpdateKmsIssuerAlgorithm>;
export declare const UpdateKmsIssuerOrigin: {
readonly External: "external";
readonly Vercel: "vercel";
};
export type UpdateKmsIssuerOrigin = ClosedEnum<typeof UpdateKmsIssuerOrigin>;
export declare const UpdateKmsIssuerStatus: {
readonly Active: "active";
readonly Pending: "pending";
readonly Revoking: "revoking";
};
export type UpdateKmsIssuerStatus = ClosedEnum<typeof UpdateKmsIssuerStatus>;
export type UpdateKmsIssuerPublicKey = {
kty?: string | undefined;
kid?: string | undefined;
alg?: string | undefined;
use?: string | undefined;
keyOps?: Array<string> | undefined;
/**
* The X.509 certificate chain (RFC 7517 §4.7). Each entry is the base64 DER (not base64url) of a certificate. For keys minted with a stored certificate this holds the single self-signed cert as `[x5c]`.
*/
x5c?: Array<string> | undefined;
/**
* The base64url SHA-256 thumbprint of the DER certificate in `x5c[0]` (RFC 7517 §4.9).
*/
x5tNumberS256?: string | undefined;
};
export type UpdateKmsIssuerSigningKeys = {
/**
* The server-minted, unique record identifier. Use this to address the key on the activate / certificate endpoints.
*/
keyId: string;
/**
* The caller-supplied key id (imported keys only), used as the JWT/JWKS `kid`. Not unique across an issuer's keys; omitted for generated keys.
*/
importKeyId?: string | undefined;
issuerId: string;
algorithm: string;
status: UpdateKmsIssuerStatus;
publicKey?: UpdateKmsIssuerPublicKey | undefined;
publicKeyFingerprint?: string | undefined;
/**
* The public key in SPKI PEM form, ready to render. Present whenever the key has public key material. Derived from `publicKey`; the embedded certificate members (`x5c`/`x5t#S256`) do not affect it.
*/
publicKeyPem?: string | undefined;
/**
* The stored X.509 certificate (from `publicKey.x5c[0]`) in PEM form, ready to render. Present only for keys created with a stored certificate; omitted for keys created before certificates were stored.
*/
certificatePem?: string | undefined;
createdAt: string;
updatedAt: string;
revokeAt?: string | undefined;
activateAt?: string | undefined;
/**
* When the key became the active signer. Present for active and revoking keys (and absent for pending keys and rows predating this field).
*/
activatedAt?: string | undefined;
};
export type UpdateKmsIssuerPolicies2 = {
kind: "connex-grant";
clientId: string;
tokenClaims?: {
[k: string]: any;
} | undefined;
createdAt: string;
updatedAt: string;
};
export type UpdateKmsIssuerPolicies1 = {
kind: "project-grant";
teamId: string;
projectId: string;
/**
* Environments whose OIDC tokens this grant authorizes. Each entry is either a system environment slug (`production`, `preview`, `development`) or a custom environment ID (prefixed `env_`). Custom environments are matched against the token's `custom_environment_id` claim (the stable ID); system environments against its `environment` claim.
*/
environments: Array<string>;
tokenClaims?: {
[k: string]: any;
} | undefined;
createdAt: string;
updatedAt: string;
};
export type UpdateKmsIssuerPolicies = UpdateKmsIssuerPolicies1 | UpdateKmsIssuerPolicies2;
export type UpdateKmsIssuerResponseBody = {
id: string;
ownerId: string;
name: string;
algorithm: UpdateKmsIssuerAlgorithm;
origin: UpdateKmsIssuerOrigin;
managedBy?: string | undefined;
claimsSchema?: {
[k: string]: any;
} | undefined;
createdAt: string;
updatedAt: string;
signingKeys: Array<UpdateKmsIssuerSigningKeys>;
policies: Array<UpdateKmsIssuerPolicies1 | UpdateKmsIssuerPolicies2>;
};
/** @internal */
export type UpdateKmsIssuerRequestBody$Outbound = {
name?: string | undefined;
claimsSchema?: {
[k: string]: any;
} | null | undefined;
};
/** @internal */
export declare const UpdateKmsIssuerRequestBody$outboundSchema: z.ZodType<UpdateKmsIssuerRequestBody$Outbound, z.ZodTypeDef, UpdateKmsIssuerRequestBody>;
export declare function updateKmsIssuerRequestBodyToJSON(updateKmsIssuerRequestBody: UpdateKmsIssuerRequestBody): string;
/** @internal */
export type UpdateKmsIssuerRequest$Outbound = {
issuerId: string;
teamId?: string | undefined;
slug?: string | undefined;
RequestBody?: UpdateKmsIssuerRequestBody$Outbound | undefined;
};
/** @internal */
export declare const UpdateKmsIssuerRequest$outboundSchema: z.ZodType<UpdateKmsIssuerRequest$Outbound, z.ZodTypeDef, UpdateKmsIssuerRequest>;
export declare function updateKmsIssuerRequestToJSON(updateKmsIssuerRequest: UpdateKmsIssuerRequest): string;
/** @internal */
export declare const UpdateKmsIssuerAlgorithm$inboundSchema: z.ZodNativeEnum<typeof UpdateKmsIssuerAlgorithm>;
/** @internal */
export declare const UpdateKmsIssuerOrigin$inboundSchema: z.ZodNativeEnum<typeof UpdateKmsIssuerOrigin>;
/** @internal */
export declare const UpdateKmsIssuerStatus$inboundSchema: z.ZodNativeEnum<typeof UpdateKmsIssuerStatus>;
/** @internal */
export declare const UpdateKmsIssuerPublicKey$inboundSchema: z.ZodType<UpdateKmsIssuerPublicKey, z.ZodTypeDef, unknown>;
export declare function updateKmsIssuerPublicKeyFromJSON(jsonString: string): SafeParseResult<UpdateKmsIssuerPublicKey, SDKValidationError>;
/** @internal */
export declare const UpdateKmsIssuerSigningKeys$inboundSchema: z.ZodType<UpdateKmsIssuerSigningKeys, z.ZodTypeDef, unknown>;
export declare function updateKmsIssuerSigningKeysFromJSON(jsonString: string): SafeParseResult<UpdateKmsIssuerSigningKeys, SDKValidationError>;
/** @internal */
export declare const UpdateKmsIssuerPolicies2$inboundSchema: z.ZodType<UpdateKmsIssuerPolicies2, z.ZodTypeDef, unknown>;
export declare function updateKmsIssuerPolicies2FromJSON(jsonString: string): SafeParseResult<UpdateKmsIssuerPolicies2, SDKValidationError>;
/** @internal */
export declare const UpdateKmsIssuerPolicies1$inboundSchema: z.ZodType<UpdateKmsIssuerPolicies1, z.ZodTypeDef, unknown>;
export declare function updateKmsIssuerPolicies1FromJSON(jsonString: string): SafeParseResult<UpdateKmsIssuerPolicies1, SDKValidationError>;
/** @internal */
export declare const UpdateKmsIssuerPolicies$inboundSchema: z.ZodType<UpdateKmsIssuerPolicies, z.ZodTypeDef, unknown>;
export declare function updateKmsIssuerPoliciesFromJSON(jsonString: string): SafeParseResult<UpdateKmsIssuerPolicies, SDKValidationError>;
/** @internal */
export declare const UpdateKmsIssuerResponseBody$inboundSchema: z.ZodType<UpdateKmsIssuerResponseBody, z.ZodTypeDef, unknown>;
export declare function updateKmsIssuerResponseBodyFromJSON(jsonString: string): SafeParseResult<UpdateKmsIssuerResponseBody, SDKValidationError>;
//# sourceMappingURL=updatekmsissuerop.d.ts.map