@playbasis-ai/qwikcard-sdk 2.3.7 → 2.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@playbasis-ai/qwikcard-sdk",
3
- "version": "2.3.7",
3
+ "version": "2.3.9",
4
4
  "description": "Playbasis SDK for QwikCard College Rewards - React Native gamification integration",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -73,14 +73,14 @@
73
73
  "license": "MIT",
74
74
  "repository": {
75
75
  "type": "git",
76
- "url": "https://github.com/playbasis/playbasis-platform.git",
76
+ "url": "https://github.com/Playbasis/playbasis-platform.git",
77
77
  "directory": "client-sdks/qwikcard-sdk-v1.3.0-pkg"
78
78
  },
79
79
  "bugs": {
80
- "url": "https://github.com/playbasis/playbasis-platform/issues"
80
+ "url": "https://github.com/Playbasis/playbasis-platform/issues"
81
81
  },
82
- "homepage": "https://github.com/playbasis/playbasis-platform/tree/main/client-sdks/qwikcard-sdk-v1.3.0-pkg#readme",
82
+ "homepage": "https://github.com/Playbasis/playbasis-platform/tree/main/client-sdks/qwikcard-sdk-v1.3.0-pkg#readme",
83
83
  "publishConfig": {
84
- "registry": "https://registry.npmjs.org/"
84
+ "registry": "https://registry.npmjs.org"
85
85
  }
86
- }
86
+ }
@@ -49,8 +49,8 @@ function AppContent({ leaderboardId }: { leaderboardId?: string }) {
49
49
  const [player, balances, quests, allBadges, playerBadges, rewards] = await Promise.all([
50
50
  client.getPlayer(playerId),
51
51
  client.getBalances(playerId),
52
- client.getPlayerQuests(playerId).catch(() => []), // Gracefully handle if endpoint missing
53
- client.getBadges().catch(() => []), // Gracefully handle if endpoint missing
52
+ client.getPlayerQuests(playerId),
53
+ client.getBadges(),
54
54
  client.getPlayerBadges(playerId),
55
55
  client.getRewards().catch(() => []), // Gracefully handle if rewards endpoint doesn't exist
56
56
  ]);
@@ -60,19 +60,19 @@ function AppContent({ leaderboardId }: { leaderboardId?: string }) {
60
60
 
61
61
  const leaderboardEntries = leaderboardId
62
62
  ? await (async () => {
63
- try {
64
- const res = await client.getLeaderboard(leaderboardId, { limit: 50 });
65
- return res.entries.map((e) => ({
66
- userId: e.playerId,
67
- rank: e.rank,
68
- displayName: e.displayName,
69
- score: e.score,
70
- isCurrentUser: e.playerId === player.id,
71
- }));
72
- } catch {
73
- return [];
74
- }
75
- })()
63
+ try {
64
+ const res = await client.getLeaderboard(leaderboardId, { limit: 50 });
65
+ return res.entries.map((e) => ({
66
+ userId: e.playerId,
67
+ rank: e.rank,
68
+ displayName: e.displayName,
69
+ score: e.score,
70
+ isCurrentUser: e.playerId === player.id,
71
+ }));
72
+ } catch {
73
+ return [];
74
+ }
75
+ })()
76
76
  : [];
77
77
 
78
78
  return {
@@ -75,7 +75,7 @@ export function usePoints(): UsePointsReturn {
75
75
 
76
76
  // Helper getters for common currencies
77
77
  const xp = balances.find((b) => b.currency === 'xp')?.balance ?? 0;
78
- const qwikCoins = balances.find((b) => b.currency === 'qwik-coins')?.balance ?? 0;
78
+ const qwikCoins = balances.find((b) => b.currency === 'coins')?.balance ?? 0;
79
79
 
80
80
  return {
81
81
  balances,
@@ -34,7 +34,7 @@ export interface PointBalance {
34
34
  updatedAt: string;
35
35
  }
36
36
 
37
- export type Currency = 'xp' | 'qwik-coins';
37
+ export type Currency = 'xp' | 'coins';
38
38
 
39
39
  // ─────────────────────────────────────────────────────────────────────────────
40
40
  // Quests