Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add type prop to DatedUserAchievement model #81

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/user/getAchievementsEarnedBetween.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import { setupServer } from "msw/node";
import { apiBaseUrl } from "../utils/internal";
import { buildAuthorization } from "../utils/public";
import { getAchievementsEarnedBetween } from "./getAchievementsEarnedBetween";
import type { DatedUserAchievementsResponse } from "./models";
import type {
DatedUserAchievement,
DatedUserAchievementsResponse
} from "./models";

const server = setupServer();

Expand Down Expand Up @@ -42,7 +45,8 @@ describe("Function: getAchievementsEarnedBetween", () => {
ConsoleName: "PlayStation Portable",
CumulScore: 40,
BadgeURL: "/Badge/193797.png",
GameURL: "/game/3571"
GameURL: "/game/3571",
Type: "progression"
}
];

Expand Down Expand Up @@ -76,8 +80,9 @@ describe("Function: getAchievementsEarnedBetween", () => {
consoleName: "PlayStation Portable",
cumulScore: 40,
badgeUrl: "/Badge/193797.png",
gameUrl: "/game/3571"
gameUrl: "/game/3571",
type: "progression"
}
]);
] as DatedUserAchievement[]);
wescopeland marked this conversation as resolved.
Show resolved Hide resolved
});
});
3 changes: 2 additions & 1 deletion src/user/getAchievementsEarnedBetween.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ import type {
* consoleName: 'PlayStation Portable',
* cumulScore: 120,
* badgeUrl: '/Badge/193756.png',
* gameUrl: '/game/3571'
* gameUrl: '/game/3571',
* type: 'progression'
* }
* ]
* ```
Expand Down
13 changes: 9 additions & 4 deletions src/user/getAchievementsEarnedOnDay.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import { setupServer } from "msw/node";
import { apiBaseUrl } from "../utils/internal";
import { buildAuthorization } from "../utils/public";
import { getAchievementsEarnedOnDay } from "./getAchievementsEarnedOnDay";
import type { DatedUserAchievementsResponse } from "./models";
import type {
DatedUserAchievement,
DatedUserAchievementsResponse
} from "./models";

const server = setupServer();

Expand Down Expand Up @@ -42,7 +45,8 @@ describe("Function: getAchievementsEarnedOnDay", () => {
ConsoleName: "PlayStation Portable",
CumulScore: 40,
BadgeURL: "/Badge/193797.png",
GameURL: "/game/3571"
GameURL: "/game/3571",
Type: null
}
];

Expand Down Expand Up @@ -75,8 +79,9 @@ describe("Function: getAchievementsEarnedOnDay", () => {
consoleName: "PlayStation Portable",
cumulScore: 40,
badgeUrl: "/Badge/193797.png",
gameUrl: "/game/3571"
gameUrl: "/game/3571",
type: null
}
]);
] as DatedUserAchievement[]);
});
});
3 changes: 2 additions & 1 deletion src/user/getAchievementsEarnedOnDay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ import type {
* consoleName: 'PlayStation Portable',
* cumulScore: 120,
* badgeUrl: '/Badge/193756.png',
* gameUrl: '/game/3571'
* gameUrl: '/game/3571',
* type: 'progression'
* }
* ]
* ```
Expand Down
1 change: 1 addition & 0 deletions src/user/models/dated-user-achievement.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ export type DatedUserAchievement = {
cumulScore: number;
badgeUrl: string;
gameUrl: string;
type: "progression" | "win_condition" | "missable" | null;
};
1 change: 1 addition & 0 deletions src/user/models/dated-user-achievements-response.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ interface DatedUserAchievementResponseEntity {
CumulScore: number;
BadgeURL: string;
GameURL: string;
Type: "progression" | "win_condition" | "missable" | null;
}

export type DatedUserAchievementsResponse =
Expand Down
Loading