ionic-vhframeworks 3.7.3 → 3.7.4

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.
@@ -300,10 +300,16 @@ export declare class VhAuth {
300
300
  private initializeDB;
301
301
  /**
302
302
  * @example:
303
- * this.vhAuth.initializeProject('vhsales','firebase-mongo','research','research');
304
- * @param url
303
+ * this.vhAuth.initializeProject('vhsales','firebase-mongo','research','research', 394637, 'all');
304
+ * @param projectname
305
+ * @param dbstorage
306
+ * @param dbserverversion
307
+ * @param camserverversion
308
+ * @param fwcode
309
+ * @param database : tất cả database 'all' hoặc một database nào đó '4wk3JMSwSjh4kOLWOMbLbWt0Rdk2'
310
+ * @returns
305
311
  */
306
- initializeProject(projectname: string, dbstorage: string, dbserverversion: string, camserverversion: string, fwcode: number): any;
312
+ initializeProject(projectname: string, dbstorage: string, dbserverversion: string, camserverversion: string, fwcode: number, database: string): any;
307
313
  /**
308
314
  * @example:
309
315
  * this.vhAuth.runOnMGDBServerVersion();
@@ -10330,7 +10336,7 @@ export declare class VhQuerySales {
10330
10336
  * let discount = this.vhQuerySales.getDiscount_bill_byCustomer(43000000, '7YLcm0cFKLu2KaQQ8cyv');
10331
10337
  * @param total_price : Tổng giá
10332
10338
  * @param id_customer
10333
- * @returns Object or null => obj = {type, discount}, type ==1 là chiết khấu %, type == 2 là chiết khấu money, discount là số tiền đc chiết khấu,
10339
+ * @returns Object or null => obj = {discount}, discount là số tiền đc chiết khấu,
10334
10340
  * trả về null nghĩa là khách hàng này không có chiết khấu theo hóa đơn
10335
10341
  */
10336
10342
  getDiscount_bill_byCustomer(total_price: number, id_customer: any): any;
@@ -14110,6 +14116,241 @@ export declare class VhMqttService {
14110
14116
  getConnectedSSID(): Promise<unknown>;
14111
14117
  private getIotID;
14112
14118
  }
14119
+ export declare class VhQuerySalesWebUser {
14120
+ private vhmongo_firebase;
14121
+ private vhQuery;
14122
+ private vhAuth;
14123
+ private vhAlgorithm;
14124
+ constructor(vhmongo_firebase: Vhmongo_firebase, vhQuery: VhQuery, vhAuth: VhAuth, vhAlgorithm: VhAlgorithm);
14125
+ /**
14126
+ * @example
14127
+ * this.vhQuerySales.getBranch('5fb67fda87c0f21d484cbdf3')
14128
+ .then((branch)=>{
14129
+ console.log('getBranch', branch);
14130
+ },error=>{
14131
+ reject(error);
14132
+ })
14133
+ * @param id_branch
14134
+ * @return Promise => obj ={} or null
14135
+ */
14136
+ getBranch(id_branch: string): Promise<unknown>;
14137
+ /**
14138
+ * @example
14139
+ * this.vhQuerySales.getBranchs()
14140
+ .then((branchs)=>{
14141
+ console.log('getBranchs', branchs);
14142
+ },error=>{
14143
+ reject(error);
14144
+ })
14145
+ * @return Promise => array(object) = [{},{},..]
14146
+ */
14147
+ getBranchs(): Promise<unknown>;
14148
+ /**
14149
+ * @example
14150
+ * this.vhQuerySales.getProduct('5fb67fda87c0f21d484cbdf3')
14151
+ .then((product)=>{
14152
+ console.log('getProduct', product);
14153
+ }, error=>{
14154
+ reject(error)
14155
+ })
14156
+ * @param id_product
14157
+ * @return false or object
14158
+ */
14159
+ getProduct(id_product: string): Promise<unknown>;
14160
+ /**
14161
+ * @example:
14162
+ * this.vhQuery.getProductsByFields({name:{$eq:'name abc'}}, {},{},0)
14163
+ .then((products)=>{
14164
+ console.log('getProductsByFields', products);
14165
+ },error=>{
14166
+ console.log('error', error);
14167
+ })
14168
+ * @param query
14169
+ * @param projection — đang tìm hiểu, tạm thời để giá trị là {}
14170
+ * @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
14171
+ * @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
14172
+ * @return — Array -> array = [{},{},...]
14173
+ */
14174
+ getProductsByFields(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
14175
+ /**
14176
+ * @example
14177
+ * this.vhQuerySales.getCategory('5fb67fda87c0f21d484cbdf3')
14178
+ .then((category)=>{
14179
+ console.log('getCategory', category);
14180
+ })
14181
+ * @param id_category
14182
+ * @return Promise => obj ={} or null
14183
+ */
14184
+ getCategory(id_category: string): Promise<unknown>;
14185
+ /**
14186
+ * @example
14187
+ * this.vhQuerySales.getCategorys()
14188
+ .then((categorys)=>{
14189
+ console.log('getCategorys', categorys);
14190
+ })
14191
+ * @return Promise => array(object) = [{},{},..]
14192
+ */
14193
+ getCategorys(): Promise<unknown>;
14194
+ /**
14195
+ * @example:
14196
+ * this.vhQuery.getCategorysByFields({name:{$eq:'name abc'}}, {},{},0)
14197
+ .then((categorys)=>{
14198
+ console.log('getCategorysByFields', categorys);
14199
+ })
14200
+ * @param query
14201
+ * @param projection — đang tìm hiểu, tạm thời để giá trị là {}
14202
+ * @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
14203
+ * @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
14204
+ * @return — Array -> array = [{},{},...]
14205
+ */
14206
+ getCategorysByFields(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
14207
+ }
14208
+ export declare class VhQuerySalesWebAdmin {
14209
+ private vhmongo_firebase;
14210
+ private vhQuery;
14211
+ private vhAuth;
14212
+ private vhAlgorithm;
14213
+ constructor(vhmongo_firebase: Vhmongo_firebase, vhQuery: VhQuery, vhAuth: VhAuth, vhAlgorithm: VhAlgorithm);
14214
+ /**
14215
+ * @example
14216
+ * this.vhQuerySales.getBranch('5fb67fda87c0f21d484cbdf3')
14217
+ .then((branch)=>{
14218
+ console.log('getBranch', branch);
14219
+ },error=>{
14220
+ reject(error);
14221
+ })
14222
+ * @param id_branch
14223
+ * @return Promise => obj ={} or null
14224
+ */
14225
+ getBranch(id_branch: string): Promise<unknown>;
14226
+ /**
14227
+ * @example
14228
+ * this.vhQuerySales.getBranchs()
14229
+ .then((branchs)=>{
14230
+ console.log('getBranchs', branchs);
14231
+ },error=>{
14232
+ reject(error);
14233
+ })
14234
+ * @return Promise => array(object) = [{},{},..]
14235
+ */
14236
+ getBranchs(): Promise<unknown>;
14237
+ addProduct(data: any): Promise<unknown>;
14238
+ /**
14239
+ * @example:
14240
+ * this.vhQuerySales.updateProduct('5fb6780ca2148e09806c5b01', {quantity:400})
14241
+ .then((bool)=>{
14242
+ console.log('updateProduct', bool);
14243
+ }, error=>{
14244
+ console.log('error', error);
14245
+ })
14246
+ * @param id_product
14247
+ * @param data
14248
+ * @return Promise => bool = true or false
14249
+ */
14250
+ updateProduct(id_product: string, data: object): Promise<unknown>;
14251
+ /**
14252
+ * @example:
14253
+ * this.vhQuerySales.deleteProduct('5fb67fda87c0f21d484cbdf3')
14254
+ .then((bool)=>{
14255
+ console.log('deleteDoc', bool);
14256
+ }, error=>{
14257
+ reject(error)
14258
+ })
14259
+ * @param id_product
14260
+ * @return Promise => bool = true or false
14261
+ */
14262
+ deleteProduct(id_product: string): Promise<unknown>;
14263
+ /**
14264
+ * @example
14265
+ * this.vhQuerySales.getProduct('5fb67fda87c0f21d484cbdf3')
14266
+ .then((product)=>{
14267
+ console.log('getProduct', product);
14268
+ })
14269
+ * @param id_product
14270
+ * @return false or object
14271
+ */
14272
+ getProduct(id_product: string): Promise<unknown>;
14273
+ /**
14274
+ * @example:
14275
+ * this.vhQuery.getProductsByFields({name:{$eq:'name abc'}}, {},{},0)
14276
+ .then((products)=>{
14277
+ console.log('getProductsByFields', products);
14278
+ })
14279
+ * @param query
14280
+ * @param projection — đang tìm hiểu, tạm thời để giá trị là {}
14281
+ * @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
14282
+ * @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
14283
+ * @return — Array -> array = [{},{},...]
14284
+ */
14285
+ getProductsByFields(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
14286
+ /**
14287
+ * @example:
14288
+ * this.vhQuerySales.addCategory({name:'Danh mục 1'})
14289
+ .then((category)=>{
14290
+ console.log('addCategory', category);
14291
+ },error=>{
14292
+ console.log('error', error);
14293
+ })
14294
+ * @param colname
14295
+ * @param data
14296
+ * @return Promise => obj = {}
14297
+ * 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
14298
+ */
14299
+ addCategory(data: object): Promise<unknown>;
14300
+ /**
14301
+ * @example:
14302
+ * this.vhQuerySales.updateCategory('5fb6780ca2148e09806c5b01', {quantity:400})
14303
+ .then((bool)=>{
14304
+ console.log('updateCategory', bool);
14305
+ })
14306
+ * @param id_category
14307
+ * @param data
14308
+ * @return Promise => bool = true or false
14309
+ */
14310
+ updateCategory(id_category: string, data: object): Promise<unknown>;
14311
+ /**
14312
+ * @example:
14313
+ * this.vhQuerySales.deleteCategory('5fb67fda87c0f21d484cbdf3')
14314
+ .then((bool)=>{
14315
+ console.log('deleteCategory', bool);
14316
+ })
14317
+ * @param id_category
14318
+ * @return Promise => bool = true or false
14319
+ */
14320
+ deleteCategory(id_category: string): Promise<unknown>;
14321
+ /**
14322
+ * @example
14323
+ * this.vhQuerySales.getCategory('5fb67fda87c0f21d484cbdf3')
14324
+ .then((category)=>{
14325
+ console.log('getCategory', category);
14326
+ })
14327
+ * @param id_category
14328
+ * @return Promise => obj ={} or null
14329
+ */
14330
+ getCategory(id_category: string): Promise<unknown>;
14331
+ /**
14332
+ * @example
14333
+ * this.vhQuerySales.getCategorys()
14334
+ .then((categorys)=>{
14335
+ console.log('getCategorys', categorys);
14336
+ })
14337
+ * @return Promise => array(object) = [{},{},..]
14338
+ */
14339
+ getCategorys(): Promise<unknown>;
14340
+ /**
14341
+ * @example:
14342
+ * this.vhQuery.getCategorysByFields({name:{$eq:'name abc'}}, {},{},0)
14343
+ .then((categorys)=>{
14344
+ console.log('getCategorysByFields', categorys);
14345
+ })
14346
+ * @param query
14347
+ * @param projection — đang tìm hiểu, tạm thời để giá trị là {}
14348
+ * @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
14349
+ * @param limit — null hoặc 0: không giới hạn record get về; 2: get về 2 record
14350
+ * @return — Array -> array = [{},{},...]
14351
+ */
14352
+ getCategorysByFields(query: object, projection?: object, sort?: object, limit?: number): Promise<unknown>;
14353
+ }
14113
14354
  export declare class VhCurrencyPipe implements PipeTransform {
14114
14355
  transform(value: number, currencyCode?: string, display?: 'code' | 'symbol' | 'symbol-narrow' | string | boolean, digitsInfo?: string, locale?: string): string | null;
14115
14356
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ionic-vhframeworks",
3
- "version": "3.7.3",
3
+ "version": "3.7.4",
4
4
  "peerDependencies": {},
5
5
  "dependencies": {
6
6
  "tslib": "^2.0.0"