@playbasis-ai/qwikcard-sdk 2.3.11 → 2.3.13

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.11",
3
+ "version": "2.3.13",
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",
package/src/api/client.ts CHANGED
@@ -211,16 +211,16 @@ export class PlaybasisClient {
211
211
  // ─────────────────────────────────────────────────────────────────────────
212
212
 
213
213
  async getQuests(): Promise<Quest[]> {
214
- const data = await this.request<{ quests?: Quest[] }>('GET', '/quests');
215
- return data.quests || [];
214
+ const data = await this.request<{ quests?: Quest[]; items?: Quest[] }>('GET', '/quests');
215
+ return data.quests || data.items || [];
216
216
  }
217
217
 
218
218
  async getPlayerQuests(playerId: string): Promise<Quest[]> {
219
- const data = await this.request<{ quests?: Quest[] }>(
219
+ const data = await this.request<{ quests?: Quest[]; items?: Quest[] }>(
220
220
  'GET',
221
221
  `/players/${encodeURIComponent(playerId)}/quests`,
222
222
  );
223
- return data.quests || [];
223
+ return data.quests || data.items || [];
224
224
  }
225
225
 
226
226
  async getQuestProgress(playerId: string, questId: string): Promise<Quest> {
@@ -236,16 +236,16 @@ export class PlaybasisClient {
236
236
  // ─────────────────────────────────────────────────────────────────────────
237
237
 
238
238
  async getBadges(): Promise<Badge[]> {
239
- const data = await this.request<{ badges?: Badge[] }>('GET', '/badges');
240
- return data.badges || [];
239
+ const data = await this.request<{ badges?: Badge[]; items?: Badge[] }>('GET', '/badges');
240
+ return data.badges || data.items || [];
241
241
  }
242
242
 
243
243
  async getPlayerBadges(playerId: string): Promise<Badge[]> {
244
- const data = await this.request<{ badges?: Badge[] }>(
244
+ const data = await this.request<{ badges?: Badge[]; items?: Badge[] }>(
245
245
  'GET',
246
246
  `/players/${encodeURIComponent(playerId)}/badges`,
247
247
  );
248
- return data.badges || [];
248
+ return data.badges || data.items || [];
249
249
  }
250
250
 
251
251
  // ─────────────────────────────────────────────────────────────────────────
@@ -253,8 +253,8 @@ export class PlaybasisClient {
253
253
  // ─────────────────────────────────────────────────────────────────────────
254
254
 
255
255
  async getRewards(): Promise<Reward[]> {
256
- const data = await this.request<{ rewards?: Reward[] }>('GET', '/rewards');
257
- return data.rewards || [];
256
+ const data = await this.request<{ rewards?: Reward[]; items?: Reward[] }>('GET', '/rewards');
257
+ return data.rewards || data.items || [];
258
258
  }
259
259
 
260
260
  async redeemReward(playerId: string, rewardId: string): Promise<RedemptionResult> {