
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@grabjs/superapp-sdk
Advanced tools
Communication between web-app and native Grab app happens via web bridge. Each request and response object must have a structure defined in this document.
One point to note is that partner engineers need to call ScopeModule.reloadScopes
after redirection to partner website to load permissions from GrabID
:
const scopeModule = new ScopeModule();
await scopeModule.reloadScopes();
Afterwards, calls to module methods will reflect actual permissions.
Each request to native API should be done through JavaScript bridge provided by Grab. Please refer to specific Module API documentation for more details
Each resonse from the native bridge follows the same structure described bellow.
Key | Type | Description |
---|---|---|
status_code | Integer | Response status code (see list of codes below) |
result | Object or primitive type | Result object according to method specification (required for 200 status code) |
error | String | Error message (required for non-200 status codes) |
Code | Type | Description |
---|---|---|
200 | OK | Request successful, result value contains response data |
204 | No Content | Request successful, result value doesn't contain data |
400 | Bad Request | The request is malformed (e.g. missing parameters, missing method name) |
403 | Forbidden | The client doesn't have permission to access this method |
424 | Failed Dependency | Underlying request returned an error |
500 | Internal Error | Unexpected internal error (e.g. failed to serialize response object) |
{
"status_code": 200,
"result": {
"latitude": 1.234523,
"longitude": 1.4356345
}
}
{
"status_code": 403,
"error": "Client doesn't have access to method \"getLocation\" in module \"LocationModule\""
}
FAQs
SDK for Grab SuperApp WebView.
The npm package @grabjs/superapp-sdk receives a total of 301 weekly downloads. As such, @grabjs/superapp-sdk popularity was classified as not popular.
We found that @grabjs/superapp-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 42 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.