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

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.
Files changed (167) hide show
  1. package/README.md +14 -155
  2. package/api-reference/api.json +43962 -0
  3. package/dist/index.d.ts +2140 -2608
  4. package/dist/index.esm.js +1 -1
  5. package/dist/index.js +1 -1
  6. package/package.json +14 -9
  7. package/skills/SKILL.md +405 -0
  8. package/api-reference/json/api.json +0 -27688
  9. package/api-reference/markdown/README.md +0 -194
  10. package/api-reference/markdown/classes/BaseModule.md +0 -123
  11. package/api-reference/markdown/classes/CameraModule.md +0 -177
  12. package/api-reference/markdown/classes/CheckoutModule.md +0 -181
  13. package/api-reference/markdown/classes/ContainerModule.md +0 -751
  14. package/api-reference/markdown/classes/DeviceCapabilityModule.md +0 -161
  15. package/api-reference/markdown/classes/FileModule.md +0 -178
  16. package/api-reference/markdown/classes/IdentityModule.md +0 -299
  17. package/api-reference/markdown/classes/LocaleModule.md +0 -161
  18. package/api-reference/markdown/classes/LocationModule.md +0 -239
  19. package/api-reference/markdown/classes/MediaModule.md +0 -219
  20. package/api-reference/markdown/classes/PlatformModule.md +0 -162
  21. package/api-reference/markdown/classes/ProfileModule.md +0 -224
  22. package/api-reference/markdown/classes/ScopeModule.md +0 -219
  23. package/api-reference/markdown/classes/StorageModule.md +0 -608
  24. package/api-reference/markdown/classes/SystemWebViewKitModule.md +0 -177
  25. package/api-reference/markdown/classes/UserAttributesModule.md +0 -164
  26. package/api-reference/markdown/functions/isClientError.md +0 -37
  27. package/api-reference/markdown/functions/isErrorResponse.md +0 -40
  28. package/api-reference/markdown/functions/isRedirection.md +0 -37
  29. package/api-reference/markdown/functions/isServerError.md +0 -37
  30. package/api-reference/markdown/functions/isSuccess.md +0 -39
  31. package/api-reference/markdown/globals.md +0 -176
  32. package/api-reference/markdown/interfaces/GrabAppInfo.md +0 -23
  33. package/api-reference/markdown/interfaces/InvokeOptions.md +0 -63
  34. package/api-reference/markdown/interfaces/Version.md +0 -23
  35. package/api-reference/markdown/interfaces/WrappedModule.md +0 -51
  36. package/api-reference/markdown/type-aliases/AuthorizeRequest.md +0 -79
  37. package/api-reference/markdown/type-aliases/AuthorizeResponse.md +0 -58
  38. package/api-reference/markdown/type-aliases/AuthorizeResult.md +0 -33
  39. package/api-reference/markdown/type-aliases/BackResponse.md +0 -37
  40. package/api-reference/markdown/type-aliases/BackResult.md +0 -8
  41. package/api-reference/markdown/type-aliases/BridgeClientError.md +0 -9
  42. package/api-reference/markdown/type-aliases/BridgeError.md +0 -8
  43. package/api-reference/markdown/type-aliases/BridgeRedirection.md +0 -8
  44. package/api-reference/markdown/type-aliases/BridgeResponse.md +0 -40
  45. package/api-reference/markdown/type-aliases/BridgeServerError.md +0 -8
  46. package/api-reference/markdown/type-aliases/BridgeStatusCode.md +0 -7
  47. package/api-reference/markdown/type-aliases/BridgeStream.md +0 -29
  48. package/api-reference/markdown/type-aliases/BridgeStreamHandlers.md +0 -25
  49. package/api-reference/markdown/type-aliases/BridgeSuccessResponse.md +0 -14
  50. package/api-reference/markdown/type-aliases/ClearAuthorizationArtifactsResponse.md +0 -18
  51. package/api-reference/markdown/type-aliases/ClearAuthorizationArtifactsResult.md +0 -8
  52. package/api-reference/markdown/type-aliases/CloseResponse.md +0 -37
  53. package/api-reference/markdown/type-aliases/CloseResult.md +0 -8
  54. package/api-reference/markdown/type-aliases/DRMContentConfig.md +0 -34
  55. package/api-reference/markdown/type-aliases/DRMPlaybackEvent.md +0 -43
  56. package/api-reference/markdown/type-aliases/DownloadFileRequest.md +0 -32
  57. package/api-reference/markdown/type-aliases/DownloadFileResponse.md +0 -48
  58. package/api-reference/markdown/type-aliases/DownloadFileResult.md +0 -11
  59. package/api-reference/markdown/type-aliases/ErrorResponse.md +0 -32
  60. package/api-reference/markdown/type-aliases/FetchEmailResponse.md +0 -58
  61. package/api-reference/markdown/type-aliases/FetchEmailResult.md +0 -21
  62. package/api-reference/markdown/type-aliases/GetAuthorizationArtifactsResponse.md +0 -42
  63. package/api-reference/markdown/type-aliases/GetAuthorizationArtifactsResult.md +0 -57
  64. package/api-reference/markdown/type-aliases/GetBooleanRequest.md +0 -21
  65. package/api-reference/markdown/type-aliases/GetBooleanResponse.md +0 -57
  66. package/api-reference/markdown/type-aliases/GetBooleanResult.md +0 -27
  67. package/api-reference/markdown/type-aliases/GetCoordinateResponse.md +0 -49
  68. package/api-reference/markdown/type-aliases/GetCoordinateResult.md +0 -29
  69. package/api-reference/markdown/type-aliases/GetCountryCodeResponse.md +0 -57
  70. package/api-reference/markdown/type-aliases/GetCountryCodeResult.md +0 -25
  71. package/api-reference/markdown/type-aliases/GetDoubleRequest.md +0 -21
  72. package/api-reference/markdown/type-aliases/GetDoubleResponse.md +0 -57
  73. package/api-reference/markdown/type-aliases/GetDoubleResult.md +0 -27
  74. package/api-reference/markdown/type-aliases/GetIntRequest.md +0 -21
  75. package/api-reference/markdown/type-aliases/GetIntResponse.md +0 -57
  76. package/api-reference/markdown/type-aliases/GetIntResult.md +0 -27
  77. package/api-reference/markdown/type-aliases/GetLanguageLocaleIdentifierResponse.md +0 -48
  78. package/api-reference/markdown/type-aliases/GetLanguageLocaleIdentifierResult.md +0 -31
  79. package/api-reference/markdown/type-aliases/GetSelectedTravelDestinationResponse.md +0 -48
  80. package/api-reference/markdown/type-aliases/GetSelectedTravelDestinationResult.md +0 -17
  81. package/api-reference/markdown/type-aliases/GetSessionParamsResponse.md +0 -40
  82. package/api-reference/markdown/type-aliases/GetSessionParamsResult.md +0 -27
  83. package/api-reference/markdown/type-aliases/GetStringRequest.md +0 -21
  84. package/api-reference/markdown/type-aliases/GetStringResponse.md +0 -57
  85. package/api-reference/markdown/type-aliases/GetStringResult.md +0 -27
  86. package/api-reference/markdown/type-aliases/HasAccessToResponse.md +0 -66
  87. package/api-reference/markdown/type-aliases/HasAccessToResult.md +0 -27
  88. package/api-reference/markdown/type-aliases/HideBackButtonResponse.md +0 -37
  89. package/api-reference/markdown/type-aliases/HideBackButtonResult.md +0 -8
  90. package/api-reference/markdown/type-aliases/HideLoaderResponse.md +0 -37
  91. package/api-reference/markdown/type-aliases/HideLoaderResult.md +0 -8
  92. package/api-reference/markdown/type-aliases/HideRefreshButtonResponse.md +0 -37
  93. package/api-reference/markdown/type-aliases/HideRefreshButtonResult.md +0 -8
  94. package/api-reference/markdown/type-aliases/IsConnectedResponse.md +0 -31
  95. package/api-reference/markdown/type-aliases/IsConnectedResult.md +0 -27
  96. package/api-reference/markdown/type-aliases/IsEsimSupportedResponse.md +0 -48
  97. package/api-reference/markdown/type-aliases/IsEsimSupportedResult.md +0 -17
  98. package/api-reference/markdown/type-aliases/ObserveDRMPlaybackResponse.md +0 -15
  99. package/api-reference/markdown/type-aliases/ObserveLocationChangeResponse.md +0 -15
  100. package/api-reference/markdown/type-aliases/OnContentLoadedResponse.md +0 -37
  101. package/api-reference/markdown/type-aliases/OnContentLoadedResult.md +0 -8
  102. package/api-reference/markdown/type-aliases/OnCtaTapRequest.md +0 -13
  103. package/api-reference/markdown/type-aliases/OnCtaTapResponse.md +0 -37
  104. package/api-reference/markdown/type-aliases/OnCtaTapResult.md +0 -8
  105. package/api-reference/markdown/type-aliases/OpenExternalLinkRequest.md +0 -13
  106. package/api-reference/markdown/type-aliases/OpenExternalLinkResponse.md +0 -46
  107. package/api-reference/markdown/type-aliases/OpenExternalLinkResult.md +0 -8
  108. package/api-reference/markdown/type-aliases/Platform.md +0 -7
  109. package/api-reference/markdown/type-aliases/PlayDRMContentResponse.md +0 -43
  110. package/api-reference/markdown/type-aliases/PlayDRMContentResult.md +0 -8
  111. package/api-reference/markdown/type-aliases/RedirectToSystemWebViewRequest.md +0 -23
  112. package/api-reference/markdown/type-aliases/RedirectToSystemWebViewResponse.md +0 -55
  113. package/api-reference/markdown/type-aliases/RedirectToSystemWebViewResult.md +0 -8
  114. package/api-reference/markdown/type-aliases/ReloadScopesResponse.md +0 -46
  115. package/api-reference/markdown/type-aliases/ReloadScopesResult.md +0 -8
  116. package/api-reference/markdown/type-aliases/RemoveAllResponse.md +0 -37
  117. package/api-reference/markdown/type-aliases/RemoveAllResult.md +0 -8
  118. package/api-reference/markdown/type-aliases/RemoveResponse.md +0 -46
  119. package/api-reference/markdown/type-aliases/RemoveResult.md +0 -8
  120. package/api-reference/markdown/type-aliases/ResponseStatusCode200.md +0 -34
  121. package/api-reference/markdown/type-aliases/ResponseStatusCode204.md +0 -20
  122. package/api-reference/markdown/type-aliases/ResponseStatusCode302.md +0 -20
  123. package/api-reference/markdown/type-aliases/ResponseStatusCode400.md +0 -7
  124. package/api-reference/markdown/type-aliases/ResponseStatusCode401.md +0 -7
  125. package/api-reference/markdown/type-aliases/ResponseStatusCode403.md +0 -7
  126. package/api-reference/markdown/type-aliases/ResponseStatusCode404.md +0 -7
  127. package/api-reference/markdown/type-aliases/ResponseStatusCode424.md +0 -7
  128. package/api-reference/markdown/type-aliases/ResponseStatusCode426.md +0 -12
  129. package/api-reference/markdown/type-aliases/ResponseStatusCode500.md +0 -7
  130. package/api-reference/markdown/type-aliases/ResponseStatusCode501.md +0 -12
  131. package/api-reference/markdown/type-aliases/ScanQRCodeRequest.md +0 -27
  132. package/api-reference/markdown/type-aliases/ScanQRCodeResponse.md +0 -64
  133. package/api-reference/markdown/type-aliases/ScanQRCodeResult.md +0 -21
  134. package/api-reference/markdown/type-aliases/SendAnalyticsEventRequest.md +0 -56
  135. package/api-reference/markdown/type-aliases/SendAnalyticsEventResponse.md +0 -46
  136. package/api-reference/markdown/type-aliases/SendAnalyticsEventResult.md +0 -8
  137. package/api-reference/markdown/type-aliases/SetBackgroundColorRequest.md +0 -13
  138. package/api-reference/markdown/type-aliases/SetBackgroundColorResponse.md +0 -46
  139. package/api-reference/markdown/type-aliases/SetBackgroundColorResult.md +0 -8
  140. package/api-reference/markdown/type-aliases/SetBooleanResponse.md +0 -46
  141. package/api-reference/markdown/type-aliases/SetBooleanResult.md +0 -8
  142. package/api-reference/markdown/type-aliases/SetDoubleResponse.md +0 -46
  143. package/api-reference/markdown/type-aliases/SetDoubleResult.md +0 -8
  144. package/api-reference/markdown/type-aliases/SetIntResponse.md +0 -46
  145. package/api-reference/markdown/type-aliases/SetIntResult.md +0 -8
  146. package/api-reference/markdown/type-aliases/SetStringResponse.md +0 -46
  147. package/api-reference/markdown/type-aliases/SetStringResult.md +0 -8
  148. package/api-reference/markdown/type-aliases/SetTitleRequest.md +0 -13
  149. package/api-reference/markdown/type-aliases/SetTitleResponse.md +0 -46
  150. package/api-reference/markdown/type-aliases/SetTitleResult.md +0 -8
  151. package/api-reference/markdown/type-aliases/ShowBackButtonResponse.md +0 -37
  152. package/api-reference/markdown/type-aliases/ShowBackButtonResult.md +0 -8
  153. package/api-reference/markdown/type-aliases/ShowLoaderResponse.md +0 -37
  154. package/api-reference/markdown/type-aliases/ShowLoaderResult.md +0 -8
  155. package/api-reference/markdown/type-aliases/ShowRefreshButtonResponse.md +0 -37
  156. package/api-reference/markdown/type-aliases/ShowRefreshButtonResult.md +0 -8
  157. package/api-reference/markdown/type-aliases/StatusCodeMap.md +0 -80
  158. package/api-reference/markdown/type-aliases/Subscription.md +0 -12
  159. package/api-reference/markdown/type-aliases/TriggerCheckoutRequest.md +0 -26
  160. package/api-reference/markdown/type-aliases/TriggerCheckoutResponse.md +0 -76
  161. package/api-reference/markdown/type-aliases/TriggerCheckoutResult.md +0 -75
  162. package/api-reference/markdown/type-aliases/VerifyEmailRequest.md +0 -32
  163. package/api-reference/markdown/type-aliases/VerifyEmailResponse.md +0 -55
  164. package/api-reference/markdown/type-aliases/VerifyEmailResult.md +0 -8
  165. package/api-reference/markdown/variables/ContainerAnalyticsEventData.md +0 -21
  166. package/api-reference/markdown/variables/ContainerAnalyticsEventName.md +0 -13
  167. package/api-reference/markdown/variables/ContainerAnalyticsEventState.md +0 -25
@@ -1,25 +0,0 @@
1
- [@grabjs/superapp-sdk](../globals.md) / BridgeStreamHandlers
2
-
3
- # Type Alias: BridgeStreamHandlers\<Codes, T\>
4
-
5
- > **BridgeStreamHandlers**\<`Codes`, `T`\> = `Readonly`\<\{ `complete?`: () => `unknown`; `next?`: (`data`: [`BridgeResponse`](BridgeResponse.md)\<`Codes`, `T`\>) => `unknown`; \}\>
6
-
7
- Callbacks for handling stream events.
8
-
9
- ## Type Parameters
10
-
11
- ### Codes
12
-
13
- `Codes` *extends* [`BridgeStatusCode`](BridgeStatusCode.md) = [`BridgeStatusCode`](BridgeStatusCode.md)
14
-
15
- The status codes that can be emitted by the stream.
16
-
17
- ### T
18
-
19
- `T` = `void`
20
-
21
- The type of data emitted by the stream.
22
-
23
- ## Remarks
24
-
25
- Pass these to `subscribe()` to receive data via `next` and completion via `complete`.
@@ -1,14 +0,0 @@
1
- [@grabjs/superapp-sdk](../globals.md) / BridgeSuccessResponse
2
-
3
- # Type Alias: BridgeSuccessResponse\<T\>
4
-
5
- > **BridgeSuccessResponse**\<`T`\> = [`ResponseStatusCode200`](ResponseStatusCode200.md)\<`T`\> \| [`ResponseStatusCode204`](ResponseStatusCode204.md)
6
-
7
- Union type representing all successful JSBridge responses.
8
- Includes status codes 200 (with result data) and 204 (no content).
9
-
10
- ## Type Parameters
11
-
12
- ### T
13
-
14
- `T`
@@ -1,18 +0,0 @@
1
- [@grabjs/superapp-sdk](../globals.md) / ClearAuthorizationArtifactsResponse
2
-
3
- # Type Alias: ClearAuthorizationArtifactsResponse
4
-
5
- > **ClearAuthorizationArtifactsResponse** = [`BridgeResponse`](BridgeResponse.md)\<`204`, [`ClearAuthorizationArtifactsResult`](ClearAuthorizationArtifactsResult.md)\>
6
-
7
- Response when clearing stored authorization artifacts.
8
-
9
- ## Remarks
10
-
11
- This response returns status code `204` when artifacts are successfully cleared.
12
-
13
- ## Example
14
-
15
- **Success response (204):**
16
- ```typescript
17
- { status_code: 204 }
18
- ```
@@ -1,8 +0,0 @@
1
- [@grabjs/superapp-sdk](../globals.md) / ClearAuthorizationArtifactsResult
2
-
3
- # Type Alias: ClearAuthorizationArtifactsResult
4
-
5
- > **ClearAuthorizationArtifactsResult** = `void`
6
-
7
- Result object for clearing authorization artifacts.
8
- This operation returns no data on success.
@@ -1,37 +0,0 @@
1
- [@grabjs/superapp-sdk](../globals.md) / CloseResponse
2
-
3
- # Type Alias: CloseResponse
4
-
5
- > **CloseResponse** = [`BridgeResponse`](BridgeResponse.md)\<`200` \| `500` \| `501`, [`CloseResult`](CloseResult.md)\>
6
-
7
- Response when closing the container.
8
-
9
- ## Remarks
10
-
11
- This response can have the following status codes:
12
- - `200`: Container closed successfully.
13
- - `500`: Internal server error - an unexpected error occurred on the native side.
14
- - `501`: Not implemented - this method requires the Grab app environment.
15
-
16
- ## Examples
17
-
18
- **Success response (200):**
19
- ```typescript
20
- { status_code: 200 }
21
- ```
22
-
23
- **Not implemented response (501) - outside Grab app:**
24
- ```typescript
25
- {
26
- status_code: 501,
27
- error: 'Not implemented: This method requires the Grab app environment'
28
- }
29
- ```
30
-
31
- **Internal server error response (500):**
32
- ```typescript
33
- {
34
- status_code: 500,
35
- error: 'Internal server error'
36
- }
37
- ```
@@ -1,8 +0,0 @@
1
- [@grabjs/superapp-sdk](../globals.md) / CloseResult
2
-
3
- # Type Alias: CloseResult
4
-
5
- > **CloseResult** = `void`
6
-
7
- Result when closing the container.
8
- This operation returns no data on success.
@@ -1,34 +0,0 @@
1
- [@grabjs/superapp-sdk](../globals.md) / DRMContentConfig
2
-
3
- # Type Alias: DRMContentConfig
4
-
5
- > **DRMContentConfig** = `Record`\<`string`, `unknown`\>
6
-
7
- DRM content configuration for playback.
8
-
9
- ## Remarks
10
-
11
- Configuration object containing DRM license information, content URLs, and playback settings.
12
- The exact structure depends on the DRM provider (e.g., FairPlay, Widevine).
13
-
14
- ## Examples
15
-
16
- **Widevine DRM configuration:**
17
- ```typescript
18
- {
19
- contentId: 'movie-123',
20
- licenseUrl: 'https://license.example.com/widevine',
21
- contentUrl: 'https://cdn.example.com/video.mp4',
22
- headers: { 'Authorization': 'Bearer token123' }
23
- }
24
- ```
25
-
26
- **FairPlay DRM configuration:**
27
- ```typescript
28
- {
29
- assetId: 'content-456',
30
- certificateUrl: 'https://fairplay.example.com/cert',
31
- licenseUrl: 'https://fairplay.example.com/license',
32
- contentUrl: 'https://cdn.example.com/video.m3u8'
33
- }
34
- ```
@@ -1,43 +0,0 @@
1
- [@grabjs/superapp-sdk](../globals.md) / DRMPlaybackEvent
2
-
3
- # Type Alias: DRMPlaybackEvent
4
-
5
- > **DRMPlaybackEvent** = \{ `data?`: `Record`\<`string`, `unknown`\>; `eventType`: `"started"` \| `"paused"` \| `"ended"` \| `"error"`; \}
6
-
7
- Result object for DRM playback events.
8
-
9
- ## Examples
10
-
11
- **Playback started event:**
12
- ```typescript
13
- { eventType: 'started' }
14
- ```
15
-
16
- **Playback paused event:**
17
- ```typescript
18
- { eventType: 'paused' }
19
- ```
20
-
21
- **Playback error event:**
22
- ```typescript
23
- {
24
- eventType: 'error',
25
- data: { errorCode: 'DRM_LICENSE_ERROR', message: 'License expired' }
26
- }
27
- ```
28
-
29
- ## Properties
30
-
31
- ### data?
32
-
33
- > `optional` **data**: `Record`\<`string`, `unknown`\>
34
-
35
- Additional event data as key-value pairs.
36
-
37
- ***
38
-
39
- ### eventType
40
-
41
- > **eventType**: `"started"` \| `"paused"` \| `"ended"` \| `"error"`
42
-
43
- The type of playback event.
@@ -1,32 +0,0 @@
1
- [@grabjs/superapp-sdk](../globals.md) / DownloadFileRequest
2
-
3
- # Type Alias: DownloadFileRequest
4
-
5
- > **DownloadFileRequest** = \{ `fileName`: `string`; `fileUrl`: `string`; \}
6
-
7
- Request parameters for downloading a file via native bridge.
8
-
9
- ## Example
10
-
11
- ```typescript
12
- {
13
- fileUrl: 'https://example.com/report.pdf',
14
- fileName: 'report.pdf'
15
- }
16
- ```
17
-
18
- ## Properties
19
-
20
- ### fileName
21
-
22
- > **fileName**: `string`
23
-
24
- The desired name for the downloaded file.
25
-
26
- ***
27
-
28
- ### fileUrl
29
-
30
- > **fileUrl**: `string`
31
-
32
- The URL of the file to download.
@@ -1,48 +0,0 @@
1
- [@grabjs/superapp-sdk](../globals.md) / DownloadFileResponse
2
-
3
- # Type Alias: DownloadFileResponse
4
-
5
- > **DownloadFileResponse** = [`BridgeResponse`](BridgeResponse.md)\<`204` \| `400` \| `500` \| `501`, [`DownloadFileResult`](DownloadFileResult.md)\>
6
-
7
- Response when requesting a native file download.
8
-
9
- ## Remarks
10
-
11
- This response can have the following status codes:
12
- - `204`: File downloaded successfully.
13
- - `400`: Invalid request parameters such as invalid file URL, invalid domain, or missing file name.
14
- - `500`: Internal server error - an unexpected error occurred on the native side.
15
- - `501`: Not implemented - this method requires the Grab app environment.
16
-
17
- ## Examples
18
-
19
- **Success response (204):**
20
- ```typescript
21
- {
22
- status_code: 204
23
- }
24
- ```
25
-
26
- **Bad request response (400):**
27
- ```typescript
28
- {
29
- status_code: 400,
30
- error: 'Invalid request'
31
- }
32
- ```
33
-
34
- **Not implemented response (501) - outside Grab app:**
35
- ```typescript
36
- {
37
- status_code: 501,
38
- error: 'Not implemented: This method requires the Grab app environment'
39
- }
40
- ```
41
-
42
- **Internal server error response (500):**
43
- ```typescript
44
- {
45
- status_code: 500,
46
- error: 'Internal server error'
47
- }
48
- ```
@@ -1,11 +0,0 @@
1
- [@grabjs/superapp-sdk](../globals.md) / DownloadFileResult
2
-
3
- # Type Alias: DownloadFileResult
4
-
5
- > **DownloadFileResult** = `void`
6
-
7
- Result data structure for file download operations.
8
-
9
- ## Remarks
10
-
11
- This is a void result type as successful downloads return status code 204 with no content.
@@ -1,32 +0,0 @@
1
- [@grabjs/superapp-sdk](../globals.md) / ErrorResponse
2
-
3
- # Type Alias: ErrorResponse\<Code\>
4
-
5
- > **ErrorResponse**\<`Code`\> = \{ `error`: `string`; `status_code`: `Code`; \}
6
-
7
- Generic error response shape with a specific status code.
8
- Used as the base for all error response types (4xx and 5xx).
9
-
10
- ## Type Parameters
11
-
12
- ### Code
13
-
14
- `Code` *extends* `number`
15
-
16
- The HTTP status code (e.g., 400, 401, 500)
17
-
18
- ## Properties
19
-
20
- ### error
21
-
22
- > **error**: `string`
23
-
24
- Error message if the call failed
25
-
26
- ***
27
-
28
- ### status\_code
29
-
30
- > **status\_code**: `Code`
31
-
32
- HTTP-style status code indicating the outcome of the JSBridge method call
@@ -1,58 +0,0 @@
1
- [@grabjs/superapp-sdk](../globals.md) / FetchEmailResponse
2
-
3
- # Type Alias: FetchEmailResponse
4
-
5
- > **FetchEmailResponse** = [`BridgeResponse`](BridgeResponse.md)\<`200` \| `400` \| `426` \| `500` \| `501`, [`FetchEmailResult`](FetchEmailResult.md)\>
6
-
7
- Response when fetching the user's email.
8
-
9
- ## Remarks
10
-
11
- This response can have the following status codes:
12
- - `200`: Email fetched successfully. The `result` contains the email address.
13
- - `400`: Invalid request - the request was malformed.
14
- - `426`: Upgrade Required - feature requires Grab app version 5.399 or above.
15
- - `500`: Internal server error - an unexpected error occurred on the native side.
16
- - `501`: Not implemented - this method requires the Grab app environment.
17
-
18
- ## Examples
19
-
20
- **Success response (200):**
21
- ```typescript
22
- {
23
- status_code: 200,
24
- result: { email: 'user@example.com' }
25
- }
26
- ```
27
-
28
- **Bad request response (400):**
29
- ```typescript
30
- {
31
- status_code: 400,
32
- error: 'Invalid request'
33
- }
34
- ```
35
-
36
- **Upgrade Required response (426):**
37
- ```typescript
38
- {
39
- status_code: 426,
40
- error: 'Upgrade Required: This method requires Grab app version 5.399.0 or above on iOS'
41
- }
42
- ```
43
-
44
- **Not implemented response (501) - outside Grab app:**
45
- ```typescript
46
- {
47
- status_code: 501,
48
- error: 'Not implemented: This method requires the Grab app environment'
49
- }
50
- ```
51
-
52
- **Internal server error response (500):**
53
- ```typescript
54
- {
55
- status_code: 500,
56
- error: 'Internal server error'
57
- }
58
- ```
@@ -1,21 +0,0 @@
1
- [@grabjs/superapp-sdk](../globals.md) / FetchEmailResult
2
-
3
- # Type Alias: FetchEmailResult
4
-
5
- > **FetchEmailResult** = \{ `email`: `string`; \}
6
-
7
- Result object containing the user's email address.
8
-
9
- ## Example
10
-
11
- ```typescript
12
- { email: 'user@example.com' }
13
- ```
14
-
15
- ## Properties
16
-
17
- ### email
18
-
19
- > **email**: `string`
20
-
21
- The user's email address.
@@ -1,42 +0,0 @@
1
- [@grabjs/superapp-sdk](../globals.md) / GetAuthorizationArtifactsResponse
2
-
3
- # Type Alias: GetAuthorizationArtifactsResponse
4
-
5
- > **GetAuthorizationArtifactsResponse** = [`BridgeResponse`](BridgeResponse.md)\<`200` \| `204` \| `400`, [`GetAuthorizationArtifactsResult`](GetAuthorizationArtifactsResult.md)\>
6
-
7
- Response when retrieving stored authorization artifacts.
8
-
9
- ## Remarks
10
-
11
- This response can have the following status codes:
12
- - `200`: All artifacts present. The `result` contains the PKCE artifacts needed for token exchange.
13
- - `204`: No artifacts yet - authorization has not been initiated.
14
- - `400`: Inconsistent state - possible data corruption in storage.
15
-
16
- ## Examples
17
-
18
- **Success response (200) - all artifacts present:**
19
- ```typescript
20
- {
21
- status_code: 200,
22
- result: {
23
- state: 'csrf-state-xyz789',
24
- codeVerifier: 'code-verifier-123',
25
- nonce: 'nonce-abc',
26
- redirectUri: 'https://your-app.com/callback'
27
- }
28
- }
29
- ```
30
-
31
- **No content response (204) - no artifacts:**
32
- ```typescript
33
- { status_code: 204 }
34
- ```
35
-
36
- **Bad request response (400) - inconsistent state:**
37
- ```typescript
38
- {
39
- status_code: 400,
40
- error: 'Inconsistent authorization artifacts in storage'
41
- }
42
- ```
@@ -1,57 +0,0 @@
1
- [@grabjs/superapp-sdk](../globals.md) / GetAuthorizationArtifactsResult
2
-
3
- # Type Alias: GetAuthorizationArtifactsResult
4
-
5
- > **GetAuthorizationArtifactsResult** = \{ `codeVerifier`: `string`; `nonce`: `string`; `redirectUri`: `string`; `state`: `string`; \}
6
-
7
- Result object containing the stored PKCE authorization artifacts.
8
- These are used to complete the OAuth2 authorization code exchange.
9
-
10
- ## Examples
11
-
12
- **All artifacts present:**
13
- ```typescript
14
- {
15
- state: 'csrf-state-xyz789',
16
- codeVerifier: 'code-verifier-123',
17
- nonce: 'nonce-abc',
18
- redirectUri: 'https://your-app.com/callback'
19
- }
20
- ```
21
-
22
- **No artifacts (null):**
23
- ```typescript
24
- null
25
- ```
26
-
27
- ## Properties
28
-
29
- ### codeVerifier
30
-
31
- > **codeVerifier**: `string`
32
-
33
- The code verifier for PKCE.
34
-
35
- ***
36
-
37
- ### nonce
38
-
39
- > **nonce**: `string`
40
-
41
- The nonce used in the authorization request.
42
-
43
- ***
44
-
45
- ### redirectUri
46
-
47
- > **redirectUri**: `string`
48
-
49
- The redirect URI used in the authorization request.
50
-
51
- ***
52
-
53
- ### state
54
-
55
- > **state**: `string`
56
-
57
- The state parameter used in the authorization request.
@@ -1,21 +0,0 @@
1
- [@grabjs/superapp-sdk](../globals.md) / GetBooleanRequest
2
-
3
- # Type Alias: GetBooleanRequest
4
-
5
- > **GetBooleanRequest** = \{ `key`: `string`; \}
6
-
7
- Request parameters for getting a boolean value from storage.
8
-
9
- ## Example
10
-
11
- ```typescript
12
- { key: 'isDarkMode' }
13
- ```
14
-
15
- ## Properties
16
-
17
- ### key
18
-
19
- > **key**: `string`
20
-
21
- The key to retrieve the value for.
@@ -1,57 +0,0 @@
1
- [@grabjs/superapp-sdk](../globals.md) / GetBooleanResponse
2
-
3
- # Type Alias: GetBooleanResponse
4
-
5
- > **GetBooleanResponse** = [`BridgeResponse`](BridgeResponse.md)\<`200` \| `400` \| `500` \| `501`, [`GetBooleanResult`](GetBooleanResult.md)\>
6
-
7
- Response when getting a boolean value.
8
-
9
- ## Remarks
10
-
11
- This response can have the following status codes:
12
- - `200`: Value retrieved successfully. The `result` contains the boolean value or null if not found.
13
- - `400`: Missing required parameters - key not provided.
14
- - `500`: Internal server error - an unexpected error occurred on the native side.
15
- - `501`: Not implemented - this method requires the Grab app environment.
16
-
17
- ## Examples
18
-
19
- **Success response (200) - value exists:**
20
- ```typescript
21
- {
22
- status_code: 200,
23
- result: { value: true }
24
- }
25
- ```
26
-
27
- **Success response (200) - value not found:**
28
- ```typescript
29
- {
30
- status_code: 200,
31
- result: { value: null }
32
- }
33
- ```
34
-
35
- **Bad request response (400):**
36
- ```typescript
37
- {
38
- status_code: 400,
39
- error: 'Missing required parameters'
40
- }
41
- ```
42
-
43
- **Not implemented response (501) - outside Grab app:**
44
- ```typescript
45
- {
46
- status_code: 501,
47
- error: 'Not implemented: This method requires the Grab app environment'
48
- }
49
- ```
50
-
51
- **Internal server error response (500):**
52
- ```typescript
53
- {
54
- status_code: 500,
55
- error: 'Internal server error'
56
- }
57
- ```
@@ -1,27 +0,0 @@
1
- [@grabjs/superapp-sdk](../globals.md) / GetBooleanResult
2
-
3
- # Type Alias: GetBooleanResult
4
-
5
- > **GetBooleanResult** = \{ `value`: `boolean` \| `null`; \}
6
-
7
- Result object containing the boolean value.
8
-
9
- ## Examples
10
-
11
- **Value exists:**
12
- ```typescript
13
- { value: true }
14
- ```
15
-
16
- **Value not found:**
17
- ```typescript
18
- { value: null }
19
- ```
20
-
21
- ## Properties
22
-
23
- ### value
24
-
25
- > **value**: `boolean` \| `null`
26
-
27
- The stored boolean value, or null if not found.
@@ -1,49 +0,0 @@
1
- [@grabjs/superapp-sdk](../globals.md) / GetCoordinateResponse
2
-
3
- # Type Alias: GetCoordinateResponse
4
-
5
- > **GetCoordinateResponse** = [`BridgeResponse`](BridgeResponse.md)\<`200` \| `424` \| `500` \| `501`, [`GetCoordinateResult`](GetCoordinateResult.md)\>
6
-
7
- Response when getting the device coordinates.
8
-
9
- ## Remarks
10
-
11
- This response can have the following status codes:
12
- - `200`: Coordinates retrieved successfully. The `result` contains latitude and longitude.
13
- - `424`: GeoKit error - location services unavailable or permission denied.
14
- - `500`: Internal server error - an unexpected error occurred on the native side.
15
- - `501`: Not implemented - this method requires the Grab app environment.
16
-
17
- ## Examples
18
-
19
- **Success response (200) - Singapore coordinates:**
20
- ```typescript
21
- {
22
- status_code: 200,
23
- result: { lat: 1.3521, lng: 103.8198 }
24
- }
25
- ```
26
-
27
- **Failed dependency response (424) - GeoKit error:**
28
- ```typescript
29
- {
30
- status_code: 424,
31
- error: 'GeoKit error'
32
- }
33
- ```
34
-
35
- **Not implemented response (501) - outside Grab app:**
36
- ```typescript
37
- {
38
- status_code: 501,
39
- error: 'Not implemented: This method requires the Grab app environment'
40
- }
41
- ```
42
-
43
- **Internal server error response (500):**
44
- ```typescript
45
- {
46
- status_code: 500,
47
- error: 'Internal server error'
48
- }
49
- ```
@@ -1,29 +0,0 @@
1
- [@grabjs/superapp-sdk](../globals.md) / GetCoordinateResult
2
-
3
- # Type Alias: GetCoordinateResult
4
-
5
- > **GetCoordinateResult** = \{ `lat`: `number`; `lng`: `number`; \}
6
-
7
- Result object containing the geographic coordinates.
8
-
9
- ## Example
10
-
11
- ```typescript
12
- { lat: 1.3521, lng: 103.8198 }
13
- ```
14
-
15
- ## Properties
16
-
17
- ### lat
18
-
19
- > **lat**: `number`
20
-
21
- Latitude in degrees
22
-
23
- ***
24
-
25
- ### lng
26
-
27
- > **lng**: `number`
28
-
29
- Longitude in degrees