asv-hlps 1.4.5 → 1.4.7

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.
Files changed (107) hide show
  1. package/lib/cjs/auth/auth.d.ts +2 -1
  2. package/lib/cjs/auth/auth.js +18 -23
  3. package/lib/cjs/markets/index.d.ts +2 -0
  4. package/lib/cjs/markets/index.js +18 -0
  5. package/lib/cjs/markets/models/Market.d.ts +8 -0
  6. package/lib/cjs/markets/models/Market.js +2 -0
  7. package/lib/cjs/markets/models/UMarket.d.ts +11 -0
  8. package/lib/cjs/markets/models/UMarket.js +2 -0
  9. package/lib/cjs/markets/models/index.d.ts +2 -0
  10. package/lib/cjs/markets/models/index.js +18 -0
  11. package/lib/cjs/markets/products/models/Product.d.ts +39 -0
  12. package/lib/cjs/markets/products/models/Product.js +2 -0
  13. package/lib/cjs/markets/products/models/ProductAsset.d.ts +8 -0
  14. package/lib/cjs/markets/products/models/ProductAsset.js +2 -0
  15. package/lib/cjs/markets/products/models/ProductCat.d.ts +3 -0
  16. package/lib/cjs/markets/products/models/ProductCat.js +2 -0
  17. package/lib/cjs/markets/products/models/ProductCollection.d.ts +3 -0
  18. package/lib/cjs/markets/products/models/ProductCollection.js +2 -0
  19. package/lib/cjs/markets/products/models/ProductDepot.d.ts +11 -0
  20. package/lib/cjs/markets/products/models/ProductDepot.js +2 -0
  21. package/lib/cjs/markets/products/models/ProductElt.d.ts +3 -0
  22. package/lib/cjs/markets/products/models/ProductElt.js +2 -0
  23. package/lib/cjs/markets/products/models/ProductGrp.d.ts +3 -0
  24. package/lib/cjs/markets/products/models/ProductGrp.js +2 -0
  25. package/lib/cjs/markets/products/models/ProductImage.d.ts +4 -0
  26. package/lib/cjs/markets/products/models/ProductImage.js +6 -0
  27. package/lib/cjs/markets/products/models/ProductIn.d.ts +42 -0
  28. package/lib/cjs/markets/products/models/ProductIn.js +6 -0
  29. package/lib/cjs/markets/products/models/ProductState.d.ts +3 -0
  30. package/lib/cjs/markets/products/models/ProductState.js +2 -0
  31. package/lib/cjs/markets/products/models/ProductStock.d.ts +6 -0
  32. package/lib/cjs/markets/products/models/ProductStock.js +2 -0
  33. package/lib/cjs/markets/products/models/ProductTag.d.ts +3 -0
  34. package/lib/cjs/markets/products/models/ProductTag.js +2 -0
  35. package/lib/cjs/markets/products/models/ProductVariant.d.ts +6 -0
  36. package/lib/cjs/markets/products/models/ProductVariant.js +2 -0
  37. package/lib/cjs/markets/products/models/index.d.ts +13 -0
  38. package/lib/cjs/markets/products/models/index.js +29 -0
  39. package/lib/cjs/markets/shops/index.d.ts +1 -0
  40. package/lib/cjs/markets/shops/index.js +17 -0
  41. package/lib/cjs/markets/shops/models/Shop.d.ts +13 -0
  42. package/lib/cjs/markets/shops/models/Shop.js +2 -0
  43. package/lib/cjs/markets/users/models/User.d.ts +7 -0
  44. package/lib/cjs/markets/users/models/User.js +2 -0
  45. package/lib/cjs/npms/yup.js +17 -7
  46. package/lib/cjs/shared/models/IIcon.d.ts +4 -0
  47. package/lib/cjs/shared/models/IIcon.js +6 -0
  48. package/lib/cjs/shared/models/NaAcIc.d.ts +7 -0
  49. package/lib/cjs/shared/models/NaAcIc.js +7 -0
  50. package/lib/cjs/shared/models/NaCoAcIc.d.ts +4 -0
  51. package/lib/cjs/shared/models/NaCoAcIc.js +7 -0
  52. package/lib/cjs/users/user.js +17 -7
  53. package/lib/cjs/utils.d.ts +1 -0
  54. package/lib/cjs/utils.js +5 -0
  55. package/lib/esm/auth/auth.d.ts +2 -1
  56. package/lib/esm/auth/auth.js +18 -23
  57. package/lib/esm/markets/index.d.ts +2 -0
  58. package/lib/esm/markets/index.js +2 -0
  59. package/lib/esm/markets/models/Market.d.ts +8 -0
  60. package/lib/esm/markets/models/Market.js +1 -0
  61. package/lib/esm/markets/models/UMarket.d.ts +11 -0
  62. package/lib/esm/markets/models/UMarket.js +1 -0
  63. package/lib/esm/markets/models/index.d.ts +2 -0
  64. package/lib/esm/markets/models/index.js +2 -0
  65. package/lib/esm/markets/products/models/Product.d.ts +39 -0
  66. package/lib/esm/markets/products/models/Product.js +1 -0
  67. package/lib/esm/markets/products/models/ProductAsset.d.ts +8 -0
  68. package/lib/esm/markets/products/models/ProductAsset.js +1 -0
  69. package/lib/esm/markets/products/models/ProductCat.d.ts +3 -0
  70. package/lib/esm/markets/products/models/ProductCat.js +1 -0
  71. package/lib/esm/markets/products/models/ProductCollection.d.ts +3 -0
  72. package/lib/esm/markets/products/models/ProductCollection.js +1 -0
  73. package/lib/esm/markets/products/models/ProductDepot.d.ts +11 -0
  74. package/lib/esm/markets/products/models/ProductDepot.js +1 -0
  75. package/lib/esm/markets/products/models/ProductElt.d.ts +3 -0
  76. package/lib/esm/markets/products/models/ProductElt.js +1 -0
  77. package/lib/esm/markets/products/models/ProductGrp.d.ts +3 -0
  78. package/lib/esm/markets/products/models/ProductGrp.js +1 -0
  79. package/lib/esm/markets/products/models/ProductImage.d.ts +4 -0
  80. package/lib/esm/markets/products/models/ProductImage.js +2 -0
  81. package/lib/esm/markets/products/models/ProductIn.d.ts +42 -0
  82. package/lib/esm/markets/products/models/ProductIn.js +2 -0
  83. package/lib/esm/markets/products/models/ProductState.d.ts +3 -0
  84. package/lib/esm/markets/products/models/ProductState.js +1 -0
  85. package/lib/esm/markets/products/models/ProductStock.d.ts +6 -0
  86. package/lib/esm/markets/products/models/ProductStock.js +1 -0
  87. package/lib/esm/markets/products/models/ProductTag.d.ts +3 -0
  88. package/lib/esm/markets/products/models/ProductTag.js +1 -0
  89. package/lib/esm/markets/products/models/ProductVariant.d.ts +6 -0
  90. package/lib/esm/markets/products/models/ProductVariant.js +1 -0
  91. package/lib/esm/markets/products/models/index.d.ts +13 -0
  92. package/lib/esm/markets/products/models/index.js +13 -0
  93. package/lib/esm/markets/shops/index.d.ts +1 -0
  94. package/lib/esm/markets/shops/index.js +1 -0
  95. package/lib/esm/markets/shops/models/Shop.d.ts +13 -0
  96. package/lib/esm/markets/shops/models/Shop.js +1 -0
  97. package/lib/esm/markets/users/models/User.d.ts +7 -0
  98. package/lib/esm/markets/users/models/User.js +1 -0
  99. package/lib/esm/shared/models/IIcon.d.ts +4 -0
  100. package/lib/esm/shared/models/IIcon.js +2 -0
  101. package/lib/esm/shared/models/NaAcIc.d.ts +7 -0
  102. package/lib/esm/shared/models/NaAcIc.js +3 -0
  103. package/lib/esm/shared/models/NaCoAcIc.d.ts +4 -0
  104. package/lib/esm/shared/models/NaCoAcIc.js +3 -0
  105. package/lib/esm/utils.d.ts +1 -0
  106. package/lib/esm/utils.js +4 -0
  107. package/package.json +9 -9
@@ -1,4 +1,5 @@
1
1
  import { Ste, SteGrp, UserGrp, UserRole } from "../users/models";
2
+ import AuthTag from "./models/AuthTag";
2
3
  interface AuthParam {
3
4
  tag?: string;
4
5
  roles?: string[];
@@ -17,7 +18,7 @@ interface AuthParam {
17
18
  url?: string;
18
19
  }
19
20
  type TData = {
20
- tags?: string[];
21
+ tags?: AuthTag[] | string[];
21
22
  ste: Ste;
22
23
  role: UserRole;
23
24
  roles: string[];
@@ -1,31 +1,26 @@
1
1
  import { isStaffSte } from "../users/user";
2
+ import { checkIsStringOfArray } from "../utils";
2
3
  const arraySome = (arr1, arr2) => {
3
4
  return arr1.some((x) => arr2.includes(x));
4
5
  };
5
6
  const getAuth = (authUser, authSte, param) => {
6
- var _a, _b, _c, _d, _e, _f, _g, _h;
7
- /* if (param?.tag && authUser?.tags?.length) {
8
- const tags: string[] = [];
9
- for (const tag of authUser.tags) {
10
- tags.push(tag?.code?.toLowerCase());
11
- }
12
- const authIn = tags?.includes(param?.tag?.toLowerCase());
13
- if (authIn) {
14
- return true;
15
- }
16
- } */
7
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
17
8
  if ((param === null || param === void 0 ? void 0 : param.tag) && ((_a = authUser === null || authUser === void 0 ? void 0 : authUser.tags) === null || _a === void 0 ? void 0 : _a.length)) {
18
- // const tags: string[] = [];
19
- /* for (const tag of authUser.tags) {
20
- tags.push(tag?.code?.toLowerCase());
21
- } */
22
- const tags = authUser.tags;
23
- const authIn = tags === null || tags === void 0 ? void 0 : tags.includes((_b = param === null || param === void 0 ? void 0 : param.tag) === null || _b === void 0 ? void 0 : _b.toLowerCase());
9
+ let tags = [];
10
+ if (checkIsStringOfArray(authUser.tags)) {
11
+ tags = authUser === null || authUser === void 0 ? void 0 : authUser.tags;
12
+ }
13
+ else {
14
+ for (const tag of authUser.tags) {
15
+ tags.push((_b = tag === null || tag === void 0 ? void 0 : tag.code) === null || _b === void 0 ? void 0 : _b.toLowerCase());
16
+ }
17
+ }
18
+ const authIn = tags === null || tags === void 0 ? void 0 : tags.includes((_c = param === null || param === void 0 ? void 0 : param.tag) === null || _c === void 0 ? void 0 : _c.toLowerCase());
24
19
  if (authIn) {
25
20
  return true;
26
21
  }
27
22
  }
28
- if (((_c = param === null || param === void 0 ? void 0 : param.roles) === null || _c === void 0 ? void 0 : _c.length) > 0) {
23
+ if (((_d = param === null || param === void 0 ? void 0 : param.roles) === null || _d === void 0 ? void 0 : _d.length) > 0) {
29
24
  /* if (isStaffSte(authSte, authUser.ste.name) && ["sadm", ...param.roles].includes(authUser.role.code.toLowerCase())) {
30
25
  return true;
31
26
  } */
@@ -35,7 +30,7 @@ const getAuth = (authUser, authSte, param) => {
35
30
  }
36
31
  // ------ staff ------
37
32
  if (param === null || param === void 0 ? void 0 : param.staff) {
38
- if (((_d = param === null || param === void 0 ? void 0 : param.staff.roles) === null || _d === void 0 ? void 0 : _d.length) > 0 &&
33
+ if (((_e = param === null || param === void 0 ? void 0 : param.staff.roles) === null || _e === void 0 ? void 0 : _e.length) > 0 &&
39
34
  isStaffSte(authSte, authUser.ste.name) &&
40
35
  ["sadm", ...param.roles].includes(authUser.role.code.toLowerCase())) {
41
36
  return true;
@@ -56,7 +51,7 @@ const getAuth = (authUser, authSte, param) => {
56
51
  param.client.steGrps.includes(authUser.ste.grp.code.toLowerCase())) {
57
52
  return true;
58
53
  }
59
- if (((_e = param === null || param === void 0 ? void 0 : param.client.roles) === null || _e === void 0 ? void 0 : _e.length) &&
54
+ if (((_f = param === null || param === void 0 ? void 0 : param.client.roles) === null || _f === void 0 ? void 0 : _f.length) &&
60
55
  (param === null || param === void 0 ? void 0 : param.client.steGrps.length) &&
61
56
  ["ceo", ...param === null || param === void 0 ? void 0 : param.client.roles].includes(authUser.role.code.toLowerCase()) &&
62
57
  (param === null || param === void 0 ? void 0 : param.client.steGrps).includes(authUser.ste.grp.code.toLowerCase())) {
@@ -65,13 +60,13 @@ const getAuth = (authUser, authSte, param) => {
65
60
  }
66
61
  }
67
62
  // ------ ste grps ------
68
- if (((_f = param === null || param === void 0 ? void 0 : param.steGrps) === null || _f === void 0 ? void 0 : _f.length) > 0 && param.steGrps.includes(authUser.ste.grp.code.toLowerCase())) {
63
+ if (((_g = param === null || param === void 0 ? void 0 : param.steGrps) === null || _g === void 0 ? void 0 : _g.length) > 0 && param.steGrps.includes(authUser.ste.grp.code.toLowerCase())) {
69
64
  return true;
70
65
  }
71
- if (((_g = param === null || param === void 0 ? void 0 : param.grps) === null || _g === void 0 ? void 0 : _g.length) && param.grps.includes(authUser.grp.code.toLowerCase())) {
66
+ if (((_h = param === null || param === void 0 ? void 0 : param.grps) === null || _h === void 0 ? void 0 : _h.length) && param.grps.includes(authUser.grp.code.toLowerCase())) {
72
67
  return true;
73
68
  }
74
- if (((_h = param === null || param === void 0 ? void 0 : param.steNames) === null || _h === void 0 ? void 0 : _h.length) > 0 && param.steNames.includes(authUser.ste.name.toLowerCase())) {
69
+ if (((_j = param === null || param === void 0 ? void 0 : param.steNames) === null || _j === void 0 ? void 0 : _j.length) > 0 && param.steNames.includes(authUser.ste.name.toLowerCase())) {
75
70
  return true;
76
71
  }
77
72
  return false;
@@ -0,0 +1,2 @@
1
+ export * from "./models";
2
+ export * from "./products/models";
@@ -0,0 +1,2 @@
1
+ export * from "./models";
2
+ export * from "./products/models";
@@ -0,0 +1,8 @@
1
+ export interface Market {
2
+ id?: number;
3
+ name: string;
4
+ code: string;
5
+ iconName: string;
6
+ iconPack: string;
7
+ isActive: boolean;
8
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import User from "../../users/models/User";
2
+ import { Market } from "./Market";
3
+ export interface UMarket {
4
+ id: number;
5
+ createdAt: Date;
6
+ updatedAt: Date;
7
+ isActive: boolean;
8
+ disabled?: boolean;
9
+ user: User;
10
+ market: Market;
11
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from "./Market";
2
+ export * from "./UMarket";
@@ -0,0 +1,2 @@
1
+ export * from "./Market";
2
+ export * from "./UMarket";
@@ -0,0 +1,39 @@
1
+ import { Market } from "../../models/Market";
2
+ import { Shop } from "../../shops/models/Shop";
3
+ import { ProductCat } from "./ProductCat";
4
+ import { ProductImage } from "./ProductImage";
5
+ import { ProductIn } from "./ProductIn";
6
+ interface Stock {
7
+ sumIns: number;
8
+ sumOuts: number;
9
+ qtityPerPackaging: number;
10
+ }
11
+ export interface Product {
12
+ capacity: string;
13
+ cat: ProductCat;
14
+ createdAt: Date;
15
+ description: string;
16
+ designation: string;
17
+ disabled?: boolean;
18
+ iconName: string;
19
+ iconPack: string;
20
+ id: number;
21
+ images: ProductImage[];
22
+ ins: ProductIn[];
23
+ isActive: boolean;
24
+ isAvailable?: boolean;
25
+ isBulk: boolean;
26
+ market: Market;
27
+ price: number;
28
+ publicPrice: number;
29
+ qtityLimit: number;
30
+ qtityUnit: number;
31
+ stock: Stock;
32
+ qtityPerBox: number;
33
+ qtityPerPackaging: number;
34
+ ref: string;
35
+ salePrice: number;
36
+ shop: Shop;
37
+ updatedAt: Date;
38
+ }
39
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ export interface ProductAsset {
2
+ id: number;
3
+ elt: string;
4
+ name: string;
5
+ qtity: number;
6
+ size: number;
7
+ isActive: boolean;
8
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { NaCoAcIc } from "../../../shared/models/NaCoAcIc";
2
+ export interface ProductCat extends NaCoAcIc {
3
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import NaAc from "../../../shared/models/NaAc";
2
+ export interface ProductCollection extends NaAc {
3
+ }
@@ -0,0 +1,11 @@
1
+ import { ProductIn } from "./ProductIn";
2
+ export interface ProductDepot {
3
+ id: number;
4
+ name: string;
5
+ code: string;
6
+ main: "master" | "slave";
7
+ hasViewStock: boolean;
8
+ qtityInTransfert: number;
9
+ isActive: boolean;
10
+ ins: ProductIn[];
11
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { NaCoAc } from "../../../shared/models";
2
+ export interface ProductElt extends NaCoAc {
3
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import NaAc from "../../../shared/models/NaAc";
2
+ export interface ProductGrp extends NaAc {
3
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { Product } from "./Product";
2
+ export declare class ProductImage extends Image {
3
+ product: Product;
4
+ }
@@ -0,0 +1,2 @@
1
+ export class ProductImage extends Image {
2
+ }
@@ -0,0 +1,42 @@
1
+ import EInOutMotive from "../../../shared/models/EInOutMotive";
2
+ import { Product } from "./Product";
3
+ import { ProductDepot } from "./ProductDepot";
4
+ export declare class ProductIn {
5
+ id: number;
6
+ createdAt: Date;
7
+ lot: string;
8
+ qtity: number;
9
+ comment: string;
10
+ isEdit: boolean;
11
+ motive: EInOutMotive;
12
+ authorId: number;
13
+ qtityPerPackaging: number;
14
+ /**
15
+ * remaining qtity
16
+ */
17
+ qtityIn: number;
18
+ isOutDate: boolean;
19
+ /**
20
+ * expired
21
+ */
22
+ isOut: boolean;
23
+ /**
24
+ * if true the productIn is created from transfering qtity from another productin
25
+ */
26
+ fromTransfert: boolean;
27
+ /**
28
+ * indique the qtity waiting to transfert after transfert validation
29
+ */
30
+ qtityInTransfert: number;
31
+ /**
32
+ * is true if the transfert not validate
33
+ */
34
+ inTransfert: boolean;
35
+ depotId: number;
36
+ productId: number;
37
+ designation: string;
38
+ salePrice: number;
39
+ publicPrice: number;
40
+ product: Product;
41
+ depot: ProductDepot;
42
+ }
@@ -0,0 +1,2 @@
1
+ export class ProductIn {
2
+ }
@@ -0,0 +1,3 @@
1
+ import NaAc from "../../../shared/models/NaAc";
2
+ export interface ProductState extends NaAc {
3
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ export interface ProductStock {
2
+ sumIns: number;
3
+ sumOuts: number;
4
+ qtityPerPackaging: number;
5
+ qtityUnit?: number;
6
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import NaAc from "../../../shared/models/NaAc";
2
+ export interface ProductTag extends NaAc {
3
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ export interface ProductVariant {
2
+ id: number;
3
+ sku: string;
4
+ size: string;
5
+ color: string;
6
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ export * from "./Product";
2
+ export * from "./ProductAsset";
3
+ export * from "./ProductCat";
4
+ export * from "./ProductCollection";
5
+ export * from "./ProductDepot";
6
+ export * from "./ProductElt";
7
+ export * from "./ProductGrp";
8
+ export * from "./ProductImage";
9
+ export * from "./ProductIn";
10
+ export * from "./ProductState";
11
+ export * from "./ProductStock";
12
+ export * from "./ProductTag";
13
+ export * from "./ProductVariant";
@@ -0,0 +1,13 @@
1
+ export * from "./Product";
2
+ export * from "./ProductAsset";
3
+ export * from "./ProductCat";
4
+ export * from "./ProductCollection";
5
+ export * from "./ProductDepot";
6
+ export * from "./ProductElt";
7
+ export * from "./ProductGrp";
8
+ export * from "./ProductImage";
9
+ export * from "./ProductIn";
10
+ export * from "./ProductState";
11
+ export * from "./ProductStock";
12
+ export * from "./ProductTag";
13
+ export * from "./ProductVariant";
@@ -0,0 +1 @@
1
+ export * from "./models/Shop";
@@ -0,0 +1 @@
1
+ export * from "./models/Shop";
@@ -0,0 +1,13 @@
1
+ import { UMarket } from "../../models/UMarket";
2
+ import { Product } from "../../products/models/Product";
3
+ export interface Shop {
4
+ id: number;
5
+ name: string;
6
+ title: string;
7
+ description: string;
8
+ logo: string;
9
+ banner: string;
10
+ isActive: boolean;
11
+ products: Product[];
12
+ umarket: UMarket;
13
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ import UserBase from "../../../users/models/UserBase";
2
+ import { UMarket } from "../../models/UMarket";
3
+ export default interface User extends UserBase {
4
+ markets?: UMarket[];
5
+ wallets?: any;
6
+ phone?: string;
7
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare abstract class IIcon {
2
+ iconName: string;
3
+ iconPack: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ export class IIcon {
2
+ }
@@ -0,0 +1,7 @@
1
+ import { IIcon } from "./IIcon";
2
+ export declare abstract class NaAcIc extends IIcon {
3
+ id: number;
4
+ name: string;
5
+ isActive?: boolean;
6
+ disabled?: boolean;
7
+ }
@@ -0,0 +1,3 @@
1
+ import { IIcon } from "./IIcon";
2
+ export class NaAcIc extends IIcon {
3
+ }
@@ -0,0 +1,4 @@
1
+ import { NaAcIc } from "./NaAcIc";
2
+ export declare abstract class NaCoAcIc extends NaAcIc {
3
+ code: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ import { NaAcIc } from "./NaAcIc";
2
+ export class NaCoAcIc extends NaAcIc {
3
+ }
@@ -108,3 +108,4 @@ export declare const toggleProp: (tob: any, propToToggle: string) => any;
108
108
  export declare const winMaxHeight: (step?: 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9) => number;
109
109
  export declare const arraySome: (arr1: any[], arr2: any[]) => boolean;
110
110
  export declare const checkObjInArray: (objs: any[], checkProp: string | number, prop?: string) => boolean;
111
+ export declare function checkIsStringOfArray(array: unknown[]): array is string[];
package/lib/esm/utils.js CHANGED
@@ -685,3 +685,7 @@ export const checkObjInArray = (objs, checkProp, prop = "id") => {
685
685
  return x[prop] === checkProp;
686
686
  });
687
687
  };
688
+ export function checkIsStringOfArray(array) {
689
+ // return array.every((element) => typeof element === "string");
690
+ return array.some((element) => typeof element === "string");
691
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asv-hlps",
3
- "version": "1.4.5",
3
+ "version": "1.4.7",
4
4
  "description": "helpers",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/esm/index.js",
@@ -18,24 +18,24 @@
18
18
  "devDependencies": {
19
19
  "@types/bcryptjs": "^2.4.6",
20
20
  "@types/express": "^5.0.0",
21
- "@types/lodash": "^4.17.13",
22
- "@types/pdfmake": "^0.2.9",
21
+ "@types/lodash": "^4.17.14",
22
+ "@types/pdfmake": "^0.2.11",
23
23
  "@types/randomatic": "^3.1.5",
24
- "@types/react": "^18.3.12"
24
+ "@types/react": "^19.0.4"
25
25
  },
26
26
  "dependencies": {
27
- "axios": "^1.7.7",
27
+ "axios": "^1.7.9",
28
28
  "bcryptjs": "^2.4.3",
29
29
  "class-validator": "^0.14.1",
30
30
  "classnames": "^2.5.1",
31
31
  "dayjs": "^1.11.13",
32
- "express": "^4.21.1",
32
+ "express": "^4.21.2",
33
33
  "jwt-decode": "^4.0.0",
34
34
  "lodash": "^4.17.21",
35
- "pdfmake": "^0.2.15",
35
+ "pdfmake": "^0.2.18",
36
36
  "randomatic": "^3.1.1",
37
37
  "typeorm": "^0.3.20",
38
- "typescript": "^5.6.3",
39
- "yup": "^1.4.0"
38
+ "typescript": "^5.7.3",
39
+ "yup": "^1.6.1"
40
40
  }
41
41
  }