Skip to content

Commit 02d12b3

Browse files
authored
Merge pull request #55 from contentstack/bug/utils-lib
Update Utils Package
2 parents 71ce2ed + c982972 commit 02d12b3

18 files changed

Lines changed: 291 additions & 338 deletions

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
## Change log
12

2-
3+
### Version: 3.13.2
4+
#### Date: May-26-2021
5+
##### Dependency:
6+
- Update Utils SDK dependency version
7+
38
### Version: 3.13.1
49
#### Date: Apr-16-2021
510
##### Bug fix:

dist/nativescript/contentstack.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/node/contentstack.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/react-native/contentstack.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/web/contentstack.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/node/contentstack-demo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class ContentstackDemo {
2626
*/
2727
getEntries(contentTypeUid) {
2828
contentTypeUid = contentTypeUid || 'source'
29-
return this.Stack.ContentType('test').Query().includeContentType().toJSON().find()
29+
return this.Stack.ContentType(contentTypeUid).Query().includeContentType().toJSON().find()
3030
//return this.Stack.getContentTypes(contentTypeUid)
3131

3232
}

examples/node/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict'
22

33
const ContentstackDemo = require('./contentstack-demo.js')
4-
const Demo = new ContentstackDemo({ 'api_key': 'blt1b0a32d0c621f844', 'delivery_token': 'csaba2e2b6a51971b00ea373ea', 'environment': 'development', })
4+
const Demo = new ContentstackDemo({ 'api_key': 'blt123something', 'delivery_token': 'blt123something', 'environment': 'development', })
55

66

77
//get all the entries

js-sdk-reference/Stack.html

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ <h2>
6464

6565

6666

67-
<h4 class="name" id="Stack"><span class="type-signature"></span>new Stack<span class="signature">(api_key, delivery_token, environment, region, fetchOptions)</span><span class="type-signature"> &rarr; {<a href="Stack.html">Stack</a>}</span></h4>
67+
<h4 class="name" id="Stack"><span class="type-signature"></span>new Stack<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Stack.html">Stack</a>}</span></h4>
6868

6969

7070

@@ -105,7 +105,7 @@ <h5>Parameters:</h5>
105105

106106
<tr>
107107

108-
<td class="name"><code>api_key</code></td>
108+
<td class="name"><code>stack.api_key</code></td>
109109

110110

111111

@@ -119,7 +119,7 @@ <h5>Parameters:</h5>
119119

120120
<tr>
121121

122-
<td class="name"><code>delivery_token</code></td>
122+
<td class="name"><code>stack.delivery_token</code></td>
123123

124124

125125

@@ -133,7 +133,7 @@ <h5>Parameters:</h5>
133133

134134
<tr>
135135

136-
<td class="name"><code>environment</code></td>
136+
<td class="name"><code>stack.environment</code></td>
137137

138138

139139

@@ -147,7 +147,7 @@ <h5>Parameters:</h5>
147147

148148
<tr>
149149

150-
<td class="name"><code>region</code></td>
150+
<td class="name"><code>stack.region</code></td>
151151

152152

153153

@@ -161,7 +161,7 @@ <h5>Parameters:</h5>
161161

162162
<tr>
163163

164-
<td class="name"><code>fetchOptions</code></td>
164+
<td class="name"><code>stack.fetchOptions</code></td>
165165

166166

167167

@@ -333,7 +333,7 @@ <h6>Properties</h6>
333333

334334

335335

336-
<h5>Examples</h5>
336+
<h5>Example</h5>
337337

338338
<pre class="prettyprint"><code>var Stack = Contentstack.Stack({
339339
'api_key':'api_key',
@@ -345,14 +345,6 @@ <h5>Examples</h5>
345345
}
346346
});</code></pre>
347347

348-
<pre class="prettyprint"><code>var Stack = Contentstack.Stack('api_key', 'access_token', 'environment', {
349-
350-
});</code></pre>
351-
352-
<pre class="prettyprint"><code>// For Setting the European Region:
353-
// If you want to set and use European region, refer to the code below:
354-
const Stack = Contentstack.Stack("api_key", "delivery_token", "environment_name", Contentstack.Region.EU);</code></pre>
355-
356348

357349

358350

js-sdk-reference/modules_assets.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ <h1 class="page-title">modules/assets.js</h1>
167167
query: this._query
168168
}
169169
}
170-
var options = Object.assign({}, this.fetchOptions, fetchOptions);
170+
var options = Utils.mergeDeep({}, this.fetchOptions, fetchOptions);
171171
return Utils.sendRequest(this, options);
172172
} else {
173173
console.error("Kindly provide an asset uid. e.g. .Assets('bltsomething123')");

js-sdk-reference/modules_entry.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ <h1 class="page-title">modules/entry.js</h1>
390390
query: this._query
391391
}
392392
};
393-
var options = Object.assign({}, this.fetchOptions, fetchOptions);
393+
var options = Utils.mergeDeep({}, this.fetchOptions, fetchOptions);
394394
return Utils.sendRequest(this, options);
395395
} else {
396396
console.error("Kindly provide an entry uid. e.g. .Entry('bltsomething123')");

0 commit comments

Comments
 (0)