<p align="center">
    <img alt="logo" src="https://www.edgeros.com/logo_edgeros.svg" height="80" style="margin-bottom: 20px;">
</p>
<p align="center" style="margin-bottom: 30px;">
  🔥 <a href="https://www.edgeros.com/edgeros/api/FRONT-END%20SDK/frontend.html">文档网站</a>
</p>

# SDK  Introduction
EdgerOS Web-SDK is a front-end development kit that provides various interactive interfaces for the front end of EdgerOS App, and the front end of EdgerOS App correctly uses Web-SDK.

EdgerOS Web-SDK supports both `JavaScript` and `TypeScript` development.

## npm install
you can use command: ```npm i @edgeros/web-sdk``` to install EdgerOS Web-SDK.

+ TypeScript

```typescript
import '@edgeros/web-sdk'
```

+ JavaScript

```html
<script src="\\PATH/sdk.min.js"></script>
```

## Test
After the `@edgeros/web-sdk` module is correctly import, the browser `window` object will contain the `edger` member:

```javascript
console.log(window.edger); // Web-SDK object show
```

## Style
Most Web-SDK functions return `Promise` objects, for example, the following function obtains the Web-SDK version:

```javascript
edger.version().then(data => {
	console.log('Version:', data.version);
}).catch(error => {
	console.error(error);
});
```

# Web-SDK functions
## Security
+ App front-end and back-end secure communication specifications See details: [Security](https://www.edgeros.com/edgeros/api/FRONT-END%20SDK/web-sdk/security.html)

## State & gestures
+ Front-end state and gestures. See details: [State](https://www.edgeros.com/edgeros/api/FRONT-END%20SDK/web-sdk/state.html)

## Account
+ Web-SDK provides information about users who are currently accessing EdgerOS device. See details: [Account](https://www.edgeros.com/edgeros/api/FRONT-END%20SDK/web-sdk/account.html)

## Notify
+ App calls this interface to pop up system notify information. See details: [Notify](https://www.edgeros.com/edgeros/api/FRONT-END%20SDK/web-sdk/notify.html)

## Permission
+ App front end can obtain and check related permissions by using these functions. See details: [Permission](https://www.edgeros.com/edgeros/api/FRONT-END%20SDK/web-sdk/permission.html)

## Share
+ Apps can share messages with each other by using these functions. See details: [Share](https://www.edgeros.com/edgeros/api/FRONT-END%20SDK/web-sdk/share.html)

## Network
+ These functions provide current EdgerOS device network working information. See details: [Network](https://www.edgeros.com/edgeros/api/FRONT-END%20SDK/web-sdk/network.html)

## Language
+ App can get EdgerOS current language information. See details: [Language](https://www.edgeros.com/edgeros/api/FRONT-END%20SDK/web-sdk/language.html)

## Theme
+ Get the current display theme of EdgerOS, the App can dynamically select its own display style according to the theme information. See details: [Theme](https://www.edgeros.com/edgeros/api/FRONT-END%20SDK/web-sdk/theme.html)

## Orientation
+ Obtain and control the current display orientation of EdgerOS. See details: [Orientation](https://www.edgeros.com/edgeros/api/FRONT-END%20SDK/web-sdk/orientation.html)

## Mobile
+ Operate current mobile functions, such as camera, etc. See details: [Mobile](https://www.edgeros.com/edgeros/api/FRONT-END%20SDK/web-sdk/mobile.html)

## AcoPay
+ EdgerOS online payment system **翼辉支付**. This payment system uses **WeChat Pay** or **Alipay** payment channels. App can use this payment system to complete on-site payments. See details: [AcoPay](https://www.edgeros.com/edgeros/api/FRONT-END%20SDK/web-sdk/acopay.html)

## SafeArea
+ EdgerOS App can get current safeArea information. [SafeArea](https://www.edgeros.com/edgeros/api/FRONT-END%20SDK/web-sdk/safe-area.html)

## Download
+ EdgerOS provides download function. See details: [Download](https://www.edgeros.com/edgeros/api/FRONT-END%20SDK/web-sdk/download.html)

## Filesystem
+ EdgerOS provides filesystem function. See details: [Filesystem](https://www.edgeros.com/edgeros/api/FRONT-END%20SDK/web-sdk/filesystem.html)
---
