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.
Files changed (86) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +55 -24
  3. package/dist/bundle-report-commonjs.html +39 -0
  4. package/dist/bundle-report.html +39 -0
  5. package/dist/skapi.cjs +3 -0
  6. package/dist/skapi.cjs.LICENSE.txt +233 -0
  7. package/dist/skapi.cjs.map +1 -0
  8. package/dist/skapi.js +1 -1
  9. package/dist/skapi.js.LICENSE.txt +221 -0
  10. package/dist/skapi.js.map +1 -1
  11. package/js/Main.d.ts +3 -1
  12. package/js/Main.js +4 -1
  13. package/js/Main.js.map +1 -0
  14. package/js/Types.d.ts +139 -96
  15. package/js/Types.js +1 -0
  16. package/js/Types.js.map +1 -0
  17. package/js/main/error.js +33 -25
  18. package/js/main/error.js.map +1 -0
  19. package/js/main/skapi.d.ts +247 -65
  20. package/js/main/skapi.js +388 -70
  21. package/js/main/skapi.js.map +1 -0
  22. package/js/methods/admin.d.ts +55 -0
  23. package/js/methods/admin.js +315 -0
  24. package/js/methods/admin.js.map +1 -0
  25. package/js/methods/database.d.ts +31 -26
  26. package/js/methods/database.js +461 -599
  27. package/js/methods/database.js.map +1 -0
  28. package/js/methods/notification.d.ts +21 -0
  29. package/js/methods/notification.js +69 -0
  30. package/js/methods/notification.js.map +1 -0
  31. package/js/methods/param_restrictions.d.ts +21 -0
  32. package/js/methods/param_restrictions.js +144 -0
  33. package/js/methods/param_restrictions.js.map +1 -0
  34. package/js/methods/realtime.d.ts +15 -12
  35. package/js/methods/realtime.js +264 -81
  36. package/js/methods/realtime.js.map +1 -0
  37. package/js/methods/request.d.ts +32 -22
  38. package/js/methods/request.js +90 -618
  39. package/js/methods/request.js.map +1 -0
  40. package/js/methods/subscription.d.ts +42 -18
  41. package/js/methods/subscription.js +170 -86
  42. package/js/methods/subscription.js.map +1 -0
  43. package/js/methods/user.d.ts +113 -22
  44. package/js/methods/user.js +484 -307
  45. package/js/methods/user.js.map +1 -0
  46. package/js/methods/vivian.d.ts +3 -0
  47. package/js/methods/vivian.js +35 -0
  48. package/js/methods/vivian.js.map +1 -0
  49. package/js/methods/webrtc.d.ts +26 -0
  50. package/js/methods/webrtc.js +602 -0
  51. package/js/methods/webrtc.js.map +1 -0
  52. package/js/node_modules/queuecumber/index.d.ts +23 -0
  53. package/js/polyfills/global.d.ts +0 -0
  54. package/js/polyfills/global.js +3 -0
  55. package/js/polyfills/global.js.map +1 -0
  56. package/js/src/Main.d.ts +5 -0
  57. package/js/src/Types.d.ts +259 -0
  58. package/js/src/main/error.d.ts +9 -0
  59. package/js/src/main/skapi.d.ts +451 -0
  60. package/js/src/methods/admin.d.ts +55 -0
  61. package/js/src/methods/database.d.ts +87 -0
  62. package/js/src/methods/notification.d.ts +21 -0
  63. package/js/src/methods/param_restrictions.d.ts +21 -0
  64. package/js/src/methods/realtime.d.ts +35 -0
  65. package/js/src/methods/request.d.ts +43 -0
  66. package/js/src/methods/subscription.d.ts +69 -0
  67. package/js/src/methods/user.d.ts +171 -0
  68. package/js/src/methods/vivian.d.ts +3 -0
  69. package/js/src/methods/webrtc.d.ts +26 -0
  70. package/js/src/polyfills/global.d.ts +0 -0
  71. package/js/src/utils/network.d.ts +23 -0
  72. package/js/src/utils/utils.d.ts +32 -0
  73. package/js/src/utils/validator.d.ts +24 -0
  74. package/js/utils/network.d.ts +23 -0
  75. package/js/utils/network.js +702 -0
  76. package/js/utils/network.js.map +1 -0
  77. package/js/utils/utils.d.ts +17 -6
  78. package/js/utils/utils.js +242 -112
  79. package/js/utils/utils.js.map +1 -0
  80. package/js/utils/validator.d.ts +6 -1
  81. package/js/utils/validator.js +108 -116
  82. package/js/utils/validator.js.map +1 -0
  83. package/package.json +26 -11
  84. package/dist/skapi.module.js +0 -3
  85. package/dist/skapi.module.js.LICENSE.txt +0 -21
  86. 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 [yyyy] [name of copyright owner]
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
- Skapi is a backend API service that is specially designed for frontend web developers.
3
+ ### Zero-Setup Backend API for HTML Frontend
4
4
 
5
- #### Compatible with both vanilla HTML and SPA projects
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
- 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 frontend frameworks.
8
+ ### Compatible with both vanilla HTML and SPA projects
8
9
 
9
- #### All-in-One Package
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
- Skapi provides all the backend features you need for your web application out of the box, without the need to set up or maintain multiple services.
12
+ ### All-in-One Package
12
13
 
13
- #### Simple, Yet Flexible Database
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
- Skapi's unique database design combines the best of SQL and noSQL worlds, providing both scalability and flexibility without the need for manual schema design.
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 your [dashboard page](https://www.skapi.com/admin).
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
- #### For HTML projects:
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
- #### For SPA projects:
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 both HTML forms and JavaScript code.
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
- Skapi is capable of handling HTML `onsubmit` event directly.
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
- #### For more information, check out our [documentation](https://docs.skapi.com).
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.