Skip to content

Commit

Permalink
add new method to get a service passport
Browse files Browse the repository at this point in the history
  • Loading branch information
fgerardwltn24 committed Dec 12, 2024
1 parent b78027a commit 3a80810
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions dist/ps-web-apis.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,26 @@ export interface WhoamiUserInfo {
export interface PurchaseData {
entitlements: [string];
}
export interface ServicePassportSuccessResponse {
code: string;
message: string;
passport: string;
expires: number;
}
export interface ServicePassportErrorResponse {
code: string;
message: string;
}
export declare type ServicePassportResponse = ServicePassportSuccessResponse | ServicePassportErrorResponse;
export interface UserDataRequestResult {
success: boolean;
reason?: "userNotLoggedIn" | "generalError" | "userAborted";
}
export declare type FetchOptions = RequestInit & {
timeout?: number;
retries?: number;
retryDelay?: number;
retryStatusCodes?: number[];
};
export declare type WaitingRoomQueueDefault = "";
export declare type WaitingRoomQueue = WaitingRoomQueueDefault | "auth" | "checkout" | "lefty-in-app-purchase";
Expand Down Expand Up @@ -147,6 +161,16 @@ export interface WhoamiV1 {
*
*/
renderAuthComponent(container: HTMLElement, props: WonderwallProps): Promise<AuthRes>;
/**
* Retrieves a service passport for the specified service.
* The passport is intended to be used for authenticated communication with the service.
*
* @param service - The identifier or type of the service for which the passport is requested.
* Use "logora" or a custom service identifier as a string.
*
* @returns A promise that resolves to a ServicePassportResponse containing the token and related details.
*/
getServicePassport(service: "logora" | string): Promise<ServicePassportResponse>;
}
export interface AuthRes {
isLoggedIn: boolean;
Expand Down

0 comments on commit 3a80810

Please sign in to comment.