Skip to content

Commit

Permalink
Merge pull request #33 from spring-media/SPR-15803
Browse files Browse the repository at this point in the history
SPR-15803: Add method to get AsInfo as PUR way
  • Loading branch information
btrinh authored Oct 21, 2021
2 parents d33ff03 + 4a367a7 commit 9e2dddc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ps-web-apis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ export interface WhoamiUserInfo {
last_name?: string;
}

export interface PurchaseData {
entitlements: [string];
}

export interface WhoamiV1 {
/**
* will assert valid not outdated session before fetch will be done. backend credentials will be added automatically
Expand Down Expand Up @@ -90,6 +94,10 @@ export interface WhoamiV1 {
* @param clientId The string identifier of the client for which the customer id is requested.
*/
getCustomerId(clientId: string): Promise<string>;
/**
* will provide unsafe purchase data
*/
getUnsafePurchaseData(): Promise<PurchaseData>;
}

export function whoamiV1(): Promise<WhoamiV1> {
Expand Down

0 comments on commit 9e2dddc

Please sign in to comment.