@azrico/webobject 1.1.23 → 1.1.24
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.
|
@@ -71,14 +71,14 @@ export declare class WebObject extends SimpleObject {
|
|
|
71
71
|
* get a single web object
|
|
72
72
|
* @param search
|
|
73
73
|
* @param readonly
|
|
74
|
-
* @param fetchID
|
|
74
|
+
* @param fetchID this can be used to prevent loading the same data twice
|
|
75
75
|
*/
|
|
76
|
-
static get_single(search: string | object, readonly?: boolean): Promise<WebObject | undefined>;
|
|
76
|
+
static get_single(search: string | object, readonly?: boolean, fetchID?: string): Promise<WebObject | undefined>;
|
|
77
77
|
/**
|
|
78
78
|
* Get a list of web objects
|
|
79
79
|
* @param search
|
|
80
80
|
* @param readonly
|
|
81
|
-
* @param fetchID
|
|
81
|
+
* @param fetchID this can be used to prevent loading the same data twice
|
|
82
82
|
*/
|
|
83
83
|
static get_list(search: any, readonly?: boolean, fetchID?: string): Promise<WebObject[]>;
|
|
84
84
|
}
|
|
@@ -26,15 +26,15 @@
|
|
|
26
26
|
* get a single web object
|
|
27
27
|
* @param search
|
|
28
28
|
* @param readonly
|
|
29
|
-
* @param fetchID
|
|
29
|
+
* @param fetchID this can be used to prevent loading the same data twice
|
|
30
30
|
*/}],[{key:"getMeta",value:function getMeta(a,b){if(null==a)return null;var c=[];return"object"===_typeof(a)&&(c="function"==typeof a.getValue?a.getValue("meta_data"):a.meta_data),(0,_object.getInArray)(c,"key",b)}/**
|
|
31
31
|
* Get meta value by key
|
|
32
32
|
* @param o
|
|
33
33
|
* @param key
|
|
34
34
|
* @returns value or undefined
|
|
35
|
-
*/},{key:"getMetaValue",value:function getMetaValue(a,c){var d;return null===(d=b.getMeta(a,c))||void 0===d?void 0:d.value}},{key:"isResultValid",value:function isResultValid(a){return!(0,_object.object_isEmpty)(a)&&!!(0,_object.object_isTrue)(a.acknowledged)}},{key:"get_single",value:function(){function a(a){return b.apply(this,arguments)}var b=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function b(a){var c,d=arguments;return _regeneratorRuntime().wrap(function b(a){for(;1;)switch(a.prev=a.next){case 0:throw c=!!(1<
|
|
35
|
+
*/},{key:"getMetaValue",value:function getMetaValue(a,c){var d;return null===(d=b.getMeta(a,c))||void 0===d?void 0:d.value}},{key:"isResultValid",value:function isResultValid(a){return!(0,_object.object_isEmpty)(a)&&!!(0,_object.object_isTrue)(a.acknowledged)}},{key:"get_single",value:function(){function a(a){return b.apply(this,arguments)}var b=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function b(a){var c,d,e=arguments;return _regeneratorRuntime().wrap(function b(a){for(;1;)switch(a.prev=a.next){case 0:throw c=!!(1<e.length&&void 0!==e[1])&&e[1],d=2<e.length&&void 0!==e[2]?e[2]:"",new Error("get_single not implented");case 3:case"end":return a.stop();}},b)}));return a}()/**
|
|
36
36
|
* Get a list of web objects
|
|
37
37
|
* @param search
|
|
38
38
|
* @param readonly
|
|
39
|
-
* @param fetchID
|
|
39
|
+
* @param fetchID this can be used to prevent loading the same data twice
|
|
40
40
|
*/},{key:"get_list",value:function(){function a(a){return b.apply(this,arguments)}var b=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function b(a){var c,d,e=arguments;return _regeneratorRuntime().wrap(function b(a){for(;1;)switch(a.prev=a.next){case 0:throw c=!(1<e.length&&void 0!==e[1])||e[1],d=2<e.length&&void 0!==e[2]?e[2]:"",new Error("get_list not implented");case 3:case"end":return a.stop();}},b)}));return a}()}]),b}(_SimpleObject2["default"]);exports.WebObject=WebObject,_defineProperty(WebObject,"__web_path",""),_defineProperty(WebObject,"__web_type","");var _default=WebObject;exports["default"]=_default;
|
|
@@ -18,7 +18,7 @@ export declare class WebObjectManager<T extends WebObject> extends ObjectManager
|
|
|
18
18
|
getMetaValue(key: string): any;
|
|
19
19
|
get_deltaObject(): Promise<any>;
|
|
20
20
|
Save(): Promise<boolean>;
|
|
21
|
-
Load(
|
|
21
|
+
Load(search: any, ...p: any[]): Promise<T | undefined>;
|
|
22
22
|
/**
|
|
23
23
|
* Use this when you load new Object
|
|
24
24
|
* @param p
|