/** * Token operations namespace for TinybirdClient */ import type { CreateJWTOptions, CreateJWTResult } from "../api/tokens.js"; /** * Token operations namespace for TinybirdClient */ export declare class TokensNamespace { private readonly getToken; private readonly baseUrl; private readonly fetchFn?; private readonly timeout?; constructor(getToken: () => Promise, baseUrl: string, fetchFn?: typeof globalThis.fetch | undefined, timeout?: number | undefined); /** * Create a JWT token * * Creates a short-lived JWT token with specific scopes for secure, * time-limited access to pipes and datasources. * * @param options - JWT creation options * @returns The created JWT token * * @example * ```ts * const result = await client.tokens.createJWT({ * name: "user_123_token", * expiresAt: new Date(Date.now() + 3600 * 1000), // 1 hour * scopes: [ * { * type: "PIPES:READ", * resource: "user_analytics", * fixed_params: { user_id: 123 }, * }, * ], * }); * * console.log(result.token); // "eyJ..." * ``` */ createJWT(options: CreateJWTOptions): Promise; } //# sourceMappingURL=tokens.d.ts.map