release: @marketplaces/auth 0.1.0 (built from main)

This commit is contained in:
sdarbinyan
2026-08-18 01:55:26 +04:00
commit 93f99cc7b1
44 changed files with 1601 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
import { Observable } from 'rxjs';
import { AuthSession, WebSessionStart } from './models/session.model';
/**
* The one Telegram QR/session API (`{authApiUrl}/users/sessions`). Customer
* login (AuthService) and admin login (AdminAuthService) both call this same
* service against this same endpoint - there is no separate admin backend.
* This class only does the HTTP call + response normalization; it holds no
* session state and writes no cookies, so each caller manages its own
* storage/signals independently on top of it.
*/
export declare class TelegramSessionApiService {
private readonly http;
private readonly authApiUrl;
private readonly telegramBotUsername;
createSession(): Observable<WebSessionStart>;
checkSessionOnce(webSessionID: string | null): Observable<AuthSession | null>;
logout(webSessionID: string): Observable<unknown>;
getBotLoginUrl(webSessionID: string): string;
getBotAppLoginUrl(webSessionID: string): string;
private getBotUsername;
private normalizeWebSession;
private extractSessionId;
private readFirst;
private readString;
private readNumber;
private asRecord;
private isActiveStatus;
}