From 03c74c53a3330d6ca83ea948379c49fc6f031712 Mon Sep 17 00:00:00 2001 From: Vitaly Gashkov Date: Tue, 26 Aug 2025 12:22:10 +0500 Subject: [PATCH] fix: improve types --- crextractor.d.ts | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/crextractor.d.ts b/crextractor.d.ts index 122465e..bb5acf2 100644 --- a/crextractor.d.ts +++ b/crextractor.d.ts @@ -1,10 +1,24 @@ -export function extractSecrets(): Promise<{ +export type CrunchyrollAppCredentials = { // Crunchyroll app ID id: string; // Crunchyroll app secret secret: string; // Base64 encoded `id:secret` string encoded: string; - // HTTP header with Basic Authorization to access Crunchyroll mobile APIs + // Ready HTTP header in the format `Basic `, can be used to access some Crunchyroll APIs authorization: string; -}>; +}; + +/** + * Extract credentials from the Crunchyroll Android APK using jadx. + */ +export function extract(options?: { + target?: 'mobile' | 'tv'; + output?: string; + cleanup?: boolean; +}): Promise; + +/** + * Fetch ready credentials from the GitHub repository. + */ +export function pull(options?: { target: 'mobile' | 'tv' }): Promise;