ionic-vhframeworks 6.6.4 → 6.6.6
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.
|
@@ -10980,6 +10980,7 @@ export declare class VhQueryAutoWeb {
|
|
|
10980
10980
|
private hwinfo;
|
|
10981
10981
|
private subproject_working;
|
|
10982
10982
|
private callbacksyncobject_properties;
|
|
10983
|
+
private webappserverURL_vhuserweb;
|
|
10983
10984
|
constructor(vhMGDB_database: VhMGDB_database, vhMGDB_socketMongoDB: VhMGDB_socketMongoDB, vhQuery: VhQuery, vhAuth: VhAuth, vhAlgorithm: VhAlgorithm);
|
|
10984
10985
|
/**
|
|
10985
10986
|
* @example:
|
|
@@ -11014,6 +11015,126 @@ export declare class VhQueryAutoWeb {
|
|
|
11014
11015
|
* @returns void
|
|
11015
11016
|
*/
|
|
11016
11017
|
closeSyncObject_Properties(): void;
|
|
11018
|
+
/**
|
|
11019
|
+
* @example:
|
|
11020
|
+
* this.vhQueryAutoWeb.addDoc_vhuserweb('pages',{name:name: 'Quảng cáo 1'})
|
|
11021
|
+
.then((ads)=>{
|
|
11022
|
+
console.log('addDoc', ads);
|
|
11023
|
+
}, error=>{
|
|
11024
|
+
console.log('error', error);
|
|
11025
|
+
})
|
|
11026
|
+
* @param data
|
|
11027
|
+
* @return Promise => object = {}
|
|
11028
|
+
* Luu ý: chỉ có 2 trường hợp, hoặc là thêm thành công, hoặc là báo lỗi error
|
|
11029
|
+
*/
|
|
11030
|
+
private addDoc_vhuserweb;
|
|
11031
|
+
/**
|
|
11032
|
+
* @example:
|
|
11033
|
+
* this.vhQueryAutoWeb.updateDoc_vhuserweb('categories', '5fb6780ca2148e09806c5b01', {name: 'Quảng cáo 1'})
|
|
11034
|
+
.then((bool:any)=>{
|
|
11035
|
+
console.log('updateDoc', bool);
|
|
11036
|
+
}, error=>{
|
|
11037
|
+
console.log('error', error);
|
|
11038
|
+
})
|
|
11039
|
+
* @param id_doc
|
|
11040
|
+
* @param data
|
|
11041
|
+
* @return Promise => bool = true or false
|
|
11042
|
+
*/
|
|
11043
|
+
private updateDoc_vhuserweb;
|
|
11044
|
+
/**
|
|
11045
|
+
* @example:
|
|
11046
|
+
* this.vhQueryAutoWeb.deleteDoc('categories', '5fb67fda87c0f21d484cbdf3')
|
|
11047
|
+
.then((bool:any)=>{
|
|
11048
|
+
console.log('deleteDoc', bool);
|
|
11049
|
+
}, error=>{
|
|
11050
|
+
reject(error)
|
|
11051
|
+
})
|
|
11052
|
+
* @param id_doc
|
|
11053
|
+
* @return Promise => bool = true or false
|
|
11054
|
+
*/
|
|
11055
|
+
private deleteDoc_vhuserweb;
|
|
11056
|
+
/**
|
|
11057
|
+
* @example
|
|
11058
|
+
* this.vhQueryAutoWeb.getDoc_fromService_vhuserweb('categories', '5fb67fda87c0f21d484cbdf3')
|
|
11059
|
+
.then((doc)=>{
|
|
11060
|
+
console.log('getDoc_fromService_vhuserweb', doc);
|
|
11061
|
+
})
|
|
11062
|
+
* @param id_doc
|
|
11063
|
+
* @return null or object
|
|
11064
|
+
*/
|
|
11065
|
+
private getDoc_fromService_vhuserweb;
|
|
11066
|
+
/**
|
|
11067
|
+
* @example
|
|
11068
|
+
* this.vhQueryAutoWeb.getDoc_fromService_vhuserweb('categories', '5fb67fda87c0f21d484cbdf3')
|
|
11069
|
+
.then((doc)=>{
|
|
11070
|
+
console.log('getDoc_fromService_vhuserweb', doc);
|
|
11071
|
+
})
|
|
11072
|
+
* @param id_doc
|
|
11073
|
+
* @return null or object
|
|
11074
|
+
*/
|
|
11075
|
+
private getDoc_fromDatabase_vhuserweb;
|
|
11076
|
+
/**
|
|
11077
|
+
* @example:
|
|
11078
|
+
* this.vhQueryAutoWeb.getDocs_fromService_byFields_byPages_vhuserweb('webapp_abouts', {name:{$eq:'name abc'}}, {},{},6,1)
|
|
11079
|
+
.then(response=>{
|
|
11080
|
+
console.log('response', response);
|
|
11081
|
+
if(response.vcode === 0){
|
|
11082
|
+
//-----------your code-----------
|
|
11083
|
+
let products = response.data;
|
|
11084
|
+
}
|
|
11085
|
+
},error=>{
|
|
11086
|
+
console.log('error', error)
|
|
11087
|
+
})
|
|
11088
|
+
* @param colname
|
|
11089
|
+
* @param query
|
|
11090
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
11091
|
+
* @param sort — null hoặc {}:không sắp xếp; {date:1}: sắp xếp theo ASC; {date:-1}: sắp xếp theo DESC
|
|
11092
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
11093
|
+
* @param page — null hoặc 0 hoặc 1: get về trang đầu tiên; 2: get về trang thứ 2
|
|
11094
|
+
* @return Promise object => response = {vcode, message, data(array), limit, page, totalpages}
|
|
11095
|
+
*/
|
|
11096
|
+
private getDocs_fromService_byFields_byPages_vhuserweb;
|
|
11097
|
+
/**
|
|
11098
|
+
* @example:
|
|
11099
|
+
* this.vhQueryAutoWeb.getDocs_byFields_fromService_vhuserweb('webapp_abouts', {name:{$eq:'name abc'}}, {},{},6,1)
|
|
11100
|
+
.then(response=>{
|
|
11101
|
+
console.log('response', response);
|
|
11102
|
+
if(response.vcode === 0){
|
|
11103
|
+
//-----------your code-----------
|
|
11104
|
+
let products = response.data;
|
|
11105
|
+
}
|
|
11106
|
+
},error=>{
|
|
11107
|
+
console.log('error', error)
|
|
11108
|
+
})
|
|
11109
|
+
* @param colname
|
|
11110
|
+
* @param query
|
|
11111
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
11112
|
+
* @param sort — null hoặc {}:không sắp xếp; {date:1}: sắp xếp theo ASC; {date:-1}: sắp xếp theo DESC
|
|
11113
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
11114
|
+
* @param page — null hoặc 0 hoặc 1: get về trang đầu tiên; 2: get về trang thứ 2
|
|
11115
|
+
* @return Promise => array(object) = [{},{},..]
|
|
11116
|
+
*/
|
|
11117
|
+
private getDocs_fromService_byFields_vhuserweb;
|
|
11118
|
+
/**
|
|
11119
|
+
* @example:
|
|
11120
|
+
* this.vhQueryAutoWeb.getDocs_byFields_fromService_vhuserweb('webapp_abouts', {name:{$eq:'name abc'}}, {},{},6,1)
|
|
11121
|
+
.then(response=>{
|
|
11122
|
+
console.log('response', response);
|
|
11123
|
+
if(response.vcode === 0){
|
|
11124
|
+
//-----------your code-----------
|
|
11125
|
+
let products = response.data;
|
|
11126
|
+
}
|
|
11127
|
+
},error=>{
|
|
11128
|
+
console.log('error', error)
|
|
11129
|
+
})
|
|
11130
|
+
* @param colname
|
|
11131
|
+
* @param query
|
|
11132
|
+
* @param projection — đang tìm hiểu, tạm thời để giá trị là {}
|
|
11133
|
+
* @param sort — null hoặc {}:không sắp xếp; {date:1}: sắp xếp theo ASC; {date:-1}: sắp xếp theo DESC
|
|
11134
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
11135
|
+
* @return Promise => array(object) = [{},{},..]
|
|
11136
|
+
*/
|
|
11137
|
+
private getDocs_fromDatabase_byFields_vhuserweb;
|
|
11017
11138
|
/**
|
|
11018
11139
|
* @example:
|
|
11019
11140
|
* this.vhQueryAutoWeb.addDoc('categories'{name:name: 'Quảng cáo 1'})
|
|
@@ -11026,7 +11147,7 @@ export declare class VhQueryAutoWeb {
|
|
|
11026
11147
|
* @return Promise => object = {}
|
|
11027
11148
|
* Luu ý: chỉ có 2 trường hợp, hoặc là thêm thành công, hoặc là báo lỗi error
|
|
11028
11149
|
*/
|
|
11029
|
-
addDoc
|
|
11150
|
+
private addDoc;
|
|
11030
11151
|
/**
|
|
11031
11152
|
* @example:
|
|
11032
11153
|
* this.vhQueryAutoWeb.updateDoc('categories', '5fb6780ca2148e09806c5b01', {name: 'Quảng cáo 1'})
|
|
@@ -11039,7 +11160,7 @@ export declare class VhQueryAutoWeb {
|
|
|
11039
11160
|
* @param data
|
|
11040
11161
|
* @return Promise => bool = true or false
|
|
11041
11162
|
*/
|
|
11042
|
-
updateDoc
|
|
11163
|
+
private updateDoc;
|
|
11043
11164
|
/**
|
|
11044
11165
|
* @example:
|
|
11045
11166
|
* this.vhQueryAutoWeb.deleteDoc('categories', '5fb67fda87c0f21d484cbdf3')
|
|
@@ -11051,7 +11172,7 @@ export declare class VhQueryAutoWeb {
|
|
|
11051
11172
|
* @param id_doc
|
|
11052
11173
|
* @return Promise => bool = true or false
|
|
11053
11174
|
*/
|
|
11054
|
-
deleteDoc
|
|
11175
|
+
private deleteDoc;
|
|
11055
11176
|
/**
|
|
11056
11177
|
* @example
|
|
11057
11178
|
* this.vhQueryAutoWeb.getDoc('categories', '5fb67fda87c0f21d484cbdf3')
|
|
@@ -11061,7 +11182,7 @@ export declare class VhQueryAutoWeb {
|
|
|
11061
11182
|
* @param id_doc
|
|
11062
11183
|
* @return false or object
|
|
11063
11184
|
*/
|
|
11064
|
-
getDoc
|
|
11185
|
+
private getDoc;
|
|
11065
11186
|
/**
|
|
11066
11187
|
* @example
|
|
11067
11188
|
* this.vhQueryAutoWeb.getDocs_byFields('categories', {quantity:{$gte:10}}, {}, {}, 0)
|
|
@@ -11074,7 +11195,7 @@ export declare class VhQueryAutoWeb {
|
|
|
11074
11195
|
* @param limit
|
|
11075
11196
|
* @return Promise => array(object) = [{},{},..]
|
|
11076
11197
|
*/
|
|
11077
|
-
getDocs_byFields
|
|
11198
|
+
private getDocs_byFields;
|
|
11078
11199
|
/**
|
|
11079
11200
|
* @example:
|
|
11080
11201
|
* let subproject = this.vhQueryAutoWeb.getlocalSubProject('5fb6780ca2148e09806c5b01');
|
|
@@ -11103,7 +11224,7 @@ export declare class VhQueryAutoWeb {
|
|
|
11103
11224
|
* Hàm này refresh giá trị mới nhất cho hàm getlocalSubProject(), getlocalSubProjects() trong localstorage
|
|
11104
11225
|
* @return Promise => null
|
|
11105
11226
|
*/
|
|
11106
|
-
refreshLocalSubProjects
|
|
11227
|
+
private refreshLocalSubProjects;
|
|
11107
11228
|
/**
|
|
11108
11229
|
* @example:
|
|
11109
11230
|
* this.vhQueryAutoWeb.addSubProject({name:'Dự án website siêu thị mini'})
|
|
@@ -11166,7 +11287,7 @@ export declare class VhQueryAutoWeb {
|
|
|
11166
11287
|
* @param id_subproject
|
|
11167
11288
|
* @return boolean => true or false
|
|
11168
11289
|
*/
|
|
11169
|
-
checkSubProject(id_subproject: string):
|
|
11290
|
+
checkSubProject(id_subproject: string): Promise<unknown>;
|
|
11170
11291
|
/**
|
|
11171
11292
|
* @example:
|
|
11172
11293
|
* this.vhQueryAutoWeb.addPage({name:'Danh mục 1'})
|
|
@@ -11322,7 +11443,7 @@ export declare class VhQueryAutoWeb {
|
|
|
11322
11443
|
* @param data
|
|
11323
11444
|
* @return Promise => bool = true or false
|
|
11324
11445
|
*/
|
|
11325
|
-
updateBlock(
|
|
11446
|
+
updateBlock(id_page: string, data: object): Promise<unknown>;
|
|
11326
11447
|
/**
|
|
11327
11448
|
* @example:
|
|
11328
11449
|
* this.vhQueryAutoWeb.deleteBlock('5fb67fda87c0f21d484cbdf3')
|
|
@@ -11355,17 +11476,17 @@ export declare class VhQueryAutoWeb {
|
|
|
11355
11476
|
*/
|
|
11356
11477
|
getBlocks_byIDpage(id_page: any): Promise<unknown>;
|
|
11357
11478
|
/**
|
|
11358
|
-
|
|
11359
|
-
|
|
11360
|
-
|
|
11361
|
-
|
|
11362
|
-
|
|
11363
|
-
|
|
11364
|
-
|
|
11365
|
-
|
|
11366
|
-
|
|
11367
|
-
|
|
11368
|
-
|
|
11479
|
+
* @example
|
|
11480
|
+
* this.vhQueryAutoWeb.getBlocks_byFields({id_subproject:{$eq:'00Tm41GNYN0aYbAtuncH'}}, {}, {}, 0)
|
|
11481
|
+
.then((pages)=>{
|
|
11482
|
+
console.log('getBlocks_byFields', pages);
|
|
11483
|
+
})
|
|
11484
|
+
* @param query
|
|
11485
|
+
* @param projection
|
|
11486
|
+
* @param sort
|
|
11487
|
+
* @param limit
|
|
11488
|
+
* @return Promise => array(object) = [{},{},..]
|
|
11489
|
+
*/
|
|
11369
11490
|
getBlocks_byFields(query: any, projection?: object, sort?: any, limit?: number): Promise<unknown>;
|
|
11370
11491
|
/**
|
|
11371
11492
|
* Hàm này trả về 1 block (có đủ thông tin block), trong mỗi block có trường frames và objects (có đủ thông tin từng object)
|
|
@@ -11572,15 +11693,6 @@ export declare class VhQueryAutoWeb {
|
|
|
11572
11693
|
* @return Promise => obj ={} or null
|
|
11573
11694
|
*/
|
|
11574
11695
|
getProduct(id_product: string): Promise<unknown>;
|
|
11575
|
-
/**
|
|
11576
|
-
* @example
|
|
11577
|
-
* this.vhQueryAutoWeb.getProducts()
|
|
11578
|
-
.then((response)=>{
|
|
11579
|
-
console.log('getProducts', response);
|
|
11580
|
-
})
|
|
11581
|
-
* @return array(object) = [{},{},..]
|
|
11582
|
-
*/
|
|
11583
|
-
private getProducts;
|
|
11584
11696
|
/**
|
|
11585
11697
|
* @example:
|
|
11586
11698
|
* this.vhQueryAutoWeb.getProducts_byFields({name:{$eq:'name abc'}}, {},{},6,1)
|
|
@@ -11601,6 +11713,27 @@ export declare class VhQueryAutoWeb {
|
|
|
11601
11713
|
* @return Promise object => response = {vcode, message, data(array), limit, page, totalpages}
|
|
11602
11714
|
*/
|
|
11603
11715
|
getProducts_byFields(query: any, projection?: object, sort?: any, limit?: number, page?: number): Promise<unknown>;
|
|
11716
|
+
private getProducts_byFields_old;
|
|
11717
|
+
/**
|
|
11718
|
+
* @example
|
|
11719
|
+
* this.vhQueryAutoWeb.searchList('products',["name", "describe"], 'Điện Thoại', 20, 1)
|
|
11720
|
+
.then(response=>{
|
|
11721
|
+
console.log('response', response);
|
|
11722
|
+
if(response.vcode === 0){
|
|
11723
|
+
//-----------your code-----------
|
|
11724
|
+
let array_searched_data = response.data;
|
|
11725
|
+
}
|
|
11726
|
+
},error=>{
|
|
11727
|
+
console.log('error', error)
|
|
11728
|
+
})
|
|
11729
|
+
* @param colname
|
|
11730
|
+
* @param array_field
|
|
11731
|
+
* @param value
|
|
11732
|
+
* @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
|
|
11733
|
+
* @param page — null hoặc 0 hoặc 1: get về trang đầu tiên; 2: get về trang thứ 2
|
|
11734
|
+
* @return Promise object => response = {vcode, message, data(array), limit, page, totalpages}
|
|
11735
|
+
*/
|
|
11736
|
+
searchList(colname: string, array_field: any, value: string, limit: number, page: number): Promise<unknown>;
|
|
11604
11737
|
/**
|
|
11605
11738
|
* @example:
|
|
11606
11739
|
* this.vhQueryAutoWeb.addCategory({name:'Danh mục 1'})
|