@cloudparse/up-miniapps-sdk 0.7.0 → 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/README.md +3 -3
- package/dist/index.browser.min.js +2 -2
- package/dist/index.browser.min.js.map +1 -1
- package/dist/index.cjs +35 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -12
- package/dist/index.d.ts +15 -12
- package/dist/index.js +35 -43
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -139,38 +139,35 @@ function isRunningInsideNativeShell() {
|
|
|
139
139
|
var BridgeTimeoutError = class extends Error {
|
|
140
140
|
};
|
|
141
141
|
var MOCK_ACHIEVEMENTS = [
|
|
142
|
-
{
|
|
143
|
-
completed: false,
|
|
144
|
-
description: "Discover 5 points of interest around Annecy.",
|
|
145
|
-
imageUrl: "https://api.dicebear.com/9.x/icons/svg?seed=explore",
|
|
146
|
-
playerActionCount: 3,
|
|
147
|
-
slug: "explore-5-pois",
|
|
148
|
-
title: "Explorer",
|
|
149
|
-
totalActionCount: 5,
|
|
150
|
-
upReward: 50,
|
|
151
|
-
xpReward: 100
|
|
152
|
-
},
|
|
153
142
|
{
|
|
154
143
|
completed: true,
|
|
155
144
|
description: "Complete your first navigation journey.",
|
|
156
|
-
imageUrl: "https://api.dicebear.com/9.x/icons/svg?seed=journey",
|
|
157
145
|
playerActionCount: 1,
|
|
146
|
+
priority: 1,
|
|
158
147
|
slug: "first-journey",
|
|
159
148
|
title: "First Steps",
|
|
160
149
|
totalActionCount: 1,
|
|
161
|
-
|
|
162
|
-
|
|
150
|
+
pointsReward: 10
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
completed: false,
|
|
154
|
+
description: "Discover 5 points of interest around Annecy.",
|
|
155
|
+
playerActionCount: 3,
|
|
156
|
+
priority: 2,
|
|
157
|
+
slug: "explore-5-pois",
|
|
158
|
+
title: "Explorer",
|
|
159
|
+
totalActionCount: 5,
|
|
160
|
+
pointsReward: 15
|
|
163
161
|
},
|
|
164
162
|
{
|
|
165
163
|
completed: false,
|
|
166
164
|
description: "Scan 10 QR codes at partner venues.",
|
|
167
|
-
imageUrl: "https://api.dicebear.com/9.x/icons/svg?seed=scan",
|
|
168
165
|
playerActionCount: 4,
|
|
166
|
+
priority: 3,
|
|
169
167
|
slug: "scan-10-qrcodes",
|
|
170
168
|
title: "Code Breaker",
|
|
171
169
|
totalActionCount: 10,
|
|
172
|
-
|
|
173
|
-
xpReward: 150
|
|
170
|
+
pointsReward: 20
|
|
174
171
|
}
|
|
175
172
|
];
|
|
176
173
|
function mockAchievement(slug) {
|
|
@@ -180,11 +177,11 @@ function mockAchievement(slug) {
|
|
|
180
177
|
completed: false,
|
|
181
178
|
description: "Mocked achievement (no native shell attached).",
|
|
182
179
|
playerActionCount: 0,
|
|
180
|
+
priority: 1,
|
|
183
181
|
slug: slug || "unknown-achievement",
|
|
184
182
|
title: slug || "Unknown Achievement",
|
|
185
183
|
totalActionCount: 1,
|
|
186
|
-
|
|
187
|
-
xpReward: 0
|
|
184
|
+
pointsReward: 0
|
|
188
185
|
};
|
|
189
186
|
}
|
|
190
187
|
function mockAchievements() {
|
|
@@ -3630,7 +3627,7 @@ var RoutingService = {
|
|
|
3630
3627
|
};
|
|
3631
3628
|
|
|
3632
3629
|
// package.json
|
|
3633
|
-
var version = "0.
|
|
3630
|
+
var version = "0.8.0";
|
|
3634
3631
|
|
|
3635
3632
|
// src/sdk.ts
|
|
3636
3633
|
function deepFreeze(obj) {
|
|
@@ -3865,7 +3862,7 @@ var MiniAppSDK = class {
|
|
|
3865
3862
|
}
|
|
3866
3863
|
});
|
|
3867
3864
|
/**
|
|
3868
|
-
* Fidelity &
|
|
3865
|
+
* Fidelity & Points program integration.
|
|
3869
3866
|
*/
|
|
3870
3867
|
fidelity = Object.freeze({
|
|
3871
3868
|
/** Returns current fidelity balance. */
|
|
@@ -4059,38 +4056,35 @@ var sdk = deepFreeze(new MiniAppSDK());
|
|
|
4059
4056
|
var import_react16 = require("react");
|
|
4060
4057
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
4061
4058
|
var MOCK_ACHIEVEMENTS2 = [
|
|
4062
|
-
{
|
|
4063
|
-
completed: false,
|
|
4064
|
-
description: "Discover 5 points of interest around Annecy.",
|
|
4065
|
-
imageUrl: "https://api.dicebear.com/9.x/icons/svg?seed=explore",
|
|
4066
|
-
playerActionCount: 3,
|
|
4067
|
-
slug: "explore-5-pois",
|
|
4068
|
-
title: "Explorer",
|
|
4069
|
-
totalActionCount: 5,
|
|
4070
|
-
upReward: 50,
|
|
4071
|
-
xpReward: 100
|
|
4072
|
-
},
|
|
4073
4059
|
{
|
|
4074
4060
|
completed: true,
|
|
4075
4061
|
description: "Complete your first navigation journey.",
|
|
4076
|
-
imageUrl: "https://api.dicebear.com/9.x/icons/svg?seed=journey",
|
|
4077
4062
|
playerActionCount: 1,
|
|
4063
|
+
priority: 1,
|
|
4078
4064
|
slug: "first-journey",
|
|
4079
4065
|
title: "First Steps",
|
|
4080
4066
|
totalActionCount: 1,
|
|
4081
|
-
|
|
4082
|
-
|
|
4067
|
+
pointsReward: 10
|
|
4068
|
+
},
|
|
4069
|
+
{
|
|
4070
|
+
completed: false,
|
|
4071
|
+
description: "Discover 5 points of interest around Annecy.",
|
|
4072
|
+
playerActionCount: 3,
|
|
4073
|
+
priority: 2,
|
|
4074
|
+
slug: "explore-5-pois",
|
|
4075
|
+
title: "Explorer",
|
|
4076
|
+
totalActionCount: 5,
|
|
4077
|
+
pointsReward: 15
|
|
4083
4078
|
},
|
|
4084
4079
|
{
|
|
4085
4080
|
completed: false,
|
|
4086
4081
|
description: "Scan 10 QR codes at partner venues.",
|
|
4087
|
-
imageUrl: "https://api.dicebear.com/9.x/icons/svg?seed=scan",
|
|
4088
4082
|
playerActionCount: 4,
|
|
4083
|
+
priority: 3,
|
|
4089
4084
|
slug: "scan-10-qrcodes",
|
|
4090
4085
|
title: "Code Breaker",
|
|
4091
4086
|
totalActionCount: 10,
|
|
4092
|
-
|
|
4093
|
-
xpReward: 150
|
|
4087
|
+
pointsReward: 20
|
|
4094
4088
|
}
|
|
4095
4089
|
];
|
|
4096
4090
|
var AVATAR_MOUTH_VARIANTS = [
|
|
@@ -4155,10 +4149,8 @@ function buildMockProfile(mockJWTToken) {
|
|
|
4155
4149
|
fullName,
|
|
4156
4150
|
lastName: lastNameParts.join(" ") || "Caveman",
|
|
4157
4151
|
localNumber: "0600000000",
|
|
4158
|
-
ups: 100,
|
|
4159
4152
|
username,
|
|
4160
|
-
uuid
|
|
4161
|
-
xp: 500
|
|
4153
|
+
uuid
|
|
4162
4154
|
};
|
|
4163
4155
|
}
|
|
4164
4156
|
var getBearing = (p1, p2) => {
|
|
@@ -4459,11 +4451,11 @@ var BridgeMocker = ({
|
|
|
4459
4451
|
completed: false,
|
|
4460
4452
|
description: "Mocked achievement (no native shell attached).",
|
|
4461
4453
|
playerActionCount: 0,
|
|
4454
|
+
priority: 1,
|
|
4462
4455
|
slug: slug || "unknown-achievement",
|
|
4463
4456
|
title: slug || "Unknown Achievement",
|
|
4464
4457
|
totalActionCount: 1,
|
|
4465
|
-
|
|
4466
|
-
xpReward: 0
|
|
4458
|
+
pointsReward: 0
|
|
4467
4459
|
}
|
|
4468
4460
|
);
|
|
4469
4461
|
}
|