@cloudparse/up-miniapps-sdk 0.1.0 → 0.1.2
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 +100 -31
- package/dist/index.browser.min.js +2 -2
- package/dist/index.browser.min.js.map +1 -7
- package/dist/index.d.mts +519 -0
- package/dist/index.d.ts +519 -4
- package/dist/index.js +336 -2
- package/dist/index.js.map +1 -7
- package/dist/index.mjs +307 -2
- package/dist/index.mjs.map +1 -7
- package/package.json +8 -7
- package/dist/bridge.d.ts +0 -9
- package/dist/sdk.d.ts +0 -98
- package/dist/types.d.ts +0 -75
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,519 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UP Mini-App SDK Types
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Represents the user's profile information.
|
|
6
|
+
*/
|
|
7
|
+
interface IUserProfile {
|
|
8
|
+
/** Unique identifier for the user. */
|
|
9
|
+
uuid: string;
|
|
10
|
+
/** Full legal name of the user. */
|
|
11
|
+
fullName: string;
|
|
12
|
+
/** Primary email address. */
|
|
13
|
+
email: string;
|
|
14
|
+
/** Chosen username within the UP ecosystem. */
|
|
15
|
+
username: string;
|
|
16
|
+
/** ISO country code (e.g., "FR", "US"). */
|
|
17
|
+
countryCode: string;
|
|
18
|
+
/** Phone number without country code. */
|
|
19
|
+
localNumber: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Geographic location data.
|
|
23
|
+
*/
|
|
24
|
+
interface ILocationData {
|
|
25
|
+
coords: {
|
|
26
|
+
/** Latitude in decimal degrees. */
|
|
27
|
+
latitude: number;
|
|
28
|
+
/** Longitude in decimal degrees. */
|
|
29
|
+
longitude: number;
|
|
30
|
+
/** Altitude in meters above the WGS 84 reference ellipsoid, or null if not available. */
|
|
31
|
+
altitude: number | null;
|
|
32
|
+
/** Accuracy of the latitude and longitude properties in meters. */
|
|
33
|
+
accuracy: number | null;
|
|
34
|
+
/** Accuracy of the altitude property in meters. */
|
|
35
|
+
altitudeAccuracy: number | null;
|
|
36
|
+
/** The direction in which the device is traveling, in degrees (0-360). */
|
|
37
|
+
heading: number | null;
|
|
38
|
+
/** The velocity of the device in meters per second. */
|
|
39
|
+
speed: number | null;
|
|
40
|
+
};
|
|
41
|
+
/** The time at which the location was retrieved (Unix timestamp). */
|
|
42
|
+
timestamp: number;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Request payload for triggering a payment flow.
|
|
46
|
+
*/
|
|
47
|
+
interface IPaymentRequest {
|
|
48
|
+
/** The specific amount to charge. */
|
|
49
|
+
amount: number;
|
|
50
|
+
/** ISO currency code (e.g., "EUR", "USD"). */
|
|
51
|
+
currency: string;
|
|
52
|
+
/** Total amount including taxes/fees. */
|
|
53
|
+
total: number;
|
|
54
|
+
/** Itemized breakdown of the purchase. */
|
|
55
|
+
items: Array<{
|
|
56
|
+
/** Name or description of the item. */
|
|
57
|
+
item: string;
|
|
58
|
+
/** Price per unit. */
|
|
59
|
+
price?: number;
|
|
60
|
+
/** Number of units. */
|
|
61
|
+
quantity?: number;
|
|
62
|
+
}>;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Style of haptic feedback.
|
|
66
|
+
*/
|
|
67
|
+
type HapticStyleType = "light" | "medium" | "heavy" | "rigid" | "soft" | "success" | "warning" | "error";
|
|
68
|
+
/**
|
|
69
|
+
* Network Proxy Types
|
|
70
|
+
*/
|
|
71
|
+
/**
|
|
72
|
+
* The HTTP method to use as request method
|
|
73
|
+
*/
|
|
74
|
+
type NetworkMethodType = "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
75
|
+
/**
|
|
76
|
+
* Configuration for network proxy requests.
|
|
77
|
+
*/
|
|
78
|
+
interface INetworkOptions {
|
|
79
|
+
/** Full URL for the request. */
|
|
80
|
+
url: string;
|
|
81
|
+
/** HTTP method to use. */
|
|
82
|
+
method: NetworkMethodType;
|
|
83
|
+
/** Request body for POST/PUT/PATCH. */
|
|
84
|
+
body?: unknown;
|
|
85
|
+
/** Custom HTTP headers. */
|
|
86
|
+
headers?: Record<string, string>;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Response from a network proxy request.
|
|
90
|
+
*/
|
|
91
|
+
interface INetworkResponse<T = unknown> {
|
|
92
|
+
/** HTTP status code. */
|
|
93
|
+
status: number;
|
|
94
|
+
/** Response data payload. */
|
|
95
|
+
data: T;
|
|
96
|
+
/** Response headers. */
|
|
97
|
+
headers: Headers;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Fidelity & Rewards Types
|
|
101
|
+
*/
|
|
102
|
+
/**
|
|
103
|
+
* Fidelity program balance information.
|
|
104
|
+
*/
|
|
105
|
+
interface IFidelityBalance {
|
|
106
|
+
/** Current point or currency balance. */
|
|
107
|
+
balance: number;
|
|
108
|
+
/** Name or symbol of the fidelity currency (e.g., "FPoints"). */
|
|
109
|
+
currency: string;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Parameters for retrieving fidelity transaction history.
|
|
113
|
+
*/
|
|
114
|
+
interface IFidelityHistoryParams {
|
|
115
|
+
/** Maximum number of records to return. */
|
|
116
|
+
limit?: number;
|
|
117
|
+
/** Cursor for pagination; null for the first page. */
|
|
118
|
+
cursor?: string | null;
|
|
119
|
+
}
|
|
120
|
+
/** Type of transaction: credit (add) or debit (remove). */
|
|
121
|
+
type FidelityTransactionTypeType = "credit" | "debit";
|
|
122
|
+
/**
|
|
123
|
+
* A single fidelity program transaction.
|
|
124
|
+
*/
|
|
125
|
+
interface IFidelityTransaction {
|
|
126
|
+
/** Unique identifier for the transaction. */
|
|
127
|
+
id: string;
|
|
128
|
+
/** Amount of the transaction. */
|
|
129
|
+
amount: number;
|
|
130
|
+
/** Human-readable description. */
|
|
131
|
+
description: string;
|
|
132
|
+
/** ISO 8601 date string. */
|
|
133
|
+
date: string;
|
|
134
|
+
/** Type of transaction */
|
|
135
|
+
type: FidelityTransactionTypeType;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* The initialization options required to set up the Mini-App SDK.
|
|
139
|
+
*/
|
|
140
|
+
type IInitializationOptions = {};
|
|
141
|
+
/**
|
|
142
|
+
* The post initialization response
|
|
143
|
+
*/
|
|
144
|
+
interface IInitializationResponse {
|
|
145
|
+
/** The name of the mini app */
|
|
146
|
+
name: string;
|
|
147
|
+
/** The uuid of the mini app */
|
|
148
|
+
uuid: string;
|
|
149
|
+
/** The description of the mini app */
|
|
150
|
+
description: string;
|
|
151
|
+
/** The authors of the mini app */
|
|
152
|
+
authors?: string;
|
|
153
|
+
/** The current version in the registry */
|
|
154
|
+
version?: string;
|
|
155
|
+
/** The identity token got from the shell's backend */
|
|
156
|
+
identityToken: string;
|
|
157
|
+
/** The scoped profile based on the requested fields during initialization or the getUserProfile call */
|
|
158
|
+
profile: Partial<IUserProfile | null>;
|
|
159
|
+
/** The environment variables defined for the mini app in the shell's backend */
|
|
160
|
+
env: Record<string, unknown>;
|
|
161
|
+
/** The user data passed during the initialization or the setUserData call */
|
|
162
|
+
userData: Record<string, unknown>;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Events emitted by the UI module.
|
|
166
|
+
*/
|
|
167
|
+
declare enum UIEvent {
|
|
168
|
+
/** Triggered when the user performs a native "Pull-to-Refresh". */
|
|
169
|
+
TOP_SCROLL_MORE = "TOP_SCROLL_MORE",
|
|
170
|
+
/** Triggered when the user scrolls near the bottom of the page (within 200px threshold). */
|
|
171
|
+
BOTTOM_SCROLL_MORE = "BOTTOM_SCROLL_MORE"
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Union type for all SDK events, allowing for both known enums and custom strings.
|
|
175
|
+
* The (string & {}) pattern preserves IntelliSense for enum members.
|
|
176
|
+
*/
|
|
177
|
+
type SDKEvent = UIEvent | (string & {});
|
|
178
|
+
/**
|
|
179
|
+
* Configuration for native scroll interactions managed by the Host Shell.
|
|
180
|
+
*/
|
|
181
|
+
interface ScrollConfig {
|
|
182
|
+
/** Configuration for Pull-to-Refresh (Top). */
|
|
183
|
+
topScrollMore?: {
|
|
184
|
+
/** Show/hide the native RefreshControl. */
|
|
185
|
+
enabled: boolean;
|
|
186
|
+
/** Set to true to show the loading spinner, false to hide it. */
|
|
187
|
+
refreshing?: boolean;
|
|
188
|
+
};
|
|
189
|
+
/** Configuration for Infinite Scroll (Bottom). */
|
|
190
|
+
bottomScrollMore?: {
|
|
191
|
+
/** Enable/disable bottom scroll detection. */
|
|
192
|
+
enabled: boolean;
|
|
193
|
+
/** If false, detection stops and the indicator is hidden. */
|
|
194
|
+
hasMore?: boolean;
|
|
195
|
+
/** Set to true to show the bottom ActivityIndicator. */
|
|
196
|
+
loadingMore?: boolean;
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Main SDK for UP Mini-Apps.
|
|
202
|
+
* Provides access to native device features, storage, identity, and shell UI.
|
|
203
|
+
*/
|
|
204
|
+
declare class MiniAppSDK {
|
|
205
|
+
private bridge;
|
|
206
|
+
constructor();
|
|
207
|
+
/**
|
|
208
|
+
* The starting point for the Mini-App. Must be called before any other SDK methods.
|
|
209
|
+
* @param options The options to provide to the shell app
|
|
210
|
+
*/
|
|
211
|
+
initialize(options: IInitializationOptions): Promise<IInitializationResponse>;
|
|
212
|
+
/**
|
|
213
|
+
* Local SQLite Storage.
|
|
214
|
+
* Data is persisted on the device and is isolated per Mini-App.
|
|
215
|
+
*/
|
|
216
|
+
storage: {
|
|
217
|
+
/** Retrieves a value by key. */
|
|
218
|
+
get: (key: string) => Promise<string | null>;
|
|
219
|
+
/** Retrieves all key-value pairs stored for this Mini-App. */
|
|
220
|
+
getAll: () => Promise<Record<string, string>>;
|
|
221
|
+
/** Sets a value for a specific key. */
|
|
222
|
+
set: (key: string, value: string) => Promise<void>;
|
|
223
|
+
};
|
|
224
|
+
/**
|
|
225
|
+
* Hardware-level Secure Storage.
|
|
226
|
+
* Data is stored in the device's secure enclave (Keychain/Keystore) and is isolated per Mini-App.
|
|
227
|
+
*/
|
|
228
|
+
secureStore: {
|
|
229
|
+
/** Retrieves a value by key from secure storage. */
|
|
230
|
+
get: (key: string) => Promise<string | null>;
|
|
231
|
+
/** Sets a value for a specific key in secure storage. */
|
|
232
|
+
set: (key: string, value: string) => Promise<void>;
|
|
233
|
+
};
|
|
234
|
+
/**
|
|
235
|
+
* Device Location services.
|
|
236
|
+
*/
|
|
237
|
+
location: {
|
|
238
|
+
/** Retrieves the current GPS position of the device. */
|
|
239
|
+
getCurrentPosition: () => Promise<ILocationData>;
|
|
240
|
+
};
|
|
241
|
+
/**
|
|
242
|
+
* Identity & Profile management.
|
|
243
|
+
*/
|
|
244
|
+
user: {
|
|
245
|
+
/**
|
|
246
|
+
* Fetch a short-lived Scoped Identity Token (JWT).
|
|
247
|
+
* This token is signed by the UP Hub and can be verified by your backend.
|
|
248
|
+
* @param scopes Optional list of scopes requested (e.g., ['profile', 'email']).
|
|
249
|
+
*/
|
|
250
|
+
getIdentityToken: (scopes?: string[]) => Promise<string>;
|
|
251
|
+
/**
|
|
252
|
+
* Fetch user profile data.
|
|
253
|
+
* @param fields Optional list of specific fields to retrieve (e.g., ['fullName', 'username']).
|
|
254
|
+
*/
|
|
255
|
+
getProfile: <T extends keyof IUserProfile>(fields?: T[]) => Promise<Partial<IUserProfile>>;
|
|
256
|
+
};
|
|
257
|
+
/**
|
|
258
|
+
* Explicit Permission Management.
|
|
259
|
+
* Allows requesting access to sensitive device features or user data.
|
|
260
|
+
*/
|
|
261
|
+
permission: {
|
|
262
|
+
/**
|
|
263
|
+
* Explicitly request access to sensitive data.
|
|
264
|
+
* @param type The type of permission to request ('location' or 'profile').
|
|
265
|
+
* @param fields If requesting 'profile', the specific fields required.
|
|
266
|
+
*/
|
|
267
|
+
request: {
|
|
268
|
+
(type: "location"): Promise<boolean>;
|
|
269
|
+
(type: "profile", fields: (keyof IUserProfile)[]): Promise<boolean>;
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
/**
|
|
273
|
+
* Payments integration.
|
|
274
|
+
*/
|
|
275
|
+
payment: {
|
|
276
|
+
/**
|
|
277
|
+
* Triggers the native payment flow.
|
|
278
|
+
* @param payload Amount, currency, and itemized list for the payment.
|
|
279
|
+
*/
|
|
280
|
+
request: (payload: IPaymentRequest) => Promise<{
|
|
281
|
+
success: true;
|
|
282
|
+
transactionId: string;
|
|
283
|
+
}>;
|
|
284
|
+
};
|
|
285
|
+
/**
|
|
286
|
+
* Live Activities & Notifications.
|
|
287
|
+
* Allows the Mini-App to display real-time updates in the host shell.
|
|
288
|
+
*/
|
|
289
|
+
activity: {
|
|
290
|
+
/**
|
|
291
|
+
* Starts a new live activity.
|
|
292
|
+
* @param id Unique identifier for the activity.
|
|
293
|
+
* @param title Display title for the activity.
|
|
294
|
+
* @param status Initial status message.
|
|
295
|
+
*/
|
|
296
|
+
start: (id: string, title: string, status: string) => Promise<void>;
|
|
297
|
+
};
|
|
298
|
+
/**
|
|
299
|
+
* Haptic feedback.
|
|
300
|
+
*/
|
|
301
|
+
haptic: {
|
|
302
|
+
/**
|
|
303
|
+
* Triggers a haptic vibration on the device.
|
|
304
|
+
* @param style The style of haptic feedback (e.g., 'light', 'medium', 'heavy', 'success', 'warning', 'error').
|
|
305
|
+
*/
|
|
306
|
+
trigger: (style: HapticStyleType) => Promise<void>;
|
|
307
|
+
};
|
|
308
|
+
/**
|
|
309
|
+
* Network Proxy.
|
|
310
|
+
* Allows the Mini-App to make network requests through the host shell to bypass CORS or use host-level authentication.
|
|
311
|
+
*/
|
|
312
|
+
network: {
|
|
313
|
+
/**
|
|
314
|
+
* Performs a network request via the host shell.
|
|
315
|
+
* @param options Request method, URL, headers, and body.
|
|
316
|
+
*/
|
|
317
|
+
request: (options: INetworkOptions) => Promise<INetworkResponse>;
|
|
318
|
+
};
|
|
319
|
+
/**
|
|
320
|
+
* Fidelity & Rewards program integration.
|
|
321
|
+
*/
|
|
322
|
+
fidelity: {
|
|
323
|
+
/** Returns current fidelity balance. */
|
|
324
|
+
getFidelityBalance: () => Promise<IFidelityBalance>;
|
|
325
|
+
/**
|
|
326
|
+
* Retrieves fidelity transaction history.
|
|
327
|
+
* @param params Filtering and pagination parameters.
|
|
328
|
+
*/
|
|
329
|
+
getFidelityHistory: (params?: IFidelityHistoryParams) => Promise<IFidelityTransaction[]>;
|
|
330
|
+
/**
|
|
331
|
+
* Authorize spending fidelity points (FPoints) via Two-Phase Authorization.
|
|
332
|
+
* @param intentUuid UUID generated by your backend for the transaction.
|
|
333
|
+
*/
|
|
334
|
+
spendFPoints: (intentUuid: string) => Promise<{
|
|
335
|
+
success: boolean;
|
|
336
|
+
transactionId: string;
|
|
337
|
+
}>;
|
|
338
|
+
};
|
|
339
|
+
/**
|
|
340
|
+
* UI and Navigation controls.
|
|
341
|
+
*/
|
|
342
|
+
ui: {
|
|
343
|
+
/** Closes the Mini-App and returns to the host shell. */
|
|
344
|
+
exit: () => Promise<void>;
|
|
345
|
+
/**
|
|
346
|
+
* Configures native scroll behaviors like Pull-to-Refresh and Infinite Scroll.
|
|
347
|
+
* @param config Scroll configuration for top/bottom detection.
|
|
348
|
+
*/
|
|
349
|
+
setScrollConfig: (config: ScrollConfig) => Promise<void>;
|
|
350
|
+
};
|
|
351
|
+
/**
|
|
352
|
+
* Debug controls
|
|
353
|
+
*/
|
|
354
|
+
debug: {
|
|
355
|
+
/**
|
|
356
|
+
* Log to the shell app
|
|
357
|
+
* @param message
|
|
358
|
+
*/
|
|
359
|
+
log: (...message: unknown[]) => Promise<unknown>;
|
|
360
|
+
};
|
|
361
|
+
/**
|
|
362
|
+
* Registers a callback for a specific event from the native shell.
|
|
363
|
+
* @param event The name of the event to listen for.
|
|
364
|
+
* @param callback The function to execute when the event is triggered.
|
|
365
|
+
* @returns A function to unregister the listener.
|
|
366
|
+
*/
|
|
367
|
+
on(event: SDKEvent, callback: (data: unknown) => void): () => void;
|
|
368
|
+
/**
|
|
369
|
+
* Unregisters a previously registered event listener.
|
|
370
|
+
* @param event The name of the event.
|
|
371
|
+
* @param callback The callback function to remove.
|
|
372
|
+
*/
|
|
373
|
+
off(event: SDKEvent, callback: (data: unknown) => void): void;
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* Singleton instance of the MiniAppSDK.
|
|
377
|
+
*/
|
|
378
|
+
declare const sdk: MiniAppSDK;
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Internal message envelope for bridge communication.
|
|
382
|
+
* @internal
|
|
383
|
+
*/
|
|
384
|
+
interface IBridgeEnvelope<P = unknown, V = unknown> {
|
|
385
|
+
/** Unique identifier to match responses with requests. */
|
|
386
|
+
callbackId?: string;
|
|
387
|
+
/** The type/action of the message. */
|
|
388
|
+
type?: string;
|
|
389
|
+
/** Data payload for the message. */
|
|
390
|
+
payload?: P;
|
|
391
|
+
/** Whether the operation was successful. */
|
|
392
|
+
success?: boolean;
|
|
393
|
+
/** Error message if success is false. */
|
|
394
|
+
error?: string;
|
|
395
|
+
/** The result value for successful operations. */
|
|
396
|
+
value?: V;
|
|
397
|
+
/** Event name for pushed notifications. */
|
|
398
|
+
event?: string;
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* The messages the bridge can ask for
|
|
402
|
+
*/
|
|
403
|
+
type BridgeMessageType = {
|
|
404
|
+
type: "STORAGE_SET";
|
|
405
|
+
payload: {
|
|
406
|
+
key: string;
|
|
407
|
+
value: string;
|
|
408
|
+
};
|
|
409
|
+
callbackId: string;
|
|
410
|
+
} | {
|
|
411
|
+
type: "STORAGE_GET";
|
|
412
|
+
payload: {
|
|
413
|
+
key: string;
|
|
414
|
+
};
|
|
415
|
+
callbackId: string;
|
|
416
|
+
} | {
|
|
417
|
+
type: "STORAGE_GET_ALL";
|
|
418
|
+
payload?: unknown;
|
|
419
|
+
callbackId: string;
|
|
420
|
+
} | {
|
|
421
|
+
type: "GET_LOCATION";
|
|
422
|
+
payload?: unknown;
|
|
423
|
+
callbackId: string;
|
|
424
|
+
} | {
|
|
425
|
+
type: "INITIALIZE";
|
|
426
|
+
payload: {
|
|
427
|
+
options: IInitializationOptions;
|
|
428
|
+
};
|
|
429
|
+
callbackId: string;
|
|
430
|
+
} | {
|
|
431
|
+
type: "DEBUG_LOG";
|
|
432
|
+
payload: {
|
|
433
|
+
message: unknown[];
|
|
434
|
+
};
|
|
435
|
+
callbackId: string;
|
|
436
|
+
} | {
|
|
437
|
+
type: "SECURE_SET";
|
|
438
|
+
payload: {
|
|
439
|
+
key: string;
|
|
440
|
+
value: string;
|
|
441
|
+
};
|
|
442
|
+
callbackId: string;
|
|
443
|
+
} | {
|
|
444
|
+
type: "SECURE_GET";
|
|
445
|
+
payload: {
|
|
446
|
+
key: string;
|
|
447
|
+
};
|
|
448
|
+
callbackId: string;
|
|
449
|
+
} | {
|
|
450
|
+
type: "PAYMENT_REQUEST";
|
|
451
|
+
payload: unknown;
|
|
452
|
+
callbackId: string;
|
|
453
|
+
} | {
|
|
454
|
+
type: "START_ACTIVITY";
|
|
455
|
+
payload: unknown;
|
|
456
|
+
callbackId: string;
|
|
457
|
+
} | {
|
|
458
|
+
type: "GET_USER_PROFILE";
|
|
459
|
+
payload?: {
|
|
460
|
+
fields?: string[];
|
|
461
|
+
};
|
|
462
|
+
callbackId: string;
|
|
463
|
+
} | {
|
|
464
|
+
type: "GET_IDENTITY_TOKEN";
|
|
465
|
+
payload?: {
|
|
466
|
+
scopes?: string[];
|
|
467
|
+
};
|
|
468
|
+
callbackId: string;
|
|
469
|
+
} | {
|
|
470
|
+
type: "SPEND_FPOINTS";
|
|
471
|
+
payload: {
|
|
472
|
+
intentUuid: string;
|
|
473
|
+
};
|
|
474
|
+
callbackId: string;
|
|
475
|
+
} | {
|
|
476
|
+
type: "GET_FIDELITY_BALANCE";
|
|
477
|
+
payload?: unknown;
|
|
478
|
+
callbackId: string;
|
|
479
|
+
} | {
|
|
480
|
+
type: "GET_FIDELITY_HISTORY";
|
|
481
|
+
payload: IFidelityHistoryParams;
|
|
482
|
+
callbackId: string;
|
|
483
|
+
} | {
|
|
484
|
+
type: "EXIT";
|
|
485
|
+
payload?: unknown;
|
|
486
|
+
callbackId: string;
|
|
487
|
+
} | {
|
|
488
|
+
type: "REQUEST_PERMISSION";
|
|
489
|
+
payload: {
|
|
490
|
+
type: "location" | "profile";
|
|
491
|
+
fields?: string[];
|
|
492
|
+
};
|
|
493
|
+
callbackId: string;
|
|
494
|
+
} | {
|
|
495
|
+
type: "TRIGGER_HAPTIC";
|
|
496
|
+
payload?: {
|
|
497
|
+
style?: HapticStyleType;
|
|
498
|
+
};
|
|
499
|
+
callbackId: string;
|
|
500
|
+
} | {
|
|
501
|
+
type: "NETWORK_REQUEST";
|
|
502
|
+
payload: {
|
|
503
|
+
url: string;
|
|
504
|
+
method?: string;
|
|
505
|
+
headers?: Record<string, string>;
|
|
506
|
+
body?: unknown;
|
|
507
|
+
};
|
|
508
|
+
callbackId: string;
|
|
509
|
+
} | {
|
|
510
|
+
type: "SET_SCROLL_CONFIG";
|
|
511
|
+
payload: ScrollConfig;
|
|
512
|
+
callbackId: string;
|
|
513
|
+
} | {
|
|
514
|
+
type: string;
|
|
515
|
+
payload: unknown;
|
|
516
|
+
callbackId: string;
|
|
517
|
+
};
|
|
518
|
+
|
|
519
|
+
export { type BridgeMessageType, type FidelityTransactionTypeType, type HapticStyleType, type IBridgeEnvelope, type IFidelityBalance, type IFidelityHistoryParams, type IFidelityTransaction, type IInitializationOptions, type IInitializationResponse, type ILocationData, type INetworkOptions, type INetworkResponse, type IPaymentRequest, type IUserProfile, MiniAppSDK, type NetworkMethodType, type SDKEvent, type ScrollConfig, UIEvent, sdk as default, sdk };
|