@blux.ai/web-sdk 1.1.7 → 1.2.1

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 (63) hide show
  1. package/dist/package.json +1 -1
  2. package/dist/src/BluxClient.d.ts +5 -2
  3. package/dist/src/BluxClient.js +110 -37
  4. package/dist/src/BluxClient.js.map +1 -1
  5. package/dist/src/apis/APIs.d.ts +240 -65
  6. package/dist/src/apis/APIs.js +14 -19
  7. package/dist/src/apis/APIs.js.map +1 -1
  8. package/dist/src/apis/getItemRecommendations.d.ts +4 -0
  9. package/dist/src/apis/getItemRecommendations.js +7 -0
  10. package/dist/src/apis/getItemRecommendations.js.map +1 -0
  11. package/dist/src/events/AddCartaddEvent.d.ts +1 -1
  12. package/dist/src/events/AddCartaddEvent.js +2 -1
  13. package/dist/src/events/AddCartaddEvent.js.map +1 -1
  14. package/dist/src/events/AddInstantImpressionEvent.d.ts +1 -1
  15. package/dist/src/events/AddInstantImpressionEvent.js +2 -1
  16. package/dist/src/events/AddInstantImpressionEvent.js.map +1 -1
  17. package/dist/src/events/AddPageViewEvent.d.ts +1 -1
  18. package/dist/src/events/AddPageViewEvent.js +2 -2
  19. package/dist/src/events/AddPageViewEvent.js.map +1 -1
  20. package/dist/src/events/AddPersistentImpressionEvent.d.ts +1 -1
  21. package/dist/src/events/AddPersistentImpressionEvent.js +2 -1
  22. package/dist/src/events/AddPersistentImpressionEvent.js.map +1 -1
  23. package/dist/src/events/AddProductDetailViewEvent.d.ts +1 -1
  24. package/dist/src/events/AddProductDetailViewEvent.js +2 -1
  25. package/dist/src/events/AddProductDetailViewEvent.js.map +1 -1
  26. package/dist/src/events/AddSectionViewEvent.d.ts +1 -1
  27. package/dist/src/events/AddSectionViewEvent.js +2 -1
  28. package/dist/src/events/AddSectionViewEvent.js.map +1 -1
  29. package/dist/src/events/types.d.ts +12 -0
  30. package/dist/src/events/types.js.map +1 -1
  31. package/dist/src/index.d.ts +1 -1
  32. package/dist/src/index.js +1 -1
  33. package/dist/src/index.js.map +1 -1
  34. package/dist/src/recs/ItemRec.d.ts +14 -0
  35. package/dist/src/recs/ItemRec.js +42 -0
  36. package/dist/src/recs/ItemRec.js.map +1 -0
  37. package/dist/src/recs/Rec.d.ts +5 -0
  38. package/dist/src/{recommendations/Recommendation.js → recs/Rec.js} +2 -2
  39. package/dist/src/recs/Rec.js.map +1 -0
  40. package/dist/src/recs/index.d.ts +1 -0
  41. package/dist/src/recs/index.js +2 -0
  42. package/dist/src/recs/index.js.map +1 -0
  43. package/dist/src/recs/types.d.ts +23 -0
  44. package/dist/src/recs/types.js.map +1 -0
  45. package/dist/src/utils/zodSchemas.d.ts +124 -11
  46. package/dist/src/utils/zodSchemas.js +64 -22
  47. package/dist/src/utils/zodSchemas.js.map +1 -1
  48. package/dist/tsconfig.tsbuildinfo +1 -1
  49. package/package.json +1 -1
  50. package/dist/src/apis/getItemRecommendation.d.ts +0 -4
  51. package/dist/src/apis/getItemRecommendation.js +0 -7
  52. package/dist/src/apis/getItemRecommendation.js.map +0 -1
  53. package/dist/src/recommendations/ItemRecommendation.d.ts +0 -5
  54. package/dist/src/recommendations/ItemRecommendation.js +0 -13
  55. package/dist/src/recommendations/ItemRecommendation.js.map +0 -1
  56. package/dist/src/recommendations/Recommendation.d.ts +0 -5
  57. package/dist/src/recommendations/Recommendation.js.map +0 -1
  58. package/dist/src/recommendations/index.d.ts +0 -1
  59. package/dist/src/recommendations/index.js +0 -2
  60. package/dist/src/recommendations/index.js.map +0 -1
  61. package/dist/src/recommendations/types.d.ts +0 -12
  62. package/dist/src/recommendations/types.js.map +0 -1
  63. /package/dist/src/{recommendations → recs}/types.js +0 -0
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ import type { RecResponse } from "../utils/zodSchemas";
2
3
  import type { Serialize } from "../utils/Base";
3
4
  declare enum HttpMethod {
4
5
  GET = "get",
@@ -18,7 +19,7 @@ export declare namespace APIs {
18
19
  const method = HttpMethod.POST;
19
20
  const bodySchema: z.ZodObject<{
20
21
  device_id: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>>;
21
- country_code: z.ZodOptional<z.ZodEffects<z.ZodEnum<["AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BA" | "BW" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IL" | "IT" | "JM" | "JP" | "JO" | "KE" | "KI" | "KP" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "GY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "RO" | "RU" | "KZ" | "RW" | "RE" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SK" | "SI" | "SB" | "SO" | "ZA" | "SS" | "ES" | "LK" | "SD" | "SR" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "US" | "CA" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "YE" | "ZM" | "ZW", ...("AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BA" | "BW" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IL" | "IT" | "JM" | "JP" | "JO" | "KE" | "KI" | "KP" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "GY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "RO" | "RU" | "KZ" | "RW" | "RE" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SK" | "SI" | "SB" | "SO" | "ZA" | "SS" | "ES" | "LK" | "SD" | "SR" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "US" | "CA" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "YE" | "ZM" | "ZW")[]]>, "AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BA" | "BW" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IL" | "IT" | "JM" | "JP" | "JO" | "KE" | "KI" | "KP" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "GY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "RO" | "RU" | "KZ" | "RW" | "RE" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SK" | "SI" | "SB" | "SO" | "ZA" | "SS" | "ES" | "LK" | "SD" | "SR" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "US" | "CA" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "YE" | "ZM" | "ZW", unknown>>;
22
+ country_code: z.ZodOptional<z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodUnion<[z.ZodLiteral<"419">, z.ZodEnum<["AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BA" | "BW" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IL" | "IT" | "JM" | "JP" | "JO" | "KE" | "KI" | "KP" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "GY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "RO" | "RU" | "KZ" | "RW" | "RE" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SK" | "SI" | "SB" | "SO" | "ZA" | "SS" | "ES" | "LK" | "SD" | "SR" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "US" | "CA" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "YE" | "ZM" | "ZW", ...("AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BA" | "BW" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IL" | "IT" | "JM" | "JP" | "JO" | "KE" | "KI" | "KP" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "GY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "RO" | "RU" | "KZ" | "RW" | "RE" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SK" | "SI" | "SB" | "SO" | "ZA" | "SS" | "ES" | "LK" | "SD" | "SR" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "US" | "CA" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "YE" | "ZM" | "ZW")[]]>]>>, "AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BA" | "BW" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IL" | "IT" | "JM" | "JP" | "JO" | "KE" | "KI" | "KP" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "GY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "RO" | "RU" | "KZ" | "RW" | "RE" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SK" | "SI" | "SB" | "SO" | "ZA" | "SS" | "ES" | "LK" | "SD" | "SR" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "US" | "CA" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "YE" | "ZM" | "ZW" | undefined, string>>;
22
23
  device_model: z.ZodString;
23
24
  language_code: z.ZodString;
24
25
  os_version: z.ZodString;
@@ -37,9 +38,9 @@ export declare namespace APIs {
37
38
  sdk_version: string;
38
39
  timezone: string;
39
40
  isVisitHandlingInSdk: boolean;
41
+ blux_user_id?: string | undefined;
40
42
  device_id?: import("bson-objectid").default | undefined;
41
43
  country_code?: "AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AI" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BM" | "BT" | "BO" | "BA" | "BW" | "BR" | "IO" | "BN" | "BG" | "BF" | "BI" | "KH" | "CM" | "CV" | "KY" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CG" | "CD" | "CK" | "CR" | "CI" | "HR" | "CU" | "CY" | "CZ" | "DK" | "DJ" | "DM" | "DO" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FK" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GI" | "GR" | "GL" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "HT" | "VA" | "HN" | "HK" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IL" | "IT" | "JM" | "JP" | "JO" | "KE" | "KI" | "KP" | "KR" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LY" | "LI" | "LT" | "LU" | "MO" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MH" | "MQ" | "MR" | "MU" | "YT" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "MM" | "NA" | "NR" | "NP" | "NL" | "NC" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "MP" | "NO" | "OM" | "PK" | "PW" | "PS" | "PA" | "PG" | "PY" | "GY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "RO" | "RU" | "KZ" | "RW" | "RE" | "BL" | "SH" | "KN" | "LC" | "MF" | "PM" | "VC" | "WS" | "SM" | "ST" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SK" | "SI" | "SB" | "SO" | "ZA" | "SS" | "ES" | "LK" | "SD" | "SR" | "SZ" | "SE" | "CH" | "SY" | "TW" | "TJ" | "TZ" | "TH" | "TL" | "TG" | "TK" | "TO" | "TT" | "TN" | "TR" | "TM" | "TC" | "TV" | "UG" | "UA" | "AE" | "GB" | "US" | "CA" | "UY" | "UZ" | "VU" | "VE" | "VN" | "VG" | "VI" | "WF" | "YE" | "ZM" | "ZW" | undefined;
42
- blux_user_id?: string | undefined;
43
44
  }, {
44
45
  device_model: string;
45
46
  language_code: string;
@@ -48,10 +49,10 @@ export declare namespace APIs {
48
49
  sdk_type: string;
49
50
  sdk_version: string;
50
51
  timezone: string;
52
+ blux_user_id?: string | undefined;
51
53
  device_id?: string | undefined;
52
- country_code?: unknown;
54
+ country_code?: string | undefined;
53
55
  isVisitHandlingInSdk?: boolean | undefined;
54
- blux_user_id?: string | undefined;
55
56
  }>;
56
57
  type Body = Serialize<z.input<typeof bodySchema>>;
57
58
  const pathSchema: z.ZodObject<{
@@ -132,11 +133,11 @@ export declare namespace APIs {
132
133
  application_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
133
134
  blux_user_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
134
135
  }, "strip", z.ZodTypeAny, {
135
- blux_user_id: import("bson-objectid").default;
136
136
  application_id: import("bson-objectid").default;
137
+ blux_user_id: import("bson-objectid").default;
137
138
  }, {
138
- blux_user_id: string;
139
139
  application_id: string;
140
+ blux_user_id: string;
140
141
  }>;
141
142
  type PathParam = Serialize<z.input<typeof pathSchema>>;
142
143
  const bodySchema: z.ZodObject<{
@@ -145,8 +146,86 @@ export declare namespace APIs {
145
146
  event_type: z.ZodString;
146
147
  event_value: z.ZodOptional<z.ZodString>;
147
148
  item_id: z.ZodOptional<z.ZodString>;
148
- event_properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>>;
149
- custom_event_properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>>;
149
+ event_properties: z.ZodOptional<z.ZodObject<{
150
+ section: z.ZodOptional<z.ZodString>;
151
+ prev_section: z.ZodOptional<z.ZodString>;
152
+ recommendation_id: z.ZodOptional<z.ZodString>;
153
+ price: z.ZodOptional<z.ZodNumber>;
154
+ order_id: z.ZodOptional<z.ZodString>;
155
+ rating: z.ZodOptional<z.ZodNumber>;
156
+ prev_page: z.ZodOptional<z.ZodString>;
157
+ page: z.ZodOptional<z.ZodString>;
158
+ position: z.ZodOptional<z.ZodNumber>;
159
+ item_id: z.ZodOptional<z.ZodString>;
160
+ items: z.ZodOptional<z.ZodArray<z.ZodObject<{
161
+ id: z.ZodString;
162
+ price: z.ZodNumber;
163
+ }, "strip", z.ZodTypeAny, {
164
+ id: string;
165
+ price: number;
166
+ }, {
167
+ id: string;
168
+ price: number;
169
+ }>, "many">>;
170
+ search_query: z.ZodOptional<z.ZodString>;
171
+ order_amount: z.ZodOptional<z.ZodNumber>;
172
+ paid_amount: z.ZodOptional<z.ZodNumber>;
173
+ trackings: z.ZodOptional<z.ZodArray<z.ZodObject<{
174
+ id: z.ZodString;
175
+ type: z.ZodString;
176
+ }, "strip", z.ZodTypeAny, {
177
+ id: string;
178
+ type: string;
179
+ }, {
180
+ id: string;
181
+ type: string;
182
+ }>, "many">>;
183
+ }, "strip", z.ZodTypeAny, {
184
+ item_id?: string | undefined;
185
+ recommendation_id?: string | undefined;
186
+ prev_page?: string | undefined;
187
+ prev_section?: string | undefined;
188
+ trackings?: {
189
+ id: string;
190
+ type: string;
191
+ }[] | undefined;
192
+ rating?: number | undefined;
193
+ price?: number | undefined;
194
+ order_id?: string | undefined;
195
+ page?: string | undefined;
196
+ section?: string | undefined;
197
+ position?: number | undefined;
198
+ search_query?: string | undefined;
199
+ items?: {
200
+ id: string;
201
+ price: number;
202
+ }[] | undefined;
203
+ order_amount?: number | undefined;
204
+ paid_amount?: number | undefined;
205
+ }, {
206
+ item_id?: string | undefined;
207
+ recommendation_id?: string | undefined;
208
+ prev_page?: string | undefined;
209
+ prev_section?: string | undefined;
210
+ trackings?: {
211
+ id: string;
212
+ type: string;
213
+ }[] | undefined;
214
+ rating?: number | undefined;
215
+ price?: number | undefined;
216
+ order_id?: string | undefined;
217
+ page?: string | undefined;
218
+ section?: string | undefined;
219
+ position?: number | undefined;
220
+ search_query?: string | undefined;
221
+ items?: {
222
+ id: string;
223
+ price: number;
224
+ }[] | undefined;
225
+ order_amount?: number | undefined;
226
+ paid_amount?: number | undefined;
227
+ }>>;
228
+ custom_event_properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, "many">, z.ZodUndefined]>>>;
150
229
  internal_event_properties: z.ZodOptional<z.ZodObject<{
151
230
  url: z.ZodOptional<z.ZodString>;
152
231
  ref: z.ZodOptional<z.ZodString>;
@@ -165,8 +244,30 @@ export declare namespace APIs {
165
244
  url?: string | undefined;
166
245
  ref?: string | undefined;
167
246
  } | undefined;
168
- event_properties?: Record<string, string | number | boolean | Date | string[]> | undefined;
169
- custom_event_properties?: Record<string, string | number | boolean | Date | string[]> | undefined;
247
+ event_properties?: {
248
+ item_id?: string | undefined;
249
+ recommendation_id?: string | undefined;
250
+ prev_page?: string | undefined;
251
+ prev_section?: string | undefined;
252
+ trackings?: {
253
+ id: string;
254
+ type: string;
255
+ }[] | undefined;
256
+ rating?: number | undefined;
257
+ price?: number | undefined;
258
+ order_id?: string | undefined;
259
+ page?: string | undefined;
260
+ section?: string | undefined;
261
+ position?: number | undefined;
262
+ search_query?: string | undefined;
263
+ items?: {
264
+ id: string;
265
+ price: number;
266
+ }[] | undefined;
267
+ order_amount?: number | undefined;
268
+ paid_amount?: number | undefined;
269
+ } | undefined;
270
+ custom_event_properties?: Record<string, string | number | boolean | Date | string[] | {}[] | undefined> | undefined;
170
271
  item_id?: string | undefined;
171
272
  device_id?: import("bson-objectid").default | undefined;
172
273
  event_value?: string | undefined;
@@ -177,8 +278,30 @@ export declare namespace APIs {
177
278
  url?: string | undefined;
178
279
  ref?: string | undefined;
179
280
  } | undefined;
180
- event_properties?: Record<string, string | number | boolean | string[]> | undefined;
181
- custom_event_properties?: Record<string, string | number | boolean | string[]> | undefined;
281
+ event_properties?: {
282
+ item_id?: string | undefined;
283
+ recommendation_id?: string | undefined;
284
+ prev_page?: string | undefined;
285
+ prev_section?: string | undefined;
286
+ trackings?: {
287
+ id: string;
288
+ type: string;
289
+ }[] | undefined;
290
+ rating?: number | undefined;
291
+ price?: number | undefined;
292
+ order_id?: string | undefined;
293
+ page?: string | undefined;
294
+ section?: string | undefined;
295
+ position?: number | undefined;
296
+ search_query?: string | undefined;
297
+ items?: {
298
+ id: string;
299
+ price: number;
300
+ }[] | undefined;
301
+ order_amount?: number | undefined;
302
+ paid_amount?: number | undefined;
303
+ } | undefined;
304
+ custom_event_properties?: Record<string, string | number | boolean | string[] | {}[] | undefined> | undefined;
182
305
  item_id?: string | undefined;
183
306
  device_id?: string | undefined;
184
307
  event_value?: string | undefined;
@@ -191,8 +314,30 @@ export declare namespace APIs {
191
314
  url?: string | undefined;
192
315
  ref?: string | undefined;
193
316
  } | undefined;
194
- event_properties?: Record<string, string | number | boolean | Date | string[]> | undefined;
195
- custom_event_properties?: Record<string, string | number | boolean | Date | string[]> | undefined;
317
+ event_properties?: {
318
+ item_id?: string | undefined;
319
+ recommendation_id?: string | undefined;
320
+ prev_page?: string | undefined;
321
+ prev_section?: string | undefined;
322
+ trackings?: {
323
+ id: string;
324
+ type: string;
325
+ }[] | undefined;
326
+ rating?: number | undefined;
327
+ price?: number | undefined;
328
+ order_id?: string | undefined;
329
+ page?: string | undefined;
330
+ section?: string | undefined;
331
+ position?: number | undefined;
332
+ search_query?: string | undefined;
333
+ items?: {
334
+ id: string;
335
+ price: number;
336
+ }[] | undefined;
337
+ order_amount?: number | undefined;
338
+ paid_amount?: number | undefined;
339
+ } | undefined;
340
+ custom_event_properties?: Record<string, string | number | boolean | Date | string[] | {}[] | undefined> | undefined;
196
341
  item_id?: string | undefined;
197
342
  device_id?: import("bson-objectid").default | undefined;
198
343
  event_value?: string | undefined;
@@ -205,8 +350,30 @@ export declare namespace APIs {
205
350
  url?: string | undefined;
206
351
  ref?: string | undefined;
207
352
  } | undefined;
208
- event_properties?: Record<string, string | number | boolean | string[]> | undefined;
209
- custom_event_properties?: Record<string, string | number | boolean | string[]> | undefined;
353
+ event_properties?: {
354
+ item_id?: string | undefined;
355
+ recommendation_id?: string | undefined;
356
+ prev_page?: string | undefined;
357
+ prev_section?: string | undefined;
358
+ trackings?: {
359
+ id: string;
360
+ type: string;
361
+ }[] | undefined;
362
+ rating?: number | undefined;
363
+ price?: number | undefined;
364
+ order_id?: string | undefined;
365
+ page?: string | undefined;
366
+ section?: string | undefined;
367
+ position?: number | undefined;
368
+ search_query?: string | undefined;
369
+ items?: {
370
+ id: string;
371
+ price: number;
372
+ }[] | undefined;
373
+ order_amount?: number | undefined;
374
+ paid_amount?: number | undefined;
375
+ } | undefined;
376
+ custom_event_properties?: Record<string, string | number | boolean | string[] | {}[] | undefined> | undefined;
210
377
  item_id?: string | undefined;
211
378
  device_id?: string | undefined;
212
379
  event_value?: string | undefined;
@@ -215,52 +382,6 @@ export declare namespace APIs {
215
382
  type Body = Serialize<z.input<typeof bodySchema>>;
216
383
  type ResponseData = boolean;
217
384
  }
218
- namespace bluxUsersGetItemRecommendations {
219
- const name = "bluxUsersGetItemRecommendations";
220
- const path: string;
221
- const method = HttpMethod.POST;
222
- const bodySchema: z.ZodObject<{
223
- call_type: z.ZodString;
224
- limit: z.ZodNumber;
225
- offset: z.ZodDefault<z.ZodNumber>;
226
- item_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
227
- options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
228
- }, "strip", z.ZodTypeAny, {
229
- call_type: string;
230
- limit: number;
231
- offset: number;
232
- options?: Record<string, any> | undefined;
233
- item_ids?: string[] | undefined;
234
- }, {
235
- call_type: string;
236
- limit: number;
237
- options?: Record<string, any> | undefined;
238
- offset?: number | undefined;
239
- item_ids?: string[] | undefined;
240
- }>;
241
- type Body = Serialize<z.input<typeof bodySchema>>;
242
- const pathSchema: z.ZodObject<{
243
- application_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
244
- blux_user_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
245
- }, "strip", z.ZodTypeAny, {
246
- blux_user_id: import("bson-objectid").default;
247
- application_id: import("bson-objectid").default;
248
- }, {
249
- blux_user_id: string;
250
- application_id: string;
251
- }>;
252
- type PathParam = Serialize<z.input<typeof pathSchema>>;
253
- type ResponseData = {
254
- recommendation_id?: string;
255
- items: string[];
256
- metadata: Record<string, any>;
257
- status: {
258
- is_success: boolean;
259
- code: number;
260
- message?: string;
261
- };
262
- };
263
- }
264
385
  namespace bluxUsersUpdateUserProperties {
265
386
  const name = "bluxUsersUpdateUserProperties";
266
387
  const path: string;
@@ -328,11 +449,11 @@ export declare namespace APIs {
328
449
  const path: string;
329
450
  const method = HttpMethod.PUT;
330
451
  const bodySchema: z.ZodObject<{
331
- properties: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodNull]>>;
452
+ properties: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, "many">, z.ZodNull, z.ZodUndefined]>>;
332
453
  }, "strip", z.ZodTypeAny, {
333
- properties: Record<string, string | number | boolean | Date | string[] | null>;
454
+ properties: Record<string, string | number | boolean | Date | string[] | {}[] | null | undefined>;
334
455
  }, {
335
- properties: Record<string, string | number | boolean | string[] | null>;
456
+ properties: Record<string, string | number | boolean | string[] | {}[] | null | undefined>;
336
457
  }>;
337
458
  type Body = Serialize<z.input<typeof bodySchema>>;
338
459
  const pathSchema: z.ZodObject<{
@@ -350,5 +471,59 @@ export declare namespace APIs {
350
471
  blux_user_id: string;
351
472
  };
352
473
  }
474
+ namespace bluxUsersGetItemRecommendationsV2 {
475
+ const name = "bluxUsersGetItemRecommendationsV2";
476
+ const path: string;
477
+ const method = HttpMethod.POST;
478
+ const bodySchema: z.ZodObject<z.objectUtil.extendShape<Pick<{
479
+ application_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
480
+ blux_user_id: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>>>;
481
+ pipeline: z.ZodArray<z.ZodObject<{
482
+ name: z.ZodString;
483
+ kwargs: z.ZodRecord<z.ZodString, z.ZodAny>;
484
+ }, "strip", z.ZodTypeAny, {
485
+ name: string;
486
+ kwargs: Record<string, any>;
487
+ }, {
488
+ name: string;
489
+ kwargs: Record<string, any>;
490
+ }>, "many">;
491
+ item_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
492
+ item_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
493
+ limit: z.ZodNumber;
494
+ offset: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
495
+ options: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
496
+ }, "item_id" | "item_ids" | "limit" | "offset">, {
497
+ call_type: z.ZodString;
498
+ category_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
499
+ }>, "strip", z.ZodTypeAny, {
500
+ limit: number;
501
+ offset: number | null;
502
+ call_type: string;
503
+ item_id?: string | null | undefined;
504
+ item_ids?: string[] | null | undefined;
505
+ category_id?: string | null | undefined;
506
+ }, {
507
+ limit: number;
508
+ call_type: string;
509
+ item_id?: string | null | undefined;
510
+ item_ids?: string[] | null | undefined;
511
+ offset?: number | null | undefined;
512
+ category_id?: string | null | undefined;
513
+ }>;
514
+ type Body = Serialize<z.input<typeof bodySchema>>;
515
+ const pathSchema: z.ZodObject<{
516
+ application_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
517
+ blux_user_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
518
+ }, "strip", z.ZodTypeAny, {
519
+ application_id: import("bson-objectid").default;
520
+ blux_user_id: import("bson-objectid").default;
521
+ }, {
522
+ application_id: string;
523
+ blux_user_id: string;
524
+ }>;
525
+ type PathParam = Serialize<z.input<typeof pathSchema>>;
526
+ type ResponseData = RecResponse;
527
+ }
353
528
  }
354
529
  export {};
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable @typescript-eslint/no-namespace */
2
2
  import { z } from "zod";
3
- import { countryCodeWithLowerCaseSchema, customPropertiesRequestSchema, customPropertiesSchema, dateSchema, objectIdSchema, } from "../utils/zodSchemas";
3
+ import { countryCodeWithLowerCaseSchema, customPropertiesRequestSchema, customPropertiesSchema, dateSchema, eventPropertiesSchema, objectIdSchema, recommendationRequestSchema, } from "../utils/zodSchemas";
4
4
  var HttpMethod;
5
5
  (function (HttpMethod) {
6
6
  HttpMethod["GET"] = "get";
@@ -15,6 +15,7 @@ export var DevicePlatform;
15
15
  DevicePlatform["browser"] = "browser";
16
16
  })(DevicePlatform || (DevicePlatform = {}));
17
17
  const applicationsRoot = "/applications/{application_id}";
18
+ const applicationsRootV2 = "/v2/applications/{application_id}";
18
19
  export var APIs;
19
20
  (function (APIs) {
20
21
  let bluxUsersInitialize;
@@ -81,7 +82,7 @@ export var APIs;
81
82
  event_type: z.string(),
82
83
  event_value: z.string().optional(),
83
84
  item_id: z.string().optional(),
84
- event_properties: customPropertiesSchema.optional(),
85
+ event_properties: eventPropertiesSchema.optional(),
85
86
  custom_event_properties: customPropertiesSchema.optional(),
86
87
  internal_event_properties: z
87
88
  .object({
@@ -93,23 +94,6 @@ export var APIs;
93
94
  })),
94
95
  });
95
96
  })(bluxUsersCollectEvents = APIs.bluxUsersCollectEvents || (APIs.bluxUsersCollectEvents = {}));
96
- let bluxUsersGetItemRecommendations;
97
- (function (bluxUsersGetItemRecommendations) {
98
- bluxUsersGetItemRecommendations.name = "bluxUsersGetItemRecommendations";
99
- bluxUsersGetItemRecommendations.path = `${applicationsRoot}/blux-users/{blux_user_id}/item-recommendations`;
100
- bluxUsersGetItemRecommendations.method = HttpMethod.POST;
101
- bluxUsersGetItemRecommendations.bodySchema = z.object({
102
- call_type: z.string(),
103
- limit: z.number(),
104
- offset: z.number().default(0),
105
- item_ids: z.array(z.string()).optional(),
106
- options: z.record(z.string(), z.any()).optional(),
107
- });
108
- bluxUsersGetItemRecommendations.pathSchema = z.object({
109
- application_id: objectIdSchema,
110
- blux_user_id: objectIdSchema,
111
- });
112
- })(bluxUsersGetItemRecommendations = APIs.bluxUsersGetItemRecommendations || (APIs.bluxUsersGetItemRecommendations = {}));
113
97
  let bluxUsersUpdateUserProperties;
114
98
  (function (bluxUsersUpdateUserProperties) {
115
99
  bluxUsersUpdateUserProperties.name = "bluxUsersUpdateUserProperties";
@@ -143,5 +127,16 @@ export var APIs;
143
127
  blux_user_id: objectIdSchema,
144
128
  });
145
129
  })(bluxUsersUpdateCustomUserProperties = APIs.bluxUsersUpdateCustomUserProperties || (APIs.bluxUsersUpdateCustomUserProperties = {}));
130
+ let bluxUsersGetItemRecommendationsV2;
131
+ (function (bluxUsersGetItemRecommendationsV2) {
132
+ bluxUsersGetItemRecommendationsV2.name = "bluxUsersGetItemRecommendationsV2";
133
+ bluxUsersGetItemRecommendationsV2.path = `${applicationsRootV2}/blux-users/{blux_user_id}/item-recommendations`;
134
+ bluxUsersGetItemRecommendationsV2.method = HttpMethod.POST;
135
+ bluxUsersGetItemRecommendationsV2.bodySchema = recommendationRequestSchema;
136
+ bluxUsersGetItemRecommendationsV2.pathSchema = z.object({
137
+ application_id: objectIdSchema,
138
+ blux_user_id: objectIdSchema,
139
+ });
140
+ })(bluxUsersGetItemRecommendationsV2 = APIs.bluxUsersGetItemRecommendationsV2 || (APIs.bluxUsersGetItemRecommendationsV2 = {}));
146
141
  })(APIs || (APIs = {}));
147
142
  //# sourceMappingURL=APIs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"APIs.js","sourceRoot":"/","sources":["src/apis/APIs.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,8BAA8B,EAC9B,6BAA6B,EAC7B,sBAAsB,EACtB,UAAU,EACV,cAAc,GACf,MAAM,qBAAqB,CAAC;AAG7B,IAAK,UAKJ;AALD,WAAK,UAAU;IACb,yBAAW,CAAA;IACX,2BAAa,CAAA;IACb,yBAAW,CAAA;IACX,+BAAiB,CAAA;AACnB,CAAC,EALI,UAAU,KAAV,UAAU,QAKd;AAED,MAAM,CAAN,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,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YACrC,YAAY,EAAE,cAAc;SAC7B,CAAC,CAAC;IAML,CAAC,EA1BgB,6BAA6B,GAA7B,kCAA6B,KAA7B,kCAA6B,QA0B7C;IAED,IAAiB,mCAAmC,CAmBnD;IAnBD,WAAiB,mCAAmC;QACrC,wCAAI,GAAG,qCAAqC,CAAC;QAC7C,wCAAI,GAAG,GAAG,gBAAgB,0DAA0D,CAAC;QACrF,0CAAM,GAAG,UAAU,CAAC,GAAG,CAAC;QAExB,8CAAU,GAAG,CAAC,CAAC,MAAM,CAAC;YACjC,UAAU,EAAE,6BAA6B;SAC1C,CAAC,CAAC;QAGU,8CAAU,GAAG,CAAC,CAAC,MAAM,CAAC;YACjC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YACrC,YAAY,EAAE,cAAc;SAC7B,CAAC,CAAC;IAML,CAAC,EAnBgB,mCAAmC,GAAnC,wCAAmC,KAAnC,wCAAmC,QAmBnD;AACH,CAAC,EA9LgB,IAAI,KAAJ,IAAI,QA8LpB","sourcesContent":["/* eslint-disable @typescript-eslint/no-namespace */\nimport { z } from \"zod\";\nimport {\n countryCodeWithLowerCaseSchema,\n customPropertiesRequestSchema,\n customPropertiesSchema,\n dateSchema,\n objectIdSchema,\n} from \"../utils/zodSchemas\";\nimport type { Serialize } from \"../utils/Base\";\n\nenum HttpMethod {\n GET = \"get\",\n POST = \"post\",\n PUT = \"put\",\n DELETE = \"delete\",\n}\n\nexport enum DevicePlatform {\n ios = \"ios\",\n android = \"android\",\n browser = \"browser\",\n}\n\nconst applicationsRoot = \"/applications/{application_id}\";\n\nexport namespace APIs {\n export namespace bluxUsersInitialize {\n export const name = \"bluxUsersInitialize\";\n export const path = `${applicationsRoot}/blux-users/initialize`;\n export const method = HttpMethod.POST;\n\n export const bodySchema = z.object({\n device_id: objectIdSchema.optional(),\n country_code: countryCodeWithLowerCaseSchema.optional(),\n device_model: z.string(),\n language_code: z.string(),\n os_version: z.string(),\n platform: z.nativeEnum(DevicePlatform),\n sdk_type: z.string(),\n sdk_version: z.string(),\n timezone: z.string(),\n isVisitHandlingInSdk: z.boolean().default(false), // sdk 업데이트 후 삭제\n blux_user_id: z.string().optional(),\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export const pathSchema = z.object({\n application_id: z.string().optional(),\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export type ResponseData = {\n blux_user_id: string;\n device_id?: string;\n };\n }\n\n export namespace bluxUsersSignIn {\n export const name = \"bluxUsersSignIn\";\n export const path = `${applicationsRoot}/blux-users/{blux_user_id}/sign-in`;\n export const method = HttpMethod.PUT;\n\n export const bodySchema = z.object({\n user_id: z.string(),\n device_id: z.string().optional(), // todo: sdk update 후 필수로 변경\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export const pathSchema = z.object({\n application_id: z.string().optional(),\n blux_user_id: objectIdSchema,\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export type ResponseData = {\n blux_user_id: string;\n };\n }\n\n export namespace bluxUsersSignOut {\n export const name = \"bluxUsersSignOut\";\n export const path = `${applicationsRoot}/blux-users/{blux_user_id}/sign-out`;\n export const method = HttpMethod.PUT;\n\n export const bodySchema = z.object({\n device_id: objectIdSchema.optional(),\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export const pathSchema = z.object({\n application_id: z.string().optional(), // todo: objectIdSchema 로 변경\n blux_user_id: objectIdSchema,\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export type ResponseData = {\n blux_user_id: string;\n };\n }\n\n export namespace bluxUsersCollectEvents {\n export const name = \"bluxUsersCollectEvents\";\n export const path = `${applicationsRoot}/blux-users/{blux_user_id}/collect-events`;\n export const method = HttpMethod.POST;\n export const pathSchema = z.object({\n application_id: objectIdSchema,\n blux_user_id: objectIdSchema,\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export const bodySchema = z.object({\n events: z.array(\n z.object({\n device_id: objectIdSchema.optional(),\n event_type: z.string(),\n event_value: z.string().optional(),\n item_id: z.string().optional(),\n event_properties: customPropertiesSchema.optional(), // todo : remove this\n custom_event_properties: customPropertiesSchema.optional(),\n internal_event_properties: z\n .object({\n url: z.string().optional(),\n ref: z.string().optional(),\n })\n .optional(),\n captured_at: dateSchema,\n }),\n ),\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export type ResponseData = boolean;\n }\n\n export namespace bluxUsersGetItemRecommendations {\n export const name = \"bluxUsersGetItemRecommendations\";\n export const path = `${applicationsRoot}/blux-users/{blux_user_id}/item-recommendations`;\n export const method = HttpMethod.POST;\n\n export const bodySchema = z.object({\n call_type: z.string(),\n limit: z.number(),\n offset: z.number().default(0),\n item_ids: z.array(z.string()).optional(),\n options: z.record(z.string(), z.any()).optional(),\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export const pathSchema = z.object({\n application_id: objectIdSchema,\n blux_user_id: objectIdSchema,\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export type ResponseData = {\n recommendation_id?: string;\n items: string[];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n metadata: Record<string, any>;\n status: {\n is_success: boolean;\n code: number;\n message?: string;\n };\n };\n }\n\n export namespace bluxUsersUpdateUserProperties {\n export const name = \"bluxUsersUpdateUserProperties\";\n export const path = `${applicationsRoot}/blux-users/{blux_user_id}/update-user-properties`;\n export const method = HttpMethod.PUT;\n\n export const bodySchema = z.object({\n properties: z.object({\n phone_number: z.string().nullable().optional(),\n email_address: z.string().nullable().optional(),\n nighttime_notification_consent: z.boolean().nullable().optional(),\n marketing_notification_consent: z.boolean().nullable().optional(),\n sms_consent: z.boolean().nullable().optional(),\n email_consent: z.boolean().nullable().optional(),\n }),\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export const pathSchema = z.object({\n application_id: z.string().optional(),\n blux_user_id: objectIdSchema,\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export type ResponseData = {\n blux_user_id: string;\n };\n }\n\n export namespace bluxUsersUpdateCustomUserProperties {\n export const name = \"bluxUsersUpdateCustomUserProperties\";\n export const path = `${applicationsRoot}/blux-users/{blux_user_id}/update-custom-user-properties`;\n export const method = HttpMethod.PUT;\n\n export const bodySchema = z.object({\n properties: customPropertiesRequestSchema,\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export const pathSchema = z.object({\n application_id: z.string().optional(),\n blux_user_id: objectIdSchema,\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export type ResponseData = {\n blux_user_id: string;\n };\n }\n}\n"]}
1
+ {"version":3,"file":"APIs.js","sourceRoot":"/","sources":["src/apis/APIs.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,8BAA8B,EAC9B,6BAA6B,EAC7B,sBAAsB,EACtB,UAAU,EACV,qBAAqB,EACrB,cAAc,EACd,2BAA2B,GAC5B,MAAM,qBAAqB,CAAC;AAG7B,IAAK,UAKJ;AALD,WAAK,UAAU;IACb,yBAAW,CAAA;IACX,2BAAa,CAAA;IACb,yBAAW,CAAA;IACX,+BAAiB,CAAA;AACnB,CAAC,EALI,UAAU,KAAV,UAAU,QAKd;AAED,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,6BAAW,CAAA;IACX,qCAAmB,CAAA;IACnB,qCAAmB,CAAA;AACrB,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB;AAED,MAAM,gBAAgB,GAAG,gCAAgC,CAAC;AAC1D,MAAM,kBAAkB,GAAG,mCAAmC,CAAC;AAE/D,MAAM,KAAW,IAAI,CA8KpB;AA9KD,WAAiB,IAAI;IACnB,IAAiB,mBAAmB,CA6BnC;IA7BD,WAAiB,mBAAmB;QACrB,wBAAI,GAAG,qBAAqB,CAAC;QAC7B,wBAAI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espace */\nimport { z } from \"zod\";\nimport type { RecResponse } from \"../utils/zodSchemas\";\nimport {\n countryCodeWithLowerCaseSchema,\n customPropertiesRequestSchema,\n customPropertiesSchema,\n dateSchema,\n eventPropertiesSchema,\n objectIdSchema,\n recommendationRequestSchema,\n} from \"../utils/zodSchemas\";\nimport type { Serialize } from \"../utils/Base\";\n\nenum HttpMethod {\n GET = \"get\",\n POST = \"post\",\n PUT = \"put\",\n DELETE = \"delete\",\n}\n\nexport enum DevicePlatform {\n ios = \"ios\",\n android = \"android\",\n browser = \"browser\",\n}\n\nconst applicationsRoot = \"/applications/{application_id}\";\nconst applicationsRootV2 = \"/v2/applications/{application_id}\";\n\nexport namespace APIs {\n export namespace bluxUsersInitialize {\n export const name = \"bluxUsersInitialize\";\n export const path = `${applicationsRoot}/blux-users/initialize`;\n export const method = HttpMethod.POST;\n\n export const bodySchema = z.object({\n device_id: objectIdSchema.optional(),\n country_code: countryCodeWithLowerCaseSchema.optional(),\n device_model: z.string(),\n language_code: z.string(),\n os_version: z.string(),\n platform: z.nativeEnum(DevicePlatform),\n sdk_type: z.string(),\n sdk_version: z.string(),\n timezone: z.string(),\n isVisitHandlingInSdk: z.boolean().default(false), // sdk 업데이트 후 삭제\n blux_user_id: z.string().optional(),\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export const pathSchema = z.object({\n application_id: z.string().optional(),\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export type ResponseData = {\n blux_user_id: string;\n device_id?: string;\n };\n }\n\n export namespace bluxUsersSignIn {\n export const name = \"bluxUsersSignIn\";\n export const path = `${applicationsRoot}/blux-users/{blux_user_id}/sign-in`;\n export const method = HttpMethod.PUT;\n\n export const bodySchema = z.object({\n user_id: z.string(),\n device_id: z.string().optional(), // todo: sdk update 후 필수로 변경\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export const pathSchema = z.object({\n application_id: z.string().optional(),\n blux_user_id: objectIdSchema,\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export type ResponseData = {\n blux_user_id: string;\n };\n }\n\n export namespace bluxUsersSignOut {\n export const name = \"bluxUsersSignOut\";\n export const path = `${applicationsRoot}/blux-users/{blux_user_id}/sign-out`;\n export const method = HttpMethod.PUT;\n\n export const bodySchema = z.object({\n device_id: objectIdSchema.optional(),\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export const pathSchema = z.object({\n application_id: z.string().optional(), // todo: objectIdSchema 로 변경\n blux_user_id: objectIdSchema,\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export type ResponseData = {\n blux_user_id: string;\n };\n }\n\n export namespace bluxUsersCollectEvents {\n export const name = \"bluxUsersCollectEvents\";\n export const path = `${applicationsRoot}/blux-users/{blux_user_id}/collect-events`;\n export const method = HttpMethod.POST;\n export const pathSchema = z.object({\n application_id: objectIdSchema,\n blux_user_id: objectIdSchema,\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export const bodySchema = z.object({\n events: z.array(\n z.object({\n device_id: objectIdSchema.optional(),\n event_type: z.string(),\n event_value: z.string().optional(),\n item_id: z.string().optional(),\n event_properties: eventPropertiesSchema.optional(),\n custom_event_properties: customPropertiesSchema.optional(),\n internal_event_properties: z\n .object({\n url: z.string().optional(),\n ref: z.string().optional(),\n })\n .optional(),\n captured_at: dateSchema,\n }),\n ),\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export type ResponseData = boolean;\n }\n\n export namespace bluxUsersUpdateUserProperties {\n export const name = \"bluxUsersUpdateUserProperties\";\n export const path = `${applicationsRoot}/blux-users/{blux_user_id}/update-user-properties`;\n export const method = HttpMethod.PUT;\n\n export const bodySchema = z.object({\n properties: z.object({\n phone_number: z.string().nullable().optional(),\n email_address: z.string().nullable().optional(),\n nighttime_notification_consent: z.boolean().nullable().optional(),\n marketing_notification_consent: z.boolean().nullable().optional(),\n sms_consent: z.boolean().nullable().optional(),\n email_consent: z.boolean().nullable().optional(),\n }),\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export const pathSchema = z.object({\n application_id: z.string().optional(),\n blux_user_id: objectIdSchema,\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export type ResponseData = {\n blux_user_id: string;\n };\n }\n\n export namespace bluxUsersUpdateCustomUserProperties {\n export const name = \"bluxUsersUpdateCustomUserProperties\";\n export const path = `${applicationsRoot}/blux-users/{blux_user_id}/update-custom-user-properties`;\n export const method = HttpMethod.PUT;\n\n export const bodySchema = z.object({\n properties: customPropertiesRequestSchema,\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export const pathSchema = z.object({\n application_id: z.string().optional(),\n blux_user_id: objectIdSchema,\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export type ResponseData = {\n blux_user_id: string;\n };\n }\n\n export namespace bluxUsersGetItemRecommendationsV2 {\n export const name = \"bluxUsersGetItemRecommendationsV2\";\n export const path = `${applicationsRootV2}/blux-users/{blux_user_id}/item-recommendations`;\n export const method = HttpMethod.POST;\n\n export const bodySchema = recommendationRequestSchema;\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export const pathSchema = z.object({\n application_id: objectIdSchema,\n blux_user_id: objectIdSchema,\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export type ResponseData = RecResponse;\n }\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import type { AxiosInstance } from "axios";
2
+ import { APIs } from "./APIs";
3
+ import API = APIs.bluxUsersGetItemRecommendationsV2;
4
+ export declare const getItemRecommendations: (instance: AxiosInstance, pathParams: API.PathParam, body: API.Body, headers: Record<string, string>) => Promise<import("axios").AxiosResponse<import("../utils/zodSchemas").RecResponse, any>>;
@@ -0,0 +1,7 @@
1
+ import { APIs } from "./APIs";
2
+ import { getPath } from "../utils/getPath";
3
+ var API = APIs.bluxUsersGetItemRecommendationsV2;
4
+ export const getItemRecommendations = (instance, pathParams, body, headers) => {
5
+ return instance[API.method](getPath(API.path, pathParams), body, { headers });
6
+ };
7
+ //# sourceMappingURL=getItemRecommendations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getItemRecommendations.js","sourceRoot":"/","sources":["src/apis/getItemRecommendations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,IAAO,GAAG,GAAG,IAAI,CAAC,iCAAiC,CAAC;AAEpD,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,QAAuB,EACvB,UAAyB,EACzB,IAAc,EACd,OAA+B,EAC/B,EAAE;IACF,OAAO,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CACzB,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,EAC7B,IAAI,EACJ,EAAE,OAAO,EAAE,CACZ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import type { AxiosInstance } from \"axios\";\nimport { APIs } from \"./APIs\";\nimport { getPath } from \"../utils/getPath\";\n\nimport API = APIs.bluxUsersGetItemRecommendationsV2;\n\nexport const getItemRecommendations = (\n instance: AxiosInstance,\n pathParams: API.PathParam,\n body: API.Body,\n headers: Record<string, string>,\n) => {\n return instance[API.method]<API.ResponseData>(\n getPath(API.path, pathParams),\n body,\n { headers },\n );\n};\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { IAddCartaddEvent } from "./types";
2
2
  import { Event } from "./Event";
3
3
  export declare class AddCartaddEvent extends Event {
4
- constructor({ item_id, custom_event_properties }: IAddCartaddEvent);
4
+ constructor({ item_id, custom_event_properties, trackings, }: IAddCartaddEvent);
5
5
  }
@@ -1,10 +1,11 @@
1
1
  import { Event, EventType } from "./Event";
2
2
  export class AddCartaddEvent extends Event {
3
- constructor({ item_id, custom_event_properties }) {
3
+ constructor({ item_id, custom_event_properties, trackings, }) {
4
4
  super({
5
5
  event_type: EventType.cartadd,
6
6
  event_properties: {
7
7
  item_id,
8
+ trackings,
8
9
  },
9
10
  custom_event_properties,
10
11
  });
@@ -1 +1 @@
1
- {"version":3,"file":"AddCartaddEvent.js","sourceRoot":"/","sources":["src/events/AddCartaddEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,OAAO,eAAgB,SAAQ,KAAK;IACxC,YAAY,EAAE,OAAO,EAAE,uBAAuB,EAAoB;QAChE,KAAK,CAAC;YACJ,UAAU,EAAE,SAAS,CAAC,OAAO;YAC7B,gBAAgB,EAAE;gBAChB,OAAO;aACR;YACD,uBAAuB;SACxB,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import type { IAddCartaddEvent } from \"./types\";\nimport { Event, EventType } from \"./Event\";\n\nexport class AddCartaddEvent extends Event {\n constructor({ item_id, custom_event_properties }: IAddCartaddEvent) {\n super({\n event_type: EventType.cartadd,\n event_properties: {\n item_id,\n },\n custom_event_properties,\n });\n }\n}\n"]}
1
+ {"version":3,"file":"AddCartaddEvent.js","sourceRoot":"/","sources":["src/events/AddCartaddEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,OAAO,eAAgB,SAAQ,KAAK;IACxC,YAAY,EACV,OAAO,EACP,uBAAuB,EACvB,SAAS,GACQ;QACjB,KAAK,CAAC;YACJ,UAAU,EAAE,SAAS,CAAC,OAAO;YAC7B,gBAAgB,EAAE;gBAChB,OAAO;gBACP,SAAS;aACV;YACD,uBAAuB;SACxB,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import type { IAddCartaddEvent } from \"./types\";\nimport { Event, EventType } from \"./Event\";\n\nexport class AddCartaddEvent extends Event {\n constructor({\n item_id,\n custom_event_properties,\n trackings,\n }: IAddCartaddEvent) {\n super({\n event_type: EventType.cartadd,\n event_properties: {\n item_id,\n trackings,\n },\n custom_event_properties,\n });\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { IAddInstantImpressionEvent } from "./types";
2
2
  import { Event } from "./Event";
3
3
  export declare class AddInstantImpressionEvent extends Event {
4
- constructor({ page, section, position, recommendation_id, item_id, custom_event_properties, }: IAddInstantImpressionEvent);
4
+ constructor({ page, section, position, recommendation_id, item_id, custom_event_properties, trackings, }: IAddInstantImpressionEvent);
5
5
  }