@blux.ai/web-sdk 2.2.29 → 2.2.30

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 (92) hide show
  1. package/dist/BluxClient.d.ts +9 -18
  2. package/dist/BluxClient.js +13 -5
  3. package/dist/BluxClient.js.map +1 -1
  4. package/dist/apis/APIs.d.ts +33 -35
  5. package/dist/apis/APIs.js +10 -17
  6. package/dist/apis/APIs.js.map +1 -1
  7. package/dist/apis/createCrmEvent.js.map +1 -1
  8. package/dist/apis/createEvent.js.map +1 -1
  9. package/dist/apis/getItemRecommendations.js.map +1 -1
  10. package/dist/apis/getNotifications.js.map +1 -1
  11. package/dist/apis/initialize.js.map +1 -1
  12. package/dist/apis/notificationsUpdate.js.map +1 -1
  13. package/dist/apis/signIn.js.map +1 -1
  14. package/dist/apis/signOut.js.map +1 -1
  15. package/dist/apis/updateProperties.js.map +1 -1
  16. package/dist/bridges/AndroidBridge.js.map +1 -1
  17. package/dist/bridges/Bridge.d.ts +0 -1
  18. package/dist/bridges/Bridge.js.map +1 -1
  19. package/dist/bridges/FlutterBridge.js.map +1 -1
  20. package/dist/bridges/IosBridge.js.map +1 -1
  21. package/dist/bridges/RNBridge.js.map +1 -1
  22. package/dist/constants/BLUX_ATTRIBUTES.js.map +1 -1
  23. package/dist/constants/COUNTRIES.js +1 -1
  24. package/dist/constants/COUNTRIES.js.map +1 -1
  25. package/dist/constants/PAGE_VISIT_ENABLED_APPLICATION_IDS.js +1 -3
  26. package/dist/constants/PAGE_VISIT_ENABLED_APPLICATION_IDS.js.map +1 -1
  27. package/dist/events/AddCartaddEvent.d.ts +1 -6
  28. package/dist/events/AddCartaddEvent.js +2 -2
  29. package/dist/events/AddCartaddEvent.js.map +1 -1
  30. package/dist/events/AddClickEvent.d.ts +1 -6
  31. package/dist/events/AddClickEvent.js +2 -2
  32. package/dist/events/AddClickEvent.js.map +1 -1
  33. package/dist/events/AddCustomEvent.d.ts +1 -6
  34. package/dist/events/AddCustomEvent.js.map +1 -1
  35. package/dist/events/AddInstantImpressionEvent.d.ts +1 -9
  36. package/dist/events/AddInstantImpressionEvent.js +2 -2
  37. package/dist/events/AddInstantImpressionEvent.js.map +1 -1
  38. package/dist/events/AddLikeEvent.d.ts +1 -6
  39. package/dist/events/AddLikeEvent.js +2 -2
  40. package/dist/events/AddLikeEvent.js.map +1 -1
  41. package/dist/events/AddOrderEvent.d.ts +1 -8
  42. package/dist/events/AddOrderEvent.js +2 -2
  43. package/dist/events/AddOrderEvent.js.map +1 -1
  44. package/dist/events/AddPageViewEvent.d.ts +1 -6
  45. package/dist/events/AddPageViewEvent.js +2 -2
  46. package/dist/events/AddPageViewEvent.js.map +1 -1
  47. package/dist/events/AddPageVisitEvent.d.ts +1 -5
  48. package/dist/events/AddPageVisitEvent.js +2 -2
  49. package/dist/events/AddPageVisitEvent.js.map +1 -1
  50. package/dist/events/AddPersistentImpressionEvent.d.ts +1 -9
  51. package/dist/events/AddPersistentImpressionEvent.js +2 -2
  52. package/dist/events/AddPersistentImpressionEvent.js.map +1 -1
  53. package/dist/events/AddProductDetailViewEvent.d.ts +1 -6
  54. package/dist/events/AddProductDetailViewEvent.js +2 -2
  55. package/dist/events/AddProductDetailViewEvent.js.map +1 -1
  56. package/dist/events/AddRateEvent.d.ts +1 -7
  57. package/dist/events/AddRateEvent.js +2 -2
  58. package/dist/events/AddRateEvent.js.map +1 -1
  59. package/dist/events/AddSearchEvent.d.ts +1 -6
  60. package/dist/events/AddSearchEvent.js +2 -2
  61. package/dist/events/AddSearchEvent.js.map +1 -1
  62. package/dist/events/AddSectionViewEvent.d.ts +1 -6
  63. package/dist/events/AddSectionViewEvent.js +2 -2
  64. package/dist/events/AddSectionViewEvent.js.map +1 -1
  65. package/dist/events/Event.d.ts +0 -1
  66. package/dist/events/Event.js +1 -24
  67. package/dist/events/Event.js.map +1 -1
  68. package/dist/events/VisitEvent.d.ts +1 -5
  69. package/dist/events/VisitEvent.js +2 -2
  70. package/dist/events/VisitEvent.js.map +1 -1
  71. package/dist/events/index.d.ts +2 -1
  72. package/dist/events/index.js +2 -0
  73. package/dist/events/types.d.ts +0 -1
  74. package/dist/package.js +1 -1
  75. package/dist/recs/ItemRec.d.ts +4 -24
  76. package/dist/recs/ItemRec.js.map +1 -1
  77. package/dist/recs/Rec.d.ts +0 -1
  78. package/dist/recs/Rec.js.map +1 -1
  79. package/dist/recs/types.d.ts +1 -1
  80. package/dist/utils/Base.d.ts +1 -2
  81. package/dist/utils/LocalStorage.js.map +1 -1
  82. package/dist/utils/Logger.d.ts +1 -0
  83. package/dist/utils/Logger.js.map +1 -1
  84. package/dist/utils/SessionStorage.js.map +1 -1
  85. package/dist/utils/getPath.js +4 -4
  86. package/dist/utils/getPath.js.map +1 -1
  87. package/dist/utils/observables.js.map +1 -1
  88. package/dist/utils/operators.js.map +1 -1
  89. package/dist/utils/zodSchemas.d.ts +1 -2
  90. package/dist/utils/zodSchemas.js +1 -1
  91. package/dist/utils/zodSchemas.js.map +1 -1
  92. package/package.json +5 -4
@@ -1,8 +1,6 @@
1
1
  import { Serialize } from "../utils/Base.js";
2
2
  import { RecResponse } from "../utils/zodSchemas.js";
3
- import * as bson_objectid0 from "bson-objectid";
4
3
  import { z } from "zod";
5
-
6
4
  //#region src/apis/APIs.d.ts
7
5
  declare enum DevicePlatform {
8
6
  ios = "ios",
@@ -20,7 +18,7 @@ declare namespace APIs {
20
18
  const method = HttpMethod.POST;
21
19
  const bodySchema: z.ZodObject<{
22
20
  session_id: z.ZodOptional<z.ZodString>;
23
- device_id: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, bson_objectid0.default, string>>;
21
+ device_id: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>>;
24
22
  custom_device_id: z.ZodOptional<z.ZodString>;
25
23
  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>>;
26
24
  device_model: z.ZodString;
@@ -40,7 +38,7 @@ declare namespace APIs {
40
38
  sdk_version: string;
41
39
  timezone: string;
42
40
  session_id?: string | undefined;
43
- device_id?: bson_objectid0.default | undefined;
41
+ device_id?: import("bson-objectid").default | undefined;
44
42
  custom_device_id?: string | undefined;
45
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;
46
44
  blux_user_id?: string | undefined;
@@ -89,9 +87,9 @@ declare namespace APIs {
89
87
  type Body = Serialize<z.input<typeof bodySchema>>;
90
88
  const pathSchema: z.ZodObject<{
91
89
  application_id: z.ZodOptional<z.ZodString>;
92
- blux_user_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, bson_objectid0.default, string>;
90
+ blux_user_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
93
91
  }, "strip", z.ZodTypeAny, {
94
- blux_user_id: bson_objectid0.default;
92
+ blux_user_id: import("bson-objectid").default;
95
93
  application_id?: string | undefined;
96
94
  }, {
97
95
  blux_user_id: string;
@@ -107,18 +105,18 @@ declare namespace APIs {
107
105
  const path = "/applications/{application_id}/blux-users/{blux_user_id}/sign-out";
108
106
  const method = HttpMethod.PUT;
109
107
  const bodySchema: z.ZodObject<{
110
- device_id: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, bson_objectid0.default, string>>;
108
+ device_id: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>>;
111
109
  }, "strip", z.ZodTypeAny, {
112
- device_id?: bson_objectid0.default | undefined;
110
+ device_id?: import("bson-objectid").default | undefined;
113
111
  }, {
114
112
  device_id?: string | undefined;
115
113
  }>;
116
114
  type Body = Serialize<z.input<typeof bodySchema>>;
117
115
  const pathSchema: z.ZodObject<{
118
116
  application_id: z.ZodOptional<z.ZodString>;
119
- blux_user_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, bson_objectid0.default, string>;
117
+ blux_user_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
120
118
  }, "strip", z.ZodTypeAny, {
121
- blux_user_id: bson_objectid0.default;
119
+ blux_user_id: import("bson-objectid").default;
122
120
  application_id?: string | undefined;
123
121
  }, {
124
122
  blux_user_id: string;
@@ -134,18 +132,18 @@ declare namespace APIs {
134
132
  const path = "/v2/applications/{application_id}/blux-users/{blux_user_id}/collect-events";
135
133
  const method = HttpMethod.POST;
136
134
  const pathSchema: z.ZodObject<{
137
- application_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, bson_objectid0.default, string>;
138
- blux_user_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, bson_objectid0.default, string>;
135
+ application_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
136
+ blux_user_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
139
137
  }, "strip", z.ZodTypeAny, {
140
- blux_user_id: bson_objectid0.default;
141
- application_id: bson_objectid0.default;
138
+ blux_user_id: import("bson-objectid").default;
139
+ application_id: import("bson-objectid").default;
142
140
  }, {
143
141
  blux_user_id: string;
144
142
  application_id: string;
145
143
  }>;
146
144
  type PathParam = Serialize<z.input<typeof pathSchema>>;
147
145
  const bodySchema: z.ZodObject<{
148
- device_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, bson_objectid0.default, string>;
146
+ device_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
149
147
  events: z.ZodArray<z.ZodObject<{
150
148
  event_type: z.ZodString;
151
149
  event_properties: z.ZodOptional<z.ZodObject<{
@@ -327,7 +325,7 @@ declare namespace APIs {
327
325
  } | undefined;
328
326
  }>, "many">;
329
327
  }, "strip", z.ZodTypeAny, {
330
- device_id: bson_objectid0.default;
328
+ device_id: import("bson-objectid").default;
331
329
  events: {
332
330
  event_type: string;
333
331
  captured_at: Date;
@@ -491,9 +489,9 @@ declare namespace APIs {
491
489
  type Body = Serialize<z.input<typeof bodySchema>>;
492
490
  const pathSchema: z.ZodObject<{
493
491
  application_id: z.ZodString;
494
- blux_user_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, bson_objectid0.default, string>;
492
+ blux_user_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
495
493
  }, "strip", z.ZodTypeAny, {
496
- blux_user_id: bson_objectid0.default;
494
+ blux_user_id: import("bson-objectid").default;
497
495
  application_id: string;
498
496
  }, {
499
497
  blux_user_id: string;
@@ -509,8 +507,8 @@ declare namespace APIs {
509
507
  const path = "/v2/applications/{application_id}/blux-users/{blux_user_id}/item-recommendations";
510
508
  const method = HttpMethod.POST;
511
509
  const bodySchema: z.ZodObject<z.objectUtil.extendShape<Pick<{
512
- application_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, bson_objectid0.default, string>;
513
- blux_user_id: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, bson_objectid0.default, string>>>;
510
+ application_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
511
+ blux_user_id: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>>>;
514
512
  pipeline: z.ZodArray<z.ZodObject<{
515
513
  name: z.ZodString;
516
514
  kwargs: z.ZodRecord<z.ZodString, z.ZodAny>;
@@ -546,11 +544,11 @@ declare namespace APIs {
546
544
  }>;
547
545
  type Body = Serialize<z.input<typeof bodySchema>>;
548
546
  const pathSchema: z.ZodObject<{
549
- application_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, bson_objectid0.default, string>;
550
- blux_user_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, bson_objectid0.default, string>;
547
+ application_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
548
+ blux_user_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
551
549
  }, "strip", z.ZodTypeAny, {
552
- blux_user_id: bson_objectid0.default;
553
- application_id: bson_objectid0.default;
550
+ blux_user_id: import("bson-objectid").default;
551
+ application_id: import("bson-objectid").default;
554
552
  }, {
555
553
  blux_user_id: string;
556
554
  application_id: string;
@@ -563,13 +561,13 @@ declare namespace APIs {
563
561
  const path = "/applications/{application_id}/crm-events";
564
562
  const method = HttpMethod.POST;
565
563
  const bodySchema: z.ZodObject<{
566
- notification_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, bson_objectid0.default, string>;
564
+ notification_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
567
565
  crm_event_type: z.ZodUnion<[z.ZodLiteral<"push_opened">, z.ZodLiteral<"button_clicked">, z.ZodLiteral<"landing_clicked">, z.ZodLiteral<"inapp_opened">]>;
568
566
  captured_at: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>;
569
567
  item_id: z.ZodOptional<z.ZodString>;
570
568
  }, "strip", z.ZodTypeAny, {
571
569
  captured_at: Date;
572
- notification_id: bson_objectid0.default;
570
+ notification_id: import("bson-objectid").default;
573
571
  crm_event_type: "push_opened" | "button_clicked" | "landing_clicked" | "inapp_opened";
574
572
  item_id?: string | undefined;
575
573
  }, {
@@ -594,11 +592,11 @@ declare namespace APIs {
594
592
  const path = "/applications/{application_id}/notifications/{notification_id}";
595
593
  const method = HttpMethod.POST;
596
594
  const pathSchema: z.ZodObject<{
597
- application_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, bson_objectid0.default, string>;
598
- notification_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, bson_objectid0.default, string>;
595
+ application_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
596
+ notification_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
599
597
  }, "strip", z.ZodTypeAny, {
600
- application_id: bson_objectid0.default;
601
- notification_id: bson_objectid0.default;
598
+ application_id: import("bson-objectid").default;
599
+ notification_id: import("bson-objectid").default;
602
600
  }, {
603
601
  application_id: string;
604
602
  notification_id: string;
@@ -619,11 +617,11 @@ declare namespace APIs {
619
617
  const path = "/applications/{application_id}/blux-users/{blux_user_id}/notifications";
620
618
  const method = HttpMethod.GET;
621
619
  const pathSchema: z.ZodObject<{
622
- application_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, bson_objectid0.default, string>;
623
- blux_user_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, bson_objectid0.default, string>;
620
+ application_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
621
+ blux_user_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
624
622
  }, "strip", z.ZodTypeAny, {
625
- blux_user_id: bson_objectid0.default;
626
- application_id: bson_objectid0.default;
623
+ blux_user_id: import("bson-objectid").default;
624
+ application_id: import("bson-objectid").default;
627
625
  }, {
628
626
  blux_user_id: string;
629
627
  application_id: string;
@@ -649,5 +647,5 @@ declare namespace APIs {
649
647
  }
650
648
  }
651
649
  //#endregion
652
- export { APIs };
650
+ export { APIs, DevicePlatform, Gender };
653
651
  //# sourceMappingURL=APIs.d.ts.map
package/dist/apis/APIs.js CHANGED
@@ -2,13 +2,6 @@ import { countryCodeWithLowerCaseSchema, customPropertiesRequestSchema, customPr
2
2
  import { z } from "zod";
3
3
 
4
4
  //#region src/apis/APIs.ts
5
- var HttpMethod = /* @__PURE__ */ function(HttpMethod) {
6
- HttpMethod["GET"] = "get";
7
- HttpMethod["POST"] = "post";
8
- HttpMethod["PUT"] = "put";
9
- HttpMethod["DELETE"] = "delete";
10
- return HttpMethod;
11
- }(HttpMethod || {});
12
5
  let DevicePlatform = /* @__PURE__ */ function(DevicePlatform) {
13
6
  DevicePlatform["ios"] = "ios";
14
7
  DevicePlatform["android"] = "android";
@@ -28,7 +21,7 @@ let APIs;
28
21
  (function(_bluxUsersInitialize) {
29
22
  _bluxUsersInitialize.name = "bluxUsersInitialize";
30
23
  _bluxUsersInitialize.path = `${applicationsRoot}/blux-users/initialize`;
31
- _bluxUsersInitialize.method = HttpMethod.POST;
24
+ _bluxUsersInitialize.method = "post";
32
25
  _bluxUsersInitialize.bodySchema = z.object({
33
26
  session_id: z.string().optional(),
34
27
  device_id: objectIdSchema.optional(),
@@ -49,7 +42,7 @@ let APIs;
49
42
  (function(_bluxUsersSignIn) {
50
43
  _bluxUsersSignIn.name = "bluxUsersSignIn";
51
44
  _bluxUsersSignIn.path = `${applicationsRoot}/blux-users/{blux_user_id}/sign-in`;
52
- _bluxUsersSignIn.method = HttpMethod.PUT;
45
+ _bluxUsersSignIn.method = "put";
53
46
  _bluxUsersSignIn.bodySchema = z.object({
54
47
  user_id: z.string(),
55
48
  device_id: z.string().optional()
@@ -63,7 +56,7 @@ let APIs;
63
56
  (function(_bluxUsersSignOut) {
64
57
  _bluxUsersSignOut.name = "bluxUsersSignOut";
65
58
  _bluxUsersSignOut.path = `${applicationsRoot}/blux-users/{blux_user_id}/sign-out`;
66
- _bluxUsersSignOut.method = HttpMethod.PUT;
59
+ _bluxUsersSignOut.method = "put";
67
60
  _bluxUsersSignOut.bodySchema = z.object({ device_id: objectIdSchema.optional() });
68
61
  _bluxUsersSignOut.pathSchema = z.object({
69
62
  application_id: z.string().optional(),
@@ -74,7 +67,7 @@ let APIs;
74
67
  (function(_bluxUsersCollectEventsV) {
75
68
  _bluxUsersCollectEventsV.name = "bluxUsersCollectEventsV2";
76
69
  _bluxUsersCollectEventsV.path = `${applicationsRootV2}/blux-users/{blux_user_id}/collect-events`;
77
- _bluxUsersCollectEventsV.method = HttpMethod.POST;
70
+ _bluxUsersCollectEventsV.method = "post";
78
71
  _bluxUsersCollectEventsV.pathSchema = z.object({
79
72
  application_id: objectIdSchema,
80
73
  blux_user_id: objectIdSchema
@@ -94,7 +87,7 @@ let APIs;
94
87
  (function(_bluxUsersUpdateProperties) {
95
88
  _bluxUsersUpdateProperties.name = "bluxUsersUpdateProperties";
96
89
  _bluxUsersUpdateProperties.path = `${applicationsRoot}/blux-users/{blux_user_id}/update-properties`;
97
- _bluxUsersUpdateProperties.method = HttpMethod.PUT;
90
+ _bluxUsersUpdateProperties.method = "put";
98
91
  _bluxUsersUpdateProperties.bodySchema = z.object({
99
92
  user_properties: z.object({
100
93
  phone_number: z.string().nullish(),
@@ -120,7 +113,7 @@ let APIs;
120
113
  (function(_bluxUsersGetItemRecommendationsV) {
121
114
  _bluxUsersGetItemRecommendationsV.name = "bluxUsersGetItemRecommendationsV2";
122
115
  _bluxUsersGetItemRecommendationsV.path = `${applicationsRootV2}/blux-users/{blux_user_id}/item-recommendations`;
123
- _bluxUsersGetItemRecommendationsV.method = HttpMethod.POST;
116
+ _bluxUsersGetItemRecommendationsV.method = "post";
124
117
  _bluxUsersGetItemRecommendationsV.bodySchema = recommendationRequestSchema;
125
118
  _bluxUsersGetItemRecommendationsV.pathSchema = z.object({
126
119
  application_id: objectIdSchema,
@@ -131,7 +124,7 @@ let APIs;
131
124
  (function(_crmEventsCreate) {
132
125
  _crmEventsCreate.name = "crmEventsCreate";
133
126
  _crmEventsCreate.path = `${applicationsRoot}/crm-events`;
134
- _crmEventsCreate.method = HttpMethod.POST;
127
+ _crmEventsCreate.method = "post";
135
128
  _crmEventsCreate.bodySchema = z.object({
136
129
  notification_id: objectIdSchema,
137
130
  crm_event_type: z.union([
@@ -149,7 +142,7 @@ let APIs;
149
142
  (function(_notificationsUpdate) {
150
143
  _notificationsUpdate.name = "notificationsUpdate";
151
144
  _notificationsUpdate.path = `${applicationsRoot}/notifications/{notification_id}`;
152
- _notificationsUpdate.method = HttpMethod.POST;
145
+ _notificationsUpdate.method = "post";
153
146
  _notificationsUpdate.pathSchema = z.object({
154
147
  application_id: objectIdSchema,
155
148
  notification_id: objectIdSchema
@@ -160,7 +153,7 @@ let APIs;
160
153
  (function(_notificationsReadList) {
161
154
  _notificationsReadList.name = "notificationsReadList";
162
155
  _notificationsReadList.path = `${applicationsRoot}/blux-users/{blux_user_id}/notifications`;
163
- _notificationsReadList.method = HttpMethod.GET;
156
+ _notificationsReadList.method = "get";
164
157
  _notificationsReadList.pathSchema = z.object({
165
158
  application_id: objectIdSchema,
166
159
  blux_user_id: objectIdSchema
@@ -169,5 +162,5 @@ let APIs;
169
162
  })(APIs || (APIs = {}));
170
163
 
171
164
  //#endregion
172
- export { APIs, DevicePlatform };
165
+ export { APIs, DevicePlatform, Gender };
173
166
  //# sourceMappingURL=APIs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"APIs.js","names":[],"sources":["../../src/apis/APIs.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-namespace */\nimport { z } from \"zod\";\n\nimport {\n countryCodeWithLowerCaseSchema,\n customPropertiesRequestSchema,\n customPropertiesSchema,\n dateSchema,\n eventPropertiesSchema,\n internalEventPropertiesSchema,\n objectIdSchema,\n recommendationRequestSchema,\n} from \"../utils/zodSchemas\";\n\nimport type { Serialize } from \"../utils/Base\";\nimport type { RecResponse } from \"../utils/zodSchemas\";\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\nexport enum Gender {\n male = \"male\",\n female = \"female\",\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 session_id: z.string().optional(),\n device_id: objectIdSchema.optional(),\n custom_device_id: z.string().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 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: @all 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: @all 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 bluxUsersCollectEventsV2 {\n export const name = \"bluxUsersCollectEventsV2\";\n export const path = `${applicationsRootV2}/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 device_id: objectIdSchema,\n events: z.array(\n z.object({\n event_type: z.string(),\n event_properties: eventPropertiesSchema.optional(),\n custom_event_properties: customPropertiesSchema.optional(),\n internal_event_properties: internalEventPropertiesSchema.optional(),\n captured_at: dateSchema,\n }),\n ),\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export type ResponseData = {\n nextPollDelayMs: number;\n inapp?: {\n notificationId: string;\n inappId: string;\n htmlString: string;\n baseUrl: string;\n };\n };\n }\n\n export namespace bluxUsersUpdateProperties {\n export const name = \"bluxUsersUpdateProperties\";\n export const path = `${applicationsRoot}/blux-users/{blux_user_id}/update-properties`;\n export const method = HttpMethod.PUT;\n\n export const bodySchema = z.object({\n user_properties: z\n .object({\n phone_number: z.string().nullish(),\n email_address: z.string().nullish(),\n nighttime_notification_consent: z.boolean().nullish(),\n marketing_notification_consent: z.boolean().nullish(),\n marketing_notification_sms_consent: z.boolean().nullish(),\n marketing_notification_email_consent: z.boolean().nullish(),\n marketing_notification_kakao_consent: z.boolean().nullish(),\n marketing_notification_push_consent: z.boolean().nullish(),\n is_all_notification_blocked: z.boolean().nullish(),\n\n gender: z.nativeEnum(Gender).nullish(),\n age: z.number().nullish(),\n })\n .optional(),\n custom_user_properties: customPropertiesRequestSchema.optional(),\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export const pathSchema = z.object({\n application_id: z.string(),\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 export namespace crmEventsCreate {\n export const name = \"crmEventsCreate\";\n export const path = `${applicationsRoot}/crm-events`;\n export const method = HttpMethod.POST;\n\n export const bodySchema = z.object({\n notification_id: objectIdSchema,\n crm_event_type: z.union([\n z.literal(\"push_opened\"),\n z.literal(\"button_clicked\"),\n z.literal(\"landing_clicked\"),\n z.literal(\"inapp_opened\"),\n ]),\n captured_at: dateSchema,\n item_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(),\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export type ResponseData = boolean;\n }\n\n export namespace notificationsUpdate {\n export const name = \"notificationsUpdate\";\n export const path = `${applicationsRoot}/notifications/{notification_id}`;\n export const method = HttpMethod.POST;\n\n export const pathSchema = z.object({\n application_id: objectIdSchema,\n notification_id: objectIdSchema,\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export const bodySchema = z.object({\n status: z.literal(\"received\"),\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n export type ResponseData = boolean;\n }\n\n export namespace notificationsReadList {\n export const name = \"notificationsReadList\";\n export const path = `${applicationsRoot}/blux-users/{blux_user_id}/notifications`;\n export const method = HttpMethod.GET;\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 Query = {\n limit?: number;\n from_sent_at?: string;\n to_sent_at?: string;\n cursor?: string;\n };\n\n export type ResponseData = {\n notifications: {\n id: string;\n title: string;\n body: string;\n image_url?: string;\n url?: string;\n sent_at: string;\n }[];\n next_cursor?: string;\n };\n }\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"APIs.js","names":[],"sources":["../../src/apis/APIs.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-namespace */\nimport { z } from \"zod\";\n\nimport {\n countryCodeWithLowerCaseSchema,\n customPropertiesRequestSchema,\n customPropertiesSchema,\n dateSchema,\n eventPropertiesSchema,\n internalEventPropertiesSchema,\n objectIdSchema,\n recommendationRequestSchema,\n} from \"../utils/zodSchemas\";\n\nimport type { Serialize } from \"../utils/Base\";\nimport type { RecResponse } from \"../utils/zodSchemas\";\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\nexport enum Gender {\n male = \"male\",\n female = \"female\",\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 session_id: z.string().optional(),\n device_id: objectIdSchema.optional(),\n custom_device_id: z.string().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 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: @all 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: @all 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 bluxUsersCollectEventsV2 {\n export const name = \"bluxUsersCollectEventsV2\";\n export const path = `${applicationsRootV2}/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 device_id: objectIdSchema,\n events: z.array(\n z.object({\n event_type: z.string(),\n event_properties: eventPropertiesSchema.optional(),\n custom_event_properties: customPropertiesSchema.optional(),\n internal_event_properties: internalEventPropertiesSchema.optional(),\n captured_at: dateSchema,\n }),\n ),\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export type ResponseData = {\n nextPollDelayMs: number;\n inapp?: {\n notificationId: string;\n inappId: string;\n htmlString: string;\n baseUrl: string;\n };\n };\n }\n\n export namespace bluxUsersUpdateProperties {\n export const name = \"bluxUsersUpdateProperties\";\n export const path = `${applicationsRoot}/blux-users/{blux_user_id}/update-properties`;\n export const method = HttpMethod.PUT;\n\n export const bodySchema = z.object({\n user_properties: z\n .object({\n phone_number: z.string().nullish(),\n email_address: z.string().nullish(),\n nighttime_notification_consent: z.boolean().nullish(),\n marketing_notification_consent: z.boolean().nullish(),\n marketing_notification_sms_consent: z.boolean().nullish(),\n marketing_notification_email_consent: z.boolean().nullish(),\n marketing_notification_kakao_consent: z.boolean().nullish(),\n marketing_notification_push_consent: z.boolean().nullish(),\n is_all_notification_blocked: z.boolean().nullish(),\n\n gender: z.nativeEnum(Gender).nullish(),\n age: z.number().nullish(),\n })\n .optional(),\n custom_user_properties: customPropertiesRequestSchema.optional(),\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n\n export const pathSchema = z.object({\n application_id: z.string(),\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 export namespace crmEventsCreate {\n export const name = \"crmEventsCreate\";\n export const path = `${applicationsRoot}/crm-events`;\n export const method = HttpMethod.POST;\n\n export const bodySchema = z.object({\n notification_id: objectIdSchema,\n crm_event_type: z.union([\n z.literal(\"push_opened\"),\n z.literal(\"button_clicked\"),\n z.literal(\"landing_clicked\"),\n z.literal(\"inapp_opened\"),\n ]),\n captured_at: dateSchema,\n item_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(),\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export type ResponseData = boolean;\n }\n\n export namespace notificationsUpdate {\n export const name = \"notificationsUpdate\";\n export const path = `${applicationsRoot}/notifications/{notification_id}`;\n export const method = HttpMethod.POST;\n\n export const pathSchema = z.object({\n application_id: objectIdSchema,\n notification_id: objectIdSchema,\n });\n export type PathParam = Serialize<z.input<typeof pathSchema>>;\n\n export const bodySchema = z.object({\n status: z.literal(\"received\"),\n });\n export type Body = Serialize<z.input<typeof bodySchema>>;\n export type ResponseData = boolean;\n }\n\n export namespace notificationsReadList {\n export const name = \"notificationsReadList\";\n export const path = `${applicationsRoot}/blux-users/{blux_user_id}/notifications`;\n export const method = HttpMethod.GET;\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 Query = {\n limit?: number;\n from_sent_at?: string;\n to_sent_at?: string;\n cursor?: string;\n };\n\n export type ResponseData = {\n notifications: {\n id: string;\n title: string;\n body: string;\n image_url?: string;\n url?: string;\n sent_at: string;\n }[];\n next_cursor?: string;\n };\n }\n}\n"],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"createCrmEvent.js","names":[],"sources":["../../src/apis/createCrmEvent.ts"],"sourcesContent":["import { AxiosInstance } from \"axios\";\n\nimport { APIs } from \"./APIs\";\nimport { getPath } from \"../utils/getPath\";\n\nimport API = APIs.crmEventsCreate;\n\nexport const createCrmEvent = (\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"],"mappings":";;;;IAKO,MAAM,KAAK;AAElB,MAAa,kBACX,UACA,YACA,MACA,YACG;AACH,QAAO,SAAS,IAAI,QAClB,QAAQ,IAAI,MAAM,WAAW,EAC7B,MACA,EAAE,SAAS,CACZ"}
1
+ {"version":3,"file":"createCrmEvent.js","names":[],"sources":["../../src/apis/createCrmEvent.ts"],"sourcesContent":["import { AxiosInstance } from \"axios\";\n\nimport { APIs } from \"./APIs\";\nimport { getPath } from \"../utils/getPath\";\n\nimport API = APIs.crmEventsCreate;\n\nexport const createCrmEvent = (\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"],"mappings":";;;;IAKO,MAAM,KAAK;AAElB,MAAa,kBACX,UACA,YACA,MACA,YACG;CACH,OAAO,SAAS,IAAI,OAAO,CACzB,QAAQ,IAAI,MAAM,UAAU,GAC5B,MACA,EAAE,QAAQ,CACZ;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"createEvent.js","names":[],"sources":["../../src/apis/createEvent.ts"],"sourcesContent":["import { APIs } from \"./APIs\";\nimport { getPath } from \"../utils/getPath\";\n\nimport type { AxiosInstance } from \"axios\";\n\nimport API = APIs.bluxUsersCollectEventsV2;\n\nexport const collectEvent = (\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"],"mappings":";;;;IAKO,MAAM,KAAK;AAElB,MAAa,gBACX,UACA,YACA,MACA,YACG;AACH,QAAO,SAAS,IAAI,QAClB,QAAQ,IAAI,MAAM,WAAW,EAC7B,MACA,EAAE,SAAS,CACZ"}
1
+ {"version":3,"file":"createEvent.js","names":[],"sources":["../../src/apis/createEvent.ts"],"sourcesContent":["import { APIs } from \"./APIs\";\nimport { getPath } from \"../utils/getPath\";\n\nimport type { AxiosInstance } from \"axios\";\n\nimport API = APIs.bluxUsersCollectEventsV2;\n\nexport const collectEvent = (\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"],"mappings":";;;;IAKO,MAAM,KAAK;AAElB,MAAa,gBACX,UACA,YACA,MACA,YACG;CACH,OAAO,SAAS,IAAI,OAAO,CACzB,QAAQ,IAAI,MAAM,UAAU,GAC5B,MACA,EAAE,QAAQ,CACZ;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"getItemRecommendations.js","names":[],"sources":["../../src/apis/getItemRecommendations.ts"],"sourcesContent":["import { APIs } from \"./APIs\";\nimport { getPath } from \"../utils/getPath\";\n\nimport type { AxiosInstance } from \"axios\";\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"],"mappings":";;;;IAKO,MAAM,KAAK;AAElB,MAAa,0BACX,UACA,YACA,MACA,YACG;AACH,QAAO,SAAS,IAAI,QAClB,QAAQ,IAAI,MAAM,WAAW,EAC7B,MACA,EAAE,SAAS,CACZ"}
1
+ {"version":3,"file":"getItemRecommendations.js","names":[],"sources":["../../src/apis/getItemRecommendations.ts"],"sourcesContent":["import { APIs } from \"./APIs\";\nimport { getPath } from \"../utils/getPath\";\n\nimport type { AxiosInstance } from \"axios\";\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"],"mappings":";;;;IAKO,MAAM,KAAK;AAElB,MAAa,0BACX,UACA,YACA,MACA,YACG;CACH,OAAO,SAAS,IAAI,OAAO,CACzB,QAAQ,IAAI,MAAM,UAAU,GAC5B,MACA,EAAE,QAAQ,CACZ;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"getNotifications.js","names":[],"sources":["../../src/apis/getNotifications.ts"],"sourcesContent":["import { APIs } from \"./APIs\";\nimport { getPath } from \"../utils/getPath\";\n\nimport type { AxiosInstance } from \"axios\";\n\nimport API = APIs.notificationsReadList;\n\nexport const getNotifications = (\n instance: AxiosInstance,\n pathParams: API.PathParam,\n query: API.Query,\n headers: Record<string, string>,\n) => {\n return instance[API.method]<API.ResponseData>(getPath(API.path, pathParams), {\n params: query,\n headers,\n });\n};\n"],"mappings":";;;;IAKO,MAAM,KAAK;AAElB,MAAa,oBACX,UACA,YACA,OACA,YACG;AACH,QAAO,SAAS,IAAI,QAA0B,QAAQ,IAAI,MAAM,WAAW,EAAE;EAC3E,QAAQ;EACR;EACD,CAAC"}
1
+ {"version":3,"file":"getNotifications.js","names":[],"sources":["../../src/apis/getNotifications.ts"],"sourcesContent":["import { APIs } from \"./APIs\";\nimport { getPath } from \"../utils/getPath\";\n\nimport type { AxiosInstance } from \"axios\";\n\nimport API = APIs.notificationsReadList;\n\nexport const getNotifications = (\n instance: AxiosInstance,\n pathParams: API.PathParam,\n query: API.Query,\n headers: Record<string, string>,\n) => {\n return instance[API.method]<API.ResponseData>(getPath(API.path, pathParams), {\n params: query,\n headers,\n });\n};\n"],"mappings":";;;;IAKO,MAAM,KAAK;AAElB,MAAa,oBACX,UACA,YACA,OACA,YACG;CACH,OAAO,SAAS,IAAI,OAAO,CAAmB,QAAQ,IAAI,MAAM,UAAU,GAAG;EAC3E,QAAQ;EACR;CACF,CAAC;AACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"initialize.js","names":[],"sources":["../../src/apis/initialize.ts"],"sourcesContent":["import { APIs } from \"./APIs\";\nimport { getPath } from \"../utils/getPath\";\n\nimport type { AxiosInstance } from \"axios\";\n\nimport API = APIs.bluxUsersInitialize;\n\nexport const initialize = (\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"],"mappings":";;;;IAKO,MAAM,KAAK;AAElB,MAAa,cACX,UACA,YACA,MACA,YACG;AACH,QAAO,SAAS,IAAI,QAClB,QAAQ,IAAI,MAAM,WAAW,EAC7B,MACA,EAAE,SAAS,CACZ"}
1
+ {"version":3,"file":"initialize.js","names":[],"sources":["../../src/apis/initialize.ts"],"sourcesContent":["import { APIs } from \"./APIs\";\nimport { getPath } from \"../utils/getPath\";\n\nimport type { AxiosInstance } from \"axios\";\n\nimport API = APIs.bluxUsersInitialize;\n\nexport const initialize = (\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"],"mappings":";;;;IAKO,MAAM,KAAK;AAElB,MAAa,cACX,UACA,YACA,MACA,YACG;CACH,OAAO,SAAS,IAAI,OAAO,CACzB,QAAQ,IAAI,MAAM,UAAU,GAC5B,MACA,EAAE,QAAQ,CACZ;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"notificationsUpdate.js","names":[],"sources":["../../src/apis/notificationsUpdate.ts"],"sourcesContent":["import { APIs } from \"./APIs\";\nimport { getPath } from \"../utils/getPath\";\n\nimport type { AxiosInstance } from \"axios\";\n\nimport API = APIs.notificationsUpdate;\n\nexport const notificationsUpdate = (\n instance: AxiosInstance,\n pathParams: API.PathParam,\n body: API.Body,\n headers: Record<string, string>,\n) =>\n instance[API.method]<API.ResponseData>(getPath(API.path, pathParams), body, {\n headers,\n });\n"],"mappings":";;;;IAKO,MAAM,KAAK;AAElB,MAAa,uBACX,UACA,YACA,MACA,YAEA,SAAS,IAAI,QAA0B,QAAQ,IAAI,MAAM,WAAW,EAAE,MAAM,EAC1E,SACD,CAAC"}
1
+ {"version":3,"file":"notificationsUpdate.js","names":[],"sources":["../../src/apis/notificationsUpdate.ts"],"sourcesContent":["import { APIs } from \"./APIs\";\nimport { getPath } from \"../utils/getPath\";\n\nimport type { AxiosInstance } from \"axios\";\n\nimport API = APIs.notificationsUpdate;\n\nexport const notificationsUpdate = (\n instance: AxiosInstance,\n pathParams: API.PathParam,\n body: API.Body,\n headers: Record<string, string>,\n) =>\n instance[API.method]<API.ResponseData>(getPath(API.path, pathParams), body, {\n headers,\n });\n"],"mappings":";;;;IAKO,MAAM,KAAK;AAElB,MAAa,uBACX,UACA,YACA,MACA,YAEA,SAAS,IAAI,OAAO,CAAmB,QAAQ,IAAI,MAAM,UAAU,GAAG,MAAM,EAC1E,QACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"signIn.js","names":[],"sources":["../../src/apis/signIn.ts"],"sourcesContent":["import { APIs } from \"./APIs\";\nimport { getPath } from \"../utils/getPath\";\n\nimport type { AxiosInstance } from \"axios\";\n\nimport API = APIs.bluxUsersSignIn;\n\nexport const signIn = (\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"],"mappings":";;;;IAKO,MAAM,KAAK;AAElB,MAAa,UACX,UACA,YACA,MACA,YACG;AACH,QAAO,SAAS,IAAI,QAClB,QAAQ,IAAI,MAAM,WAAW,EAC7B,MACA,EAAE,SAAS,CACZ"}
1
+ {"version":3,"file":"signIn.js","names":[],"sources":["../../src/apis/signIn.ts"],"sourcesContent":["import { APIs } from \"./APIs\";\nimport { getPath } from \"../utils/getPath\";\n\nimport type { AxiosInstance } from \"axios\";\n\nimport API = APIs.bluxUsersSignIn;\n\nexport const signIn = (\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"],"mappings":";;;;IAKO,MAAM,KAAK;AAElB,MAAa,UACX,UACA,YACA,MACA,YACG;CACH,OAAO,SAAS,IAAI,OAAO,CACzB,QAAQ,IAAI,MAAM,UAAU,GAC5B,MACA,EAAE,QAAQ,CACZ;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"signOut.js","names":[],"sources":["../../src/apis/signOut.ts"],"sourcesContent":["import { APIs } from \"./APIs\";\nimport { getPath } from \"../utils/getPath\";\n\nimport type { AxiosInstance } from \"axios\";\n\nimport API = APIs.bluxUsersSignOut;\n\nexport const signOut = (\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"],"mappings":";;;;IAKO,MAAM,KAAK;AAElB,MAAa,WACX,UACA,YACA,MACA,YACG;AACH,QAAO,SAAS,IAAI,QAClB,QAAQ,IAAI,MAAM,WAAW,EAC7B,MACA,EAAE,SAAS,CACZ"}
1
+ {"version":3,"file":"signOut.js","names":[],"sources":["../../src/apis/signOut.ts"],"sourcesContent":["import { APIs } from \"./APIs\";\nimport { getPath } from \"../utils/getPath\";\n\nimport type { AxiosInstance } from \"axios\";\n\nimport API = APIs.bluxUsersSignOut;\n\nexport const signOut = (\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"],"mappings":";;;;IAKO,MAAM,KAAK;AAElB,MAAa,WACX,UACA,YACA,MACA,YACG;CACH,OAAO,SAAS,IAAI,OAAO,CACzB,QAAQ,IAAI,MAAM,UAAU,GAC5B,MACA,EAAE,QAAQ,CACZ;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"updateProperties.js","names":[],"sources":["../../src/apis/updateProperties.ts"],"sourcesContent":["import { APIs } from \"./APIs\";\nimport { getPath } from \"../utils/getPath\";\n\nimport type { AxiosInstance } from \"axios\";\n\nimport API = APIs.bluxUsersUpdateProperties;\n\nexport const updateProperties = (\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"],"mappings":";;;;IAKO,MAAM,KAAK;AAElB,MAAa,oBACX,UACA,YACA,MACA,YACG;AACH,QAAO,SAAS,IAAI,QAClB,QAAQ,IAAI,MAAM,WAAW,EAC7B,MACA,EAAE,SAAS,CACZ"}
1
+ {"version":3,"file":"updateProperties.js","names":[],"sources":["../../src/apis/updateProperties.ts"],"sourcesContent":["import { APIs } from \"./APIs\";\nimport { getPath } from \"../utils/getPath\";\n\nimport type { AxiosInstance } from \"axios\";\n\nimport API = APIs.bluxUsersUpdateProperties;\n\nexport const updateProperties = (\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"],"mappings":";;;;IAKO,MAAM,KAAK;AAElB,MAAa,oBACX,UACA,YACA,MACA,YACG;CACH,OAAO,SAAS,IAAI,OAAO,CACzB,QAAQ,IAAI,MAAM,UAAU,GAC5B,MACA,EAAE,QAAQ,CACZ;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"AndroidBridge.js","names":[],"sources":["../../src/bridges/AndroidBridge.ts"],"sourcesContent":["import {\n Bridge,\n BridgeAction,\n BridgePayload,\n BridgePayloadMap,\n} from \"./Bridge\";\nimport { Logger } from \"../utils/Logger\";\n\nexport class AndroidBridge extends Bridge {\n readonly platform = \"android\";\n\n protected postMessage(action: BridgeAction, payload?: BridgePayload) {\n if (typeof window === \"undefined\") {\n Logger.error(\"window is undefined\", {\n tags: { from: \"AndroidBridge.postMessage\" },\n });\n return;\n }\n\n if (!window.BluxAndroid?.postMessage) {\n Logger.error(\"No Android WebView available\", {\n tags: { from: \"AndroidBridge.postMessage\" },\n });\n return;\n }\n\n window.BluxAndroid.postMessage(JSON.stringify({ action, payload }));\n }\n\n initialize(payload: BridgePayloadMap[\"initialize\"]) {\n this.postMessage(\"initialize\", payload);\n }\n\n signIn(payload: BridgePayloadMap[\"signIn\"]) {\n this.postMessage(\"signIn\", payload);\n }\n\n signOut() {\n this.postMessage(\"signOut\");\n }\n\n setUserProperties(payload: BridgePayloadMap[\"setUserProperties\"]) {\n this.postMessage(\"setUserProperties\", payload);\n }\n\n setCustomUserProperties(\n payload: BridgePayloadMap[\"setCustomUserProperties\"],\n ) {\n this.postMessage(\"setCustomUserProperties\", payload);\n }\n\n sendEvent(payload: BridgePayloadMap[\"sendEvent\"]) {\n this.postMessage(\"sendEvent\", payload);\n }\n}\n"],"mappings":";;;;AAQA,IAAa,gBAAb,cAAmC,OAAO;CACxC,AAAS,WAAW;CAEpB,AAAU,YAAY,QAAsB,SAAyB;AACnE,MAAI,OAAO,WAAW,aAAa;AACjC,UAAO,MAAM,uBAAuB,EAClC,MAAM,EAAE,MAAM,6BAA6B,EAC5C,CAAC;AACF;;AAGF,MAAI,CAAC,OAAO,aAAa,aAAa;AACpC,UAAO,MAAM,gCAAgC,EAC3C,MAAM,EAAE,MAAM,6BAA6B,EAC5C,CAAC;AACF;;AAGF,SAAO,YAAY,YAAY,KAAK,UAAU;GAAE;GAAQ;GAAS,CAAC,CAAC;;CAGrE,WAAW,SAAyC;AAClD,OAAK,YAAY,cAAc,QAAQ;;CAGzC,OAAO,SAAqC;AAC1C,OAAK,YAAY,UAAU,QAAQ;;CAGrC,UAAU;AACR,OAAK,YAAY,UAAU;;CAG7B,kBAAkB,SAAgD;AAChE,OAAK,YAAY,qBAAqB,QAAQ;;CAGhD,wBACE,SACA;AACA,OAAK,YAAY,2BAA2B,QAAQ;;CAGtD,UAAU,SAAwC;AAChD,OAAK,YAAY,aAAa,QAAQ"}
1
+ {"version":3,"file":"AndroidBridge.js","names":[],"sources":["../../src/bridges/AndroidBridge.ts"],"sourcesContent":["import {\n Bridge,\n BridgeAction,\n BridgePayload,\n BridgePayloadMap,\n} from \"./Bridge\";\nimport { Logger } from \"../utils/Logger\";\n\nexport class AndroidBridge extends Bridge {\n readonly platform = \"android\";\n\n protected postMessage(action: BridgeAction, payload?: BridgePayload) {\n if (typeof window === \"undefined\") {\n Logger.error(\"window is undefined\", {\n tags: { from: \"AndroidBridge.postMessage\" },\n });\n return;\n }\n\n if (!window.BluxAndroid?.postMessage) {\n Logger.error(\"No Android WebView available\", {\n tags: { from: \"AndroidBridge.postMessage\" },\n });\n return;\n }\n\n window.BluxAndroid.postMessage(JSON.stringify({ action, payload }));\n }\n\n initialize(payload: BridgePayloadMap[\"initialize\"]) {\n this.postMessage(\"initialize\", payload);\n }\n\n signIn(payload: BridgePayloadMap[\"signIn\"]) {\n this.postMessage(\"signIn\", payload);\n }\n\n signOut() {\n this.postMessage(\"signOut\");\n }\n\n setUserProperties(payload: BridgePayloadMap[\"setUserProperties\"]) {\n this.postMessage(\"setUserProperties\", payload);\n }\n\n setCustomUserProperties(\n payload: BridgePayloadMap[\"setCustomUserProperties\"],\n ) {\n this.postMessage(\"setCustomUserProperties\", payload);\n }\n\n sendEvent(payload: BridgePayloadMap[\"sendEvent\"]) {\n this.postMessage(\"sendEvent\", payload);\n }\n}\n"],"mappings":";;;;AAQA,IAAa,gBAAb,cAAmC,OAAO;CACxC,AAAS,WAAW;CAEpB,AAAU,YAAY,QAAsB,SAAyB;EACnE,IAAI,OAAO,WAAW,aAAa;GACjC,OAAO,MAAM,uBAAuB,EAClC,MAAM,EAAE,MAAM,4BAA4B,EAC5C,CAAC;GACD;EACF;EAEA,IAAI,CAAC,OAAO,aAAa,aAAa;GACpC,OAAO,MAAM,gCAAgC,EAC3C,MAAM,EAAE,MAAM,4BAA4B,EAC5C,CAAC;GACD;EACF;EAEA,OAAO,YAAY,YAAY,KAAK,UAAU;GAAE;GAAQ;EAAQ,CAAC,CAAC;CACpE;CAEA,WAAW,SAAyC;EAClD,KAAK,YAAY,cAAc,OAAO;CACxC;CAEA,OAAO,SAAqC;EAC1C,KAAK,YAAY,UAAU,OAAO;CACpC;CAEA,UAAU;EACR,KAAK,YAAY,SAAS;CAC5B;CAEA,kBAAkB,SAAgD;EAChE,KAAK,YAAY,qBAAqB,OAAO;CAC/C;CAEA,wBACE,SACA;EACA,KAAK,YAAY,2BAA2B,OAAO;CACrD;CAEA,UAAU,SAAwC;EAChD,KAAK,YAAY,aAAa,OAAO;CACvC;AACF"}
@@ -1,6 +1,5 @@
1
1
  import "../events/types.js";
2
2
  import "../BluxClient.js";
3
-
4
3
  //#region src/bridges/Bridge.d.ts
5
4
  declare const BRIDGE_PLATFORMS: readonly ["none", "android", "ios", "react-native", "flutter"];
6
5
  type BridgePlatform = (typeof BRIDGE_PLATFORMS)[number];
@@ -1 +1 @@
1
- {"version":3,"file":"Bridge.js","names":[],"sources":["../../src/bridges/Bridge.ts"],"sourcesContent":["import { BluxClient } from \"../BluxClient\";\nimport { EventRequest } from \"../events/types\";\n\n// SSoT\nexport const BRIDGE_PLATFORMS = [\n \"none\",\n \"android\",\n \"ios\",\n \"react-native\",\n \"flutter\",\n] as const;\nexport type BridgePlatform = (typeof BRIDGE_PLATFORMS)[number];\n\nexport type BridgeAction =\n | \"initialize\"\n | \"signIn\"\n | \"signOut\"\n | \"setUserProperties\"\n | \"setCustomUserProperties\"\n | \"sendEvent\";\n\nconst _bridgePayloadMap = {\n initialize: {\n bluxApplicationId: \"\",\n bluxAPIKey: \"\",\n customDeviceId: undefined as string | undefined,\n },\n signIn: {} as Parameters<BluxClient[\"signIn\"]>[0],\n signOut: {},\n setUserProperties: {} as Parameters<\n BluxClient[\"setUserProperties\"]\n >[0][\"userProperties\"],\n setCustomUserProperties: {} as Parameters<\n BluxClient[\"setCustomUserProperties\"]\n >[0][\"customUserProperties\"],\n sendEvent: { requests: [] as EventRequest[] },\n} satisfies Record<BridgeAction, unknown>;\n\nexport type BridgePayloadMap = typeof _bridgePayloadMap;\n\nexport type BridgePayload = BridgePayloadMap[keyof BridgePayloadMap];\n\nexport abstract class Bridge {\n abstract readonly platform: BridgePlatform;\n\n protected abstract postMessage(\n action: BridgeAction,\n payload?: BridgePayload,\n ): void;\n\n abstract initialize(payload: BridgePayloadMap[\"initialize\"]): void;\n\n abstract signIn(payload: BridgePayloadMap[\"signIn\"]): void;\n\n abstract signOut(): void;\n\n abstract setUserProperties(\n payload: BridgePayloadMap[\"setUserProperties\"],\n ): void;\n\n abstract setCustomUserProperties(\n payload: BridgePayloadMap[\"setCustomUserProperties\"],\n ): void;\n\n abstract sendEvent(payload: BridgePayloadMap[\"sendEvent\"]): void;\n}\n"],"mappings":";AAIA,MAAa,mBAAmB;CAC9B;CACA;CACA;CACA;CACA;CACD;AAgCD,IAAsB,SAAtB,MAA6B"}
1
+ {"version":3,"file":"Bridge.js","names":[],"sources":["../../src/bridges/Bridge.ts"],"sourcesContent":["import { BluxClient } from \"../BluxClient\";\nimport { EventRequest } from \"../events/types\";\n\n// SSoT\nexport const BRIDGE_PLATFORMS = [\n \"none\",\n \"android\",\n \"ios\",\n \"react-native\",\n \"flutter\",\n] as const;\nexport type BridgePlatform = (typeof BRIDGE_PLATFORMS)[number];\n\nexport type BridgeAction =\n | \"initialize\"\n | \"signIn\"\n | \"signOut\"\n | \"setUserProperties\"\n | \"setCustomUserProperties\"\n | \"sendEvent\";\n\nconst _bridgePayloadMap = {\n initialize: {\n bluxApplicationId: \"\",\n bluxAPIKey: \"\",\n customDeviceId: undefined as string | undefined,\n },\n signIn: {} as Parameters<BluxClient[\"signIn\"]>[0],\n signOut: {},\n setUserProperties: {} as Parameters<\n BluxClient[\"setUserProperties\"]\n >[0][\"userProperties\"],\n setCustomUserProperties: {} as Parameters<\n BluxClient[\"setCustomUserProperties\"]\n >[0][\"customUserProperties\"],\n sendEvent: { requests: [] as EventRequest[] },\n} satisfies Record<BridgeAction, unknown>;\n\nexport type BridgePayloadMap = typeof _bridgePayloadMap;\n\nexport type BridgePayload = BridgePayloadMap[keyof BridgePayloadMap];\n\nexport abstract class Bridge {\n abstract readonly platform: BridgePlatform;\n\n protected abstract postMessage(\n action: BridgeAction,\n payload?: BridgePayload,\n ): void;\n\n abstract initialize(payload: BridgePayloadMap[\"initialize\"]): void;\n\n abstract signIn(payload: BridgePayloadMap[\"signIn\"]): void;\n\n abstract signOut(): void;\n\n abstract setUserProperties(\n payload: BridgePayloadMap[\"setUserProperties\"],\n ): void;\n\n abstract setCustomUserProperties(\n payload: BridgePayloadMap[\"setCustomUserProperties\"],\n ): void;\n\n abstract sendEvent(payload: BridgePayloadMap[\"sendEvent\"]): void;\n}\n"],"mappings":";AAIA,MAAa,mBAAmB;CAC9B;CACA;CACA;CACA;CACA;AACF;AAgCA,IAAsB,SAAtB,MAA6B,CAuB7B"}
@@ -1 +1 @@
1
- {"version":3,"file":"FlutterBridge.js","names":[],"sources":["../../src/bridges/FlutterBridge.ts"],"sourcesContent":["import {\n Bridge,\n BridgeAction,\n BridgePayload,\n BridgePayloadMap,\n} from \"./Bridge\";\nimport { Logger } from \"../utils/Logger\";\n\nexport class FlutterBridge extends Bridge {\n readonly platform = \"flutter\";\n\n protected postMessage(action: BridgeAction, payload?: BridgePayload) {\n if (typeof window === \"undefined\") {\n Logger.error(\"window is undefined\", {\n tags: { from: \"FlutterBridge.postMessage\" },\n });\n return;\n }\n\n if (window.Blux?.postMessage) {\n window.Blux.postMessage(JSON.stringify({ action, payload }));\n return;\n }\n\n if (window.flutter_inappwebview?.callHandler) {\n window.flutter_inappwebview\n .callHandler(\"Blux\", JSON.stringify({ action, payload }))\n .catch((err) =>\n Logger.error(err, { tags: { from: \"FlutterBridge.postMessage\" } }),\n );\n return;\n }\n\n Logger.error(\"No Flutter WebView available\", {\n tags: { from: \"FlutterBridge.postMessage\" },\n });\n }\n\n initialize(payload: BridgePayloadMap[\"initialize\"]) {\n this.postMessage(\"initialize\", payload);\n }\n\n signIn(payload: BridgePayloadMap[\"signIn\"]) {\n this.postMessage(\"signIn\", payload);\n }\n\n signOut() {\n this.postMessage(\"signOut\");\n }\n\n setUserProperties(payload: BridgePayloadMap[\"setUserProperties\"]) {\n this.postMessage(\"setUserProperties\", payload);\n }\n\n setCustomUserProperties(\n payload: BridgePayloadMap[\"setCustomUserProperties\"],\n ) {\n this.postMessage(\"setCustomUserProperties\", payload);\n }\n\n sendEvent(payload: BridgePayloadMap[\"sendEvent\"]) {\n this.postMessage(\"sendEvent\", payload);\n }\n}\n"],"mappings":";;;;AAQA,IAAa,gBAAb,cAAmC,OAAO;CACxC,AAAS,WAAW;CAEpB,AAAU,YAAY,QAAsB,SAAyB;AACnE,MAAI,OAAO,WAAW,aAAa;AACjC,UAAO,MAAM,uBAAuB,EAClC,MAAM,EAAE,MAAM,6BAA6B,EAC5C,CAAC;AACF;;AAGF,MAAI,OAAO,MAAM,aAAa;AAC5B,UAAO,KAAK,YAAY,KAAK,UAAU;IAAE;IAAQ;IAAS,CAAC,CAAC;AAC5D;;AAGF,MAAI,OAAO,sBAAsB,aAAa;AAC5C,UAAO,qBACJ,YAAY,QAAQ,KAAK,UAAU;IAAE;IAAQ;IAAS,CAAC,CAAC,CACxD,OAAO,QACN,OAAO,MAAM,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,EAAE,CAAC,CACnE;AACH;;AAGF,SAAO,MAAM,gCAAgC,EAC3C,MAAM,EAAE,MAAM,6BAA6B,EAC5C,CAAC;;CAGJ,WAAW,SAAyC;AAClD,OAAK,YAAY,cAAc,QAAQ;;CAGzC,OAAO,SAAqC;AAC1C,OAAK,YAAY,UAAU,QAAQ;;CAGrC,UAAU;AACR,OAAK,YAAY,UAAU;;CAG7B,kBAAkB,SAAgD;AAChE,OAAK,YAAY,qBAAqB,QAAQ;;CAGhD,wBACE,SACA;AACA,OAAK,YAAY,2BAA2B,QAAQ;;CAGtD,UAAU,SAAwC;AAChD,OAAK,YAAY,aAAa,QAAQ"}
1
+ {"version":3,"file":"FlutterBridge.js","names":[],"sources":["../../src/bridges/FlutterBridge.ts"],"sourcesContent":["import {\n Bridge,\n BridgeAction,\n BridgePayload,\n BridgePayloadMap,\n} from \"./Bridge\";\nimport { Logger } from \"../utils/Logger\";\n\nexport class FlutterBridge extends Bridge {\n readonly platform = \"flutter\";\n\n protected postMessage(action: BridgeAction, payload?: BridgePayload) {\n if (typeof window === \"undefined\") {\n Logger.error(\"window is undefined\", {\n tags: { from: \"FlutterBridge.postMessage\" },\n });\n return;\n }\n\n if (window.Blux?.postMessage) {\n window.Blux.postMessage(JSON.stringify({ action, payload }));\n return;\n }\n\n if (window.flutter_inappwebview?.callHandler) {\n window.flutter_inappwebview\n .callHandler(\"Blux\", JSON.stringify({ action, payload }))\n .catch((err) =>\n Logger.error(err, { tags: { from: \"FlutterBridge.postMessage\" } }),\n );\n return;\n }\n\n Logger.error(\"No Flutter WebView available\", {\n tags: { from: \"FlutterBridge.postMessage\" },\n });\n }\n\n initialize(payload: BridgePayloadMap[\"initialize\"]) {\n this.postMessage(\"initialize\", payload);\n }\n\n signIn(payload: BridgePayloadMap[\"signIn\"]) {\n this.postMessage(\"signIn\", payload);\n }\n\n signOut() {\n this.postMessage(\"signOut\");\n }\n\n setUserProperties(payload: BridgePayloadMap[\"setUserProperties\"]) {\n this.postMessage(\"setUserProperties\", payload);\n }\n\n setCustomUserProperties(\n payload: BridgePayloadMap[\"setCustomUserProperties\"],\n ) {\n this.postMessage(\"setCustomUserProperties\", payload);\n }\n\n sendEvent(payload: BridgePayloadMap[\"sendEvent\"]) {\n this.postMessage(\"sendEvent\", payload);\n }\n}\n"],"mappings":";;;;AAQA,IAAa,gBAAb,cAAmC,OAAO;CACxC,AAAS,WAAW;CAEpB,AAAU,YAAY,QAAsB,SAAyB;EACnE,IAAI,OAAO,WAAW,aAAa;GACjC,OAAO,MAAM,uBAAuB,EAClC,MAAM,EAAE,MAAM,4BAA4B,EAC5C,CAAC;GACD;EACF;EAEA,IAAI,OAAO,MAAM,aAAa;GAC5B,OAAO,KAAK,YAAY,KAAK,UAAU;IAAE;IAAQ;GAAQ,CAAC,CAAC;GAC3D;EACF;EAEA,IAAI,OAAO,sBAAsB,aAAa;GAC5C,OAAO,qBACJ,YAAY,QAAQ,KAAK,UAAU;IAAE;IAAQ;GAAQ,CAAC,CAAC,CAAC,CACxD,OAAO,QACN,OAAO,MAAM,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,EAAE,CAAC,CACnE;GACF;EACF;EAEA,OAAO,MAAM,gCAAgC,EAC3C,MAAM,EAAE,MAAM,4BAA4B,EAC5C,CAAC;CACH;CAEA,WAAW,SAAyC;EAClD,KAAK,YAAY,cAAc,OAAO;CACxC;CAEA,OAAO,SAAqC;EAC1C,KAAK,YAAY,UAAU,OAAO;CACpC;CAEA,UAAU;EACR,KAAK,YAAY,SAAS;CAC5B;CAEA,kBAAkB,SAAgD;EAChE,KAAK,YAAY,qBAAqB,OAAO;CAC/C;CAEA,wBACE,SACA;EACA,KAAK,YAAY,2BAA2B,OAAO;CACrD;CAEA,UAAU,SAAwC;EAChD,KAAK,YAAY,aAAa,OAAO;CACvC;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"IosBridge.js","names":[],"sources":["../../src/bridges/IosBridge.ts"],"sourcesContent":["import {\n Bridge,\n BridgeAction,\n BridgePayload,\n BridgePayloadMap,\n} from \"./Bridge\";\nimport { Logger } from \"../utils/Logger\";\n\nexport class IosBridge extends Bridge {\n readonly platform = \"ios\";\n\n protected postMessage(action: BridgeAction, payload?: BridgePayload) {\n if (typeof window === \"undefined\") {\n Logger.error(\"window is undefined\", {\n tags: { from: \"IosBridge.postMessage\" },\n });\n return;\n }\n\n const handler = window.webkit?.messageHandlers?.Blux;\n if (!handler?.postMessage) {\n Logger.error(\"No iOS WKWebView Blux handler available\", {\n tags: { from: \"IosBridge.postMessage\" },\n });\n return;\n }\n\n handler.postMessage(JSON.stringify({ action, payload }));\n }\n\n initialize(payload: BridgePayloadMap[\"initialize\"]) {\n this.postMessage(\"initialize\", payload);\n }\n\n signIn(payload: BridgePayloadMap[\"signIn\"]) {\n this.postMessage(\"signIn\", payload);\n }\n\n signOut() {\n this.postMessage(\"signOut\");\n }\n\n setUserProperties(payload: BridgePayloadMap[\"setUserProperties\"]) {\n this.postMessage(\"setUserProperties\", payload);\n }\n\n setCustomUserProperties(\n payload: BridgePayloadMap[\"setCustomUserProperties\"],\n ) {\n this.postMessage(\"setCustomUserProperties\", payload);\n }\n\n sendEvent(payload: BridgePayloadMap[\"sendEvent\"]) {\n this.postMessage(\"sendEvent\", payload);\n }\n}\n"],"mappings":";;;;AAQA,IAAa,YAAb,cAA+B,OAAO;CACpC,AAAS,WAAW;CAEpB,AAAU,YAAY,QAAsB,SAAyB;AACnE,MAAI,OAAO,WAAW,aAAa;AACjC,UAAO,MAAM,uBAAuB,EAClC,MAAM,EAAE,MAAM,yBAAyB,EACxC,CAAC;AACF;;EAGF,MAAM,UAAU,OAAO,QAAQ,iBAAiB;AAChD,MAAI,CAAC,SAAS,aAAa;AACzB,UAAO,MAAM,2CAA2C,EACtD,MAAM,EAAE,MAAM,yBAAyB,EACxC,CAAC;AACF;;AAGF,UAAQ,YAAY,KAAK,UAAU;GAAE;GAAQ;GAAS,CAAC,CAAC;;CAG1D,WAAW,SAAyC;AAClD,OAAK,YAAY,cAAc,QAAQ;;CAGzC,OAAO,SAAqC;AAC1C,OAAK,YAAY,UAAU,QAAQ;;CAGrC,UAAU;AACR,OAAK,YAAY,UAAU;;CAG7B,kBAAkB,SAAgD;AAChE,OAAK,YAAY,qBAAqB,QAAQ;;CAGhD,wBACE,SACA;AACA,OAAK,YAAY,2BAA2B,QAAQ;;CAGtD,UAAU,SAAwC;AAChD,OAAK,YAAY,aAAa,QAAQ"}
1
+ {"version":3,"file":"IosBridge.js","names":[],"sources":["../../src/bridges/IosBridge.ts"],"sourcesContent":["import {\n Bridge,\n BridgeAction,\n BridgePayload,\n BridgePayloadMap,\n} from \"./Bridge\";\nimport { Logger } from \"../utils/Logger\";\n\nexport class IosBridge extends Bridge {\n readonly platform = \"ios\";\n\n protected postMessage(action: BridgeAction, payload?: BridgePayload) {\n if (typeof window === \"undefined\") {\n Logger.error(\"window is undefined\", {\n tags: { from: \"IosBridge.postMessage\" },\n });\n return;\n }\n\n const handler = window.webkit?.messageHandlers?.Blux;\n if (!handler?.postMessage) {\n Logger.error(\"No iOS WKWebView Blux handler available\", {\n tags: { from: \"IosBridge.postMessage\" },\n });\n return;\n }\n\n handler.postMessage(JSON.stringify({ action, payload }));\n }\n\n initialize(payload: BridgePayloadMap[\"initialize\"]) {\n this.postMessage(\"initialize\", payload);\n }\n\n signIn(payload: BridgePayloadMap[\"signIn\"]) {\n this.postMessage(\"signIn\", payload);\n }\n\n signOut() {\n this.postMessage(\"signOut\");\n }\n\n setUserProperties(payload: BridgePayloadMap[\"setUserProperties\"]) {\n this.postMessage(\"setUserProperties\", payload);\n }\n\n setCustomUserProperties(\n payload: BridgePayloadMap[\"setCustomUserProperties\"],\n ) {\n this.postMessage(\"setCustomUserProperties\", payload);\n }\n\n sendEvent(payload: BridgePayloadMap[\"sendEvent\"]) {\n this.postMessage(\"sendEvent\", payload);\n }\n}\n"],"mappings":";;;;AAQA,IAAa,YAAb,cAA+B,OAAO;CACpC,AAAS,WAAW;CAEpB,AAAU,YAAY,QAAsB,SAAyB;EACnE,IAAI,OAAO,WAAW,aAAa;GACjC,OAAO,MAAM,uBAAuB,EAClC,MAAM,EAAE,MAAM,wBAAwB,EACxC,CAAC;GACD;EACF;EAEA,MAAM,UAAU,OAAO,QAAQ,iBAAiB;EAChD,IAAI,CAAC,SAAS,aAAa;GACzB,OAAO,MAAM,2CAA2C,EACtD,MAAM,EAAE,MAAM,wBAAwB,EACxC,CAAC;GACD;EACF;EAEA,QAAQ,YAAY,KAAK,UAAU;GAAE;GAAQ;EAAQ,CAAC,CAAC;CACzD;CAEA,WAAW,SAAyC;EAClD,KAAK,YAAY,cAAc,OAAO;CACxC;CAEA,OAAO,SAAqC;EAC1C,KAAK,YAAY,UAAU,OAAO;CACpC;CAEA,UAAU;EACR,KAAK,YAAY,SAAS;CAC5B;CAEA,kBAAkB,SAAgD;EAChE,KAAK,YAAY,qBAAqB,OAAO;CAC/C;CAEA,wBACE,SACA;EACA,KAAK,YAAY,2BAA2B,OAAO;CACrD;CAEA,UAAU,SAAwC;EAChD,KAAK,YAAY,aAAa,OAAO;CACvC;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"RNBridge.js","names":[],"sources":["../../src/bridges/RNBridge.ts"],"sourcesContent":["import {} from \"../BluxClient\";\nimport {\n Bridge,\n BridgeAction,\n BridgePayload,\n BridgePayloadMap,\n} from \"./Bridge\";\nimport { Logger } from \"../utils/Logger\";\n\nexport class RNBridge extends Bridge {\n readonly platform = \"react-native\";\n\n protected postMessage(action: BridgeAction, payload?: BridgePayload) {\n if (typeof window === \"undefined\") {\n Logger.error(\"window is undefined\", {\n tags: { from: \"RNBridge.postMessage\" },\n });\n\n return;\n }\n\n if (!window.ReactNativeWebView?.postMessage) {\n Logger.error(\"No React Native WebView available\", {\n tags: { from: \"RNBridge.postMessage\" },\n });\n return;\n }\n\n window.ReactNativeWebView.postMessage(JSON.stringify({ action, payload }));\n }\n\n initialize(payload: BridgePayloadMap[\"initialize\"]) {\n this.postMessage(\"initialize\", payload);\n }\n\n signIn(payload: BridgePayloadMap[\"signIn\"]) {\n this.postMessage(\"signIn\", payload);\n }\n\n signOut() {\n this.postMessage(\"signOut\");\n }\n\n setUserProperties(payload: BridgePayloadMap[\"setUserProperties\"]) {\n this.postMessage(\"setUserProperties\", payload);\n }\n\n setCustomUserProperties(\n payload: BridgePayloadMap[\"setCustomUserProperties\"],\n ) {\n this.postMessage(\"setCustomUserProperties\", payload);\n }\n\n sendEvent(payload: BridgePayloadMap[\"sendEvent\"]) {\n this.postMessage(\"sendEvent\", payload);\n }\n}\n"],"mappings":";;;;;AASA,IAAa,WAAb,cAA8B,OAAO;CACnC,AAAS,WAAW;CAEpB,AAAU,YAAY,QAAsB,SAAyB;AACnE,MAAI,OAAO,WAAW,aAAa;AACjC,UAAO,MAAM,uBAAuB,EAClC,MAAM,EAAE,MAAM,wBAAwB,EACvC,CAAC;AAEF;;AAGF,MAAI,CAAC,OAAO,oBAAoB,aAAa;AAC3C,UAAO,MAAM,qCAAqC,EAChD,MAAM,EAAE,MAAM,wBAAwB,EACvC,CAAC;AACF;;AAGF,SAAO,mBAAmB,YAAY,KAAK,UAAU;GAAE;GAAQ;GAAS,CAAC,CAAC;;CAG5E,WAAW,SAAyC;AAClD,OAAK,YAAY,cAAc,QAAQ;;CAGzC,OAAO,SAAqC;AAC1C,OAAK,YAAY,UAAU,QAAQ;;CAGrC,UAAU;AACR,OAAK,YAAY,UAAU;;CAG7B,kBAAkB,SAAgD;AAChE,OAAK,YAAY,qBAAqB,QAAQ;;CAGhD,wBACE,SACA;AACA,OAAK,YAAY,2BAA2B,QAAQ;;CAGtD,UAAU,SAAwC;AAChD,OAAK,YAAY,aAAa,QAAQ"}
1
+ {"version":3,"file":"RNBridge.js","names":[],"sources":["../../src/bridges/RNBridge.ts"],"sourcesContent":["import {} from \"../BluxClient\";\nimport {\n Bridge,\n BridgeAction,\n BridgePayload,\n BridgePayloadMap,\n} from \"./Bridge\";\nimport { Logger } from \"../utils/Logger\";\n\nexport class RNBridge extends Bridge {\n readonly platform = \"react-native\";\n\n protected postMessage(action: BridgeAction, payload?: BridgePayload) {\n if (typeof window === \"undefined\") {\n Logger.error(\"window is undefined\", {\n tags: { from: \"RNBridge.postMessage\" },\n });\n\n return;\n }\n\n if (!window.ReactNativeWebView?.postMessage) {\n Logger.error(\"No React Native WebView available\", {\n tags: { from: \"RNBridge.postMessage\" },\n });\n return;\n }\n\n window.ReactNativeWebView.postMessage(JSON.stringify({ action, payload }));\n }\n\n initialize(payload: BridgePayloadMap[\"initialize\"]) {\n this.postMessage(\"initialize\", payload);\n }\n\n signIn(payload: BridgePayloadMap[\"signIn\"]) {\n this.postMessage(\"signIn\", payload);\n }\n\n signOut() {\n this.postMessage(\"signOut\");\n }\n\n setUserProperties(payload: BridgePayloadMap[\"setUserProperties\"]) {\n this.postMessage(\"setUserProperties\", payload);\n }\n\n setCustomUserProperties(\n payload: BridgePayloadMap[\"setCustomUserProperties\"],\n ) {\n this.postMessage(\"setCustomUserProperties\", payload);\n }\n\n sendEvent(payload: BridgePayloadMap[\"sendEvent\"]) {\n this.postMessage(\"sendEvent\", payload);\n }\n}\n"],"mappings":";;;;;AASA,IAAa,WAAb,cAA8B,OAAO;CACnC,AAAS,WAAW;CAEpB,AAAU,YAAY,QAAsB,SAAyB;EACnE,IAAI,OAAO,WAAW,aAAa;GACjC,OAAO,MAAM,uBAAuB,EAClC,MAAM,EAAE,MAAM,uBAAuB,EACvC,CAAC;GAED;EACF;EAEA,IAAI,CAAC,OAAO,oBAAoB,aAAa;GAC3C,OAAO,MAAM,qCAAqC,EAChD,MAAM,EAAE,MAAM,uBAAuB,EACvC,CAAC;GACD;EACF;EAEA,OAAO,mBAAmB,YAAY,KAAK,UAAU;GAAE;GAAQ;EAAQ,CAAC,CAAC;CAC3E;CAEA,WAAW,SAAyC;EAClD,KAAK,YAAY,cAAc,OAAO;CACxC;CAEA,OAAO,SAAqC;EAC1C,KAAK,YAAY,UAAU,OAAO;CACpC;CAEA,UAAU;EACR,KAAK,YAAY,SAAS;CAC5B;CAEA,kBAAkB,SAAgD;EAChE,KAAK,YAAY,qBAAqB,OAAO;CAC/C;CAEA,wBACE,SACA;EACA,KAAK,YAAY,2BAA2B,OAAO;CACrD;CAEA,UAAU,SAAwC;EAChD,KAAK,YAAY,aAAa,OAAO;CACvC;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"BLUX_ATTRIBUTES.js","names":[],"sources":["../../src/constants/BLUX_ATTRIBUTES.ts"],"sourcesContent":["export const BLUX_ATTRIBUTES = {\n tracking_id: \"data-blux-tracking-id\",\n item_id: \"data-blux-item-id\",\n};\n"],"mappings":";AAAA,MAAa,kBAAkB;CAC7B,aAAa;CACb,SAAS;CACV"}
1
+ {"version":3,"file":"BLUX_ATTRIBUTES.js","names":[],"sources":["../../src/constants/BLUX_ATTRIBUTES.ts"],"sourcesContent":["export const BLUX_ATTRIBUTES = {\n tracking_id: \"data-blux-tracking-id\",\n item_id: \"data-blux-item-id\",\n};\n"],"mappings":";AAAA,MAAa,kBAAkB;CAC7B,aAAa;CACb,SAAS;AACX"}
@@ -1159,5 +1159,5 @@ const COUNTRIES = [
1159
1159
  const COUNTRY_CODES = COUNTRIES.map((country) => country.code);
1160
1160
 
1161
1161
  //#endregion
1162
- export { COUNTRY_CODES };
1162
+ export { COUNTRIES, COUNTRY_CODES };
1163
1163
  //# sourceMappingURL=COUNTRIES.js.map