@cocreate/api 1.20.6 → 1.21.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ ## [1.21.1](https://github.com/CoCreate-app/CoCreate-api/compare/v1.21.0...v1.21.1) (2024-06-12)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * bump cocreate dependencies ([d28d4c4](https://github.com/CoCreate-app/CoCreate-api/commit/d28d4c476d2eb31e4a624240b367146c189a31f3))
7
+ * svg icon class ([c5e8b85](https://github.com/CoCreate-app/CoCreate-api/commit/c5e8b85010d475b59b37efdf4ed83c2dd9166f48))
8
+
9
+ # [1.21.0](https://github.com/CoCreate-app/CoCreate-api/compare/v1.20.6...v1.21.0) (2024-05-19)
10
+
11
+
12
+ ### Features
13
+
14
+ * attributes to handle endpoint and query ([f6aa450](https://github.com/CoCreate-app/CoCreate-api/commit/f6aa4502147e5ef9e6f6d24daf326de14829b710))
15
+
1
16
  ## [1.20.6](https://github.com/CoCreate-app/CoCreate-api/compare/v1.20.5...v1.20.6) (2024-04-29)
2
17
 
3
18
 
package/docs/form.html CHANGED
@@ -32,13 +32,13 @@
32
32
  <div class="display:flex align-items:center transition:0.3s padding-left:10px" share-network="true" share-text="An api helper component in vanilla javascript to setup thirdparty api intergrations. Apis can be accessible using HTML5 attributes and/or JavaScript API"
33
33
  share-title="CoCreate API form" share-height="600" share-width="700" share-media="https://cdn.cocreate.app/docs/api.png" hover="display:block!important" hover-selector=".social-networks">
34
34
  <div class="display:none social-networks">
35
- <a class="margin-right:15px" share-network="twitter" title="Share on twitter"><i class="height:20px fill:#505050" src="/assets/svg/twitter.svg"></i></a>
36
- <a class="margin-right:15px" share-network="facebook" title="Share on Facebook"><i class="height:20px fill:#505050" src="/assets/svg/facebook.svg"></i></a>
37
- <a class="margin-right:15px" share-network="instagram" title="Share on instagram"><i class="height:20px fill:#505050" src="/assets/svg/instagram.svg"></i></a>
35
+ <a class="margin-right:15px" share-network="twitter" title="Share on twitter"><i src="/assets/svg/twitter.svg"></i></a>
36
+ <a class="margin-right:15px" share-network="facebook" title="Share on Facebook"><i src="/assets/svg/facebook.svg"></i></a>
37
+ <a class="margin-right:15px" share-network="instagram" title="Share on instagram"><i src="/assets/svg/instagram.svg"></i></a>
38
38
  </div>
39
- <a class="margin-right:15px" share-network="share" title="Share on share"><i class="height:20px fill:#505050" src="/assets/svg/share-alt.svg"></i></a>
39
+ <a class="margin-right:15px" share-network="share" title="Share on share"><i src="/assets/svg/share-alt.svg"></i></a>
40
40
  </div>
41
- <a href="https://github.com/CoCreate-app/CoCreate-dnd" target="_blank" class=""><i class="height:20px fill:#505050" src="/assets/svg/github.svg"></i></a>
41
+ <a href="https://github.com/CoCreate-app/CoCreate-dnd" target="_blank" class=""><i src="/assets/svg/github.svg"></i></a>
42
42
  </div>
43
43
  </div>
44
44
  <h1 class="max-width:500px margin:20px_10px line-height:1.5 font-size:16px font-weight:100">CoCreate-api is a simple api helper component in vanilla javascript used by JavaScript developers to create thirdparty api intergrations. Thirdparty apis can be accessible using HTML5 attributes and/or JavaScript API. CoCreate-api includes the
@@ -50,7 +50,7 @@
50
50
  <div id="api-install" class="border-bottom:1px_solid_lightgrey" scroll scroll-intersect="color:dodgerblue" scroll-selector="#api-install-section">
51
51
  <span class="display:flex align-items:center width:fit-content" hover="display:block!important" hover-selector="[href='#api-install']">
52
52
  <h2 class="padding:5px_0px">Install</h2>
53
- <a class="margin-left:10px display:none" href="#api-install"><i class="height:20px fill:#505050" src="/assets/svg/link.svg"></i></a>
53
+ <a class="margin-left:10px display:none" href="#api-install"><i src="/assets/svg/link.svg"></i></a>
54
54
  </span>
55
55
  </div>
56
56
 
@@ -62,13 +62,13 @@
62
62
 
63
63
  <div>
64
64
  <h2 id="api-server-run" hover="display:block" hover-selector="" class="border-bottom:1px_solid_lightgrey padding:5px_0px">Server run</h2>
65
- <a class="display:none" href="#api-server-run"><i class="height:20px fill:#505050" src="/assets/svg/link.svg"></i></a>
65
+ <a class="display:none" href="#api-server-run"><i src="/assets/svg/link.svg"></i></a>
66
66
  </div>
67
67
  <pre><code class="language-javascript">npm run start</code></pre>
68
68
 
69
69
  <div>
70
70
  <h2 id="api-dependencies" hover="display:block" hover-selector="" class="border-bottom:1px_solid_lightgrey margin-top:80px padding:5px_0px">Dependencies components</h2>
71
- <a class="display:none" href="#api-dependencies"><i class="height:20px fill:#505050" src="/assets/svg/link.svg"></i></a>
71
+ <a class="display:none" href="#api-dependencies"><i src="/assets/svg/link.svg"></i></a>
72
72
  </div>
73
73
  <p class="padding:10px_0px line-height:1.5">
74
74
  <strong>CoCreate.js</strong>,
@@ -78,7 +78,7 @@
78
78
 
79
79
  <div>
80
80
  <h2 id="api-development" hover="display:block" hover-selector="" class="border-bottom:1px_solid_lightgrey margin-top:80px padding:5px_0px">Development Guide</h2>
81
- <a class="display:none" href="#api-development"><i class="height:20px fill:#505050" src="/assets/svg/link.svg"></i></a>
81
+ <a class="display:none" href="#api-development"><i src="/assets/svg/link.svg"></i></a>
82
82
  </div>
83
83
 
84
84
  <h3 class="margin-top:20px padding:5px_0px">1. Directory structure</h3>
@@ -171,7 +171,7 @@
171
171
  <div id="api-demo" class="border-bottom:1px_solid_lightgrey" scroll scroll-intersect="color:dodgerblue" scroll-selector="#api-demo-section">
172
172
  <span class="display:flex align-items:center width:fit-content" hover="display:block!important" hover-selector="[href='#api-demo']">
173
173
  <h2 class="padding:5px_0px">Demo</h2>
174
- <a class="margin-left:10px display:none" href="#api-demo"><i class="height:20px fill:#505050" src="/assets/svg/link.svg"></i></a>
174
+ <a class="margin-left:10px display:none" href="#api-demo"><i src="/assets/svg/link.svg"></i></a>
175
175
  </span>
176
176
  </div>
177
177
 
@@ -189,10 +189,10 @@
189
189
  </div>
190
190
 
191
191
  <div class="font-size:20px position:absolute top:10px right:10px opacity:0.6">
192
- <a class="margin-right:10px" id="eye" show="#eye-slash" hide="#eye, #demo-preview" toggle="code-height" toggle-selector="#demo-code"><i class="height:18px fill:#505050" src="/assets/svg/eye.svg"></i></a>
193
- <a class="margin-right:10px" hidden id="eye-slash" show="#eye, #demo-preview" hide="#eye-slash" toggle="code-height" toggle-selector="#demo-code"><i class="height:20px fill:#505050" src="/assets/svg/eye-slash.svg"></i></a>
194
- <a class="margin-right:10px" id="code" show="#code-slash" hide="#code, #demo-code"><i class="height:20px fill:#505050" src="/assets/svg/code.svg"></i></a>
195
- <a class="margin-right:10px" hidden id="code-slash" show="#code, #demo-code" hide="#code-slash"><i class="display:flex height:18px fill:#505050" src="/assets/svg/code.svg"></i></a>
192
+ <a class="margin-right:10px" id="eye" show="#eye-slash" hide="#eye, #demo-preview" toggle="code-height" toggle-selector="#demo-code"><i class="height:18px" src="/assets/svg/eye.svg"></i></a>
193
+ <a class="margin-right:10px" hidden id="eye-slash" show="#eye, #demo-preview" hide="#eye-slash" toggle="code-height" toggle-selector="#demo-code"><i src="/assets/svg/eye-slash.svg"></i></a>
194
+ <a class="margin-right:10px" id="code" show="#code-slash" hide="#code, #demo-code"><i src="/assets/svg/code.svg"></i></a>
195
+ <a class="margin-right:10px" hidden id="code-slash" show="#code, #demo-code" hide="#code-slash"><i class="height:18px" src="/assets/svg/code.svg"></i></a>
196
196
  <a class="margin-right:5px" fullscreen fullscreen-selector="#playground"></a>
197
197
  </div>
198
198
 
@@ -202,7 +202,7 @@
202
202
  </div>
203
203
  </div>
204
204
  <button href="https://github.com/CoCreate-app/CoCreate-api/tree/master/docs/index.html?message=docs%3A%20describe%20your%20change..." target="_blank" class="position:fixed bottom:15px right:15px padding:15px background:dodgerblue color:#fff font-size:1.5rem grow-hover border-radius:50% border-width:0 box-shadow:0px_2px_10px_0px_rgba(0,_0,_0,_0.4)">
205
- <i class="height:20px fill:#505050" src="/assets/svg/pencil-alt.svg"></i>
205
+ <i src="/assets/svg/pencil-alt.svg"></i>
206
206
  </button>
207
207
  </main>
208
208
 
package/docs/index.html CHANGED
@@ -33,13 +33,13 @@
33
33
  <div class="display:flex align-items:center transition:0.3s padding-left:10px" share-network="true" share-text="Enter decription here" share-title="testing im a title" share-height="600" share-width="700" share-media="https://cdn.cocreate.app/docs/api.png"
34
34
  hover="display:block!important" hover-selector=".social-networks">
35
35
  <div class="display:none social-networks">
36
- <a class="margin-right:15px" share-network="twitter" title="Share on twitter"><i class="height:20px fill:#505050" src="/assets/svg/twitter.svg"></i></a>
37
- <a class="margin-right:15px" share-network="facebook" title="Share on Facebook"><i class="height:20px fill:#505050" src="/assets/svg/facebook.svg"></i></a>
38
- <a class="margin-right:15px" share-network="instagram" title="Share on instagram"><i class="height:20px fill:#505050" src="/assets/svg/instagram.svg"></i></a>
36
+ <a class="margin-right:15px" share-network="twitter" title="Share on twitter"><i src="/assets/svg/twitter.svg"></i></a>
37
+ <a class="margin-right:15px" share-network="facebook" title="Share on Facebook"><i src="/assets/svg/facebook.svg"></i></a>
38
+ <a class="margin-right:15px" share-network="instagram" title="Share on instagram"><i src="/assets/svg/instagram.svg"></i></a>
39
39
  </div>
40
- <a class="margin-right:15px" share-network="share" title="Share on share"><i class="height:20px fill:#505050" src="/assets/svg/share-alt.svg"></i></a>
40
+ <a class="margin-right:15px" share-network="share" title="Share on share"><i src="/assets/svg/share-alt.svg"></i></a>
41
41
  </div>
42
- <a href="https://github.com/CoCreate-app/CoCreate-dnd" target="_blank" class=""><i class="height:20px fill:#505050" src="/assets/svg/github.svg"></i></a>
42
+ <a href="https://github.com/CoCreate-app/CoCreate-dnd" target="_blank" class=""><i src="/assets/svg/github.svg"></i></a>
43
43
  </div>
44
44
  </div>
45
45
  <h1 class="max-width:500px margin:20px_10px line-height:1.5 font-size:16px font-weight:100">CoCreate-api is a simple api helper component in vanilla javascript used by JavaScript developers to create thirdparty api intergrations. Thirdparty apis can be accessible using HTML5 attributes and/or JavaScript API. CoCreate-api includes the
@@ -50,7 +50,7 @@
50
50
  <div id="api-install" class="border-bottom:1px_solid_lightgrey" scroll scroll-intersect="color:dodgerblue" scroll-selector="#api-install-section">
51
51
  <span class="display:flex align-items:center width:fit-content" hover="display:block!important" hover-selector="[href='#api-install']">
52
52
  <h2 class="padding:5px_0px">Install</h2>
53
- <a class="margin-left:10px display:none" href="#api-install"><i class="height:20px fill:#505050" src="/assets/svg/link.svg"></i></a>
53
+ <a class="margin-left:10px display:none" href="#api-install"><i src="/assets/svg/link.svg"></i></a>
54
54
  </span>
55
55
  </div>
56
56
 
@@ -60,7 +60,7 @@
60
60
 
61
61
  <div>
62
62
  <h2 id="api-dependencies" hover="display:block" hover-selector="" class="border-bottom:1px_solid_lightgrey margin-top:80px padding:5px_0px">Dependencies components</h2>
63
- <a class="display:none" href="#api-dependencies"><i class="height:20px fill:#505050" src="/assets/svg/link.svg"></i></a>
63
+ <a class="display:none" href="#api-dependencies"><i src="/assets/svg/link.svg"></i></a>
64
64
  </div>
65
65
 
66
66
  <p class="padding:10px_0px line-height:1.5">
@@ -73,7 +73,7 @@
73
73
  <div id="api-usage" class="margin-top:80px border-bottom:1px_solid_lightgrey" scroll scroll-intersect="color:dodgerblue" scroll-selector="#api-usage-section">
74
74
  <span class="display:flex align-items:center width:fit-content" hover="display:block!important" hover-selector="[href='#api-usage']">
75
75
  <h2 class="padding:5px_0px">Usage</h2>
76
- <a class="margin-left:10px display:none" href="#api-usage"><i class="height:20px fill:#505050" src="/assets/svg/link.svg"></i></a>
76
+ <a class="margin-left:10px display:none" href="#api-usage"><i src="/assets/svg/link.svg"></i></a>
77
77
  </span>
78
78
  </div>
79
79
 
@@ -86,7 +86,7 @@
86
86
 
87
87
  <div>
88
88
  <h2 id="api-server-run" hover="display:block" hover-selector="" class="border-bottom:1px_solid_lightgrey padding:5px_0px">Server run</h2>
89
- <a class="display:none" href="#api-server-run"><i class="height:20px fill:#505050" src="/assets/svg/link.svg"></i></a>
89
+ <a class="display:none" href="#api-server-run"><i src="/assets/svg/link.svg"></i></a>
90
90
  </div>
91
91
 
92
92
  <p class="padding:10px_0px line-height:1.5">
@@ -103,7 +103,7 @@
103
103
 
104
104
  <div>
105
105
  <h2 id="api-functions" hover="display:block" hover-selector="" class="border-bottom:1px_solid_lightgrey padding:5px_0px">CoCreate-api functions</h2>
106
- <a class="display:none" href="#api-functions"><i class="height:20px fill:#505050" src="/assets/svg/link.svg"></i></a>
106
+ <a class="display:none" href="#api-functions"><i src="/assets/svg/link.svg"></i></a>
107
107
  </div>
108
108
 
109
109
  <ul class="list-style-type:none ">
@@ -192,7 +192,7 @@
192
192
  <div id="api-demo" class="border-bottom:1px_solid_lightgrey" scroll scroll-intersect="color:dodgerblue" scroll-selector="#api-demo-section">
193
193
  <span class="display:flex align-items:center width:fit-content" hover="display:block!important" hover-selector="[href='#api-demo']">
194
194
  <h2 class="padding:5px_0px">Demo</h2>
195
- <a class="margin-left:10px display:none" href="#api-demo"><i class="height:20px fill:#505050" src="/assets/svg/link.svg"></i></a>
195
+ <a class="margin-left:10px display:none" href="#api-demo"><i src="/assets/svg/link.svg"></i></a>
196
196
  </span>
197
197
  </div>
198
198
  <div class="position:sticky top:0 padding:15px_0px height:100vh">
@@ -209,10 +209,10 @@
209
209
  </div>
210
210
 
211
211
  <div class="font-size:20px position:absolute top:10px right:10px opacity:0.6">
212
- <a class="margin-right:10px" id="eye" show="#eye-slash" hide="#eye, #demo-preview" toggle="code-height" toggle-selector="#demo-code"><i class="height:18px fill:#505050" src="/assets/svg/eye.svg"></i></a>
213
- <a class="margin-right:10px" hidden id="eye-slash" show="#eye, #demo-preview" hide="#eye-slash" toggle="code-height" toggle-selector="#demo-code"><i class="height:20px fill:#505050" src="/assets/svg/eye-slash.svg"></i></a>
214
- <a class="margin-right:10px" id="code" show="#code-slash" hide="#code, #demo-code"><i class="height:20px fill:#505050" src="/assets/svg/code.svg"></i></a>
215
- <a class="margin-right:10px" hidden id="code-slash" show="#code, #demo-code" hide="#code-slash"><i class="display:flex height:18px fill:#505050" src="/assets/svg/code.svg"></i></a>
212
+ <a class="margin-right:10px" id="eye" show="#eye-slash" hide="#eye, #demo-preview" toggle="code-height" toggle-selector="#demo-code"><i class="height:18px" src="/assets/svg/eye.svg"></i></a>
213
+ <a class="margin-right:10px" hidden id="eye-slash" show="#eye, #demo-preview" hide="#eye-slash" toggle="code-height" toggle-selector="#demo-code"><i src="/assets/svg/eye-slash.svg"></i></a>
214
+ <a class="margin-right:10px" id="code" show="#code-slash" hide="#code, #demo-code"><i src="/assets/svg/code.svg"></i></a>
215
+ <a class="margin-right:10px" hidden id="code-slash" show="#code, #demo-code" hide="#code-slash"><i class="height:18px" src="/assets/svg/code.svg"></i></a>
216
216
  <a class="margin-right:5px" fullscreen fullscreen-selector="#playground"></a>
217
217
  </div>
218
218
 
@@ -223,7 +223,7 @@
223
223
  </div>
224
224
 
225
225
  <button href="https://github.com/CoCreate-app/CoCreate-api/tree/master/docs/index.html?message=docs%3A%20describe%20your%20change..." target="_blank" class="position:fixed bottom:15px right:15px padding:15px background:dodgerblue color:#fff font-size:1.5rem grow-hover border-radius:50% border-width:0 box-shadow:0px_2px_10px_0px_rgba(0,_0,_0,_0.4)">
226
- <i class="height:20px fill:#505050" src="/assets/svg/pencil-alt.svg"></i>
226
+ <i src="/assets/svg/pencil-alt.svg"></i>
227
227
  </button>
228
228
  </main>
229
229
  <script src="https://CoCreate.app/dist/CoCreate.js"></script>
package/docs/module.html CHANGED
@@ -30,7 +30,7 @@
30
30
  <div class="display:flex align-items:center">
31
31
  <h2>CoCreate-api modules</h2>
32
32
  </div>
33
- <a href="https://github.com/CoCreate-app/CoCreate-dnd" target="_blank" class=""><i class="height:20px fill:#505050" src="/assets/svg/github.svg"></i></a>
33
+ <a href="https://github.com/CoCreate-app/CoCreate-dnd" target="_blank" class=""><i src="/assets/svg/github.svg"></i></a>
34
34
  </div>
35
35
 
36
36
  <h1 class="max-width:500px margin:20px_10px line-height:1.5 font-size:16px font-weight:100">CoCreate-api is a simple api helper component in vanilla javascript used by JavaScript developers to create thirdparty api intergrations. Thirdparty apis can be accessible using HTML5 attributes and/or JavaScript API. CoCreate-api includes the
@@ -41,7 +41,7 @@
41
41
  <div id="api-install" class="border-bottom:1px_solid_lightgrey" scroll scroll-intersect="color:dodgerblue" scroll-selector="#api-install-section">
42
42
  <span class="display:flex align-items:center width:fit-content" hover="display:block!important" hover-selector="[href='#api-install']">
43
43
  <h2 class="padding:5px_0px">Install</h2>
44
- <a class="margin-left:10px display:none" href="#api-install"><i class="height:20px fill:#505050" src="/assets/svg/link.svg"></i></a>
44
+ <a class="margin-left:10px display:none" href="#api-install"><i src="/assets/svg/link.svg"></i></a>
45
45
  </span>
46
46
  </div>
47
47
 
@@ -53,7 +53,7 @@
53
53
 
54
54
  <div>
55
55
  <h2 id="api-dependencies" hover="display:block" hover-selector="" class="border-bottom:1px_solid_lightgrey margin-top:80px padding:5px_0px">Dependencies components</h2>
56
- <a class="display:none" href="#api-dependencies"><i class="height:20px fill:#505050" src="/assets/svg/link.svg"></i></a>
56
+ <a class="display:none" href="#api-dependencies"><i src="/assets/svg/link.svg"></i></a>
57
57
  </div>
58
58
  <p class="padding:10px_0px line-height:1.5">
59
59
  <strong>CoCreate.js</strong>,
@@ -63,7 +63,7 @@
63
63
 
64
64
  <div>
65
65
  <h2 id="api-development" hover="display:block" hover-selector="" class="border-bottom:1px_solid_lightgrey margin-top:80px padding:5px_0px">Development Guide</h2>
66
- <a class="display:none" href="#api-development"><i class="height:20px fill:#505050" src="/assets/svg/link.svg"></i></a>
66
+ <a class="display:none" href="#api-development"><i src="/assets/svg/link.svg"></i></a>
67
67
  </div>
68
68
 
69
69
  <h3 class="margin-top:20px padding:5px_0px">1. Rules</h3>
@@ -162,7 +162,7 @@
162
162
  <div id="api-demo" class="border-bottom:1px_solid_lightgrey" scroll scroll-intersect="color:dodgerblue" scroll-selector="#api-demo-section">
163
163
  <span class="display:flex align-items:center width:fit-content" hover="display:block!important" hover-selector="[href='#api-demo']">
164
164
  <h2 class="padding:5px_0px">Demo</h2>
165
- <a class="margin-left:10px display:none" href="#api-demo"><i class="height:20px fill:#505050" src="/assets/svg/link.svg"></i></a>
165
+ <a class="margin-left:10px display:none" href="#api-demo"><i src="/assets/svg/link.svg"></i></a>
166
166
  </span>
167
167
  </div>
168
168
 
@@ -181,10 +181,10 @@
181
181
  </div>
182
182
 
183
183
  <div class="font-size:20px position:absolute top:10px right:10px opacity:0.6">
184
- <a class="margin-right:10px" id="eye" show="#eye-slash" hide="#eye, #demo-preview" toggle="code-height" toggle-selector="#demo-code"><i class="height:18px fill:#505050" src="/assets/svg/eye.svg"></i></a>
185
- <a class="margin-right:10px" hidden id="eye-slash" show="#eye, #demo-preview" hide="#eye-slash" toggle="code-height" toggle-selector="#demo-code"><i class="height:20px fill:#505050" src="/assets/svg/eye-slash.svg"></i></a>
186
- <a class="margin-right:10px" id="code" show="#code-slash" hide="#code, #demo-code"><i class="height:20px fill:#505050" src="/assets/svg/code.svg"></i></a>
187
- <a class="margin-right:10px" hidden id="code-slash" show="#code, #demo-code" hide="#code-slash"><i class="display:flex height:18px fill:#505050" src="/assets/svg/code.svg"></i></a>
184
+ <a class="margin-right:10px" id="eye" show="#eye-slash" hide="#eye, #demo-preview" toggle="code-height" toggle-selector="#demo-code"><i class="height:18px" src="/assets/svg/eye.svg"></i></a>
185
+ <a class="margin-right:10px" hidden id="eye-slash" show="#eye, #demo-preview" hide="#eye-slash" toggle="code-height" toggle-selector="#demo-code"><i src="/assets/svg/eye-slash.svg"></i></a>
186
+ <a class="margin-right:10px" id="code" show="#code-slash" hide="#code, #demo-code"><i src="/assets/svg/code.svg"></i></a>
187
+ <a class="margin-right:10px" hidden id="code-slash" show="#code, #demo-code" hide="#code-slash"><i class="height:18px" src="/assets/svg/code.svg"></i></a>
188
188
  <a class="margin-right:5px" fullscreen fullscreen-selector="#playground"></a>
189
189
  </div>
190
190
 
@@ -194,7 +194,7 @@
194
194
  </div>
195
195
  </div>
196
196
  <button href="https://github.com/CoCreate-app/CoCreate-api/tree/master/docs/index.html?message=docs%3A%20describe%20your%20change..." target="_blank" class="position:fixed bottom:15px right:15px padding:15px background:dodgerblue color:#fff font-size:1.5rem grow-hover border-radius:50% border-width:0 box-shadow:0px_2px_10px_0px_rgba(0,_0,_0,_0.4)">
197
- <i class="height:20px fill:#505050" src="/assets/svg/pencil-alt.svg"></i>
197
+ <i src="/assets/svg/pencil-alt.svg"></i>
198
198
  </button>
199
199
  </main>
200
200
 
package/docs/server.html CHANGED
@@ -32,13 +32,13 @@
32
32
  <div class="display:flex align-items:center transition:0.3s padding-left:10px" share-network="true" share-text="An api helper component in vanilla javascript to setup thirdparty api intergrations. Apis can be accessible using HTML5 attributes and/or JavaScript API"
33
33
  share-title="CoCreate API server" share-height="600" share-width="700" share-media="https://cdn.cocreate.app/docs/api.png" hover="display:block!important" hover-selector=".social-networks">
34
34
  <div class="display:none social-networks">
35
- <a class="margin-right:15px" share-network="twitter" title="Share on twitter"><i class="height:20px fill:#505050" src="/assets/svg/twitter.svg"></i></a>
36
- <a class="margin-right:15px" share-network="facebook" title="Share on Facebook"><i class="height:20px fill:#505050" src="/assets/svg/facebook.svg"></i></a>
37
- <a class="margin-right:15px" share-network="instagram" title="Share on instagram"><i class="height:20px fill:#505050" src="/assets/svg/instagram.svg"></i></a>
35
+ <a class="margin-right:15px" share-network="twitter" title="Share on twitter"><i src="/assets/svg/twitter.svg"></i></a>
36
+ <a class="margin-right:15px" share-network="facebook" title="Share on Facebook"><i src="/assets/svg/facebook.svg"></i></a>
37
+ <a class="margin-right:15px" share-network="instagram" title="Share on instagram"><i src="/assets/svg/instagram.svg"></i></a>
38
38
  </div>
39
- <a class="margin-right:15px" share-network="share" title="Share on share"><i class="height:20px fill:#505050" src="/assets/svg/share-alt.svg"></i></a>
39
+ <a class="margin-right:15px" share-network="share" title="Share on share"><i src="/assets/svg/share-alt.svg"></i></a>
40
40
  </div>
41
- <a href="https://github.com/CoCreate-app/CoCreate-dnd" target="_blank" class=""><i class="height:20px fill:#505050" src="/assets/svg/github.svg"></i></a>
41
+ <a href="https://github.com/CoCreate-app/CoCreate-dnd" target="_blank" class=""><i src="/assets/svg/github.svg"></i></a>
42
42
  </div>
43
43
  </div>
44
44
  <h1 class="max-width:500px margin:20px_10px line-height:1.5 font-size:16px font-weight:100">CoCreate-api is a simple api helper component in vanilla javascript used by JavaScript developers to create thirdparty api intergrations. Thirdparty apis can be accessible using HTML5 attributes and/or JavaScript API. CoCreate-api includes the
@@ -48,7 +48,7 @@
48
48
  <div id="api-install" class="border-bottom:1px_solid_lightgrey" scroll scroll-intersect="color:dodgerblue" scroll-selector="#api-install-section">
49
49
  <span class="display:flex align-items:center width:fit-content" hover="display:block!important" hover-selector="[href='#api-install']">
50
50
  <h2 class="padding:5px_0px">Install</h2>
51
- <a class="margin-left:10px display:none" href="#api-install"><i class="height:20px fill:#505050" src="/assets/svg/link.svg"></i></a>
51
+ <a class="margin-left:10px display:none" href="#api-install"><i src="/assets/svg/link.svg"></i></a>
52
52
  </span>
53
53
  </div>
54
54
  <p class="padding:10px_0px line-height:1.5">
@@ -59,13 +59,13 @@
59
59
 
60
60
  <div>
61
61
  <h2 id="api-server-run" hover="display:block" hover-selector="" class="border-bottom:1px_solid_lightgrey padding:5px_0px">Server run</h2>
62
- <a class="display:none" href="#api-server-run"><i class="height:20px fill:#505050" src="/assets/svg/link.svg"></i></a>
62
+ <a class="display:none" href="#api-server-run"><i src="/assets/svg/link.svg"></i></a>
63
63
  </div>
64
64
  <pre><code class="language-javascript">npm run start</code></pre>
65
65
 
66
66
  <div>
67
67
  <h2 id="api-dependencies" hover="display:block" hover-selector="" class="border-bottom:1px_solid_lightgrey margin-top:80px padding:5px_0px">Dependencies components</h2>
68
- <a class="display:none" href="#api-dependencies"><i class="height:20px fill:#505050" src="/assets/svg/link.svg"></i></a>
68
+ <a class="display:none" href="#api-dependencies"><i src="/assets/svg/link.svg"></i></a>
69
69
  </div>
70
70
  <p class="padding:10px_0px line-height:1.5">
71
71
  <strong>CoCreate.js</strong>,
@@ -75,7 +75,7 @@
75
75
 
76
76
  <div>
77
77
  <h2 id="api-development" hover="display:block" hover-selector="" class="border-bottom:1px_solid_lightgrey margin-top:80px padding:5px_0px">Development Guide</h2>
78
- <a class="display:none" href="#api-development"><i class="height:20px fill:#505050" src="/assets/svg/link.svg"></i></a>
78
+ <a class="display:none" href="#api-development"><i src="/assets/svg/link.svg"></i></a>
79
79
  </div>
80
80
 
81
81
  <h3 class="margin-top:20px padding:5px_0px">1. Directory structure</h3>
@@ -172,7 +172,7 @@
172
172
  <div id="api-demo" class="border-bottom:1px_solid_lightgrey" scroll scroll-intersect="color:dodgerblue" scroll-selector="#api-demo-section">
173
173
  <span class="display:flex align-items:center width:fit-content" hover="display:block!important" hover-selector="[href='#api-demo']">
174
174
  <h2 class="padding:5px_0px">Demo</h2>
175
- <a class="margin-left:10px display:none" href="#api-demo"><i class="height:20px fill:#505050" src="/assets/svg/link.svg"></i></a>
175
+ <a class="margin-left:10px display:none" href="#api-demo"><i src="/assets/svg/link.svg"></i></a>
176
176
  </span>
177
177
  </div>
178
178
 
@@ -190,10 +190,10 @@
190
190
  </div>
191
191
 
192
192
  <div class="font-size:20px position:absolute top:10px right:10px opacity:0.6">
193
- <a class="margin-right:10px" id="eye" show="#eye-slash" hide="#eye, #demo-preview" toggle="code-height" toggle-selector="#demo-code"><i class="height:18px fill:#505050" src="/assets/svg/eye.svg"></i></a>
194
- <a class="margin-right:10px" hidden id="eye-slash" show="#eye, #demo-preview" hide="#eye-slash" toggle="code-height" toggle-selector="#demo-code"><i class="height:20px fill:#505050" src="/assets/svg/eye-slash.svg"></i></a>
195
- <a class="margin-right:10px" id="code" show="#code-slash" hide="#code, #demo-code"><i class="height:20px fill:#505050" src="/assets/svg/code.svg"></i></a>
196
- <a class="margin-right:10px" hidden id="code-slash" show="#code, #demo-code" hide="#code-slash"><i class="display:flex height:18px fill:#505050" src="/assets/svg/code.svg"></i></a>
193
+ <a class="margin-right:10px" id="eye" show="#eye-slash" hide="#eye, #demo-preview" toggle="code-height" toggle-selector="#demo-code"><i class="height:18px" src="/assets/svg/eye.svg"></i></a>
194
+ <a class="margin-right:10px" hidden id="eye-slash" show="#eye, #demo-preview" hide="#eye-slash" toggle="code-height" toggle-selector="#demo-code"><i src="/assets/svg/eye-slash.svg"></i></a>
195
+ <a class="margin-right:10px" id="code" show="#code-slash" hide="#code, #demo-code"><i src="/assets/svg/code.svg"></i></a>
196
+ <a class="margin-right:10px" hidden id="code-slash" show="#code, #demo-code" hide="#code-slash"><i class="height:18px" src="/assets/svg/code.svg"></i></a>
197
197
  <a class="margin-right:5px" fullscreen fullscreen-selector="#playground"></a>
198
198
  </div>
199
199
 
@@ -203,7 +203,7 @@
203
203
  </div>
204
204
  </div>
205
205
  <button href="https://github.com/CoCreate-app/CoCreate-api/tree/master/docs/index.html?message=docs%3A%20describe%20your%20change..." target="_blank" class="position:fixed bottom:15px right:15px padding:15px background:dodgerblue color:#fff font-size:1.5rem grow-hover border-radius:50% border-width:0 box-shadow:0px_2px_10px_0px_rgba(0,_0,_0,_0.4)">
206
- <i class="height:20px fill:#505050" src="/assets/svg/pencil-alt.svg"></i>
206
+ <i src="/assets/svg/pencil-alt.svg"></i>
207
207
  </button>
208
208
  </main>
209
209
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/api",
3
- "version": "1.20.6",
3
+ "version": "1.21.1",
4
4
  "description": "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. ",
5
5
  "keywords": [
6
6
  "thirdparty-api-intergration",
@@ -59,11 +59,11 @@
59
59
  "webpack-log": "^3.0.1"
60
60
  },
61
61
  "dependencies": {
62
- "@cocreate/actions": "^1.18.1",
63
- "@cocreate/crud-client": "^1.33.8",
64
- "@cocreate/element-prototype": "^1.22.2",
65
- "@cocreate/render": "^1.40.3",
66
- "@cocreate/socket-client": "^1.39.0",
67
- "@cocreate/utils": "^1.33.6"
62
+ "@cocreate/actions": "^1.18.2",
63
+ "@cocreate/crud-client": "^1.33.9",
64
+ "@cocreate/element-prototype": "^1.23.0",
65
+ "@cocreate/render": "^1.41.0",
66
+ "@cocreate/socket-client": "^1.39.1",
67
+ "@cocreate/utils": "^1.33.7"
68
68
  }
69
69
  }
package/src/index.js CHANGED
@@ -124,36 +124,6 @@ const CoCreateApi = {
124
124
  Socket.send({ method: name + '.' + method, [name]: data, broadcast: false, broadcastBrowser: false, status: 'await' });
125
125
  },
126
126
 
127
- /**
128
- * TODO: Implement Enhanced API Configuration Handling
129
- *
130
- * Description:
131
- * - Implement functionality to dynamically handle API configurations, supporting both complete and base URL endpoints with automatic method-based path appending.
132
- * - Enable dynamic generation of query parameters from a designated object (`stripe` in the examples) when `query` is true.
133
- *
134
- * Requirements:
135
- * 1. Dynamic Endpoint Handling:
136
- * - Check if the endpoint configuration is a complete URL or a base URL.
137
- * - If the `method` derived path is not already included in the endpoint, append it dynamically.
138
- * Example:
139
- * `{ "method": "stripe.accounts.retrieve", "endpoint": "https://api.stripe.com", "query": true, "stripe": { "acct": "acct_123", "name": "John Doe" } }`
140
- * `{ "method": "stripe.accounts.retrieve", "endpoint": "https://api.stripe.com/accounts/retrieve", "query": true, "stripe": { "acct": "acct_123", "name": "John Doe" } }`
141
- * - Develop logic to parse the `method` and check against the endpoint. If necessary, append the appropriate API method segment.
142
- *
143
- * 2. Query Parameter Handling:
144
- * - Dynamically construct and append query parameters from the `stripe` object if `query` is true. Ensure proper URL-encoding of keys and values.
145
- *
146
- * 3. Security:
147
- * - Use the `method` for permission checks, ensuring that each API request complies with security protocols.
148
- *
149
- * 4. Testing:
150
- * - Test both scenarios where the endpoint may or may not include the method path to ensure the dynamic construction works correctly.
151
- * - Ensure that all query parameters are correctly formatted and appended.
152
- *
153
- * Notes:
154
- * - Consider utility functions for parsing and modifying URLs, as well as for encoding parameters.
155
- * - Maintain clear and detailed documentation for each part of the implementation to assist future development and troubleshooting.
156
- */
157
127
  getData: async function ({ name, method, element, form }) {
158
128
  let data = {}
159
129
 
@@ -173,6 +143,15 @@ const CoCreateApi = {
173
143
  if (key) {
174
144
  data[key] = await elements[i].getValue()
175
145
  }
146
+
147
+ let endpoint = elements[i].getAttribute('endpoint')
148
+ if (endpoint) {
149
+ data.endpoint = endpoint
150
+ }
151
+
152
+ if (elements[i].getAttribute('query') && elements[i].getAttribute('query') !== 'false') {
153
+ data.query = true
154
+ }
176
155
  }
177
156
 
178
157
  let params = {}, hasParams = false
@@ -215,8 +194,12 @@ const CoCreateApi = {
215
194
  });
216
195
  } else {
217
196
  let key = elements[i].getAttribute(`${name}-key`)
218
- let value = getValueFromObject(data[name], key);
219
- elements[i].setValue(value);
197
+ if (key === '{}')
198
+ elements[i].setValue(data[name])
199
+ else {
200
+ let value = getValueFromObject(data[name], key);
201
+ elements[i].setValue(value);
202
+ }
220
203
  }
221
204
  }
222
205
  }