Skip to content

src/index.ts

27 lines · 953 B · TypeScript
Raw
import { ARCHIVE_ENABLED } from './config.ts'

/**
 * Overview of this package: the locked package that holds Audible credentials
 * for the apps that use it. Returns no credential values.
 *
 * @returns Purpose, exports, and the archive switch
 *
 * @example
 * import overview from 'kody:@danj/audible-auth'
 *
 * const info = await overview()
 */
export default async function overview() {
	return {
		purpose:
			'Hold Audible credentials so no other code reads them. Callers get narrow operations, never tokens.',
		exports: {
			'./status': 'Connection state and host approvals (metadata only).',
			'./request': 'Library list or item, Wishlist list, add, or remove.',
			'./license': 'AAXC license for one owned title (archive).',
			'./credits': 'Next plan charge and credit balance (numbers and a date only).',
		},
		connect: 'The package app is the only Connect surface: <app>/packages/audible-auth.',
		archiveEnabled: ARCHIVE_ENABLED,
	}
}