@@ -906,9 +906,16 @@ var Stack = function () {
906
906
/**
907
907
* @method fetch
908
908
* @memberOf Stack
909
- * @param {String } uid - uid of the entry
910
- * @description An initializer is responsible for creating Entry object
911
- * @returns {Entry }
909
+ * @description This method returns the complete information of a specific content type.
910
+ * @example
911
+ * let single_contenttype = Stack.ContentType(content_type_uid).fetch()
912
+ * single_contenttype
913
+ * .then(function(result) {
914
+ * // 'result' is a single contentType information.
915
+ * }).catch((error) => {
916
+ * console.log(error)
917
+ * });
918
+ * @returns {ContentType }
912
919
* @instance
913
920
*/
914
921
@@ -931,7 +938,23 @@ var Stack = function () {
931
938
* @method Assets
932
939
* @memberOf Stack
933
940
* @param {String } uid - uid of the asset
934
- * @description Retrieves the asset based on the specified UID
941
+ * @description Retrieves all assets of a stack by default. To retrieve a single asset, specify its UID.
942
+ * @example
943
+ * let data = Stack.Assets('bltsomething123').toJSON().fetch()
944
+ * data
945
+ * .then(function(result) {
946
+ * // ‘result’ is a single asset object of specified uid
947
+ * }, function(error) {
948
+ * // error function
949
+ * })
950
+ * @example
951
+ * let data = Stack.Assets().toJSON().find()
952
+ * data
953
+ * .then(function(result) {
954
+ * // ‘result’ will display all assets present in stack
955
+ * }, function(error) {
956
+ * // error function
957
+ * })
935
958
* @returns {Assets }
936
959
* @instance
937
960
*/
@@ -999,10 +1022,10 @@ var Stack = function () {
999
1022
/**
1000
1023
* @method getContentTypes
1001
1024
* @memberOf Stack
1002
- * @description getContentTypes get all the ContentTypes .
1025
+ * @description This method returns comprehensive information of all the content types of a particular stack in your account .
1003
1026
* @example Stack.getContentTypes()
1004
1027
* @example
1005
- * let data = Stack.getLastActivites ()
1028
+ * let data = Stack.getContentTypes ()
1006
1029
* data
1007
1030
* .then(function(result) {
1008
1031
* // 'result' is list of contentTypes.
@@ -1535,7 +1558,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
1535
1558
function _interopRequireWildcard ( obj ) { if ( obj && obj . __esModule ) { return obj ; } else { var newObj = { } ; if ( obj != null ) { for ( var key in obj ) { if ( Object . prototype . hasOwnProperty . call ( obj , key ) ) newObj [ key ] = obj [ key ] ; } } newObj . default = obj ; return newObj ; } }
1536
1559
1537
1560
//JS SDK version
1538
- var version = '3.5.2 ' ;
1561
+ var version = '3.7.0 ' ;
1539
1562
var environment = void 0 ,
1540
1563
api_key = void 0 ;
1541
1564
@@ -1979,6 +2002,31 @@ var Entry = function () {
1979
2002
return this ;
1980
2003
}
1981
2004
2005
+ /**
2006
+ * @method includeReferenceContentTypeUid
2007
+ * @memberOf Entry
2008
+ * @description This method also includes the content type UIDs of the referenced entries returned in the response.
2009
+ * @example Stack.ContentType("contentType_uid").Entry("entry_uid").includeReferenceContentTypeUID().fetch()
2010
+ * @example
2011
+ * Query = Stack.ContentType("contentType_uid").Entry("entry_uid").includeReferenceContentTypeUID().fetch()
2012
+ * Query
2013
+ * .toJSON()
2014
+ * .then(function (result) {
2015
+ * let value = result.get(field_uid)
2016
+ * },function (error) {
2017
+ * // error function
2018
+ * })
2019
+ * @returns {Entry }
2020
+ * @instance
2021
+ */
2022
+
2023
+ } , {
2024
+ key : "includeReferenceContentTypeUID" ,
2025
+ value : function includeReferenceContentTypeUID ( ) {
2026
+ this . _query [ 'include_reference_content_type_uid' ] = true ;
2027
+ return this ;
2028
+ }
2029
+
1982
2030
/**
1983
2031
* @method includeContentType
1984
2032
* @memberOf Entry
@@ -2646,6 +2694,30 @@ var Query = function (_Entry) {
2646
2694
}
2647
2695
}
2648
2696
2697
+ /**
2698
+ * @method includeReferenceContentTypeUid
2699
+ * @memberOf Query
2700
+ * @description This method also includes the content type UIDs of the referenced entries returned in the response.
2701
+ * @example Stack.ContentType("contentType_uid").Query().includeReferenceContentTypeUID().find()
2702
+ * @example
2703
+ * let blogQuery = Stack.ContentType("contentType_uid").Query();
2704
+ * let data = blogQuery.includeReferenceContentTypeUID().find()
2705
+ * data.then(function(result) {
2706
+ * // ‘result’ contains a list of entries in which content type UIDs is present.
2707
+ * },function (error) {
2708
+ * // error function
2709
+ * })
2710
+ * @returns {Query }
2711
+ * @instance
2712
+ */
2713
+
2714
+ } , {
2715
+ key : 'includeReferenceContentTypeUID' ,
2716
+ value : function includeReferenceContentTypeUID ( ) {
2717
+ this . _query [ 'include_reference_content_type_uid' ] = true ;
2718
+ return this ;
2719
+ }
2720
+
2649
2721
/**
2650
2722
* @method includeCount
2651
2723
* @memberOf Query
@@ -2832,6 +2904,7 @@ var Query = function (_Entry) {
2832
2904
query : this . _query
2833
2905
}
2834
2906
} ;
2907
+
2835
2908
return Utils . sendRequest ( this ) ;
2836
2909
}
2837
2910
} ] ) ;
@@ -7563,7 +7636,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
7563
7636
* @class
7564
7637
Assets
7565
7638
* @summary Creates an instance of `Assets`.
7566
- * @description Retrieves the asset based on the specified UID
7639
+ * @description Retrieves all assets of a stack by default. To retrieve a single asset, specify its UID.
7567
7640
* @param {String } uid - uid of asset you want to retrieve
7568
7641
* @example
7569
7642
* let data = Stack.Assets('bltsomething123').toJSON().fetch()
@@ -7573,6 +7646,14 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
7573
7646
* }, function(error) {
7574
7647
* // error function
7575
7648
* })
7649
+ * @example
7650
+ * let data = Stack.Assets().toJSON().find()
7651
+ * data
7652
+ * .then(function(result) {
7653
+ * // ‘result’ will display all assets present in stack
7654
+ * }, function(error) {
7655
+ * // error function
7656
+ * })
7576
7657
* @returns {Assets }
7577
7658
* @instance
7578
7659
*/
0 commit comments