import { Mux } from "../index.js"; type CryptoKey = Awaited>; export interface SignOptions { /** * Signature algorithm. Could be one of these values : * - RS256: RSASSA using SHA-256 hash algorithm */ algorithm?: Algorithm | undefined; keyid?: string | undefined; /** expressed in seconds or a string describing a time span [zeit/ms](https://github.com/zeit/ms.js). Eg: 60, "2 days", "10h", "7d" */ expiresIn?: string | number | undefined; /** expressed in seconds or a string describing a time span [zeit/ms](https://github.com/zeit/ms.js). Eg: 60, "2 days", "10h", "7d" */ notBefore?: string | number | undefined; audience?: string | string[] | undefined; subject?: string | undefined; issuer?: string | undefined; jwtid?: string | undefined; noTimestamp?: boolean | undefined; } export type Algorithm = 'RS256'; export interface JwtHeader { alg: string | Algorithm; typ?: string | undefined; cty?: string | undefined; crit?: Array> | undefined; kid?: string | undefined; jku?: string | undefined; x5u?: string | string[] | undefined; 'x5t#S256'?: string | undefined; x5t?: string | undefined; x5c?: string | string[] | undefined; } export declare enum TypeClaim { video = "v", thumbnail = "t", gif = "g", storyboard = "s", stats = "playback_id", drm_license = "d" } export declare enum TypeToken { video = "playback-token", thumbnail = "thumbnail-token", storyboard = "storyboard-token", drm_license = "drm-token", gif = "gif-token",// Not supported by Mux Player stats = "stats-token" } export type TypeTokenValues = (typeof TypeToken)[keyof typeof TypeToken]; export type Tokens = Partial>; export type TypeWithParams = [Type, MuxJWTSignOptions['params']]; interface MuxJWTSignOptionsBase { keyId?: string; keySecret?: string | CryptoKey; keyFilePath?: string; type?: Type | Array>; expiration?: string; params?: Record; } export interface MuxJWTSignOptions extends MuxJWTSignOptionsBase { type?: Type; } export interface MuxJWTSignOptionsMultiple extends MuxJWTSignOptionsBase { type: Array>; } export declare const isMuxJWTSignOptionsMultiple: (config: MuxJWTSignOptions | MuxJWTSignOptionsMultiple) => config is MuxJWTSignOptionsMultiple; export declare enum DataTypeClaim { video = "video_id", asset = "asset_id", playback = "playback_id", live_stream = "live_stream_id" } export type KeyLike = CryptoKey | Uint8Array; export declare function sign(payload: object, secretOrPrivateKey: KeyLike, options: SignOptions): Promise; export declare function getSigningKey(mux: Mux, opts: MuxJWTSignOptions): string; export declare function getPrivateKey(mux: Mux, opts: MuxJWTSignOptions): Promise; export {}; //# sourceMappingURL=jwt.d.ts.map