Skip to content

Commit

Permalink
achievements-app#126 - adjust type definitions for the PSN response
Browse files Browse the repository at this point in the history
  • Loading branch information
alekpentchev committed Mar 25, 2023
1 parent 58dd24a commit a75714a
Showing 1 changed file with 80 additions and 4 deletions.
84 changes: 80 additions & 4 deletions src/models/games-library-for-user.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,41 +10,117 @@ export interface GamesLibraryForUserResponse {
* ```
*/
__typename: string;
/**
* The list of games in the library.
*/
games: Array<GameLibraryTitle>;
};
};
}

export interface GameLibraryTitle {
/**
* The type of resource retrieved
* The type of resource retrieved.
*
* @example
* ```json
* "__typename": "GameLibraryTitle"
* ```
*/
__typename: string;
/** The ID of the concept. Most probably it will be of value null */

/**
* The ID of the concept.
* Most probably it will be of value null.
*/
conceptId: null | unknown;

/**
* The ID of the entitlement
* The ID of the entitlement.
*
* @example
* ```json
* "entitlementId": "UP4433-CUSA18779_00-DUNGEONSPS400000"
* ```
*/
// TODO: describe with examples the format for different fields
entitlementId: string;

/**
* The image of the game.
*
* @example
* ```
* image: {
* type: "Media",
* url: "https://image.api.playstation.com/gs2-sec/appkgo/prod/CUSA10410_00/2/i_b0afbd729d451429a45edf10e597d7b5af1a5f2a333fde963615e7a62d4d8174/i/icon0.png"
* }
* ```
*/
image: GameLibraryImage;

/**
* Whether the game is active or not.
*/
isActive: boolean;

/**
* Whether the game is downloadable or not.
*/
isDownloadable: boolean;

/**
* Whether the game is available for pre-order or not.
*/
isPreOrder: boolean;

/**
* The name of the game.
*
* @example
* ```
* name: "The Last of Us Part II"
* ```
*/
name: string;

/**
* The platform on which the game is available.
*
* @example
* ```
* platform: "PS4"
* ```
*/
platform: string;

/**
* The ID of the product.
*
* @example
* ```
* productId: "UP4433-CUSA18779_00"
* ```
*/
productId: string;

/**
* The subscription service associated with the game.
*
* @example
* ```
* subscriptionService: "PS_PLUS"
* ```
*/
subscriptionService: string;

/**
* The ID of the title.
*
* @example
* ```
* titleId: "CUSA18779"
* ```
*/
titleId: string;
}

Expand Down

0 comments on commit a75714a

Please sign in to comment.