@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.
- package/README.md +14 -155
- package/api-reference/api.json +43962 -0
- package/dist/index.d.ts +2140 -2608
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +14 -9
- package/skills/SKILL.md +405 -0
- package/api-reference/json/api.json +0 -27688
- package/api-reference/markdown/README.md +0 -194
- package/api-reference/markdown/classes/BaseModule.md +0 -123
- package/api-reference/markdown/classes/CameraModule.md +0 -177
- package/api-reference/markdown/classes/CheckoutModule.md +0 -181
- package/api-reference/markdown/classes/ContainerModule.md +0 -751
- package/api-reference/markdown/classes/DeviceCapabilityModule.md +0 -161
- package/api-reference/markdown/classes/FileModule.md +0 -178
- package/api-reference/markdown/classes/IdentityModule.md +0 -299
- package/api-reference/markdown/classes/LocaleModule.md +0 -161
- package/api-reference/markdown/classes/LocationModule.md +0 -239
- package/api-reference/markdown/classes/MediaModule.md +0 -219
- package/api-reference/markdown/classes/PlatformModule.md +0 -162
- package/api-reference/markdown/classes/ProfileModule.md +0 -224
- package/api-reference/markdown/classes/ScopeModule.md +0 -219
- package/api-reference/markdown/classes/StorageModule.md +0 -608
- package/api-reference/markdown/classes/SystemWebViewKitModule.md +0 -177
- package/api-reference/markdown/classes/UserAttributesModule.md +0 -164
- package/api-reference/markdown/functions/isClientError.md +0 -37
- package/api-reference/markdown/functions/isErrorResponse.md +0 -40
- package/api-reference/markdown/functions/isRedirection.md +0 -37
- package/api-reference/markdown/functions/isServerError.md +0 -37
- package/api-reference/markdown/functions/isSuccess.md +0 -39
- package/api-reference/markdown/globals.md +0 -176
- package/api-reference/markdown/interfaces/GrabAppInfo.md +0 -23
- package/api-reference/markdown/interfaces/InvokeOptions.md +0 -63
- package/api-reference/markdown/interfaces/Version.md +0 -23
- package/api-reference/markdown/interfaces/WrappedModule.md +0 -51
- package/api-reference/markdown/type-aliases/AuthorizeRequest.md +0 -79
- package/api-reference/markdown/type-aliases/AuthorizeResponse.md +0 -58
- package/api-reference/markdown/type-aliases/AuthorizeResult.md +0 -33
- package/api-reference/markdown/type-aliases/BackResponse.md +0 -37
- package/api-reference/markdown/type-aliases/BackResult.md +0 -8
- package/api-reference/markdown/type-aliases/BridgeClientError.md +0 -9
- package/api-reference/markdown/type-aliases/BridgeError.md +0 -8
- package/api-reference/markdown/type-aliases/BridgeRedirection.md +0 -8
- package/api-reference/markdown/type-aliases/BridgeResponse.md +0 -40
- package/api-reference/markdown/type-aliases/BridgeServerError.md +0 -8
- package/api-reference/markdown/type-aliases/BridgeStatusCode.md +0 -7
- package/api-reference/markdown/type-aliases/BridgeStream.md +0 -29
- package/api-reference/markdown/type-aliases/BridgeStreamHandlers.md +0 -25
- package/api-reference/markdown/type-aliases/BridgeSuccessResponse.md +0 -14
- package/api-reference/markdown/type-aliases/ClearAuthorizationArtifactsResponse.md +0 -18
- package/api-reference/markdown/type-aliases/ClearAuthorizationArtifactsResult.md +0 -8
- package/api-reference/markdown/type-aliases/CloseResponse.md +0 -37
- package/api-reference/markdown/type-aliases/CloseResult.md +0 -8
- package/api-reference/markdown/type-aliases/DRMContentConfig.md +0 -34
- package/api-reference/markdown/type-aliases/DRMPlaybackEvent.md +0 -43
- package/api-reference/markdown/type-aliases/DownloadFileRequest.md +0 -32
- package/api-reference/markdown/type-aliases/DownloadFileResponse.md +0 -48
- package/api-reference/markdown/type-aliases/DownloadFileResult.md +0 -11
- package/api-reference/markdown/type-aliases/ErrorResponse.md +0 -32
- package/api-reference/markdown/type-aliases/FetchEmailResponse.md +0 -58
- package/api-reference/markdown/type-aliases/FetchEmailResult.md +0 -21
- package/api-reference/markdown/type-aliases/GetAuthorizationArtifactsResponse.md +0 -42
- package/api-reference/markdown/type-aliases/GetAuthorizationArtifactsResult.md +0 -57
- package/api-reference/markdown/type-aliases/GetBooleanRequest.md +0 -21
- package/api-reference/markdown/type-aliases/GetBooleanResponse.md +0 -57
- package/api-reference/markdown/type-aliases/GetBooleanResult.md +0 -27
- package/api-reference/markdown/type-aliases/GetCoordinateResponse.md +0 -49
- package/api-reference/markdown/type-aliases/GetCoordinateResult.md +0 -29
- package/api-reference/markdown/type-aliases/GetCountryCodeResponse.md +0 -57
- package/api-reference/markdown/type-aliases/GetCountryCodeResult.md +0 -25
- package/api-reference/markdown/type-aliases/GetDoubleRequest.md +0 -21
- package/api-reference/markdown/type-aliases/GetDoubleResponse.md +0 -57
- package/api-reference/markdown/type-aliases/GetDoubleResult.md +0 -27
- package/api-reference/markdown/type-aliases/GetIntRequest.md +0 -21
- package/api-reference/markdown/type-aliases/GetIntResponse.md +0 -57
- package/api-reference/markdown/type-aliases/GetIntResult.md +0 -27
- package/api-reference/markdown/type-aliases/GetLanguageLocaleIdentifierResponse.md +0 -48
- package/api-reference/markdown/type-aliases/GetLanguageLocaleIdentifierResult.md +0 -31
- package/api-reference/markdown/type-aliases/GetSelectedTravelDestinationResponse.md +0 -48
- package/api-reference/markdown/type-aliases/GetSelectedTravelDestinationResult.md +0 -17
- package/api-reference/markdown/type-aliases/GetSessionParamsResponse.md +0 -40
- package/api-reference/markdown/type-aliases/GetSessionParamsResult.md +0 -27
- package/api-reference/markdown/type-aliases/GetStringRequest.md +0 -21
- package/api-reference/markdown/type-aliases/GetStringResponse.md +0 -57
- package/api-reference/markdown/type-aliases/GetStringResult.md +0 -27
- package/api-reference/markdown/type-aliases/HasAccessToResponse.md +0 -66
- package/api-reference/markdown/type-aliases/HasAccessToResult.md +0 -27
- package/api-reference/markdown/type-aliases/HideBackButtonResponse.md +0 -37
- package/api-reference/markdown/type-aliases/HideBackButtonResult.md +0 -8
- package/api-reference/markdown/type-aliases/HideLoaderResponse.md +0 -37
- package/api-reference/markdown/type-aliases/HideLoaderResult.md +0 -8
- package/api-reference/markdown/type-aliases/HideRefreshButtonResponse.md +0 -37
- package/api-reference/markdown/type-aliases/HideRefreshButtonResult.md +0 -8
- package/api-reference/markdown/type-aliases/IsConnectedResponse.md +0 -31
- package/api-reference/markdown/type-aliases/IsConnectedResult.md +0 -27
- package/api-reference/markdown/type-aliases/IsEsimSupportedResponse.md +0 -48
- package/api-reference/markdown/type-aliases/IsEsimSupportedResult.md +0 -17
- package/api-reference/markdown/type-aliases/ObserveDRMPlaybackResponse.md +0 -15
- package/api-reference/markdown/type-aliases/ObserveLocationChangeResponse.md +0 -15
- package/api-reference/markdown/type-aliases/OnContentLoadedResponse.md +0 -37
- package/api-reference/markdown/type-aliases/OnContentLoadedResult.md +0 -8
- package/api-reference/markdown/type-aliases/OnCtaTapRequest.md +0 -13
- package/api-reference/markdown/type-aliases/OnCtaTapResponse.md +0 -37
- package/api-reference/markdown/type-aliases/OnCtaTapResult.md +0 -8
- package/api-reference/markdown/type-aliases/OpenExternalLinkRequest.md +0 -13
- package/api-reference/markdown/type-aliases/OpenExternalLinkResponse.md +0 -46
- package/api-reference/markdown/type-aliases/OpenExternalLinkResult.md +0 -8
- package/api-reference/markdown/type-aliases/Platform.md +0 -7
- package/api-reference/markdown/type-aliases/PlayDRMContentResponse.md +0 -43
- package/api-reference/markdown/type-aliases/PlayDRMContentResult.md +0 -8
- package/api-reference/markdown/type-aliases/RedirectToSystemWebViewRequest.md +0 -23
- package/api-reference/markdown/type-aliases/RedirectToSystemWebViewResponse.md +0 -55
- package/api-reference/markdown/type-aliases/RedirectToSystemWebViewResult.md +0 -8
- package/api-reference/markdown/type-aliases/ReloadScopesResponse.md +0 -46
- package/api-reference/markdown/type-aliases/ReloadScopesResult.md +0 -8
- package/api-reference/markdown/type-aliases/RemoveAllResponse.md +0 -37
- package/api-reference/markdown/type-aliases/RemoveAllResult.md +0 -8
- package/api-reference/markdown/type-aliases/RemoveResponse.md +0 -46
- package/api-reference/markdown/type-aliases/RemoveResult.md +0 -8
- package/api-reference/markdown/type-aliases/ResponseStatusCode200.md +0 -34
- package/api-reference/markdown/type-aliases/ResponseStatusCode204.md +0 -20
- package/api-reference/markdown/type-aliases/ResponseStatusCode302.md +0 -20
- package/api-reference/markdown/type-aliases/ResponseStatusCode400.md +0 -7
- package/api-reference/markdown/type-aliases/ResponseStatusCode401.md +0 -7
- package/api-reference/markdown/type-aliases/ResponseStatusCode403.md +0 -7
- package/api-reference/markdown/type-aliases/ResponseStatusCode404.md +0 -7
- package/api-reference/markdown/type-aliases/ResponseStatusCode424.md +0 -7
- package/api-reference/markdown/type-aliases/ResponseStatusCode426.md +0 -12
- package/api-reference/markdown/type-aliases/ResponseStatusCode500.md +0 -7
- package/api-reference/markdown/type-aliases/ResponseStatusCode501.md +0 -12
- package/api-reference/markdown/type-aliases/ScanQRCodeRequest.md +0 -27
- package/api-reference/markdown/type-aliases/ScanQRCodeResponse.md +0 -64
- package/api-reference/markdown/type-aliases/ScanQRCodeResult.md +0 -21
- package/api-reference/markdown/type-aliases/SendAnalyticsEventRequest.md +0 -56
- package/api-reference/markdown/type-aliases/SendAnalyticsEventResponse.md +0 -46
- package/api-reference/markdown/type-aliases/SendAnalyticsEventResult.md +0 -8
- package/api-reference/markdown/type-aliases/SetBackgroundColorRequest.md +0 -13
- package/api-reference/markdown/type-aliases/SetBackgroundColorResponse.md +0 -46
- package/api-reference/markdown/type-aliases/SetBackgroundColorResult.md +0 -8
- package/api-reference/markdown/type-aliases/SetBooleanResponse.md +0 -46
- package/api-reference/markdown/type-aliases/SetBooleanResult.md +0 -8
- package/api-reference/markdown/type-aliases/SetDoubleResponse.md +0 -46
- package/api-reference/markdown/type-aliases/SetDoubleResult.md +0 -8
- package/api-reference/markdown/type-aliases/SetIntResponse.md +0 -46
- package/api-reference/markdown/type-aliases/SetIntResult.md +0 -8
- package/api-reference/markdown/type-aliases/SetStringResponse.md +0 -46
- package/api-reference/markdown/type-aliases/SetStringResult.md +0 -8
- package/api-reference/markdown/type-aliases/SetTitleRequest.md +0 -13
- package/api-reference/markdown/type-aliases/SetTitleResponse.md +0 -46
- package/api-reference/markdown/type-aliases/SetTitleResult.md +0 -8
- package/api-reference/markdown/type-aliases/ShowBackButtonResponse.md +0 -37
- package/api-reference/markdown/type-aliases/ShowBackButtonResult.md +0 -8
- package/api-reference/markdown/type-aliases/ShowLoaderResponse.md +0 -37
- package/api-reference/markdown/type-aliases/ShowLoaderResult.md +0 -8
- package/api-reference/markdown/type-aliases/ShowRefreshButtonResponse.md +0 -37
- package/api-reference/markdown/type-aliases/ShowRefreshButtonResult.md +0 -8
- package/api-reference/markdown/type-aliases/StatusCodeMap.md +0 -80
- package/api-reference/markdown/type-aliases/Subscription.md +0 -12
- package/api-reference/markdown/type-aliases/TriggerCheckoutRequest.md +0 -26
- package/api-reference/markdown/type-aliases/TriggerCheckoutResponse.md +0 -76
- package/api-reference/markdown/type-aliases/TriggerCheckoutResult.md +0 -75
- package/api-reference/markdown/type-aliases/VerifyEmailRequest.md +0 -32
- package/api-reference/markdown/type-aliases/VerifyEmailResponse.md +0 -55
- package/api-reference/markdown/type-aliases/VerifyEmailResult.md +0 -8
- package/api-reference/markdown/variables/ContainerAnalyticsEventData.md +0 -21
- package/api-reference/markdown/variables/ContainerAnalyticsEventName.md +0 -13
- package/api-reference/markdown/variables/ContainerAnalyticsEventState.md +0 -25
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
[@grabjs/superapp-sdk](../globals.md) / SetDoubleResponse
|
|
2
|
-
|
|
3
|
-
# Type Alias: SetDoubleResponse
|
|
4
|
-
|
|
5
|
-
> **SetDoubleResponse** = [`BridgeResponse`](BridgeResponse.md)\<`204` \| `400` \| `500` \| `501`, [`SetDoubleResult`](SetDoubleResult.md)\>
|
|
6
|
-
|
|
7
|
-
Response when setting a double value.
|
|
8
|
-
|
|
9
|
-
## Remarks
|
|
10
|
-
|
|
11
|
-
This response can have the following status codes:
|
|
12
|
-
- `204`: Value stored successfully.
|
|
13
|
-
- `400`: Missing required parameters - key or value 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 (204):**
|
|
20
|
-
```typescript
|
|
21
|
-
{ status_code: 204 }
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
**Bad request response (400):**
|
|
25
|
-
```typescript
|
|
26
|
-
{
|
|
27
|
-
status_code: 400,
|
|
28
|
-
error: 'Missing required parameters'
|
|
29
|
-
}
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
**Not implemented response (501) - outside Grab app:**
|
|
33
|
-
```typescript
|
|
34
|
-
{
|
|
35
|
-
status_code: 501,
|
|
36
|
-
error: 'Not implemented: This method requires the Grab app environment'
|
|
37
|
-
}
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
**Internal server error response (500):**
|
|
41
|
-
```typescript
|
|
42
|
-
{
|
|
43
|
-
status_code: 500,
|
|
44
|
-
error: 'Internal server error'
|
|
45
|
-
}
|
|
46
|
-
```
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
[@grabjs/superapp-sdk](../globals.md) / SetIntResponse
|
|
2
|
-
|
|
3
|
-
# Type Alias: SetIntResponse
|
|
4
|
-
|
|
5
|
-
> **SetIntResponse** = [`BridgeResponse`](BridgeResponse.md)\<`204` \| `400` \| `500` \| `501`, [`SetIntResult`](SetIntResult.md)\>
|
|
6
|
-
|
|
7
|
-
Response when setting an integer value.
|
|
8
|
-
|
|
9
|
-
## Remarks
|
|
10
|
-
|
|
11
|
-
This response can have the following status codes:
|
|
12
|
-
- `204`: Value stored successfully.
|
|
13
|
-
- `400`: Missing required parameters - key or value 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 (204):**
|
|
20
|
-
```typescript
|
|
21
|
-
{ status_code: 204 }
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
**Bad request response (400):**
|
|
25
|
-
```typescript
|
|
26
|
-
{
|
|
27
|
-
status_code: 400,
|
|
28
|
-
error: 'Missing required parameters'
|
|
29
|
-
}
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
**Not implemented response (501) - outside Grab app:**
|
|
33
|
-
```typescript
|
|
34
|
-
{
|
|
35
|
-
status_code: 501,
|
|
36
|
-
error: 'Not implemented: This method requires the Grab app environment'
|
|
37
|
-
}
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
**Internal server error response (500):**
|
|
41
|
-
```typescript
|
|
42
|
-
{
|
|
43
|
-
status_code: 500,
|
|
44
|
-
error: 'Internal server error'
|
|
45
|
-
}
|
|
46
|
-
```
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
[@grabjs/superapp-sdk](../globals.md) / SetStringResponse
|
|
2
|
-
|
|
3
|
-
# Type Alias: SetStringResponse
|
|
4
|
-
|
|
5
|
-
> **SetStringResponse** = [`BridgeResponse`](BridgeResponse.md)\<`204` \| `400` \| `500` \| `501`, [`SetStringResult`](SetStringResult.md)\>
|
|
6
|
-
|
|
7
|
-
Response when setting a string value.
|
|
8
|
-
|
|
9
|
-
## Remarks
|
|
10
|
-
|
|
11
|
-
This response can have the following status codes:
|
|
12
|
-
- `204`: Value stored successfully.
|
|
13
|
-
- `400`: Missing required parameters - key or value 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 (204):**
|
|
20
|
-
```typescript
|
|
21
|
-
{ status_code: 204 }
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
**Bad request response (400):**
|
|
25
|
-
```typescript
|
|
26
|
-
{
|
|
27
|
-
status_code: 400,
|
|
28
|
-
error: 'Missing required parameters'
|
|
29
|
-
}
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
**Not implemented response (501) - outside Grab app:**
|
|
33
|
-
```typescript
|
|
34
|
-
{
|
|
35
|
-
status_code: 501,
|
|
36
|
-
error: 'Not implemented: This method requires the Grab app environment'
|
|
37
|
-
}
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
**Internal server error response (500):**
|
|
41
|
-
```typescript
|
|
42
|
-
{
|
|
43
|
-
status_code: 500,
|
|
44
|
-
error: 'Internal server error'
|
|
45
|
-
}
|
|
46
|
-
```
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
[@grabjs/superapp-sdk](../globals.md) / SetTitleResponse
|
|
2
|
-
|
|
3
|
-
# Type Alias: SetTitleResponse
|
|
4
|
-
|
|
5
|
-
> **SetTitleResponse** = [`BridgeResponse`](BridgeResponse.md)\<`200` \| `400` \| `500` \| `501`, [`SetTitleResult`](SetTitleResult.md)\>
|
|
6
|
-
|
|
7
|
-
Response when setting the title.
|
|
8
|
-
|
|
9
|
-
## Remarks
|
|
10
|
-
|
|
11
|
-
This response can have the following status codes:
|
|
12
|
-
- `200`: Title set successfully.
|
|
13
|
-
- `400`: Invalid title parameter.
|
|
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):**
|
|
20
|
-
```typescript
|
|
21
|
-
{ status_code: 200 }
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
**Bad request response (400):**
|
|
25
|
-
```typescript
|
|
26
|
-
{
|
|
27
|
-
status_code: 400,
|
|
28
|
-
error: 'Invalid title parameter'
|
|
29
|
-
}
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
**Not implemented response (501) - outside Grab app:**
|
|
33
|
-
```typescript
|
|
34
|
-
{
|
|
35
|
-
status_code: 501,
|
|
36
|
-
error: 'Not implemented: This method requires the Grab app environment'
|
|
37
|
-
}
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
**Internal server error response (500):**
|
|
41
|
-
```typescript
|
|
42
|
-
{
|
|
43
|
-
status_code: 500,
|
|
44
|
-
error: 'Internal server error'
|
|
45
|
-
}
|
|
46
|
-
```
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
[@grabjs/superapp-sdk](../globals.md) / ShowBackButtonResponse
|
|
2
|
-
|
|
3
|
-
# Type Alias: ShowBackButtonResponse
|
|
4
|
-
|
|
5
|
-
> **ShowBackButtonResponse** = [`BridgeResponse`](BridgeResponse.md)\<`200` \| `500` \| `501`, [`ShowBackButtonResult`](ShowBackButtonResult.md)\>
|
|
6
|
-
|
|
7
|
-
Response when showing the back button.
|
|
8
|
-
|
|
9
|
-
## Remarks
|
|
10
|
-
|
|
11
|
-
This response can have the following status codes:
|
|
12
|
-
- `200`: Back button shown 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,37 +0,0 @@
|
|
|
1
|
-
[@grabjs/superapp-sdk](../globals.md) / ShowLoaderResponse
|
|
2
|
-
|
|
3
|
-
# Type Alias: ShowLoaderResponse
|
|
4
|
-
|
|
5
|
-
> **ShowLoaderResponse** = [`BridgeResponse`](BridgeResponse.md)\<`200` \| `500` \| `501`, [`ShowLoaderResult`](ShowLoaderResult.md)\>
|
|
6
|
-
|
|
7
|
-
Response when showing the loader.
|
|
8
|
-
|
|
9
|
-
## Remarks
|
|
10
|
-
|
|
11
|
-
This response can have the following status codes:
|
|
12
|
-
- `200`: Loader shown 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,37 +0,0 @@
|
|
|
1
|
-
[@grabjs/superapp-sdk](../globals.md) / ShowRefreshButtonResponse
|
|
2
|
-
|
|
3
|
-
# Type Alias: ShowRefreshButtonResponse
|
|
4
|
-
|
|
5
|
-
> **ShowRefreshButtonResponse** = [`BridgeResponse`](BridgeResponse.md)\<`200` \| `500` \| `501`, [`ShowRefreshButtonResult`](ShowRefreshButtonResult.md)\>
|
|
6
|
-
|
|
7
|
-
Response when showing the refresh button.
|
|
8
|
-
|
|
9
|
-
## Remarks
|
|
10
|
-
|
|
11
|
-
This response can have the following status codes:
|
|
12
|
-
- `200`: Refresh button shown 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,80 +0,0 @@
|
|
|
1
|
-
[@grabjs/superapp-sdk](../globals.md) / StatusCodeMap
|
|
2
|
-
|
|
3
|
-
# Type Alias: StatusCodeMap\<T\>
|
|
4
|
-
|
|
5
|
-
> **StatusCodeMap**\<`T`\> = \{ `200`: [`ResponseStatusCode200`](ResponseStatusCode200.md)\<`T`\>; `204`: [`ResponseStatusCode204`](ResponseStatusCode204.md); `302`: [`ResponseStatusCode302`](ResponseStatusCode302.md); `400`: [`ResponseStatusCode400`](ResponseStatusCode400.md); `401`: [`ResponseStatusCode401`](ResponseStatusCode401.md); `403`: [`ResponseStatusCode403`](ResponseStatusCode403.md); `404`: [`ResponseStatusCode404`](ResponseStatusCode404.md); `424`: [`ResponseStatusCode424`](ResponseStatusCode424.md); `426`: [`ResponseStatusCode426`](ResponseStatusCode426.md); `500`: [`ResponseStatusCode500`](ResponseStatusCode500.md); `501`: [`ResponseStatusCode501`](ResponseStatusCode501.md); \}
|
|
6
|
-
|
|
7
|
-
Map of individual status codes to their JSBridge response types.
|
|
8
|
-
Used internally by BridgeResponse to select specific response types.
|
|
9
|
-
|
|
10
|
-
## Type Parameters
|
|
11
|
-
|
|
12
|
-
### T
|
|
13
|
-
|
|
14
|
-
`T`
|
|
15
|
-
|
|
16
|
-
## Properties
|
|
17
|
-
|
|
18
|
-
### 200
|
|
19
|
-
|
|
20
|
-
> **200**: [`ResponseStatusCode200`](ResponseStatusCode200.md)\<`T`\>
|
|
21
|
-
|
|
22
|
-
***
|
|
23
|
-
|
|
24
|
-
### 204
|
|
25
|
-
|
|
26
|
-
> **204**: [`ResponseStatusCode204`](ResponseStatusCode204.md)
|
|
27
|
-
|
|
28
|
-
***
|
|
29
|
-
|
|
30
|
-
### 302
|
|
31
|
-
|
|
32
|
-
> **302**: [`ResponseStatusCode302`](ResponseStatusCode302.md)
|
|
33
|
-
|
|
34
|
-
***
|
|
35
|
-
|
|
36
|
-
### 400
|
|
37
|
-
|
|
38
|
-
> **400**: [`ResponseStatusCode400`](ResponseStatusCode400.md)
|
|
39
|
-
|
|
40
|
-
***
|
|
41
|
-
|
|
42
|
-
### 401
|
|
43
|
-
|
|
44
|
-
> **401**: [`ResponseStatusCode401`](ResponseStatusCode401.md)
|
|
45
|
-
|
|
46
|
-
***
|
|
47
|
-
|
|
48
|
-
### 403
|
|
49
|
-
|
|
50
|
-
> **403**: [`ResponseStatusCode403`](ResponseStatusCode403.md)
|
|
51
|
-
|
|
52
|
-
***
|
|
53
|
-
|
|
54
|
-
### 404
|
|
55
|
-
|
|
56
|
-
> **404**: [`ResponseStatusCode404`](ResponseStatusCode404.md)
|
|
57
|
-
|
|
58
|
-
***
|
|
59
|
-
|
|
60
|
-
### 424
|
|
61
|
-
|
|
62
|
-
> **424**: [`ResponseStatusCode424`](ResponseStatusCode424.md)
|
|
63
|
-
|
|
64
|
-
***
|
|
65
|
-
|
|
66
|
-
### 426
|
|
67
|
-
|
|
68
|
-
> **426**: [`ResponseStatusCode426`](ResponseStatusCode426.md)
|
|
69
|
-
|
|
70
|
-
***
|
|
71
|
-
|
|
72
|
-
### 500
|
|
73
|
-
|
|
74
|
-
> **500**: [`ResponseStatusCode500`](ResponseStatusCode500.md)
|
|
75
|
-
|
|
76
|
-
***
|
|
77
|
-
|
|
78
|
-
### 501
|
|
79
|
-
|
|
80
|
-
> **501**: [`ResponseStatusCode501`](ResponseStatusCode501.md)
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
[@grabjs/superapp-sdk](../globals.md) / Subscription
|
|
2
|
-
|
|
3
|
-
# Type Alias: Subscription
|
|
4
|
-
|
|
5
|
-
> **Subscription** = `Readonly`\<\{ `isUnsubscribed`: () => `boolean`; `unsubscribe`: () => `unknown`; \}\>
|
|
6
|
-
|
|
7
|
-
Controls an active stream subscription. Call `unsubscribe()` to stop receiving data.
|
|
8
|
-
|
|
9
|
-
## Remarks
|
|
10
|
-
|
|
11
|
-
Returned by `subscribe()`. Use `unsubscribe()` to terminate the stream early.
|
|
12
|
-
Use `isUnsubscribed()` to check if already terminated.
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
[@grabjs/superapp-sdk](../globals.md) / TriggerCheckoutRequest
|
|
2
|
-
|
|
3
|
-
# Type Alias: TriggerCheckoutRequest
|
|
4
|
-
|
|
5
|
-
> **TriggerCheckoutRequest** = `Record`\<`string`, `unknown`\>
|
|
6
|
-
|
|
7
|
-
Request parameters for triggering the checkout flow.
|
|
8
|
-
|
|
9
|
-
## Remarks
|
|
10
|
-
|
|
11
|
-
This type is intentionally flexible as the checkout parameters vary depending on the specific payment flow and partner requirements.
|
|
12
|
-
Consult the Grab SuperApp SDK documentation for the specific parameters required for your use case.
|
|
13
|
-
|
|
14
|
-
## Example
|
|
15
|
-
|
|
16
|
-
**Typical checkout request:**
|
|
17
|
-
```typescript
|
|
18
|
-
{
|
|
19
|
-
partnerTxID: 'txn-123456',
|
|
20
|
-
partnerGroupTxID: 'group-txn-789',
|
|
21
|
-
amount: 10000,
|
|
22
|
-
currency: 'SGD',
|
|
23
|
-
description: 'Payment for services',
|
|
24
|
-
// ... additional checkout-specific parameters
|
|
25
|
-
}
|
|
26
|
-
```
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
[@grabjs/superapp-sdk](../globals.md) / TriggerCheckoutResponse
|
|
2
|
-
|
|
3
|
-
# Type Alias: TriggerCheckoutResponse
|
|
4
|
-
|
|
5
|
-
> **TriggerCheckoutResponse** = [`BridgeResponse`](BridgeResponse.md)\<`200` \| `400` \| `500` \| `501`, [`TriggerCheckoutResult`](TriggerCheckoutResult.md)\>
|
|
6
|
-
|
|
7
|
-
Response when triggering the checkout flow.
|
|
8
|
-
|
|
9
|
-
## Remarks
|
|
10
|
-
|
|
11
|
-
This response can have the following status codes:
|
|
12
|
-
- `200`: Checkout completed successfully. The `result` contains transaction details.
|
|
13
|
-
- `400`: Bad request - invalid checkout parameters.
|
|
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) - payment successful:**
|
|
20
|
-
```typescript
|
|
21
|
-
{
|
|
22
|
-
status_code: 200,
|
|
23
|
-
result: {
|
|
24
|
-
transactionID: 'grab-txn-abc123',
|
|
25
|
-
status: 'success'
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
**Success response (200) - payment failed:**
|
|
31
|
-
```typescript
|
|
32
|
-
{
|
|
33
|
-
status_code: 200,
|
|
34
|
-
result: {
|
|
35
|
-
transactionID: 'grab-txn-abc123',
|
|
36
|
-
status: 'failure',
|
|
37
|
-
errorMessage: 'Insufficient funds',
|
|
38
|
-
errorCode: 'PAYMENT_FAILED'
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
**Success response (200) - user cancelled:**
|
|
44
|
-
```typescript
|
|
45
|
-
{
|
|
46
|
-
status_code: 200,
|
|
47
|
-
result: {
|
|
48
|
-
transactionID: 'grab-txn-abc123',
|
|
49
|
-
status: 'userInitiatedCancel'
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
**Bad request response (400):**
|
|
55
|
-
```typescript
|
|
56
|
-
{
|
|
57
|
-
status_code: 400,
|
|
58
|
-
error: 'Invalid checkout parameters'
|
|
59
|
-
}
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
**Not implemented response (501) - outside Grab app:**
|
|
63
|
-
```typescript
|
|
64
|
-
{
|
|
65
|
-
status_code: 501,
|
|
66
|
-
error: 'Not implemented: This method requires the Grab app environment'
|
|
67
|
-
}
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
**Internal server error response (500):**
|
|
71
|
-
```typescript
|
|
72
|
-
{
|
|
73
|
-
status_code: 500,
|
|
74
|
-
error: 'Internal server error'
|
|
75
|
-
}
|
|
76
|
-
```
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
[@grabjs/superapp-sdk](../globals.md) / TriggerCheckoutResult
|
|
2
|
-
|
|
3
|
-
# Type Alias: TriggerCheckoutResult
|
|
4
|
-
|
|
5
|
-
> **TriggerCheckoutResult** = \{ `errorCode?`: `string`; `errorMessage?`: `string`; `status`: `"success"` \| `"failure"` \| `"pending"` \| `"userInitiatedCancel"`; `transactionID`: `string`; \}
|
|
6
|
-
|
|
7
|
-
Result object containing the checkout transaction details.
|
|
8
|
-
|
|
9
|
-
## Examples
|
|
10
|
-
|
|
11
|
-
**Successful transaction:**
|
|
12
|
-
```typescript
|
|
13
|
-
{
|
|
14
|
-
transactionID: 'grab-txn-abc123',
|
|
15
|
-
status: 'success'
|
|
16
|
-
}
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
**Failed transaction:**
|
|
20
|
-
```typescript
|
|
21
|
-
{
|
|
22
|
-
transactionID: 'grab-txn-abc123',
|
|
23
|
-
status: 'failure',
|
|
24
|
-
errorMessage: 'Insufficient funds',
|
|
25
|
-
errorCode: 'PAYMENT_FAILED'
|
|
26
|
-
}
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
**Pending transaction:**
|
|
30
|
-
```typescript
|
|
31
|
-
{
|
|
32
|
-
transactionID: 'grab-txn-abc123',
|
|
33
|
-
status: 'pending'
|
|
34
|
-
}
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
**User cancelled:**
|
|
38
|
-
```typescript
|
|
39
|
-
{
|
|
40
|
-
transactionID: 'grab-txn-abc123',
|
|
41
|
-
status: 'userInitiatedCancel'
|
|
42
|
-
}
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
## Properties
|
|
46
|
-
|
|
47
|
-
### errorCode?
|
|
48
|
-
|
|
49
|
-
> `optional` **errorCode**: `string`
|
|
50
|
-
|
|
51
|
-
Error code associated with the failed transaction.
|
|
52
|
-
|
|
53
|
-
***
|
|
54
|
-
|
|
55
|
-
### errorMessage?
|
|
56
|
-
|
|
57
|
-
> `optional` **errorMessage**: `string`
|
|
58
|
-
|
|
59
|
-
Error message if the transaction failed.
|
|
60
|
-
|
|
61
|
-
***
|
|
62
|
-
|
|
63
|
-
### status
|
|
64
|
-
|
|
65
|
-
> **status**: `"success"` \| `"failure"` \| `"pending"` \| `"userInitiatedCancel"`
|
|
66
|
-
|
|
67
|
-
Status of the transaction.
|
|
68
|
-
|
|
69
|
-
***
|
|
70
|
-
|
|
71
|
-
### transactionID
|
|
72
|
-
|
|
73
|
-
> **transactionID**: `string`
|
|
74
|
-
|
|
75
|
-
Unique identifier for the transaction at Grab side.
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
[@grabjs/superapp-sdk](../globals.md) / VerifyEmailRequest
|
|
2
|
-
|
|
3
|
-
# Type Alias: VerifyEmailRequest
|
|
4
|
-
|
|
5
|
-
> **VerifyEmailRequest** = \{ `email`: `string`; `otp`: `string`; \}
|
|
6
|
-
|
|
7
|
-
Request parameters for verifying the user's email with an OTP.
|
|
8
|
-
|
|
9
|
-
## Example
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
{
|
|
13
|
-
email: 'user@example.com',
|
|
14
|
-
otp: '123456'
|
|
15
|
-
}
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Properties
|
|
19
|
-
|
|
20
|
-
### email
|
|
21
|
-
|
|
22
|
-
> **email**: `string`
|
|
23
|
-
|
|
24
|
-
The email address to verify.
|
|
25
|
-
|
|
26
|
-
***
|
|
27
|
-
|
|
28
|
-
### otp
|
|
29
|
-
|
|
30
|
-
> **otp**: `string`
|
|
31
|
-
|
|
32
|
-
The one-time password (OTP) entered by the user.
|