@aerostack/sdk-react-native 0.1.2

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 (2) hide show
  1. package/README.md +51 -0
  2. package/package.json +31 -0
package/README.md ADDED
@@ -0,0 +1,51 @@
1
+ # @aerostack/sdk-react-native
2
+
3
+ The official React Native SDK for Aerostack. Compatible with Expo and bare React Native projects.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @aerostack/sdk-react-native
9
+ # or
10
+ yarn add @aerostack/sdk-react-native
11
+ ```
12
+
13
+ > **Note**: This SDK uses standard fetch and web-compatible APIs, so it requires no native linking in Expo managed workflows.
14
+
15
+ ## Usage
16
+
17
+ ### Initialization
18
+
19
+ ```typescript
20
+ import { Aerostack } from '@aerostack/sdk-react-native';
21
+
22
+ const client = new Aerostack({
23
+ projectUrl: 'https://your-project.aerostack.app',
24
+ apiKey: 'your-public-api-key',
25
+ });
26
+ ```
27
+
28
+ ### Authentication
29
+
30
+ ```typescript
31
+ try {
32
+ const session = await client.auth.signIn({
33
+ email: 'user@example.com',
34
+ password: 'password123'
35
+ });
36
+ console.log('Logged in:', session.user.id);
37
+ } catch (error) {
38
+ console.error('Login failed:', error);
39
+ }
40
+ ```
41
+
42
+ ### Database
43
+
44
+ ```typescript
45
+ // Fetch data
46
+ const users = await client.db.query('SELECT * FROM users LIMIT 5');
47
+ ```
48
+
49
+ ## Documentation
50
+
51
+ For full documentation, visit [docs.aerostack.ai](https://docs.aerostack.ai/sdk/react-native).
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@aerostack/sdk-react-native",
3
+ "version": "0.1.2",
4
+ "main": "lib/index.js",
5
+ "types": "lib/index.d.ts",
6
+ "scripts": {
7
+ "build": "tsc",
8
+ "test": "jest"
9
+ },
10
+ "dependencies": {
11
+ "axios": "^1.4.0"
12
+ },
13
+ "devDependencies": {
14
+ "@types/node": "^18.17.0",
15
+ "typescript": "^5.2.2",
16
+ "jest": "^29.6.2",
17
+ "ts-jest": "^29.1.1"
18
+ },
19
+ "files": [
20
+ "lib/**/*"
21
+ ],
22
+ "keywords": [
23
+ "aerostack",
24
+ "sdk",
25
+ "api-client",
26
+ "typescript",
27
+ "react-native"
28
+ ],
29
+ "author": "Aerostack Team",
30
+ "license": "MIT"
31
+ }