@cloudparse/up-miniapps-sdk 0.7.3 → 0.8.0

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/dist/index.d.cts CHANGED
@@ -74,10 +74,6 @@ interface IUserProfile {
74
74
  registrationType: "up" | "apple" | "google";
75
75
  /** Admin status. */
76
76
  admin: boolean;
77
- /** UP points balance. */
78
- ups: number;
79
- /** Experience points balance. */
80
- xp: number;
81
77
  /** ISO timestamp of user creation. */
82
78
  createdAt: string;
83
79
  /** ISO timestamp of last password update. */
@@ -218,9 +214,10 @@ interface IFidelityTransaction {
218
214
  * A player's progress towards a single named Achievement. The Hub tracks a
219
215
  * raw in-app action count per Achievement `slug` (reported server-to-server
220
216
  * by each mini-app's own backend — never by this SDK, see `sdk.achievement`/
221
- * `sdk.achievements` doc comments in `sdk.ts`) and auto-credits UP+XP once
222
- * `playerActionCount` reaches `totalActionCount`. This is a read-only view
223
- * for rendering progress (e.g. a progress bar) — there is no "claim" step.
217
+ * `sdk.achievements` doc comments in `sdk.ts`) and auto-credits points
218
+ * (FPoints) once `playerActionCount` reaches `totalActionCount`. This is a
219
+ * read-only view for rendering progress (e.g. a progress bar) — there is no
220
+ * "claim" step.
224
221
  */
225
222
  interface IAchievement {
226
223
  /** Unique slug identifying the Achievement (e.g. "explore-5-pois"). */
@@ -233,10 +230,8 @@ interface IAchievement {
233
230
  playerActionCount: number;
234
231
  /** The action count required to complete this Achievement. */
235
232
  totalActionCount: number;
236
- /** UP points credited automatically once completed. */
237
- upReward: number;
238
- /** XP credited automatically once completed. */
239
- xpReward: number;
233
+ /** Points (FPoints) credited automatically once completed. */
234
+ pointsReward: number;
240
235
  /** Whether `playerActionCount` has reached `totalActionCount`. */
241
236
  completed: boolean;
242
237
  /** Optional illustration/icon URL. */
package/dist/index.d.ts CHANGED
@@ -74,10 +74,6 @@ interface IUserProfile {
74
74
  registrationType: "up" | "apple" | "google";
75
75
  /** Admin status. */
76
76
  admin: boolean;
77
- /** UP points balance. */
78
- ups: number;
79
- /** Experience points balance. */
80
- xp: number;
81
77
  /** ISO timestamp of user creation. */
82
78
  createdAt: string;
83
79
  /** ISO timestamp of last password update. */
@@ -218,9 +214,10 @@ interface IFidelityTransaction {
218
214
  * A player's progress towards a single named Achievement. The Hub tracks a
219
215
  * raw in-app action count per Achievement `slug` (reported server-to-server
220
216
  * by each mini-app's own backend — never by this SDK, see `sdk.achievement`/
221
- * `sdk.achievements` doc comments in `sdk.ts`) and auto-credits UP+XP once
222
- * `playerActionCount` reaches `totalActionCount`. This is a read-only view
223
- * for rendering progress (e.g. a progress bar) — there is no "claim" step.
217
+ * `sdk.achievements` doc comments in `sdk.ts`) and auto-credits points
218
+ * (FPoints) once `playerActionCount` reaches `totalActionCount`. This is a
219
+ * read-only view for rendering progress (e.g. a progress bar) — there is no
220
+ * "claim" step.
224
221
  */
225
222
  interface IAchievement {
226
223
  /** Unique slug identifying the Achievement (e.g. "explore-5-pois"). */
@@ -233,10 +230,8 @@ interface IAchievement {
233
230
  playerActionCount: number;
234
231
  /** The action count required to complete this Achievement. */
235
232
  totalActionCount: number;
236
- /** UP points credited automatically once completed. */
237
- upReward: number;
238
- /** XP credited automatically once completed. */
239
- xpReward: number;
233
+ /** Points (FPoints) credited automatically once completed. */
234
+ pointsReward: number;
240
235
  /** Whether `playerActionCount` has reached `totalActionCount`. */
241
236
  completed: boolean;
242
237
  /** Optional illustration/icon URL. */
package/dist/index.js CHANGED
@@ -81,8 +81,7 @@ var MOCK_ACHIEVEMENTS = [
81
81
  slug: "first-journey",
82
82
  title: "First Steps",
83
83
  totalActionCount: 1,
84
- upReward: 20,
85
- xpReward: 40
84
+ pointsReward: 10
86
85
  },
87
86
  {
88
87
  completed: false,
@@ -92,8 +91,7 @@ var MOCK_ACHIEVEMENTS = [
92
91
  slug: "explore-5-pois",
93
92
  title: "Explorer",
94
93
  totalActionCount: 5,
95
- upReward: 50,
96
- xpReward: 100
94
+ pointsReward: 15
97
95
  },
98
96
  {
99
97
  completed: false,
@@ -103,8 +101,7 @@ var MOCK_ACHIEVEMENTS = [
103
101
  slug: "scan-10-qrcodes",
104
102
  title: "Code Breaker",
105
103
  totalActionCount: 10,
106
- upReward: 80,
107
- xpReward: 150
104
+ pointsReward: 20
108
105
  }
109
106
  ];
110
107
  function mockAchievement(slug) {
@@ -118,8 +115,7 @@ function mockAchievement(slug) {
118
115
  slug: slug || "unknown-achievement",
119
116
  title: slug || "Unknown Achievement",
120
117
  totalActionCount: 1,
121
- upReward: 0,
122
- xpReward: 0
118
+ pointsReward: 0
123
119
  };
124
120
  }
125
121
  function mockAchievements() {
@@ -3407,7 +3403,7 @@ var loadImage2 = (src) => new Promise((resolve, reject) => {
3407
3403
  });
3408
3404
 
3409
3405
  // package.json
3410
- var version = "0.7.3";
3406
+ var version = "0.8.0";
3411
3407
 
3412
3408
  // src/sdk.ts
3413
3409
  function deepFreeze(obj) {
@@ -3844,8 +3840,7 @@ var MOCK_ACHIEVEMENTS2 = [
3844
3840
  slug: "first-journey",
3845
3841
  title: "First Steps",
3846
3842
  totalActionCount: 1,
3847
- upReward: 20,
3848
- xpReward: 40
3843
+ pointsReward: 10
3849
3844
  },
3850
3845
  {
3851
3846
  completed: false,
@@ -3855,8 +3850,7 @@ var MOCK_ACHIEVEMENTS2 = [
3855
3850
  slug: "explore-5-pois",
3856
3851
  title: "Explorer",
3857
3852
  totalActionCount: 5,
3858
- upReward: 50,
3859
- xpReward: 100
3853
+ pointsReward: 15
3860
3854
  },
3861
3855
  {
3862
3856
  completed: false,
@@ -3866,8 +3860,7 @@ var MOCK_ACHIEVEMENTS2 = [
3866
3860
  slug: "scan-10-qrcodes",
3867
3861
  title: "Code Breaker",
3868
3862
  totalActionCount: 10,
3869
- upReward: 80,
3870
- xpReward: 150
3863
+ pointsReward: 20
3871
3864
  }
3872
3865
  ];
3873
3866
  var AVATAR_MOUTH_VARIANTS = [
@@ -3932,10 +3925,8 @@ function buildMockProfile(mockJWTToken) {
3932
3925
  fullName,
3933
3926
  lastName: lastNameParts.join(" ") || "Caveman",
3934
3927
  localNumber: "0600000000",
3935
- ups: 100,
3936
3928
  username,
3937
- uuid,
3938
- xp: 500
3929
+ uuid
3939
3930
  };
3940
3931
  }
3941
3932
  var getBearing = (p1, p2) => {
@@ -4240,8 +4231,7 @@ var BridgeMocker = ({
4240
4231
  slug: slug || "unknown-achievement",
4241
4232
  title: slug || "Unknown Achievement",
4242
4233
  totalActionCount: 1,
4243
- upReward: 0,
4244
- xpReward: 0
4234
+ pointsReward: 0
4245
4235
  }
4246
4236
  );
4247
4237
  }