@datalayer/core
Version:
[](https://datalayer.io)
19 lines (18 loc) • 670 B
TypeScript
import { CreditsResponse } from '../../models/CreditsDTO';
/**
* Get the current user's available credits and usage information.
*
* @param token - Authentication token
* @param iamUrl - Optional IAM service URL (defaults to production)
* @returns Promise with credits information
*
* @example
* ```typescript
* import { getCredits } from '@datalayer/core/api/iam';
*
* const creditsInfo = await getCredits(token);
* console.log(`Available credits: ${creditsInfo.credits.credits}`);
* console.log(`Quota: ${creditsInfo.credits.quota || 'unlimited'}`);
* ```
*/
export declare function getCredits(token: string, iamUrl?: string): Promise<CreditsResponse>;