Skip to content

Commit 4eac251

Browse files
committed
crate: Add versions_meta field
1 parent 7cebb91 commit 4eac251

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

app/models/crate.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,22 @@ export default class Crate extends Model {
2222
@attr max_version;
2323
@attr max_stable_version;
2424
@attr newest_version;
25+
/**
26+
* @typedef {Object} VersionsMeta
27+
* @property {number} total
28+
* @property {string | null} next_page
29+
* @property {Object.<string, ReleaseTrackDetails>} release_tracks
30+
*
31+
* @typedef {Object} ReleaseTrackDetails
32+
* @property {string} highest
33+
**/
34+
/**
35+
* This isn't an attribute in the crate response.
36+
* It's actually the `meta` attribute that belongs to `versions`
37+
* and needs to be assigned to `crate` manually.
38+
* @type {VersionsMeta | null}
39+
**/
40+
@attr versions_meta;
2541

2642
@attr description;
2743
@attr homepage;

0 commit comments

Comments
 (0)