UNPKG

@unkey/api

Version:

Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@unkey/api* API.

40 lines (35 loc) 1.27 kB
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type V2KeysMigrateKeysMigration = { /** * The hash provided in the migration request */ hash: string; /** * The unique identifier for this key in Unkey's system. This is NOT the actual API key, but a reference ID used for management operations like updating or deleting the key. Store this ID in your database to reference the key later. This ID is not sensitive and can be logged or displayed in dashboards. */ keyId: string; }; /** @internal */ export const V2KeysMigrateKeysMigration$inboundSchema: z.ZodType< V2KeysMigrateKeysMigration, z.ZodTypeDef, unknown > = z.object({ hash: z.string(), keyId: z.string(), }); export function v2KeysMigrateKeysMigrationFromJSON( jsonString: string, ): SafeParseResult<V2KeysMigrateKeysMigration, SDKValidationError> { return safeParse( jsonString, (x) => V2KeysMigrateKeysMigration$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V2KeysMigrateKeysMigration' from JSON`, ); }