@grabjs/superapp-sdk 2.0.0-beta.29 → 2.0.0-beta.31

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.ts CHANGED
@@ -55,7 +55,6 @@ export declare const AuthorizeRequestSchema: v.ObjectSchema<{
55
55
  * - `204`: No content - user cancelled or flow completed without result data.
56
56
  * - `302`: Redirect in progress (web redirect flow). The page will navigate away.
57
57
  * - `400`: Bad request - missing required OAuth parameters or invalid configuration.
58
- * - `401`: Unauthorized - user not authenticated or session expired.
59
58
  * - `403`: Forbidden - client not authorized for the requested scope.
60
59
  * - `500`: Internal server error - unexpected error during native authorization.
61
60
  * - `501`: Not implemented - this method requires the Grab app environment.
@@ -82,9 +81,6 @@ export declare const AuthorizeResponseSchema: v.UnionSchema<[v.ObjectSchema<{
82
81
  }, undefined>, v.ObjectSchema<{
83
82
  readonly status_code: v.LiteralSchema<400, undefined>;
84
83
  readonly error: v.StringSchema<undefined>;
85
- }, undefined>, v.ObjectSchema<{
86
- readonly status_code: v.LiteralSchema<401, undefined>;
87
- readonly error: v.StringSchema<undefined>;
88
84
  }, undefined>, v.ObjectSchema<{
89
85
  readonly status_code: v.LiteralSchema<403, undefined>;
90
86
  readonly error: v.StringSchema<undefined>;
@@ -172,6 +168,12 @@ export declare class BaseModule {
172
168
  * The module name used to identify the JSBridge module.
173
169
  */
174
170
  private readonly name;
171
+ /**
172
+ * Logger scoped to this module (e.g. `[SuperAppSDK][ContainerModule.setTitle] ...`).
173
+ *
174
+ * @protected
175
+ */
176
+ protected readonly logger: Logger;
175
177
  /**
176
178
  * Returns the wrapped JSBridge module from the global `window` object.
177
179
  *
@@ -392,7 +394,7 @@ export declare class CameraModule extends BaseModule {
392
394
  * ```
393
395
  * @public
394
396
  */
395
- scanQRCode(request: ScanQRCodeRequest): Promise<ScanQRCodeResponse>;
397
+ scanQRCode(request?: ScanQRCodeRequest): Promise<ScanQRCodeResponse>;
396
398
  }
397
399
 
398
400
  /**
@@ -428,9 +430,14 @@ export declare class CheckoutModule extends BaseModule {
428
430
  /**
429
431
  * Triggers the native checkout flow for payment processing.
430
432
  *
433
+ * @remarks
434
+ * You must create a transaction on your backend (via API POST https://partner-api.grab.com/grabpay/partner/v4/charge/init) **before** calling this method.
435
+ * Pass the transaction parameters returned from that API call as the `request` argument.
436
+ * Calling this method without a valid pre-created transaction will result in a checkout failure.
437
+ *
431
438
  * @param request - Payment transaction details, including the transaction ID and amount. See {@link TriggerCheckoutRequest}.
432
439
  *
433
- * @returns The checkout result, containing transaction status (success, failure, or pending) and transaction details. See {@link TriggerCheckoutResponse}.
440
+ * @returns The checkout result, containing transaction status (success, failure, pending, or userInitiatedCancel) and transaction details. See {@link TriggerCheckoutResponse}.
434
441
  *
435
442
  * @example
436
443
  * **Simple usage**
@@ -462,7 +469,14 @@ export declare class CheckoutModule extends BaseModule {
462
469
  * break;
463
470
  * }
464
471
  * } else if (isError(response)) {
465
- * console.error(`Error ${response.status_code}: ${response.error}`);
472
+ * switch (response.status_code) {
473
+ * case 403:
474
+ * console.log('No permission to trigger checkout');
475
+ * // Trigger IdentityModule.authorize() for scope 'mobile.checkout', then reload via ScopeModule.reloadScopes() and try again
476
+ * break;
477
+ * default:
478
+ * console.error(`Error ${response.status_code}: ${response.error}`);
479
+ * }
466
480
  * } else {
467
481
  * console.error('Unhandled response');
468
482
  * }
@@ -488,9 +502,9 @@ export declare type ClearAuthorizationArtifactsResponse = InferOutput<typeof Cle
488
502
  *
489
503
  * @public
490
504
  */
491
- export declare const ClearAuthorizationArtifactsResponseSchema: v.ObjectSchema<{
505
+ export declare const ClearAuthorizationArtifactsResponseSchema: v.UnionSchema<[v.ObjectSchema<{
492
506
  readonly status_code: v.LiteralSchema<204, undefined>;
493
- }, undefined>;
507
+ }, undefined>], undefined>;
494
508
 
495
509
  /**
496
510
  * Result object for clearing authorization artifacts.
@@ -506,6 +520,7 @@ export declare type ClearAuthorizationArtifactsResult = void;
506
520
  * @remarks
507
521
  * This response can have the following status codes:
508
522
  * - `200`: Container closed successfully.
523
+ * - `204`: Operation completed successfully (no content).
509
524
  * - `500`: Internal server error - an unexpected error occurred on the native side.
510
525
  * - `501`: Not implemented - this method requires the Grab app environment.
511
526
  *
@@ -520,6 +535,9 @@ export declare type CloseResponse = InferOutput<typeof CloseResponseSchema>;
520
535
  */
521
536
  export declare const CloseResponseSchema: v.UnionSchema<[v.ObjectSchema<{
522
537
  readonly status_code: v.LiteralSchema<200, undefined>;
538
+ readonly result: v.BooleanSchema<undefined>;
539
+ }, undefined>, v.ObjectSchema<{
540
+ readonly status_code: v.LiteralSchema<204, undefined>;
523
541
  }, undefined>, v.ObjectSchema<{
524
542
  readonly status_code: v.LiteralSchema<500, undefined>;
525
543
  readonly error: v.StringSchema<undefined>;
@@ -1067,8 +1085,12 @@ export declare class ContainerModule extends BaseModule {
1067
1085
  *
1068
1086
  * // Handle the response
1069
1087
  * if (isSuccess(response)) {
1070
- * const sessionParams = JSON.parse(response.result?.result || '{}');
1071
- * console.log('Session params retrieved:', sessionParams);
1088
+ * if (response.status_code === 200) {
1089
+ * const sessionParams = JSON.parse(response.result);
1090
+ * console.log('Session params retrieved:', sessionParams);
1091
+ * } else if (response.status_code === 204) {
1092
+ * console.log('No session parameters found');
1093
+ * }
1072
1094
  * } else if (isError(response)) {
1073
1095
  * console.error(`Error ${response.status_code}: ${response.error}`);
1074
1096
  * } else {
@@ -1308,21 +1330,33 @@ export declare type DRMContentConfig = Record<string, unknown>;
1308
1330
  * @example
1309
1331
  * **Playback started event:**
1310
1332
  * ```typescript
1311
- * { eventType: 'started' }
1333
+ * {
1334
+ * type: 'START_PLAYBACK',
1335
+ * titleId: 'movie-123',
1336
+ * position: 0,
1337
+ * length: 3600
1338
+ * }
1312
1339
  * ```
1313
1340
  *
1314
1341
  * @example
1315
- * **Playback paused event:**
1342
+ * **Playback progress event:**
1316
1343
  * ```typescript
1317
- * { eventType: 'paused' }
1344
+ * {
1345
+ * type: 'PROGRESS_PLAYBACK',
1346
+ * titleId: 'movie-123',
1347
+ * position: 120,
1348
+ * length: 3600
1349
+ * }
1318
1350
  * ```
1319
1351
  *
1320
1352
  * @example
1321
1353
  * **Playback error event:**
1322
1354
  * ```typescript
1323
1355
  * {
1324
- * eventType: 'error',
1325
- * data: { errorCode: 'DRM_LICENSE_ERROR', message: 'License expired' }
1356
+ * type: 'ERROR_PLAYBACK',
1357
+ * titleId: 'movie-123',
1358
+ * position: 300,
1359
+ * length: 3600
1326
1360
  * }
1327
1361
  * ```
1328
1362
  *
@@ -1336,8 +1370,10 @@ export declare type DRMPlaybackEvent = InferOutput<typeof DRMPlaybackEventSchema
1336
1370
  * @public
1337
1371
  */
1338
1372
  export declare const DRMPlaybackEventSchema: v.ObjectSchema<{
1339
- readonly eventType: v.PicklistSchema<["started", "paused", "ended", "error"], undefined>;
1340
- readonly data: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
1373
+ readonly type: v.PicklistSchema<["START_PLAYBACK", "PROGRESS_PLAYBACK", "START_SEEK", "STOP_SEEK", "STOP_PLAYBACK", "CLOSE_PLAYBACK", "PAUSE_PLAYBACK", "RESUME_PLAYBACK", "FAST_FORWARD_PLAYBACK", "REWIND_PLAYBACK", "ERROR_PLAYBACK", "CHANGE_VOLUME"], undefined>;
1374
+ readonly titleId: v.StringSchema<undefined>;
1375
+ readonly position: v.NumberSchema<undefined>;
1376
+ readonly length: v.NumberSchema<undefined>;
1341
1377
  }, undefined>;
1342
1378
 
1343
1379
  /**
@@ -1346,6 +1382,7 @@ export declare const DRMPlaybackEventSchema: v.ObjectSchema<{
1346
1382
  * @remarks
1347
1383
  * This response can have the following status codes:
1348
1384
  * - `200`: Email fetched successfully. The `result` contains the email address.
1385
+ * - `204`: No content - email not available.
1349
1386
  * - `400`: Invalid request - the request was malformed.
1350
1387
  * - `403`: Forbidden - client not authorized to access user profile data.
1351
1388
  * - `426`: Upgrade Required - feature requires Grab app version 5.399 or above.
@@ -1366,6 +1403,8 @@ export declare const FetchEmailResponseSchema: v.UnionSchema<[v.ObjectSchema<{
1366
1403
  readonly result: v.ObjectSchema<{
1367
1404
  readonly email: v.StringSchema<undefined>;
1368
1405
  }, undefined>;
1406
+ }, undefined>, v.ObjectSchema<{
1407
+ readonly status_code: v.LiteralSchema<204, undefined>;
1369
1408
  }, undefined>, v.ObjectSchema<{
1370
1409
  readonly status_code: v.LiteralSchema<400, undefined>;
1371
1410
  readonly error: v.StringSchema<undefined>;
@@ -1562,6 +1601,7 @@ export declare const GetBooleanRequestSchema: v.ObjectSchema<{
1562
1601
  * This response can have the following status codes:
1563
1602
  * - `200`: Value retrieved successfully. The `result` contains the boolean value or null if not found.
1564
1603
  * - `400`: Missing required parameters - key not provided.
1604
+ * - `424`: Failed Dependency - storage operation failed due to underlying storage error.
1565
1605
  * - `500`: Internal server error - an unexpected error occurred on the native side.
1566
1606
  * - `501`: Not implemented - this method requires the Grab app environment.
1567
1607
  *
@@ -1582,6 +1622,9 @@ export declare const GetBooleanResponseSchema: v.UnionSchema<[v.ObjectSchema<{
1582
1622
  }, undefined>, v.ObjectSchema<{
1583
1623
  readonly status_code: v.LiteralSchema<400, undefined>;
1584
1624
  readonly error: v.StringSchema<undefined>;
1625
+ }, undefined>, v.ObjectSchema<{
1626
+ readonly status_code: v.LiteralSchema<424, undefined>;
1627
+ readonly error: v.StringSchema<undefined>;
1585
1628
  }, undefined>, v.ObjectSchema<{
1586
1629
  readonly status_code: v.LiteralSchema<500, undefined>;
1587
1630
  readonly error: v.StringSchema<undefined>;
@@ -1685,7 +1728,8 @@ export declare const GetCoordinateResultSchema: v.ObjectSchema<{
1685
1728
  *
1686
1729
  * @remarks
1687
1730
  * This response can have the following status codes:
1688
- * - `200`: Country code retrieved successfully. The `result` contains the ISO country code.
1731
+ * - `200`: Country code retrieved successfully. The `result` is the ISO country code string.
1732
+ * - `204`: No content - country code not available.
1689
1733
  * - `403`: Forbidden - client not authorized to access location data.
1690
1734
  * - `424`: GeoKit/Resolver error - location services unavailable.
1691
1735
  * - `500`: Internal server error - an unexpected error occurred on the native side.
@@ -1702,9 +1746,9 @@ export declare type GetCountryCodeResponse = InferOutput<typeof GetCountryCodeRe
1702
1746
  */
1703
1747
  export declare const GetCountryCodeResponseSchema: v.UnionSchema<[v.ObjectSchema<{
1704
1748
  readonly status_code: v.LiteralSchema<200, undefined>;
1705
- readonly result: v.ObjectSchema<{
1706
- readonly countryCode: v.StringSchema<undefined>;
1707
- }, undefined>;
1749
+ readonly result: v.StringSchema<undefined>;
1750
+ }, undefined>, v.ObjectSchema<{
1751
+ readonly status_code: v.LiteralSchema<204, undefined>;
1708
1752
  }, undefined>, v.ObjectSchema<{
1709
1753
  readonly status_code: v.LiteralSchema<403, undefined>;
1710
1754
  readonly error: v.StringSchema<undefined>;
@@ -1720,16 +1764,16 @@ export declare const GetCountryCodeResponseSchema: v.UnionSchema<[v.ObjectSchema
1720
1764
  }, undefined>], undefined>;
1721
1765
 
1722
1766
  /**
1723
- * Result object containing the country code.
1767
+ * The ISO country code string returned from the native bridge.
1724
1768
  *
1725
1769
  * @example
1726
1770
  * ```typescript
1727
- * { countryCode: 'SG' }
1771
+ * 'SG'
1728
1772
  * ```
1729
1773
  *
1730
1774
  * @example
1731
1775
  * ```typescript
1732
- * { countryCode: 'ID' }
1776
+ * 'ID'
1733
1777
  * ```
1734
1778
  *
1735
1779
  * @public
@@ -1741,9 +1785,7 @@ export declare type GetCountryCodeResult = InferOutput<typeof GetCountryCodeResu
1741
1785
  *
1742
1786
  * @public
1743
1787
  */
1744
- export declare const GetCountryCodeResultSchema: v.ObjectSchema<{
1745
- readonly countryCode: v.StringSchema<undefined>;
1746
- }, undefined>;
1788
+ export declare const GetCountryCodeResultSchema: v.StringSchema<undefined>;
1747
1789
 
1748
1790
  /**
1749
1791
  * Request parameters for getting a double value from storage.
@@ -1773,6 +1815,7 @@ export declare const GetDoubleRequestSchema: v.ObjectSchema<{
1773
1815
  * This response can have the following status codes:
1774
1816
  * - `200`: Value retrieved successfully. The `result` contains the double value or null if not found.
1775
1817
  * - `400`: Missing required parameters - key not provided.
1818
+ * - `424`: Failed Dependency - storage operation failed due to underlying storage error.
1776
1819
  * - `500`: Internal server error - an unexpected error occurred on the native side.
1777
1820
  * - `501`: Not implemented - this method requires the Grab app environment.
1778
1821
  *
@@ -1793,6 +1836,9 @@ export declare const GetDoubleResponseSchema: v.UnionSchema<[v.ObjectSchema<{
1793
1836
  }, undefined>, v.ObjectSchema<{
1794
1837
  readonly status_code: v.LiteralSchema<400, undefined>;
1795
1838
  readonly error: v.StringSchema<undefined>;
1839
+ }, undefined>, v.ObjectSchema<{
1840
+ readonly status_code: v.LiteralSchema<424, undefined>;
1841
+ readonly error: v.StringSchema<undefined>;
1796
1842
  }, undefined>, v.ObjectSchema<{
1797
1843
  readonly status_code: v.LiteralSchema<500, undefined>;
1798
1844
  readonly error: v.StringSchema<undefined>;
@@ -1857,6 +1903,7 @@ export declare const GetIntRequestSchema: v.ObjectSchema<{
1857
1903
  * This response can have the following status codes:
1858
1904
  * - `200`: Value retrieved successfully. The `result` contains the integer value or null if not found.
1859
1905
  * - `400`: Missing required parameters - key not provided.
1906
+ * - `424`: Failed Dependency - storage operation failed due to underlying storage error.
1860
1907
  * - `500`: Internal server error - an unexpected error occurred on the native side.
1861
1908
  * - `501`: Not implemented - this method requires the Grab app environment.
1862
1909
  *
@@ -1877,6 +1924,9 @@ export declare const GetIntResponseSchema: v.UnionSchema<[v.ObjectSchema<{
1877
1924
  }, undefined>, v.ObjectSchema<{
1878
1925
  readonly status_code: v.LiteralSchema<400, undefined>;
1879
1926
  readonly error: v.StringSchema<undefined>;
1927
+ }, undefined>, v.ObjectSchema<{
1928
+ readonly status_code: v.LiteralSchema<424, undefined>;
1929
+ readonly error: v.StringSchema<undefined>;
1880
1930
  }, undefined>, v.ObjectSchema<{
1881
1931
  readonly status_code: v.LiteralSchema<500, undefined>;
1882
1932
  readonly error: v.StringSchema<undefined>;
@@ -1919,6 +1969,8 @@ export declare const GetIntResultSchema: v.ObjectSchema<{
1919
1969
  * @remarks
1920
1970
  * This response can have the following status codes:
1921
1971
  * - `200`: Locale identifier retrieved successfully.
1972
+ * - `204`: No content - locale identifier not available.
1973
+ * - `400`: Invalid request parameters.
1922
1974
  * - `500`: Internal server error - an unexpected error occurred on the native side.
1923
1975
  * - `501`: Not implemented - this method requires the Grab app environment.
1924
1976
  *
@@ -1934,6 +1986,11 @@ export declare type GetLanguageLocaleIdentifierResponse = InferOutput<typeof Get
1934
1986
  export declare const GetLanguageLocaleIdentifierResponseSchema: v.UnionSchema<[v.ObjectSchema<{
1935
1987
  readonly status_code: v.LiteralSchema<200, undefined>;
1936
1988
  readonly result: v.StringSchema<undefined>;
1989
+ }, undefined>, v.ObjectSchema<{
1990
+ readonly status_code: v.LiteralSchema<204, undefined>;
1991
+ }, undefined>, v.ObjectSchema<{
1992
+ readonly status_code: v.LiteralSchema<400, undefined>;
1993
+ readonly error: v.StringSchema<undefined>;
1937
1994
  }, undefined>, v.ObjectSchema<{
1938
1995
  readonly status_code: v.LiteralSchema<500, undefined>;
1939
1996
  readonly error: v.StringSchema<undefined>;
@@ -1954,8 +2011,9 @@ export declare const GetLanguageLocaleIdentifierResponseSchema: v.UnionSchema<[v
1954
2011
  * - "ms" (Malay)
1955
2012
  * - "th" (Thai)
1956
2013
  * - "vi" (Vietnamese)
1957
- * - "zg" (Burmese Zawgyi)
1958
- * - "my" (Burmese Unicode)
2014
+ * - "my" (Burmese)
2015
+ * - "ja" (Japanese)
2016
+ * - "ko" (Korean)
1959
2017
  * - "km" (Khmer)
1960
2018
  *
1961
2019
  * @example
@@ -2055,9 +2113,9 @@ export declare type GetSessionParamsResponse = InferOutput<typeof GetSessionPara
2055
2113
  */
2056
2114
  export declare const GetSessionParamsResponseSchema: v.UnionSchema<[v.ObjectSchema<{
2057
2115
  readonly status_code: v.LiteralSchema<200, undefined>;
2058
- readonly result: v.ObjectSchema<{
2059
- readonly result: v.StringSchema<undefined>;
2060
- }, undefined>;
2116
+ readonly result: v.StringSchema<undefined>;
2117
+ }, undefined>, v.ObjectSchema<{
2118
+ readonly status_code: v.LiteralSchema<204, undefined>;
2061
2119
  }, undefined>, v.ObjectSchema<{
2062
2120
  readonly status_code: v.LiteralSchema<500, undefined>;
2063
2121
  readonly error: v.StringSchema<undefined>;
@@ -2088,9 +2146,7 @@ export declare type GetSessionParamsResult = InferOutput<typeof GetSessionParams
2088
2146
  *
2089
2147
  * @public
2090
2148
  */
2091
- export declare const GetSessionParamsResultSchema: v.ObjectSchema<{
2092
- readonly result: v.StringSchema<undefined>;
2093
- }, undefined>;
2149
+ export declare const GetSessionParamsResultSchema: v.StringSchema<undefined>;
2094
2150
 
2095
2151
  /**
2096
2152
  * Request parameters for getting a string value from storage.
@@ -2120,6 +2176,7 @@ export declare const GetStringRequestSchema: v.ObjectSchema<{
2120
2176
  * This response can have the following status codes:
2121
2177
  * - `200`: Value retrieved successfully. The `result` contains the string value or null if not found.
2122
2178
  * - `400`: Missing required parameters - key not provided.
2179
+ * - `424`: Failed Dependency - storage operation failed due to underlying storage error.
2123
2180
  * - `500`: Internal server error - an unexpected error occurred on the native side.
2124
2181
  * - `501`: Not implemented - this method requires the Grab app environment.
2125
2182
  *
@@ -2140,6 +2197,9 @@ export declare const GetStringResponseSchema: v.UnionSchema<[v.ObjectSchema<{
2140
2197
  }, undefined>, v.ObjectSchema<{
2141
2198
  readonly status_code: v.LiteralSchema<400, undefined>;
2142
2199
  readonly error: v.StringSchema<undefined>;
2200
+ }, undefined>, v.ObjectSchema<{
2201
+ readonly status_code: v.LiteralSchema<424, undefined>;
2202
+ readonly error: v.StringSchema<undefined>;
2143
2203
  }, undefined>, v.ObjectSchema<{
2144
2204
  readonly status_code: v.LiteralSchema<500, undefined>;
2145
2205
  readonly error: v.StringSchema<undefined>;
@@ -2285,6 +2345,7 @@ export declare const HasAccessToResultSchema: v.ObjectSchema<{
2285
2345
  * @remarks
2286
2346
  * This response can have the following status codes:
2287
2347
  * - `200`: Back button hidden successfully.
2348
+ * - `204`: Operation completed successfully (no content).
2288
2349
  * - `500`: Internal server error - an unexpected error occurred on the native side.
2289
2350
  * - `501`: Not implemented - this method requires the Grab app environment.
2290
2351
  *
@@ -2299,6 +2360,9 @@ export declare type HideBackButtonResponse = InferOutput<typeof HideBackButtonRe
2299
2360
  */
2300
2361
  export declare const HideBackButtonResponseSchema: v.UnionSchema<[v.ObjectSchema<{
2301
2362
  readonly status_code: v.LiteralSchema<200, undefined>;
2363
+ readonly result: v.BooleanSchema<undefined>;
2364
+ }, undefined>, v.ObjectSchema<{
2365
+ readonly status_code: v.LiteralSchema<204, undefined>;
2302
2366
  }, undefined>, v.ObjectSchema<{
2303
2367
  readonly status_code: v.LiteralSchema<500, undefined>;
2304
2368
  readonly error: v.StringSchema<undefined>;
@@ -2321,6 +2385,7 @@ export declare type HideBackButtonResult = void;
2321
2385
  * @remarks
2322
2386
  * This response can have the following status codes:
2323
2387
  * - `200`: Loader hidden successfully.
2388
+ * - `204`: Operation completed successfully (no content).
2324
2389
  * - `500`: Internal server error - an unexpected error occurred on the native side.
2325
2390
  * - `501`: Not implemented - this method requires the Grab app environment.
2326
2391
  *
@@ -2335,6 +2400,9 @@ export declare type HideLoaderResponse = InferOutput<typeof HideLoaderResponseSc
2335
2400
  */
2336
2401
  export declare const HideLoaderResponseSchema: v.UnionSchema<[v.ObjectSchema<{
2337
2402
  readonly status_code: v.LiteralSchema<200, undefined>;
2403
+ readonly result: v.BooleanSchema<undefined>;
2404
+ }, undefined>, v.ObjectSchema<{
2405
+ readonly status_code: v.LiteralSchema<204, undefined>;
2338
2406
  }, undefined>, v.ObjectSchema<{
2339
2407
  readonly status_code: v.LiteralSchema<500, undefined>;
2340
2408
  readonly error: v.StringSchema<undefined>;
@@ -2357,6 +2425,7 @@ export declare type HideLoaderResult = void;
2357
2425
  * @remarks
2358
2426
  * This response can have the following status codes:
2359
2427
  * - `200`: Refresh button hidden successfully.
2428
+ * - `204`: Operation completed successfully (no content).
2360
2429
  * - `500`: Internal server error - an unexpected error occurred on the native side.
2361
2430
  * - `501`: Not implemented - this method requires the Grab app environment.
2362
2431
  *
@@ -2371,6 +2440,9 @@ export declare type HideRefreshButtonResponse = InferOutput<typeof HideRefreshBu
2371
2440
  */
2372
2441
  export declare const HideRefreshButtonResponseSchema: v.UnionSchema<[v.ObjectSchema<{
2373
2442
  readonly status_code: v.LiteralSchema<200, undefined>;
2443
+ readonly result: v.BooleanSchema<undefined>;
2444
+ }, undefined>, v.ObjectSchema<{
2445
+ readonly status_code: v.LiteralSchema<204, undefined>;
2374
2446
  }, undefined>, v.ObjectSchema<{
2375
2447
  readonly status_code: v.LiteralSchema<500, undefined>;
2376
2448
  readonly error: v.StringSchema<undefined>;
@@ -3118,7 +3190,7 @@ export declare class LocationModule extends BaseModule {
3118
3190
  *
3119
3191
  * // Handle the response
3120
3192
  * if (isSuccess(response)) {
3121
- * console.log('Country code:', response.result.countryCode);
3193
+ * console.log('Country code:', response.result);
3122
3194
  * } else if (isError(response)) {
3123
3195
  * switch (response.status_code) {
3124
3196
  * case 403:
@@ -3138,6 +3210,23 @@ export declare class LocationModule extends BaseModule {
3138
3210
  getCountryCode(): Promise<GetCountryCodeResponse>;
3139
3211
  }
3140
3212
 
3213
+ /**
3214
+ * Provides scoped logging for SDK modules.
3215
+ *
3216
+ * @remarks
3217
+ * Log messages are prefixed with `[SuperAppSDK][ModuleName.methodName]`
3218
+ * (e.g. `[SuperAppSDK][ContainerModule.setTitle] An error occurred`).
3219
+ *
3220
+ * @public
3221
+ */
3222
+ export declare class Logger {
3223
+ private readonly moduleName;
3224
+ constructor(moduleName: string);
3225
+ private formatPrefix;
3226
+ warn(method: string, message: string): void;
3227
+ error(method: string, message: string): void;
3228
+ }
3229
+
3141
3230
  /**
3142
3231
  * JSBridge module for playing DRM-protected media content.
3143
3232
  *
@@ -3274,8 +3363,10 @@ export declare type ObserveDRMPlaybackResponse = BridgeStream<InferOutput<typeof
3274
3363
  export declare const ObserveDRMPlaybackResponseSchema: v.UnionSchema<[v.ObjectSchema<{
3275
3364
  readonly status_code: v.LiteralSchema<200, undefined>;
3276
3365
  readonly result: v.ObjectSchema<{
3277
- readonly eventType: v.PicklistSchema<["started", "paused", "ended", "error"], undefined>;
3278
- readonly data: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
3366
+ readonly type: v.PicklistSchema<["START_PLAYBACK", "PROGRESS_PLAYBACK", "START_SEEK", "STOP_SEEK", "STOP_PLAYBACK", "CLOSE_PLAYBACK", "PAUSE_PLAYBACK", "RESUME_PLAYBACK", "FAST_FORWARD_PLAYBACK", "REWIND_PLAYBACK", "ERROR_PLAYBACK", "CHANGE_VOLUME"], undefined>;
3367
+ readonly titleId: v.StringSchema<undefined>;
3368
+ readonly position: v.NumberSchema<undefined>;
3369
+ readonly length: v.NumberSchema<undefined>;
3279
3370
  }, undefined>;
3280
3371
  }, undefined>, v.ObjectSchema<{
3281
3372
  readonly status_code: v.LiteralSchema<500, undefined>;
@@ -3305,6 +3396,7 @@ export declare type ObserveLocationChangeResponse = BridgeStream<GetCoordinateRe
3305
3396
  * @remarks
3306
3397
  * This response can have the following status codes:
3307
3398
  * - `200`: Notification sent successfully.
3399
+ * - `204`: Operation completed successfully (no content).
3308
3400
  * - `500`: Internal server error - an unexpected error occurred on the native side.
3309
3401
  * - `501`: Not implemented - this method requires the Grab app environment.
3310
3402
  *
@@ -3319,6 +3411,9 @@ export declare type OnContentLoadedResponse = InferOutput<typeof OnContentLoaded
3319
3411
  */
3320
3412
  export declare const OnContentLoadedResponseSchema: v.UnionSchema<[v.ObjectSchema<{
3321
3413
  readonly status_code: v.LiteralSchema<200, undefined>;
3414
+ readonly result: v.BooleanSchema<undefined>;
3415
+ }, undefined>, v.ObjectSchema<{
3416
+ readonly status_code: v.LiteralSchema<204, undefined>;
3322
3417
  }, undefined>, v.ObjectSchema<{
3323
3418
  readonly status_code: v.LiteralSchema<500, undefined>;
3324
3419
  readonly error: v.StringSchema<undefined>;
@@ -3367,6 +3462,7 @@ export declare type OnCtaTapResponse = InferOutput<typeof OnCtaTapResponseSchema
3367
3462
  */
3368
3463
  export declare const OnCtaTapResponseSchema: v.UnionSchema<[v.ObjectSchema<{
3369
3464
  readonly status_code: v.LiteralSchema<200, undefined>;
3465
+ readonly result: v.BooleanSchema<undefined>;
3370
3466
  }, undefined>, v.ObjectSchema<{
3371
3467
  readonly status_code: v.LiteralSchema<500, undefined>;
3372
3468
  readonly error: v.StringSchema<undefined>;
@@ -3416,6 +3512,9 @@ export declare type OpenExternalLinkResponse = InferOutput<typeof OpenExternalLi
3416
3512
  */
3417
3513
  export declare const OpenExternalLinkResponseSchema: v.UnionSchema<[v.ObjectSchema<{
3418
3514
  readonly status_code: v.LiteralSchema<200, undefined>;
3515
+ readonly result: v.BooleanSchema<undefined>;
3516
+ }, undefined>, v.ObjectSchema<{
3517
+ readonly status_code: v.LiteralSchema<204, undefined>;
3419
3518
  }, undefined>, v.ObjectSchema<{
3420
3519
  readonly status_code: v.LiteralSchema<400, undefined>;
3421
3520
  readonly error: v.StringSchema<undefined>;
@@ -3525,8 +3624,20 @@ export declare type PlayDRMContentResponse = InferOutput<typeof PlayDRMContentRe
3525
3624
  */
3526
3625
  export declare const PlayDRMContentResponseSchema: v.UnionSchema<[v.ObjectSchema<{
3527
3626
  readonly status_code: v.LiteralSchema<200, undefined>;
3627
+ readonly result: v.ObjectSchema<{
3628
+ readonly type: v.PicklistSchema<["START_PLAYBACK", "PROGRESS_PLAYBACK", "START_SEEK", "STOP_SEEK", "STOP_PLAYBACK", "CLOSE_PLAYBACK", "PAUSE_PLAYBACK", "RESUME_PLAYBACK", "FAST_FORWARD_PLAYBACK", "REWIND_PLAYBACK", "ERROR_PLAYBACK", "CHANGE_VOLUME"], undefined>;
3629
+ readonly titleId: v.StringSchema<undefined>;
3630
+ readonly position: v.NumberSchema<undefined>;
3631
+ readonly length: v.NumberSchema<undefined>;
3632
+ }, undefined>;
3528
3633
  }, undefined>, v.ObjectSchema<{
3529
3634
  readonly status_code: v.LiteralSchema<204, undefined>;
3635
+ }, undefined>, v.ObjectSchema<{
3636
+ readonly status_code: v.LiteralSchema<400, undefined>;
3637
+ readonly error: v.StringSchema<undefined>;
3638
+ }, undefined>, v.ObjectSchema<{
3639
+ readonly status_code: v.LiteralSchema<424, undefined>;
3640
+ readonly error: v.StringSchema<undefined>;
3530
3641
  }, undefined>, v.ObjectSchema<{
3531
3642
  readonly status_code: v.LiteralSchema<500, undefined>;
3532
3643
  readonly error: v.StringSchema<undefined>;
@@ -3619,33 +3730,40 @@ export declare class ProfileModule extends BaseModule {
3619
3730
  */
3620
3731
  fetchEmail(): Promise<FetchEmailResponse>;
3621
3732
  /**
3622
- * Verifies the user's email address using a one-time password (OTP).
3733
+ * Verifies the user's email address by triggering email capture bottom sheet and OTP verification.
3623
3734
  *
3624
3735
  * @remarks
3625
3736
  * This method requires Grab app version 5.399 or above. If called on an older version,
3626
3737
  * it will return a 426 (Upgrade Required) response.
3627
3738
  *
3628
- * @param request - The email and OTP to verify. See {@link VerifyEmailRequest}.
3739
+ * If the user closes the verify OTP bottom sheet, the method will return a `status_code` of `204`.
3740
+ * Successful verification will also update the email address for the user on Grab.
3741
+ *
3742
+ * @param request - Optional request parameters for email verification. See {@link VerifyEmailRequest}.
3629
3743
  *
3630
3744
  * @returns Confirmation of whether the email verification was successful. See {@link VerifyEmailResponse}.
3631
3745
  *
3632
3746
  * @example
3633
- * **Simple usage**
3747
+ * **Simple usage with email provided**
3634
3748
  * ```typescript
3635
3749
  * import { ProfileModule, isSuccess, isError } from '@grabjs/superapp-sdk';
3636
3750
  *
3637
3751
  * // Initialize the profile module
3638
3752
  * const profile = new ProfileModule();
3639
3753
  *
3640
- * // Verify email with OTP
3754
+ * // Verify email with pre-filled email address
3641
3755
  * const response = await profile.verifyEmail({
3642
3756
  * email: 'user@example.com',
3643
- * otp: '123456'
3757
+ * skipUserInput: true
3644
3758
  * });
3645
3759
  *
3646
3760
  * // Handle the response
3647
3761
  * if (isSuccess(response)) {
3648
- * console.log('Email verified successfully');
3762
+ * if (response.status_code === 200) {
3763
+ * console.log('Verified email:', response.result.email);
3764
+ * } else if (response.status_code === 204) {
3765
+ * console.log('User closed the bottom sheet');
3766
+ * }
3649
3767
  * } else if (isError(response)) {
3650
3768
  * switch (response.status_code) {
3651
3769
  * case 403:
@@ -3664,9 +3782,20 @@ export declare class ProfileModule extends BaseModule {
3664
3782
  * }
3665
3783
  * ```
3666
3784
  *
3785
+ * @example
3786
+ * **Usage without parameters**
3787
+ * ```typescript
3788
+ * import { ProfileModule } from '@grabjs/superapp-sdk';
3789
+ *
3790
+ * const profile = new ProfileModule();
3791
+ *
3792
+ * // Let user enter email in the native bottom sheet
3793
+ * const response = await profile.verifyEmail();
3794
+ * ```
3795
+ *
3667
3796
  * @public
3668
3797
  */
3669
- verifyEmail(request: VerifyEmailRequest): Promise<VerifyEmailResponse>;
3798
+ verifyEmail(request?: VerifyEmailRequest): Promise<VerifyEmailResponse>;
3670
3799
  }
3671
3800
 
3672
3801
  /**
@@ -3714,6 +3843,7 @@ export declare type RedirectToSystemWebViewResponse = InferOutput<typeof Redirec
3714
3843
  */
3715
3844
  export declare const RedirectToSystemWebViewResponseSchema: v.UnionSchema<[v.ObjectSchema<{
3716
3845
  readonly status_code: v.LiteralSchema<200, undefined>;
3846
+ readonly result: v.StringSchema<undefined>;
3717
3847
  }, undefined>, v.ObjectSchema<{
3718
3848
  readonly status_code: v.LiteralSchema<400, undefined>;
3719
3849
  readonly error: v.StringSchema<undefined>;
@@ -3741,7 +3871,7 @@ export declare type RedirectToSystemWebViewResult = void;
3741
3871
  *
3742
3872
  * @remarks
3743
3873
  * This response can have the following status codes:
3744
- * - `200`: Scopes reloaded successfully.
3874
+ * - `204`: Scopes reloaded successfully (no content).
3745
3875
  * - `424`: ScopeKit error - unable to reload scopes due to a dependency error.
3746
3876
  * - `500`: Internal server error - an unexpected error occurred on the native side.
3747
3877
  * - `501`: Not implemented - this method requires the Grab app environment.
@@ -3756,7 +3886,7 @@ export declare type ReloadScopesResponse = InferOutput<typeof ReloadScopesRespon
3756
3886
  * @public
3757
3887
  */
3758
3888
  export declare const ReloadScopesResponseSchema: v.UnionSchema<[v.ObjectSchema<{
3759
- readonly status_code: v.LiteralSchema<200, undefined>;
3889
+ readonly status_code: v.LiteralSchema<204, undefined>;
3760
3890
  }, undefined>, v.ObjectSchema<{
3761
3891
  readonly status_code: v.LiteralSchema<424, undefined>;
3762
3892
  readonly error: v.StringSchema<undefined>;
@@ -3782,6 +3912,7 @@ export declare type ReloadScopesResult = void;
3782
3912
  * @remarks
3783
3913
  * This response can have the following status codes:
3784
3914
  * - `204`: All values removed successfully.
3915
+ * - `424`: Failed Dependency - storage operation failed due to underlying storage error.
3785
3916
  * - `500`: Internal server error - an unexpected error occurred on the native side.
3786
3917
  * - `501`: Not implemented - this method requires the Grab app environment.
3787
3918
  *
@@ -3796,6 +3927,9 @@ export declare type RemoveAllResponse = InferOutput<typeof RemoveAllResponseSche
3796
3927
  */
3797
3928
  export declare const RemoveAllResponseSchema: v.UnionSchema<[v.ObjectSchema<{
3798
3929
  readonly status_code: v.LiteralSchema<204, undefined>;
3930
+ }, undefined>, v.ObjectSchema<{
3931
+ readonly status_code: v.LiteralSchema<424, undefined>;
3932
+ readonly error: v.StringSchema<undefined>;
3799
3933
  }, undefined>, v.ObjectSchema<{
3800
3934
  readonly status_code: v.LiteralSchema<500, undefined>;
3801
3935
  readonly error: v.StringSchema<undefined>;
@@ -3819,6 +3953,7 @@ export declare type RemoveAllResult = void;
3819
3953
  * This response can have the following status codes:
3820
3954
  * - `204`: Value removed successfully.
3821
3955
  * - `400`: Missing required parameters - key not provided.
3956
+ * - `424`: Failed Dependency - storage operation failed due to underlying storage error.
3822
3957
  * - `500`: Internal server error - an unexpected error occurred on the native side.
3823
3958
  * - `501`: Not implemented - this method requires the Grab app environment.
3824
3959
  *
@@ -3836,6 +3971,9 @@ export declare const RemoveResponseSchema: v.UnionSchema<[v.ObjectSchema<{
3836
3971
  }, undefined>, v.ObjectSchema<{
3837
3972
  readonly status_code: v.LiteralSchema<400, undefined>;
3838
3973
  readonly error: v.StringSchema<undefined>;
3974
+ }, undefined>, v.ObjectSchema<{
3975
+ readonly status_code: v.LiteralSchema<424, undefined>;
3976
+ readonly error: v.StringSchema<undefined>;
3839
3977
  }, undefined>, v.ObjectSchema<{
3840
3978
  readonly status_code: v.LiteralSchema<500, undefined>;
3841
3979
  readonly error: v.StringSchema<undefined>;
@@ -4100,6 +4238,9 @@ export declare type SendAnalyticsEventResponse = InferOutput<typeof SendAnalytic
4100
4238
  */
4101
4239
  export declare const SendAnalyticsEventResponseSchema: v.UnionSchema<[v.ObjectSchema<{
4102
4240
  readonly status_code: v.LiteralSchema<200, undefined>;
4241
+ readonly result: v.BooleanSchema<undefined>;
4242
+ }, undefined>, v.ObjectSchema<{
4243
+ readonly status_code: v.LiteralSchema<204, undefined>;
4103
4244
  }, undefined>, v.ObjectSchema<{
4104
4245
  readonly status_code: v.LiteralSchema<400, undefined>;
4105
4246
  readonly error: v.StringSchema<undefined>;
@@ -4151,6 +4292,9 @@ export declare type SetBackgroundColorResponse = InferOutput<typeof SetBackgroun
4151
4292
  * @public
4152
4293
  */
4153
4294
  export declare const SetBackgroundColorResponseSchema: v.UnionSchema<[v.ObjectSchema<{
4295
+ readonly status_code: v.LiteralSchema<200, undefined>;
4296
+ readonly result: v.BooleanSchema<undefined>;
4297
+ }, undefined>, v.ObjectSchema<{
4154
4298
  readonly status_code: v.LiteralSchema<204, undefined>;
4155
4299
  }, undefined>, v.ObjectSchema<{
4156
4300
  readonly status_code: v.LiteralSchema<400, undefined>;
@@ -4178,6 +4322,7 @@ export declare type SetBackgroundColorResult = void;
4178
4322
  * This response can have the following status codes:
4179
4323
  * - `204`: Value stored successfully.
4180
4324
  * - `400`: Missing required parameters - key or value not provided.
4325
+ * - `424`: Failed Dependency - storage operation failed due to underlying storage error.
4181
4326
  * - `500`: Internal server error - an unexpected error occurred on the native side.
4182
4327
  * - `501`: Not implemented - this method requires the Grab app environment.
4183
4328
  *
@@ -4195,6 +4340,9 @@ export declare const SetBooleanResponseSchema: v.UnionSchema<[v.ObjectSchema<{
4195
4340
  }, undefined>, v.ObjectSchema<{
4196
4341
  readonly status_code: v.LiteralSchema<400, undefined>;
4197
4342
  readonly error: v.StringSchema<undefined>;
4343
+ }, undefined>, v.ObjectSchema<{
4344
+ readonly status_code: v.LiteralSchema<424, undefined>;
4345
+ readonly error: v.StringSchema<undefined>;
4198
4346
  }, undefined>, v.ObjectSchema<{
4199
4347
  readonly status_code: v.LiteralSchema<500, undefined>;
4200
4348
  readonly error: v.StringSchema<undefined>;
@@ -4218,6 +4366,7 @@ export declare type SetBooleanResult = void;
4218
4366
  * This response can have the following status codes:
4219
4367
  * - `204`: Value stored successfully.
4220
4368
  * - `400`: Missing required parameters - key or value not provided.
4369
+ * - `424`: Failed Dependency - storage operation failed due to underlying storage error.
4221
4370
  * - `500`: Internal server error - an unexpected error occurred on the native side.
4222
4371
  * - `501`: Not implemented - this method requires the Grab app environment.
4223
4372
  *
@@ -4235,6 +4384,9 @@ export declare const SetDoubleResponseSchema: v.UnionSchema<[v.ObjectSchema<{
4235
4384
  }, undefined>, v.ObjectSchema<{
4236
4385
  readonly status_code: v.LiteralSchema<400, undefined>;
4237
4386
  readonly error: v.StringSchema<undefined>;
4387
+ }, undefined>, v.ObjectSchema<{
4388
+ readonly status_code: v.LiteralSchema<424, undefined>;
4389
+ readonly error: v.StringSchema<undefined>;
4238
4390
  }, undefined>, v.ObjectSchema<{
4239
4391
  readonly status_code: v.LiteralSchema<500, undefined>;
4240
4392
  readonly error: v.StringSchema<undefined>;
@@ -4258,6 +4410,7 @@ export declare type SetDoubleResult = void;
4258
4410
  * This response can have the following status codes:
4259
4411
  * - `204`: Value stored successfully.
4260
4412
  * - `400`: Missing required parameters - key or value not provided.
4413
+ * - `424`: Failed Dependency - storage operation failed due to underlying storage error.
4261
4414
  * - `500`: Internal server error - an unexpected error occurred on the native side.
4262
4415
  * - `501`: Not implemented - this method requires the Grab app environment.
4263
4416
  *
@@ -4275,6 +4428,9 @@ export declare const SetIntResponseSchema: v.UnionSchema<[v.ObjectSchema<{
4275
4428
  }, undefined>, v.ObjectSchema<{
4276
4429
  readonly status_code: v.LiteralSchema<400, undefined>;
4277
4430
  readonly error: v.StringSchema<undefined>;
4431
+ }, undefined>, v.ObjectSchema<{
4432
+ readonly status_code: v.LiteralSchema<424, undefined>;
4433
+ readonly error: v.StringSchema<undefined>;
4278
4434
  }, undefined>, v.ObjectSchema<{
4279
4435
  readonly status_code: v.LiteralSchema<500, undefined>;
4280
4436
  readonly error: v.StringSchema<undefined>;
@@ -4298,6 +4454,7 @@ export declare type SetIntResult = void;
4298
4454
  * This response can have the following status codes:
4299
4455
  * - `204`: Value stored successfully.
4300
4456
  * - `400`: Missing required parameters - key or value not provided.
4457
+ * - `424`: Failed Dependency - storage operation failed due to underlying storage error.
4301
4458
  * - `500`: Internal server error - an unexpected error occurred on the native side.
4302
4459
  * - `501`: Not implemented - this method requires the Grab app environment.
4303
4460
  *
@@ -4315,6 +4472,9 @@ export declare const SetStringResponseSchema: v.UnionSchema<[v.ObjectSchema<{
4315
4472
  }, undefined>, v.ObjectSchema<{
4316
4473
  readonly status_code: v.LiteralSchema<400, undefined>;
4317
4474
  readonly error: v.StringSchema<undefined>;
4475
+ }, undefined>, v.ObjectSchema<{
4476
+ readonly status_code: v.LiteralSchema<424, undefined>;
4477
+ readonly error: v.StringSchema<undefined>;
4318
4478
  }, undefined>, v.ObjectSchema<{
4319
4479
  readonly status_code: v.LiteralSchema<500, undefined>;
4320
4480
  readonly error: v.StringSchema<undefined>;
@@ -4349,6 +4509,7 @@ export declare type SetTitleRequest = string;
4349
4509
  * @remarks
4350
4510
  * This response can have the following status codes:
4351
4511
  * - `200`: Title set successfully.
4512
+ * - `204`: Title set successfully.
4352
4513
  * - `400`: Invalid title parameter.
4353
4514
  * - `500`: Internal server error - an unexpected error occurred on the native side.
4354
4515
  * - `501`: Not implemented - this method requires the Grab app environment.
@@ -4364,6 +4525,9 @@ export declare type SetTitleResponse = InferOutput<typeof SetTitleResponseSchema
4364
4525
  */
4365
4526
  export declare const SetTitleResponseSchema: v.UnionSchema<[v.ObjectSchema<{
4366
4527
  readonly status_code: v.LiteralSchema<200, undefined>;
4528
+ readonly result: v.BooleanSchema<undefined>;
4529
+ }, undefined>, v.ObjectSchema<{
4530
+ readonly status_code: v.LiteralSchema<204, undefined>;
4367
4531
  }, undefined>, v.ObjectSchema<{
4368
4532
  readonly status_code: v.LiteralSchema<400, undefined>;
4369
4533
  readonly error: v.StringSchema<undefined>;
@@ -4389,6 +4553,7 @@ export declare type SetTitleResult = void;
4389
4553
  * @remarks
4390
4554
  * This response can have the following status codes:
4391
4555
  * - `200`: Back button shown successfully.
4556
+ * - `204`: Operation completed successfully (no content).
4392
4557
  * - `500`: Internal server error - an unexpected error occurred on the native side.
4393
4558
  * - `501`: Not implemented - this method requires the Grab app environment.
4394
4559
  *
@@ -4403,6 +4568,9 @@ export declare type ShowBackButtonResponse = InferOutput<typeof ShowBackButtonRe
4403
4568
  */
4404
4569
  export declare const ShowBackButtonResponseSchema: v.UnionSchema<[v.ObjectSchema<{
4405
4570
  readonly status_code: v.LiteralSchema<200, undefined>;
4571
+ readonly result: v.BooleanSchema<undefined>;
4572
+ }, undefined>, v.ObjectSchema<{
4573
+ readonly status_code: v.LiteralSchema<204, undefined>;
4406
4574
  }, undefined>, v.ObjectSchema<{
4407
4575
  readonly status_code: v.LiteralSchema<500, undefined>;
4408
4576
  readonly error: v.StringSchema<undefined>;
@@ -4425,6 +4593,7 @@ export declare type ShowBackButtonResult = void;
4425
4593
  * @remarks
4426
4594
  * This response can have the following status codes:
4427
4595
  * - `200`: Loader shown successfully.
4596
+ * - `204`: Operation completed successfully (no content).
4428
4597
  * - `500`: Internal server error - an unexpected error occurred on the native side.
4429
4598
  * - `501`: Not implemented - this method requires the Grab app environment.
4430
4599
  *
@@ -4439,6 +4608,9 @@ export declare type ShowLoaderResponse = InferOutput<typeof ShowLoaderResponseSc
4439
4608
  */
4440
4609
  export declare const ShowLoaderResponseSchema: v.UnionSchema<[v.ObjectSchema<{
4441
4610
  readonly status_code: v.LiteralSchema<200, undefined>;
4611
+ readonly result: v.BooleanSchema<undefined>;
4612
+ }, undefined>, v.ObjectSchema<{
4613
+ readonly status_code: v.LiteralSchema<204, undefined>;
4442
4614
  }, undefined>, v.ObjectSchema<{
4443
4615
  readonly status_code: v.LiteralSchema<500, undefined>;
4444
4616
  readonly error: v.StringSchema<undefined>;
@@ -4461,6 +4633,7 @@ export declare type ShowLoaderResult = void;
4461
4633
  * @remarks
4462
4634
  * This response can have the following status codes:
4463
4635
  * - `200`: Refresh button shown successfully.
4636
+ * - `204`: Operation completed successfully (no content).
4464
4637
  * - `500`: Internal server error - an unexpected error occurred on the native side.
4465
4638
  * - `501`: Not implemented - this method requires the Grab app environment.
4466
4639
  *
@@ -4475,6 +4648,9 @@ export declare type ShowRefreshButtonResponse = InferOutput<typeof ShowRefreshBu
4475
4648
  */
4476
4649
  export declare const ShowRefreshButtonResponseSchema: v.UnionSchema<[v.ObjectSchema<{
4477
4650
  readonly status_code: v.LiteralSchema<200, undefined>;
4651
+ readonly result: v.BooleanSchema<undefined>;
4652
+ }, undefined>, v.ObjectSchema<{
4653
+ readonly status_code: v.LiteralSchema<204, undefined>;
4478
4654
  }, undefined>, v.ObjectSchema<{
4479
4655
  readonly status_code: v.LiteralSchema<500, undefined>;
4480
4656
  readonly error: v.StringSchema<undefined>;
@@ -4553,6 +4729,7 @@ export declare class SplashScreenModule extends BaseModule {
4553
4729
  *
4554
4730
  * @remarks
4555
4731
  * Stores data in the native app's persistent storage, allowing data to survive WebView restarts.
4732
+ * All stored data is automatically removed when the user logs out.
4556
4733
  * This code must run on the Grab SuperApp's WebView to function correctly.
4557
4734
  *
4558
4735
  * @example
@@ -5026,12 +5203,20 @@ export declare type TriggerCheckoutResponse = InferOutput<typeof TriggerCheckout
5026
5203
  */
5027
5204
  export declare const TriggerCheckoutResponseSchema: v.UnionSchema<[v.ObjectSchema<{
5028
5205
  readonly status_code: v.LiteralSchema<200, undefined>;
5029
- readonly result: v.ObjectSchema<{
5206
+ readonly result: v.VariantSchema<"status", [v.ObjectSchema<{
5207
+ readonly status: v.LiteralSchema<"success", undefined>;
5030
5208
  readonly transactionID: v.StringSchema<undefined>;
5031
- readonly status: v.PicklistSchema<["success", "failure", "pending", "userInitiatedCancel"], undefined>;
5032
- readonly errorMessage: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
5033
- readonly errorCode: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
5034
- }, undefined>;
5209
+ }, undefined>, v.ObjectSchema<{
5210
+ readonly status: v.LiteralSchema<"failure", undefined>;
5211
+ readonly transactionID: v.StringSchema<undefined>;
5212
+ readonly errorMessage: v.StringSchema<undefined>;
5213
+ readonly errorCode: v.StringSchema<undefined>;
5214
+ }, undefined>, v.ObjectSchema<{
5215
+ readonly status: v.LiteralSchema<"pending", undefined>;
5216
+ readonly transactionID: v.StringSchema<undefined>;
5217
+ }, undefined>, v.ObjectSchema<{
5218
+ readonly status: v.LiteralSchema<"userInitiatedCancel", undefined>;
5219
+ }, undefined>], undefined>;
5035
5220
  }, undefined>, v.ObjectSchema<{
5036
5221
  readonly status_code: v.LiteralSchema<400, undefined>;
5037
5222
  readonly error: v.StringSchema<undefined>;
@@ -5046,6 +5231,12 @@ export declare const TriggerCheckoutResponseSchema: v.UnionSchema<[v.ObjectSchem
5046
5231
  /**
5047
5232
  * Result object containing the checkout transaction details.
5048
5233
  *
5234
+ * @remarks
5235
+ * - `status: 'success'` → `transactionID`
5236
+ * - `status: 'failure'` → `transactionID`, `errorMessage`, `errorCode`
5237
+ * - `status: 'pending'` → `transactionID`
5238
+ * - `status: 'userInitiatedCancel'` → only `status`
5239
+ *
5049
5240
  * @example
5050
5241
  * **Successful transaction:**
5051
5242
  * ```typescript
@@ -5076,10 +5267,9 @@ export declare const TriggerCheckoutResponseSchema: v.UnionSchema<[v.ObjectSchem
5076
5267
  * ```
5077
5268
  *
5078
5269
  * @example
5079
- * **User cancelled:**
5270
+ * **User cancelled or closed checkout:**
5080
5271
  * ```typescript
5081
5272
  * {
5082
- * transactionID: 'grab-txn-abc123',
5083
5273
  * status: 'userInitiatedCancel'
5084
5274
  * }
5085
5275
  * ```
@@ -5093,12 +5283,20 @@ export declare type TriggerCheckoutResult = InferOutput<typeof TriggerCheckoutRe
5093
5283
  *
5094
5284
  * @public
5095
5285
  */
5096
- export declare const TriggerCheckoutResultSchema: v.ObjectSchema<{
5286
+ export declare const TriggerCheckoutResultSchema: v.VariantSchema<"status", [v.ObjectSchema<{
5287
+ readonly status: v.LiteralSchema<"success", undefined>;
5097
5288
  readonly transactionID: v.StringSchema<undefined>;
5098
- readonly status: v.PicklistSchema<["success", "failure", "pending", "userInitiatedCancel"], undefined>;
5099
- readonly errorMessage: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
5100
- readonly errorCode: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
5101
- }, undefined>;
5289
+ }, undefined>, v.ObjectSchema<{
5290
+ readonly status: v.LiteralSchema<"failure", undefined>;
5291
+ readonly transactionID: v.StringSchema<undefined>;
5292
+ readonly errorMessage: v.StringSchema<undefined>;
5293
+ readonly errorCode: v.StringSchema<undefined>;
5294
+ }, undefined>, v.ObjectSchema<{
5295
+ readonly status: v.LiteralSchema<"pending", undefined>;
5296
+ readonly transactionID: v.StringSchema<undefined>;
5297
+ }, undefined>, v.ObjectSchema<{
5298
+ readonly status: v.LiteralSchema<"userInitiatedCancel", undefined>;
5299
+ }, undefined>], undefined>;
5102
5300
 
5103
5301
  /**
5104
5302
  * JSBridge module for reading user-related attributes from native code.
@@ -5169,13 +5367,17 @@ export declare class UserAttributesModule extends BaseModule {
5169
5367
  }
5170
5368
 
5171
5369
  /**
5172
- * Request parameters for verifying the user's email with an OTP.
5370
+ * Request parameters for verifying the user's email.
5371
+ *
5372
+ * @remarks
5373
+ * Both properties are optional. If email is provided and skipUserInput is true,
5374
+ * the verify OTP bottom sheet will be triggered directly without user editing.
5173
5375
  *
5174
5376
  * @example
5175
5377
  * ```typescript
5176
5378
  * {
5177
5379
  * email: 'user@example.com',
5178
- * otp: '123456'
5380
+ * skipUserInput: true
5179
5381
  * }
5180
5382
  * ```
5181
5383
  *
@@ -5189,8 +5391,8 @@ export declare type VerifyEmailRequest = InferOutput<typeof VerifyEmailRequestSc
5189
5391
  * @public
5190
5392
  */
5191
5393
  export declare const VerifyEmailRequestSchema: v.ObjectSchema<{
5192
- readonly email: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5193
- readonly otp: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
5394
+ readonly email: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
5395
+ readonly skipUserInput: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
5194
5396
  }, undefined>;
5195
5397
 
5196
5398
  /**
@@ -5198,13 +5400,29 @@ export declare const VerifyEmailRequestSchema: v.ObjectSchema<{
5198
5400
  *
5199
5401
  * @remarks
5200
5402
  * This response can have the following status codes:
5201
- * - `200`: Email verified successfully.
5202
- * - `400`: Invalid request - OTP is incorrect or expired.
5403
+ * - `200`: Success, email verified and returned in `result`.
5404
+ * - `204`: User closed the native bottom sheet.
5405
+ * - `400`: Client error (e.g. invalid email format).
5203
5406
  * - `403`: Forbidden - client not authorized to access user profile data.
5204
5407
  * - `426`: Upgrade Required - feature requires Grab app version 5.399 or above.
5205
5408
  * - `500`: Internal server error - an unexpected error occurred on the native side.
5206
5409
  * - `501`: Not implemented - this method requires the Grab app environment.
5207
5410
  *
5411
+ * @example
5412
+ * **Successful verification:**
5413
+ * ```typescript
5414
+ * {
5415
+ * status_code: 200,
5416
+ * result: { email: 'user@example.com' }
5417
+ * }
5418
+ * ```
5419
+ *
5420
+ * @example
5421
+ * **User closed bottom sheet:**
5422
+ * ```typescript
5423
+ * { status_code: 204 }
5424
+ * ```
5425
+ *
5208
5426
  * @public
5209
5427
  */
5210
5428
  export declare type VerifyEmailResponse = InferOutput<typeof VerifyEmailResponseSchema>;
@@ -5216,6 +5434,11 @@ export declare type VerifyEmailResponse = InferOutput<typeof VerifyEmailResponse
5216
5434
  */
5217
5435
  export declare const VerifyEmailResponseSchema: v.UnionSchema<[v.ObjectSchema<{
5218
5436
  readonly status_code: v.LiteralSchema<200, undefined>;
5437
+ readonly result: v.ObjectSchema<{
5438
+ readonly email: v.StringSchema<undefined>;
5439
+ }, undefined>;
5440
+ }, undefined>, v.ObjectSchema<{
5441
+ readonly status_code: v.LiteralSchema<204, undefined>;
5219
5442
  }, undefined>, v.ObjectSchema<{
5220
5443
  readonly status_code: v.LiteralSchema<400, undefined>;
5221
5444
  readonly error: v.StringSchema<undefined>;
@@ -5235,11 +5458,24 @@ export declare const VerifyEmailResponseSchema: v.UnionSchema<[v.ObjectSchema<{
5235
5458
 
5236
5459
  /**
5237
5460
  * Result object for verifying the user's email.
5238
- * This operation returns no data on success.
5461
+ *
5462
+ * @example
5463
+ * ```typescript
5464
+ * { email: 'user@example.com' }
5465
+ * ```
5239
5466
  *
5240
5467
  * @public
5241
5468
  */
5242
- export declare type VerifyEmailResult = void;
5469
+ export declare type VerifyEmailResult = InferOutput<typeof VerifyEmailResultSchema>;
5470
+
5471
+ /**
5472
+ * Valibot schema for {@link VerifyEmailResult}.
5473
+ *
5474
+ * @public
5475
+ */
5476
+ export declare const VerifyEmailResultSchema: v.ObjectSchema<{
5477
+ readonly email: v.StringSchema<undefined>;
5478
+ }, undefined>;
5243
5479
 
5244
5480
  /**
5245
5481
  * Represents a semantic version with major, minor, and patch components.