UNPKG

@speechmatics/auth

Version:

Library for fetching temporary keys for Speechmatics APIs

16 lines (14 loc) 654 B
declare function createSpeechmaticsJWT({ type, apiKey, clientRef, ttl, managementPlatformURL, region, }: { type: 'batch' | 'rt' | 'flow'; apiKey: string; clientRef?: string; ttl?: number; region?: 'eu' | 'usa' | 'au'; managementPlatformURL?: string; }): Promise<string>; type SpeechmaticsJWTErrorType = 'ValidationFailed' | 'Unauthorized' | 'UnknownError'; declare class SpeechmaticsJWTError extends Error { readonly type: SpeechmaticsJWTErrorType; constructor(type: SpeechmaticsJWTErrorType, message: string, opts?: ErrorOptions); } export { SpeechmaticsJWTError, type SpeechmaticsJWTErrorType, createSpeechmaticsJWT };