skapi-js 1.0.26 → 1.0.27-1.beta-0
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/LICENSE +1 -1
- package/README.md +55 -24
- package/dist/bundle-report-commonjs.html +39 -0
- package/dist/bundle-report.html +39 -0
- package/dist/skapi.cjs +3 -0
- package/dist/skapi.cjs.LICENSE.txt +233 -0
- package/dist/skapi.cjs.map +1 -0
- package/dist/skapi.js +1 -1
- package/dist/skapi.js.LICENSE.txt +221 -0
- package/dist/skapi.js.map +1 -1
- package/js/Main.d.ts +3 -1
- package/js/Main.js +4 -1
- package/js/Main.js.map +1 -0
- package/js/Types.d.ts +139 -96
- package/js/Types.js +1 -0
- package/js/Types.js.map +1 -0
- package/js/main/error.js +33 -25
- package/js/main/error.js.map +1 -0
- package/js/main/skapi.d.ts +247 -65
- package/js/main/skapi.js +388 -70
- package/js/main/skapi.js.map +1 -0
- package/js/methods/admin.d.ts +55 -0
- package/js/methods/admin.js +315 -0
- package/js/methods/admin.js.map +1 -0
- package/js/methods/database.d.ts +31 -26
- package/js/methods/database.js +461 -599
- package/js/methods/database.js.map +1 -0
- package/js/methods/notification.d.ts +21 -0
- package/js/methods/notification.js +69 -0
- package/js/methods/notification.js.map +1 -0
- package/js/methods/param_restrictions.d.ts +21 -0
- package/js/methods/param_restrictions.js +144 -0
- package/js/methods/param_restrictions.js.map +1 -0
- package/js/methods/realtime.d.ts +15 -12
- package/js/methods/realtime.js +264 -81
- package/js/methods/realtime.js.map +1 -0
- package/js/methods/request.d.ts +32 -22
- package/js/methods/request.js +90 -618
- package/js/methods/request.js.map +1 -0
- package/js/methods/subscription.d.ts +42 -18
- package/js/methods/subscription.js +170 -86
- package/js/methods/subscription.js.map +1 -0
- package/js/methods/user.d.ts +113 -22
- package/js/methods/user.js +484 -307
- package/js/methods/user.js.map +1 -0
- package/js/methods/vivian.d.ts +3 -0
- package/js/methods/vivian.js +35 -0
- package/js/methods/vivian.js.map +1 -0
- package/js/methods/webrtc.d.ts +26 -0
- package/js/methods/webrtc.js +602 -0
- package/js/methods/webrtc.js.map +1 -0
- package/js/node_modules/queuecumber/index.d.ts +23 -0
- package/js/polyfills/global.d.ts +0 -0
- package/js/polyfills/global.js +3 -0
- package/js/polyfills/global.js.map +1 -0
- package/js/src/Main.d.ts +5 -0
- package/js/src/Types.d.ts +259 -0
- package/js/src/main/error.d.ts +9 -0
- package/js/src/main/skapi.d.ts +451 -0
- package/js/src/methods/admin.d.ts +55 -0
- package/js/src/methods/database.d.ts +87 -0
- package/js/src/methods/notification.d.ts +21 -0
- package/js/src/methods/param_restrictions.d.ts +21 -0
- package/js/src/methods/realtime.d.ts +35 -0
- package/js/src/methods/request.d.ts +43 -0
- package/js/src/methods/subscription.d.ts +69 -0
- package/js/src/methods/user.d.ts +171 -0
- package/js/src/methods/vivian.d.ts +3 -0
- package/js/src/methods/webrtc.d.ts +26 -0
- package/js/src/polyfills/global.d.ts +0 -0
- package/js/src/utils/network.d.ts +23 -0
- package/js/src/utils/utils.d.ts +32 -0
- package/js/src/utils/validator.d.ts +24 -0
- package/js/utils/network.d.ts +23 -0
- package/js/utils/network.js +702 -0
- package/js/utils/network.js.map +1 -0
- package/js/utils/utils.d.ts +17 -6
- package/js/utils/utils.js +242 -112
- package/js/utils/utils.js.map +1 -0
- package/js/utils/validator.d.ts +6 -1
- package/js/utils/validator.js +108 -116
- package/js/utils/validator.js.map +1 -0
- package/package.json +26 -11
- package/dist/skapi.module.js +0 -3
- package/dist/skapi.module.js.LICENSE.txt +0 -21
- package/dist/skapi.module.js.map +0 -1
package/LICENSE
CHANGED
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
|
187
187
|
identification within third-party archives.
|
|
188
188
|
|
|
189
|
-
Copyright [
|
|
189
|
+
Copyright [xxxx] broadway Inc.
|
|
190
190
|
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
192
|
you may not use this file except in compliance with the License.
|
package/README.md
CHANGED
|
@@ -1,25 +1,35 @@
|
|
|
1
1
|
# Skapi
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
### Zero-Setup Backend API for HTML Frontend
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Skapi is a zero-setup backend API that runs entirely serverless.
|
|
6
|
+
Build full-featured web applications faster with Skapi - No complex installations, No server configurations, No database management required.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
### Compatible with both vanilla HTML and SPA projects
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
No fancy framework or complex deployment required. Just focused on the basics, Skapi is a single JavaScript library fully compatible with vanilla HTML, as well as any JS frameworks.
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
### All-in-One Package
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
Skapi provides all the backend features you need for your web application out of the box, without the need to set up or maintain any backend servers.
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
- Authentication
|
|
17
|
+
- Database
|
|
18
|
+
- File Storage
|
|
19
|
+
- Realtime websocket messaging
|
|
20
|
+
- WebRTC media streaming
|
|
21
|
+
- Notification
|
|
22
|
+
- CDN
|
|
23
|
+
- Automated Email Systems
|
|
24
|
+
- API Bridge for 3rd party APIs
|
|
25
|
+
- File Hosting
|
|
16
26
|
|
|
17
27
|
## Getting Started
|
|
18
28
|
|
|
19
29
|
### 1. Create a service
|
|
20
30
|
|
|
21
31
|
1. Signup for an account at [skapi.com](https://www.skapi.com/signup).
|
|
22
|
-
2. Log in and create a new service from
|
|
32
|
+
2. Log in and create a new service from the `My Services` page.
|
|
23
33
|
|
|
24
34
|
|
|
25
35
|
### 2. Initialize the Skapi library
|
|
@@ -27,25 +37,23 @@ Skapi's unique database design combines the best of SQL and noSQL worlds, provid
|
|
|
27
37
|
Skapi is compatible with both vanilla HTML and webpack-based projects (ex. Vue, React, Angular... etc).
|
|
28
38
|
You need to import the library using the `<script>` tag or install via npm.
|
|
29
39
|
|
|
30
|
-
|
|
40
|
+
### For HTML projects:
|
|
31
41
|
|
|
32
42
|
For vanilla HTML projects, import Skapi in the script tag, and initialize the library.
|
|
33
43
|
|
|
34
44
|
```html
|
|
35
|
-
<!-- index.html -->
|
|
36
45
|
<!DOCTYPE html>
|
|
37
46
|
<script src="https://cdn.jsdelivr.net/npm/skapi-js@latest/dist/skapi.js"></script>
|
|
38
|
-
|
|
39
|
-
<!-- Your content goes here -->
|
|
40
|
-
|
|
41
47
|
<script>
|
|
42
48
|
const skapi = new Skapi('service_id', 'owner_id');
|
|
43
49
|
</script>
|
|
44
50
|
```
|
|
45
51
|
|
|
46
|
-
**Be sure to replace `'service_id'` and `'owner_id'` with the actual values of your service
|
|
52
|
+
**Be sure to replace `'service_id'` and `'owner_id'` with the actual values of your service**
|
|
47
53
|
|
|
48
|
-
|
|
54
|
+
For more information, check out our [documentation](https://docs.skapi.com/introduction/getting-started.html).
|
|
55
|
+
|
|
56
|
+
### For SPA projects:
|
|
49
57
|
|
|
50
58
|
To use Skapi in a SPA projects (such as Vue, React, or Angular), you can install skapi-js via npm.
|
|
51
59
|
|
|
@@ -60,36 +68,59 @@ Then, import the library into your main JavaScript file.
|
|
|
60
68
|
import { Skapi } from 'skapi-js';
|
|
61
69
|
const skapi = new Skapi('service_id', 'owner_id');
|
|
62
70
|
|
|
71
|
+
// Export the skapi instance, so you can use it in other component files
|
|
63
72
|
export { skapi }
|
|
64
|
-
|
|
65
|
-
// Now you can import skapi from anywhere in your project.
|
|
66
73
|
```
|
|
67
74
|
|
|
68
75
|
### 3. Test your connection
|
|
69
76
|
|
|
70
77
|
After you initialized the Skapi library, you can test your connection by pinging your request with the `mock()` method.
|
|
71
78
|
|
|
72
|
-
Below is an example of how you can use the `mock()` method in
|
|
79
|
+
Below is an example of how you can use the `mock()` method in HTML forms.
|
|
73
80
|
|
|
74
81
|
```html
|
|
75
82
|
<!-- index.html -->
|
|
76
83
|
<!DOCTYPE html>
|
|
77
84
|
<script src="https://cdn.jsdelivr.net/npm/skapi-js@latest/dist/skapi.js"></script>
|
|
85
|
+
<script>
|
|
86
|
+
const skapi = new Skapi('service_id', 'owner_id');
|
|
87
|
+
</script>
|
|
78
88
|
|
|
79
89
|
<form onsubmit='skapi.mock(event).then(ping=>alert(ping.msg))'>
|
|
80
90
|
<input name='msg' placeholder='Test message'>
|
|
81
91
|
<input type='submit' value='Test Connection'>
|
|
82
92
|
</form>
|
|
83
|
-
|
|
84
|
-
<script>
|
|
85
|
-
const skapi = new Skapi('service_id', 'owner_id');
|
|
86
|
-
</script>
|
|
87
93
|
```
|
|
88
94
|
|
|
89
95
|
This will send a request to your Skapi service and ping back the response.
|
|
90
96
|
When the request is resolved, the `mock()` method will return the response data as a `Promise` object.
|
|
91
97
|
The response data will be displayed in an alert box.
|
|
92
98
|
|
|
93
|
-
|
|
99
|
+
#### For more information, check out our [documentation](https://docs.skapi.com).
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
# Version History
|
|
103
|
+
|
|
104
|
+
**Current version: 1.0.265**
|
|
105
|
+
|
|
106
|
+
- Bug fix: Minor fix for admin purposes.
|
|
107
|
+
|
|
108
|
+
**1.0.264**
|
|
109
|
+
|
|
110
|
+
- Anonymous users can now use `skapi.postRecord()`. Only limited to public records.
|
|
111
|
+
- Bug fix: `skapi.getTags()` not resolving proper data.
|
|
112
|
+
|
|
113
|
+
**1.0.262**
|
|
114
|
+
|
|
115
|
+
- Corrected the casing of the resolved string returned by [`resendSignupConfirmation()`](/api-reference/authentication/README.md#resendsignupconfirmation) to: `"SUCCESS: Signup confirmation e-mail has been sent."`
|
|
116
|
+
|
|
117
|
+
- During class initialization, if the constructor arguments are set to `"service_id"` and `"owner_id"`, a browser alert displays: `Replace "service_id" and "owner_id" with your actual Service ID and Owner ID.`
|
|
118
|
+
|
|
119
|
+
**1.0.260:**
|
|
94
120
|
|
|
95
|
-
|
|
121
|
+
- Service admin user invitations are now supported. [Learn more](https://docs.skapi.com/admin/invite.html)
|
|
122
|
+
- Custom unique ID features have been added to the database. [Learn more](https://docs.skapi.com/database/unique-id.html)
|
|
123
|
+
- Database referencing now offers index restriction controls, enabling fine-grained data ownership management. [Learn more](https://docs.skapi.com/database/referencing.html#referencing-index-restrictions)
|
|
124
|
+
- The database subscription feature is now available. [Learn more](https://docs.skapi.com/database/subscription.html)
|
|
125
|
+
- [WebRTC](https://docs.skapi.com/realtime/webRTC.html) and [Web notification](https://docs.skapi.com/notification/send-notifications.html) are now available, making it easy to build video chat and notification features for your application.
|
|
126
|
+
- Fixed various minor bugs.
|