@jsdev_ninja/core 0.8.52 → 0.8.54

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.
package/dist/core.es.js CHANGED
@@ -2975,10 +2975,10 @@ const ar = i.object({
2975
2975
  floor: i.string(),
2976
2976
  apartmentEnterNumber: i.string(),
2977
2977
  apartmentNumber: i.string()
2978
- }), C = i.enum(["True", "False"]), ur = i.string().min(1), lr = i.string().regex(/^\d+$/, "Must be a numeric string"), ee = i.object({
2978
+ }), C = i.enum(["True", "False"]), fr = i.string().min(1), hr = i.string().regex(/^\d+$/, "Must be a numeric string"), ee = i.object({
2979
2979
  lang: i.enum(["he"]),
2980
2980
  value: i.string().min(1)
2981
- }), fr = i.array(ee), Ge = i.object({
2981
+ }), mr = i.array(ee), Ge = i.object({
2982
2982
  id: i.string().min(1),
2983
2983
  companyId: i.string().min(1),
2984
2984
  storeId: i.string().min(1),
@@ -2988,7 +2988,7 @@ const ar = i.object({
2988
2988
  depth: i.number()
2989
2989
  }), Pe = Ge.extend({
2990
2990
  children: i.lazy(() => Pe.array())
2991
- }), hr = Ge.extend({
2991
+ }), pr = Ge.extend({
2992
2992
  index: i.number(),
2993
2993
  depth: i.number(),
2994
2994
  collapsed: i.boolean().optional(),
@@ -3042,15 +3042,15 @@ const ar = i.object({
3042
3042
  lvl4: i.array(i.string())
3043
3043
  }),
3044
3044
  categoryNames: i.array(i.string())
3045
- }), mr = Se.omit({
3045
+ }), gr = Se.omit({
3046
3046
  id: !0,
3047
3047
  categories: !0,
3048
3048
  images: !0
3049
3049
  }).extend({
3050
3050
  image: i.instanceof(File).optional()
3051
- }), pr = Se.extend({
3051
+ }), yr = Se.extend({
3052
3052
  image: i.instanceof(File).optional()
3053
- }), gr = i.object({
3053
+ }), vr = i.object({
3054
3054
  type: i.literal("Cart"),
3055
3055
  id: i.string().uuid(),
3056
3056
  companyId: i.string().uuid(),
@@ -3063,7 +3063,7 @@ const ar = i.object({
3063
3063
  amount: i.number().int().positive({ message: "Quantity must be a positive integer." })
3064
3064
  })
3065
3065
  )
3066
- }), yr = i.object({
3066
+ }), _r = i.object({
3067
3067
  id: i.string(),
3068
3068
  name: i.string(),
3069
3069
  websiteDomains: i.array(i.string()),
@@ -3073,7 +3073,7 @@ const ar = i.object({
3073
3073
  mainEmail: i.string()
3074
3074
  })
3075
3075
  })
3076
- }), vr = i.object({
3076
+ }), br = i.object({
3077
3077
  type: i.literal("FavoriteProduct"),
3078
3078
  id: i.string().uuid(),
3079
3079
  companyId: i.string().uuid(),
@@ -3098,7 +3098,7 @@ const ar = i.object({
3098
3098
  createdDate: i.number(),
3099
3099
  lastActivityDate: i.number()
3100
3100
  });
3101
- function _r() {
3101
+ function xr() {
3102
3102
  return {
3103
3103
  type: "Profile",
3104
3104
  id: "",
@@ -3123,7 +3123,7 @@ function _r() {
3123
3123
  isAnonymous: !0
3124
3124
  };
3125
3125
  }
3126
- const br = i.object({
3126
+ const kr = i.object({
3127
3127
  type: i.literal("Order"),
3128
3128
  id: i.string(),
3129
3129
  companyId: i.string(),
@@ -3175,7 +3175,7 @@ const br = i.object({
3175
3175
  MoreData: C.optional(),
3176
3176
  // extra data in response
3177
3177
  J5: C.optional()
3178
- }), xr = $e.extend({
3178
+ }), wr = $e.extend({
3179
3179
  action: i.literal("soft"),
3180
3180
  Info: x,
3181
3181
  // text that will be displayed in transaction, report and the management system.
@@ -3198,7 +3198,7 @@ const br = i.object({
3198
3198
  Token: i.literal("True")
3199
3199
  // CC2
3200
3200
  // Coin
3201
- }), kr = i.object({
3201
+ }), Tr = i.object({
3202
3202
  action: i.literal("getToken"),
3203
3203
  allowFalse: i.literal("True"),
3204
3204
  Masof: x,
@@ -3207,14 +3207,14 @@ const br = i.object({
3207
3207
  // store masof password,
3208
3208
  TransId: j
3209
3209
  //todo api key is not required???
3210
- }), wr = i.object({
3210
+ }), Sr = i.object({
3211
3211
  Id: j,
3212
3212
  Token: j,
3213
3213
  Tokef: j,
3214
3214
  // credit card validity date in the format YYMM
3215
3215
  CCode: j
3216
3216
  //0 code is valid
3217
- }), Tr = $e.extend({
3217
+ }), Cr = $e.extend({
3218
3218
  Id: x,
3219
3219
  // transaction Id in Hypay
3220
3220
  ACode: j,
@@ -3253,7 +3253,7 @@ const br = i.object({
3253
3253
  // UID unique value receive from response after successful transaction from request with action pay/soft
3254
3254
  spType: i.string().optional(),
3255
3255
  bincard: i.string().optional()
3256
- }), Sr = $e.extend({
3256
+ }), Ir = $e.extend({
3257
3257
  Masof: x,
3258
3258
  // store masof number
3259
3259
  PassP: x,
@@ -3310,7 +3310,7 @@ i.object({
3310
3310
  // api key
3311
3311
  })
3312
3312
  });
3313
- const Cr = i.object({
3313
+ const Zr = i.object({
3314
3314
  storeEmail: i.string().email()
3315
3315
  }), ge = "https://pay.hyp.co.il/p/";
3316
3316
  function Ne(r) {
@@ -3328,7 +3328,7 @@ function cr(r) {
3328
3328
  return n && s && (e[n] = decodeURIComponent(s)), e;
3329
3329
  }, {});
3330
3330
  }
3331
- const Ir = {
3331
+ const Nr = {
3332
3332
  async chargeJ5Transaction(r) {
3333
3333
  try {
3334
3334
  const e = Ne({
@@ -3379,41 +3379,59 @@ const Ir = {
3379
3379
  }
3380
3380
  }
3381
3381
  }, dr = {
3382
+ stores: "stores",
3383
+ companies: "companies"
3384
+ }, ur = {
3385
+ products: "products",
3386
+ profiles: "profiles",
3387
+ cart: "cart",
3388
+ clients: "clients",
3389
+ orders: "orders",
3390
+ categories: "categories",
3391
+ favorites: "favorites",
3392
+ payments: "payments"
3393
+ }, lr = {
3394
+ systemCollections: dr,
3395
+ storeCollections: ur,
3396
+ // for client
3382
3397
  getPath: ({
3383
3398
  companyId: r,
3384
3399
  storeId: e,
3385
- collectionName: t
3386
- }) => `${r}/${e}/${t}`
3387
- }, Zr = {
3388
- firestore: dr
3400
+ collectionName: t,
3401
+ id: n
3402
+ }) => `${r}/${e}/${t}${n ? `/${n}` : ""}`,
3403
+ // for backend
3404
+ getDocPath: (r) => `{companyId}/{storeId}/${r}/{id}`
3405
+ }, Ar = {
3406
+ firestore: lr
3389
3407
  };
3390
3408
  export {
3391
3409
  ar as AddressSchema,
3392
3410
  Ge as BaseCategorySchema,
3393
- gr as CartSchema,
3411
+ vr as CartSchema,
3394
3412
  Pe as CategorySchema,
3395
- yr as CompanySchema,
3396
- pr as EditProductSchema,
3397
- vr as FavoriteProductSchema,
3398
- Zr as FirebaseAPI,
3399
- Sr as HypPaymentLinkRequestSchema,
3400
- xr as HypSoftTransactionRequestSchema,
3401
- kr as HypTokenRequestSchema,
3402
- wr as HypTokenResponseSchema,
3413
+ _r as CompanySchema,
3414
+ yr as EditProductSchema,
3415
+ br as FavoriteProductSchema,
3416
+ Ar as FirebaseAPI,
3417
+ Ir as HypPaymentLinkRequestSchema,
3418
+ wr as HypSoftTransactionRequestSchema,
3419
+ Tr as HypTokenRequestSchema,
3420
+ Sr as HypTokenResponseSchema,
3403
3421
  ee as LocaleSchema,
3404
- fr as LocaleValueSchema,
3405
- mr as NewProductSchema,
3406
- br as OrderSchema,
3422
+ mr as LocaleValueSchema,
3423
+ gr as NewProductSchema,
3424
+ kr as OrderSchema,
3407
3425
  $e as PayProtocolGeneralSchema,
3408
- Tr as PayProtocolResponseSchema,
3426
+ Cr as PayProtocolResponseSchema,
3409
3427
  Se as ProductSchema,
3410
3428
  ir as ProfileSchema,
3411
- Cr as StorePrivateSchema,
3412
- hr as TFlattenCategorySchema,
3413
- _r as createEmptyProfile,
3429
+ Zr as StorePrivateSchema,
3430
+ pr as TFlattenCategorySchema,
3431
+ xr as createEmptyProfile,
3414
3432
  C as hypBooleanSchema,
3415
- Ir as hypPaymentService,
3416
- ur as notEmptyTextSchema,
3417
- lr as numericTextSchema
3433
+ Nr as hypPaymentService,
3434
+ fr as notEmptyTextSchema,
3435
+ hr as numericTextSchema
3418
3436
  };
3419
3437
  //# sourceMappingURL=core.es.js.map