@cocreate/api 1.10.12 → 1.10.14
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/.github/FUNDING.yml +3 -3
- package/.github/workflows/automated.yml +95 -95
- package/.github/workflows/manual.yml +44 -44
- package/CHANGELOG.md +1436 -1422
- package/CONTRIBUTING.md +96 -96
- package/CoCreate.config.js +26 -26
- package/LICENSE +660 -660
- package/README.md +85 -85
- package/demo/client.js +38 -38
- package/demo/index.html +60 -52
- package/docs/form.html +216 -216
- package/docs/index.html +241 -241
- package/docs/module.html +206 -206
- package/docs/server.html +217 -217
- package/package.json +9 -9
- package/release.config.js +21 -21
- package/src/client.js +189 -189
- package/src/index.js +13 -13
- package/src/server.js +108 -108
- package/webpack.config.js +84 -84
package/README.md
CHANGED
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
# CoCreate-api
|
|
2
|
-
|
|
3
|
-
A simple api helper component in vanilla javascript used by JavaScript developers to create thirdparty api intergrations. CoCreate-api includes the client component and server side for api processing. Thirdparty apis can be accessible using HTML5 attributes and/or JavaScript API. Take it for a spin in our [playground!](https://cocreate.app/docs/api)
|
|
4
|
-
|
|
5
|
-

|
|
6
|
-

|
|
7
|
-

|
|
8
|
-

|
|
9
|
-

|
|
10
|
-

|
|
11
|
-
|
|
12
|
-

|
|
13
|
-
|
|
14
|
-
## [Docs & Demo](https://cocreate.app/docs/api)
|
|
15
|
-
|
|
16
|
-
For a complete guide and working demo refer to the [doumentation](https://cocreate.app/docs/api)
|
|
17
|
-
|
|
18
|
-
## CDN
|
|
19
|
-
|
|
20
|
-
```html
|
|
21
|
-
<script src="https://cdn.cocreate.app/api/latest/CoCreate-api.min.js"></script>
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
```html
|
|
25
|
-
<script src="https://cdn.cocreate.app/api/latest/CoCreate-api.min.css"></script>
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## NPM
|
|
29
|
-
|
|
30
|
-
```shell
|
|
31
|
-
$ npm i @cocreate/api
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## yarn
|
|
35
|
-
|
|
36
|
-
```shell
|
|
37
|
-
$ yarn install @cocreate/api
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
# Table of Contents
|
|
41
|
-
|
|
42
|
-
- [Table of Contents](#table-of-contents)
|
|
43
|
-
- [Announcements](#announcements)
|
|
44
|
-
- [Roadmap](#roadmap)
|
|
45
|
-
- [How to Contribute](#how-to-contribute)
|
|
46
|
-
- [About](#about)
|
|
47
|
-
- [License](#license)
|
|
48
|
-
|
|
49
|
-
<a name="announcements"></a>
|
|
50
|
-
|
|
51
|
-
# Announcements
|
|
52
|
-
|
|
53
|
-
All updates to this library are documented in our [CHANGELOG](https://github.com/CoCreate-app/CoCreate-api/blob/master/CHANGELOG.md) and [releases](https://github.com/CoCreate-app/CoCreate-api/releases). You may also subscribe to email for releases and breaking changes.
|
|
54
|
-
|
|
55
|
-
<a name="roadmap"></a>
|
|
56
|
-
|
|
57
|
-
# Roadmap
|
|
58
|
-
|
|
59
|
-
If you are interested in the future direction of this project, please take a look at our open [issues](https://github.com/CoCreate-app/CoCreate-api/issues) and [pull requests](https://github.com/CoCreate-app/CoCreate-api/pulls). We would love to hear your feedback.
|
|
60
|
-
|
|
61
|
-
<a name="about"></a>
|
|
62
|
-
|
|
63
|
-
# About
|
|
64
|
-
|
|
65
|
-
CoCreate-api is guided and supported by the CoCreate Developer Experience Team.
|
|
66
|
-
|
|
67
|
-
Please Email the Developer Experience Team [here](mailto:develop@cocreate.app) in case of any queries.
|
|
68
|
-
|
|
69
|
-
CoCreate-api is maintained and funded by CoCreate. The names and logos for CoCreate are trademarks of CoCreate, LLC.
|
|
70
|
-
|
|
71
|
-
<a name="contribute"></a>
|
|
72
|
-
|
|
73
|
-
# How to Contribute
|
|
74
|
-
|
|
75
|
-
We encourage contribution to our libraries (you might even score some nifty swag), please see our [CONTRIBUTING](https://github.com/CoCreate-app/CoCreate-api/blob/master/CONTRIBUTING.md) guide for details.
|
|
76
|
-
|
|
77
|
-
We want this library to be community-driven, and CoCreate led. We need your help to realize this goal. To help make sure we are building the right things in the right order, we ask that you create [issues](https://github.com/CoCreate-app/CoCreate-api/issues) and [pull requests](https://github.com/CoCreate-app/CoCreate-api/pulls) or merely upvote or comment on existing issues or pull requests.
|
|
78
|
-
|
|
79
|
-
We appreciate your continued support, thank you!
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
<a name="license"></a>
|
|
83
|
-
# License
|
|
84
|
-
|
|
85
|
-
[The MIT License (MIT)](https://github.com/CoCreate-app/CoCreate-api/blob/master/LICENSE)
|
|
1
|
+
# CoCreate-api
|
|
2
|
+
|
|
3
|
+
A simple api helper component in vanilla javascript used by JavaScript developers to create thirdparty api intergrations. CoCreate-api includes the client component and server side for api processing. Thirdparty apis can be accessible using HTML5 attributes and/or JavaScript API. Take it for a spin in our [playground!](https://cocreate.app/docs/api)
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+

|
|
7
|
+

|
|
8
|
+

|
|
9
|
+

|
|
10
|
+

|
|
11
|
+
|
|
12
|
+

|
|
13
|
+
|
|
14
|
+
## [Docs & Demo](https://cocreate.app/docs/api)
|
|
15
|
+
|
|
16
|
+
For a complete guide and working demo refer to the [doumentation](https://cocreate.app/docs/api)
|
|
17
|
+
|
|
18
|
+
## CDN
|
|
19
|
+
|
|
20
|
+
```html
|
|
21
|
+
<script src="https://cdn.cocreate.app/api/latest/CoCreate-api.min.js"></script>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
<script src="https://cdn.cocreate.app/api/latest/CoCreate-api.min.css"></script>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## NPM
|
|
29
|
+
|
|
30
|
+
```shell
|
|
31
|
+
$ npm i @cocreate/api
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## yarn
|
|
35
|
+
|
|
36
|
+
```shell
|
|
37
|
+
$ yarn install @cocreate/api
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
# Table of Contents
|
|
41
|
+
|
|
42
|
+
- [Table of Contents](#table-of-contents)
|
|
43
|
+
- [Announcements](#announcements)
|
|
44
|
+
- [Roadmap](#roadmap)
|
|
45
|
+
- [How to Contribute](#how-to-contribute)
|
|
46
|
+
- [About](#about)
|
|
47
|
+
- [License](#license)
|
|
48
|
+
|
|
49
|
+
<a name="announcements"></a>
|
|
50
|
+
|
|
51
|
+
# Announcements
|
|
52
|
+
|
|
53
|
+
All updates to this library are documented in our [CHANGELOG](https://github.com/CoCreate-app/CoCreate-api/blob/master/CHANGELOG.md) and [releases](https://github.com/CoCreate-app/CoCreate-api/releases). You may also subscribe to email for releases and breaking changes.
|
|
54
|
+
|
|
55
|
+
<a name="roadmap"></a>
|
|
56
|
+
|
|
57
|
+
# Roadmap
|
|
58
|
+
|
|
59
|
+
If you are interested in the future direction of this project, please take a look at our open [issues](https://github.com/CoCreate-app/CoCreate-api/issues) and [pull requests](https://github.com/CoCreate-app/CoCreate-api/pulls). We would love to hear your feedback.
|
|
60
|
+
|
|
61
|
+
<a name="about"></a>
|
|
62
|
+
|
|
63
|
+
# About
|
|
64
|
+
|
|
65
|
+
CoCreate-api is guided and supported by the CoCreate Developer Experience Team.
|
|
66
|
+
|
|
67
|
+
Please Email the Developer Experience Team [here](mailto:develop@cocreate.app) in case of any queries.
|
|
68
|
+
|
|
69
|
+
CoCreate-api is maintained and funded by CoCreate. The names and logos for CoCreate are trademarks of CoCreate, LLC.
|
|
70
|
+
|
|
71
|
+
<a name="contribute"></a>
|
|
72
|
+
|
|
73
|
+
# How to Contribute
|
|
74
|
+
|
|
75
|
+
We encourage contribution to our libraries (you might even score some nifty swag), please see our [CONTRIBUTING](https://github.com/CoCreate-app/CoCreate-api/blob/master/CONTRIBUTING.md) guide for details.
|
|
76
|
+
|
|
77
|
+
We want this library to be community-driven, and CoCreate led. We need your help to realize this goal. To help make sure we are building the right things in the right order, we ask that you create [issues](https://github.com/CoCreate-app/CoCreate-api/issues) and [pull requests](https://github.com/CoCreate-app/CoCreate-api/pulls) or merely upvote or comment on existing issues or pull requests.
|
|
78
|
+
|
|
79
|
+
We appreciate your continued support, thank you!
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
<a name="license"></a>
|
|
83
|
+
# License
|
|
84
|
+
|
|
85
|
+
[The MIT License (MIT)](https://github.com/CoCreate-app/CoCreate-api/blob/master/LICENSE)
|
package/demo/client.js
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import api from "@cocreate/api";
|
|
2
|
-
|
|
3
|
-
const CoCreateExample = {
|
|
4
|
-
name: "example",
|
|
5
|
-
endPoints: {
|
|
6
|
-
'tokens.create':{},
|
|
7
|
-
create: {
|
|
8
|
-
onload: function (name, endPoint, element) {
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
input: function (name, endPoint, element) {
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
action: function (name, endPoint, element){
|
|
15
|
-
|
|
16
|
-
},
|
|
17
|
-
observer: function (name, endPoint, element) {
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
request: function (name, endPoint, element) {
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
response: function (name, endPoint, element) {
|
|
24
|
-
|
|
25
|
-
},
|
|
26
|
-
read: true,
|
|
27
|
-
realtime: true,
|
|
28
|
-
save: true,
|
|
29
|
-
update: true,
|
|
30
|
-
listen: true
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
api.init(CoCreateExample);
|
|
37
|
-
|
|
38
|
-
export default CoCreateExample;
|
|
1
|
+
import api from "@cocreate/api";
|
|
2
|
+
|
|
3
|
+
const CoCreateExample = {
|
|
4
|
+
name: "example",
|
|
5
|
+
endPoints: {
|
|
6
|
+
'tokens.create':{},
|
|
7
|
+
create: {
|
|
8
|
+
onload: function (name, endPoint, element) {
|
|
9
|
+
|
|
10
|
+
},
|
|
11
|
+
input: function (name, endPoint, element) {
|
|
12
|
+
|
|
13
|
+
},
|
|
14
|
+
action: function (name, endPoint, element){
|
|
15
|
+
|
|
16
|
+
},
|
|
17
|
+
observer: function (name, endPoint, element) {
|
|
18
|
+
|
|
19
|
+
},
|
|
20
|
+
request: function (name, endPoint, element) {
|
|
21
|
+
|
|
22
|
+
},
|
|
23
|
+
response: function (name, endPoint, element) {
|
|
24
|
+
|
|
25
|
+
},
|
|
26
|
+
read: true,
|
|
27
|
+
realtime: true,
|
|
28
|
+
save: true,
|
|
29
|
+
update: true,
|
|
30
|
+
listen: true
|
|
31
|
+
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
api.init(CoCreateExample);
|
|
37
|
+
|
|
38
|
+
export default CoCreateExample;
|
package/demo/index.html
CHANGED
|
@@ -1,52 +1,60 @@
|
|
|
1
|
-
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<title>Api | CoCreateJS</title>
|
|
5
|
-
<!-- CoCreate Favicon -->
|
|
6
|
-
<link
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
</
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<title>Api | CoCreateJS</title>
|
|
5
|
+
<!-- CoCreate Favicon -->
|
|
6
|
+
<link
|
|
7
|
+
rel="icon"
|
|
8
|
+
href="https://cdn.cocreate.app/favicon.ico"
|
|
9
|
+
type="image/ico"
|
|
10
|
+
sizes="16x16" />
|
|
11
|
+
<link rel="manifest" href="/manifest.webmanifest" />
|
|
12
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<h1>Form Demo</h1>
|
|
15
|
+
|
|
16
|
+
<form>
|
|
17
|
+
<input xxx="xxxCreateRequest.name" />
|
|
18
|
+
|
|
19
|
+
<div xxx="xxxCreateRequest.address" xxx_array="address">
|
|
20
|
+
<input xxx="address.home.city" />
|
|
21
|
+
<input xxx="address.work" />
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<div xxx="xxxCreateRequest.address" xxx_array="address">
|
|
25
|
+
<input xxx="address.home.city" />
|
|
26
|
+
<input xxx="address.name" />
|
|
27
|
+
<input xxx="address.line1" />
|
|
28
|
+
|
|
29
|
+
<div xxx="address.billing" xxx_array="b">
|
|
30
|
+
<input xxx="b.address1" />
|
|
31
|
+
<input xxx="b.city" />
|
|
32
|
+
<input xxx="b.code.zip" />
|
|
33
|
+
<input xxx="b.code.postal" />
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
<input xxx="xxxCreateRequest.email" />
|
|
37
|
+
|
|
38
|
+
<div
|
|
39
|
+
template_id="xxxCreateCard"
|
|
40
|
+
render-array="data.card"
|
|
41
|
+
render-key="c"
|
|
42
|
+
xxx="xxxCreateCard.card"
|
|
43
|
+
xxx_array="card">
|
|
44
|
+
<input xxx="card.number" value="c.number" />
|
|
45
|
+
<input xxx="card.cvv" value="c.cvv" />
|
|
46
|
+
<input xxx="card.expiry" value="c.expiry" />
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<button actions="xxxCreateRequest, xxxCreateCard">
|
|
50
|
+
Create Form
|
|
51
|
+
</button>
|
|
52
|
+
</form>
|
|
53
|
+
|
|
54
|
+
<h1>Result</h1>
|
|
55
|
+
|
|
56
|
+
<!--CoCreateJS CDN-->
|
|
57
|
+
<!-- <script src="https://cdn.cocreate.app/api/latest/CoCreate-api.min.js"></script> -->
|
|
58
|
+
<script src="../dist/CoCreate-api.js"></script>
|
|
59
|
+
</body>
|
|
60
|
+
</html>
|