@blux.ai/web-sdk 2.2.30 → 2.2.32

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.
@@ -1,5 +1,5 @@
1
+ import { CustomProperties, RecResponse } from "../utils/zodSchemas.js";
1
2
  import { Serialize } from "../utils/Base.js";
2
- import { RecResponse } from "../utils/zodSchemas.js";
3
3
  import { z } from "zod";
4
4
  //#region src/apis/APIs.d.ts
5
5
  declare enum DevicePlatform {
@@ -18,52 +18,254 @@ declare namespace APIs {
18
18
  const method = HttpMethod.POST;
19
19
  const bodySchema: z.ZodObject<{
20
20
  session_id: z.ZodOptional<z.ZodString>;
21
- device_id: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>>;
21
+ device_id: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("bson-objectid").default, string>>>;
22
22
  custom_device_id: z.ZodOptional<z.ZodString>;
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>>;
23
+ country_code: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodUnion<readonly [z.ZodLiteral<"419">, z.ZodEnum<{
24
+ AF: "AF";
25
+ AL: "AL";
26
+ DZ: "DZ";
27
+ AS: "AS";
28
+ AD: "AD";
29
+ AO: "AO";
30
+ AI: "AI";
31
+ AG: "AG";
32
+ AR: "AR";
33
+ AM: "AM";
34
+ AW: "AW";
35
+ AU: "AU";
36
+ AT: "AT";
37
+ AZ: "AZ";
38
+ BS: "BS";
39
+ BH: "BH";
40
+ BD: "BD";
41
+ BB: "BB";
42
+ BY: "BY";
43
+ BE: "BE";
44
+ BZ: "BZ";
45
+ BJ: "BJ";
46
+ BM: "BM";
47
+ BT: "BT";
48
+ BO: "BO";
49
+ BA: "BA";
50
+ BW: "BW";
51
+ BR: "BR";
52
+ IO: "IO";
53
+ BN: "BN";
54
+ BG: "BG";
55
+ BF: "BF";
56
+ BI: "BI";
57
+ KH: "KH";
58
+ CM: "CM";
59
+ CV: "CV";
60
+ KY: "KY";
61
+ CF: "CF";
62
+ TD: "TD";
63
+ CL: "CL";
64
+ CN: "CN";
65
+ CO: "CO";
66
+ KM: "KM";
67
+ CG: "CG";
68
+ CD: "CD";
69
+ CK: "CK";
70
+ CR: "CR";
71
+ CI: "CI";
72
+ HR: "HR";
73
+ CU: "CU";
74
+ CY: "CY";
75
+ CZ: "CZ";
76
+ DK: "DK";
77
+ DJ: "DJ";
78
+ DM: "DM";
79
+ DO: "DO";
80
+ EC: "EC";
81
+ EG: "EG";
82
+ SV: "SV";
83
+ GQ: "GQ";
84
+ ER: "ER";
85
+ EE: "EE";
86
+ ET: "ET";
87
+ FK: "FK";
88
+ FO: "FO";
89
+ FJ: "FJ";
90
+ FI: "FI";
91
+ FR: "FR";
92
+ GF: "GF";
93
+ PF: "PF";
94
+ GA: "GA";
95
+ GM: "GM";
96
+ GE: "GE";
97
+ DE: "DE";
98
+ GH: "GH";
99
+ GI: "GI";
100
+ GR: "GR";
101
+ GL: "GL";
102
+ GD: "GD";
103
+ GP: "GP";
104
+ GU: "GU";
105
+ GT: "GT";
106
+ GN: "GN";
107
+ GW: "GW";
108
+ HT: "HT";
109
+ VA: "VA";
110
+ HN: "HN";
111
+ HK: "HK";
112
+ HU: "HU";
113
+ IS: "IS";
114
+ IN: "IN";
115
+ ID: "ID";
116
+ IR: "IR";
117
+ IQ: "IQ";
118
+ IE: "IE";
119
+ IL: "IL";
120
+ IT: "IT";
121
+ JM: "JM";
122
+ JP: "JP";
123
+ JO: "JO";
124
+ KE: "KE";
125
+ KI: "KI";
126
+ KP: "KP";
127
+ KR: "KR";
128
+ KW: "KW";
129
+ KG: "KG";
130
+ LA: "LA";
131
+ LV: "LV";
132
+ LB: "LB";
133
+ LS: "LS";
134
+ LR: "LR";
135
+ LY: "LY";
136
+ LI: "LI";
137
+ LT: "LT";
138
+ LU: "LU";
139
+ MO: "MO";
140
+ MK: "MK";
141
+ MG: "MG";
142
+ MW: "MW";
143
+ MY: "MY";
144
+ MV: "MV";
145
+ ML: "ML";
146
+ MT: "MT";
147
+ MH: "MH";
148
+ MQ: "MQ";
149
+ MR: "MR";
150
+ MU: "MU";
151
+ YT: "YT";
152
+ MX: "MX";
153
+ FM: "FM";
154
+ MD: "MD";
155
+ MC: "MC";
156
+ MN: "MN";
157
+ ME: "ME";
158
+ MS: "MS";
159
+ MA: "MA";
160
+ MZ: "MZ";
161
+ MM: "MM";
162
+ NA: "NA";
163
+ NR: "NR";
164
+ NP: "NP";
165
+ NL: "NL";
166
+ NC: "NC";
167
+ NZ: "NZ";
168
+ NI: "NI";
169
+ NE: "NE";
170
+ NG: "NG";
171
+ NU: "NU";
172
+ NF: "NF";
173
+ MP: "MP";
174
+ NO: "NO";
175
+ OM: "OM";
176
+ PK: "PK";
177
+ PW: "PW";
178
+ PS: "PS";
179
+ PA: "PA";
180
+ PG: "PG";
181
+ PY: "PY";
182
+ GY: "GY";
183
+ PE: "PE";
184
+ PH: "PH";
185
+ PL: "PL";
186
+ PT: "PT";
187
+ PR: "PR";
188
+ QA: "QA";
189
+ RO: "RO";
190
+ RU: "RU";
191
+ KZ: "KZ";
192
+ RW: "RW";
193
+ RE: "RE";
194
+ BL: "BL";
195
+ SH: "SH";
196
+ KN: "KN";
197
+ LC: "LC";
198
+ MF: "MF";
199
+ PM: "PM";
200
+ VC: "VC";
201
+ WS: "WS";
202
+ SM: "SM";
203
+ ST: "ST";
204
+ SA: "SA";
205
+ SN: "SN";
206
+ RS: "RS";
207
+ SC: "SC";
208
+ SL: "SL";
209
+ SG: "SG";
210
+ SK: "SK";
211
+ SI: "SI";
212
+ SB: "SB";
213
+ SO: "SO";
214
+ ZA: "ZA";
215
+ SS: "SS";
216
+ ES: "ES";
217
+ LK: "LK";
218
+ SD: "SD";
219
+ SR: "SR";
220
+ SZ: "SZ";
221
+ SE: "SE";
222
+ CH: "CH";
223
+ SY: "SY";
224
+ TW: "TW";
225
+ TJ: "TJ";
226
+ TZ: "TZ";
227
+ TH: "TH";
228
+ TL: "TL";
229
+ TG: "TG";
230
+ TK: "TK";
231
+ TO: "TO";
232
+ TT: "TT";
233
+ TN: "TN";
234
+ TR: "TR";
235
+ TM: "TM";
236
+ TC: "TC";
237
+ TV: "TV";
238
+ UG: "UG";
239
+ UA: "UA";
240
+ AE: "AE";
241
+ GB: "GB";
242
+ US: "US";
243
+ CA: "CA";
244
+ UY: "UY";
245
+ UZ: "UZ";
246
+ VU: "VU";
247
+ VE: "VE";
248
+ VN: "VN";
249
+ VG: "VG";
250
+ VI: "VI";
251
+ WF: "WF";
252
+ YE: "YE";
253
+ ZM: "ZM";
254
+ ZW: "ZW";
255
+ }>]>>, z.ZodTransform<"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, "419" | "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">>>;
24
256
  device_model: z.ZodString;
25
257
  language_code: z.ZodString;
26
258
  os_version: z.ZodString;
27
- platform: z.ZodNativeEnum<typeof DevicePlatform>;
259
+ platform: z.ZodEnum<typeof DevicePlatform>;
28
260
  sdk_type: z.ZodString;
29
261
  sdk_version: z.ZodString;
30
262
  timezone: z.ZodString;
31
263
  blux_user_id: z.ZodOptional<z.ZodString>;
32
- }, "strip", z.ZodTypeAny, {
33
- device_model: string;
34
- language_code: string;
35
- os_version: string;
36
- platform: DevicePlatform;
37
- sdk_type: string;
38
- sdk_version: string;
39
- timezone: string;
40
- session_id?: string | undefined;
41
- device_id?: import("bson-objectid").default | undefined;
42
- custom_device_id?: string | undefined;
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;
44
- blux_user_id?: string | undefined;
45
- }, {
46
- device_model: string;
47
- language_code: string;
48
- os_version: string;
49
- platform: DevicePlatform;
50
- sdk_type: string;
51
- sdk_version: string;
52
- timezone: string;
53
- session_id?: string | undefined;
54
- device_id?: string | undefined;
55
- custom_device_id?: string | undefined;
56
- country_code?: string | undefined;
57
- blux_user_id?: string | undefined;
58
- }>;
264
+ }, z.core.$strip>;
59
265
  type Body = Serialize<z.input<typeof bodySchema>>;
60
266
  const pathSchema: z.ZodObject<{
61
267
  application_id: z.ZodOptional<z.ZodString>;
62
- }, "strip", z.ZodTypeAny, {
63
- application_id?: string | undefined;
64
- }, {
65
- application_id?: string | undefined;
66
- }>;
268
+ }, z.core.$strip>;
67
269
  type PathParam = Serialize<z.input<typeof pathSchema>>;
68
270
  type ResponseData = {
69
271
  blux_user_id: string;
@@ -77,24 +279,12 @@ declare namespace APIs {
77
279
  const bodySchema: z.ZodObject<{
78
280
  user_id: z.ZodString;
79
281
  device_id: z.ZodOptional<z.ZodString>;
80
- }, "strip", z.ZodTypeAny, {
81
- user_id: string;
82
- device_id?: string | undefined;
83
- }, {
84
- user_id: string;
85
- device_id?: string | undefined;
86
- }>;
282
+ }, z.core.$strip>;
87
283
  type Body = Serialize<z.input<typeof bodySchema>>;
88
284
  const pathSchema: z.ZodObject<{
89
285
  application_id: z.ZodOptional<z.ZodString>;
90
- blux_user_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
91
- }, "strip", z.ZodTypeAny, {
92
- blux_user_id: import("bson-objectid").default;
93
- application_id?: string | undefined;
94
- }, {
95
- blux_user_id: string;
96
- application_id?: string | undefined;
97
- }>;
286
+ blux_user_id: z.ZodPipe<z.ZodString, z.ZodTransform<import("bson-objectid").default, string>>;
287
+ }, z.core.$strip>;
98
288
  type PathParam = Serialize<z.input<typeof pathSchema>>;
99
289
  type ResponseData = {
100
290
  blux_user_id: string;
@@ -105,23 +295,13 @@ declare namespace APIs {
105
295
  const path = "/applications/{application_id}/blux-users/{blux_user_id}/sign-out";
106
296
  const method = HttpMethod.PUT;
107
297
  const bodySchema: z.ZodObject<{
108
- device_id: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>>;
109
- }, "strip", z.ZodTypeAny, {
110
- device_id?: import("bson-objectid").default | undefined;
111
- }, {
112
- device_id?: string | undefined;
113
- }>;
298
+ device_id: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("bson-objectid").default, string>>>;
299
+ }, z.core.$strip>;
114
300
  type Body = Serialize<z.input<typeof bodySchema>>;
115
301
  const pathSchema: z.ZodObject<{
116
302
  application_id: z.ZodOptional<z.ZodString>;
117
- blux_user_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
118
- }, "strip", z.ZodTypeAny, {
119
- blux_user_id: import("bson-objectid").default;
120
- application_id?: string | undefined;
121
- }, {
122
- blux_user_id: string;
123
- application_id?: string | undefined;
124
- }>;
303
+ blux_user_id: z.ZodPipe<z.ZodString, z.ZodTransform<import("bson-objectid").default, string>>;
304
+ }, z.core.$strip>;
125
305
  type PathParam = Serialize<z.input<typeof pathSchema>>;
126
306
  type ResponseData = {
127
307
  blux_user_id: string;
@@ -132,18 +312,12 @@ declare namespace APIs {
132
312
  const path = "/v2/applications/{application_id}/blux-users/{blux_user_id}/collect-events";
133
313
  const method = HttpMethod.POST;
134
314
  const pathSchema: z.ZodObject<{
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>;
137
- }, "strip", z.ZodTypeAny, {
138
- blux_user_id: import("bson-objectid").default;
139
- application_id: import("bson-objectid").default;
140
- }, {
141
- blux_user_id: string;
142
- application_id: string;
143
- }>;
315
+ application_id: z.ZodPipe<z.ZodString, z.ZodTransform<import("bson-objectid").default, string>>;
316
+ blux_user_id: z.ZodPipe<z.ZodString, z.ZodTransform<import("bson-objectid").default, string>>;
317
+ }, z.core.$strip>;
144
318
  type PathParam = Serialize<z.input<typeof pathSchema>>;
145
319
  const bodySchema: z.ZodObject<{
146
- device_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
320
+ device_id: z.ZodPipe<z.ZodString, z.ZodTransform<import("bson-objectid").default, string>>;
147
321
  events: z.ZodArray<z.ZodObject<{
148
322
  event_type: z.ZodString;
149
323
  event_properties: z.ZodOptional<z.ZodObject<{
@@ -161,246 +335,34 @@ declare namespace APIs {
161
335
  id: z.ZodString;
162
336
  price: z.ZodNumber;
163
337
  quantity: z.ZodOptional<z.ZodNumber>;
164
- 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.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodUndefined]>>>;
165
- }, "strip", z.ZodTypeAny, {
166
- id: string;
167
- price: number;
168
- quantity?: number | undefined;
169
- custom_event_properties?: Record<string, string | number | boolean | Date | string[] | {}[] | {} | undefined> | undefined;
170
- }, {
171
- id: string;
172
- price: number;
173
- quantity?: number | undefined;
174
- custom_event_properties?: Record<string, string | number | boolean | string[] | {}[] | {} | undefined> | undefined;
175
- }>, "many">>;
338
+ custom_event_properties: z.ZodOptional<z.ZodType<CustomProperties, {
339
+ [x: string]: string | number | boolean | {} | Date | string[] | {}[] | null | undefined;
340
+ }, z.core.$ZodTypeInternals<CustomProperties, {
341
+ [x: string]: string | number | boolean | {} | Date | string[] | {}[] | null | undefined;
342
+ }>>>;
343
+ }, z.core.$strip>>>;
176
344
  search_query: z.ZodOptional<z.ZodString>;
177
345
  order_amount: z.ZodOptional<z.ZodNumber>;
178
346
  paid_amount: z.ZodOptional<z.ZodNumber>;
179
347
  tracking: z.ZodOptional<z.ZodObject<{
180
348
  id: z.ZodString;
181
349
  type: z.ZodString;
182
- }, "strip", z.ZodTypeAny, {
183
- id: string;
184
- type: string;
185
- }, {
186
- id: string;
187
- type: string;
188
- }>>;
350
+ }, z.core.$strip>>;
189
351
  click_target: z.ZodOptional<z.ZodString>;
190
- }, "strip", z.ZodTypeAny, {
191
- section?: string | undefined;
192
- prev_section?: string | undefined;
193
- recommendation_id?: string | undefined;
194
- price?: number | undefined;
195
- order_id?: string | undefined;
196
- rating?: number | undefined;
197
- prev_page?: string | undefined;
198
- page?: string | undefined;
199
- position?: number | undefined;
200
- item_id?: string | undefined;
201
- items?: {
202
- id: string;
203
- price: number;
204
- quantity?: number | undefined;
205
- custom_event_properties?: Record<string, string | number | boolean | Date | string[] | {}[] | {} | undefined> | undefined;
206
- }[] | undefined;
207
- search_query?: string | undefined;
208
- order_amount?: number | undefined;
209
- paid_amount?: number | undefined;
210
- tracking?: {
211
- id: string;
212
- type: string;
213
- } | undefined;
214
- click_target?: string | undefined;
215
- }, {
216
- section?: string | undefined;
217
- prev_section?: string | undefined;
218
- recommendation_id?: string | undefined;
219
- price?: number | undefined;
220
- order_id?: string | undefined;
221
- rating?: number | undefined;
222
- prev_page?: string | undefined;
223
- page?: string | undefined;
224
- position?: number | undefined;
225
- item_id?: string | undefined;
226
- items?: {
227
- id: string;
228
- price: number;
229
- quantity?: number | undefined;
230
- custom_event_properties?: Record<string, string | number | boolean | string[] | {}[] | {} | undefined> | undefined;
231
- }[] | undefined;
232
- search_query?: string | undefined;
233
- order_amount?: number | undefined;
234
- paid_amount?: number | undefined;
235
- tracking?: {
236
- id: string;
237
- type: string;
238
- } | undefined;
239
- click_target?: string | undefined;
240
- }>>;
241
- 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.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodUndefined]>>>;
352
+ }, z.core.$strip>>;
353
+ custom_event_properties: z.ZodOptional<z.ZodType<CustomProperties, {
354
+ [x: string]: string | number | boolean | {} | Date | string[] | {}[] | null | undefined;
355
+ }, z.core.$ZodTypeInternals<CustomProperties, {
356
+ [x: string]: string | number | boolean | {} | Date | string[] | {}[] | null | undefined;
357
+ }>>>;
242
358
  internal_event_properties: z.ZodOptional<z.ZodObject<{
243
359
  url: z.ZodOptional<z.ZodString>;
244
360
  ref: z.ZodOptional<z.ZodString>;
245
361
  click_target: z.ZodOptional<z.ZodString>;
246
- }, "strip", z.ZodTypeAny, {
247
- click_target?: string | undefined;
248
- url?: string | undefined;
249
- ref?: string | undefined;
250
- }, {
251
- click_target?: string | undefined;
252
- url?: string | undefined;
253
- ref?: string | undefined;
254
- }>>;
255
- captured_at: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>;
256
- }, "strip", z.ZodTypeAny, {
257
- event_type: string;
258
- captured_at: Date;
259
- custom_event_properties?: Record<string, string | number | boolean | Date | string[] | {}[] | {} | undefined> | undefined;
260
- event_properties?: {
261
- section?: string | undefined;
262
- prev_section?: string | undefined;
263
- recommendation_id?: string | undefined;
264
- price?: number | undefined;
265
- order_id?: string | undefined;
266
- rating?: number | undefined;
267
- prev_page?: string | undefined;
268
- page?: string | undefined;
269
- position?: number | undefined;
270
- item_id?: string | undefined;
271
- items?: {
272
- id: string;
273
- price: number;
274
- quantity?: number | undefined;
275
- custom_event_properties?: Record<string, string | number | boolean | Date | string[] | {}[] | {} | undefined> | undefined;
276
- }[] | undefined;
277
- search_query?: string | undefined;
278
- order_amount?: number | undefined;
279
- paid_amount?: number | undefined;
280
- tracking?: {
281
- id: string;
282
- type: string;
283
- } | undefined;
284
- click_target?: string | undefined;
285
- } | undefined;
286
- internal_event_properties?: {
287
- click_target?: string | undefined;
288
- url?: string | undefined;
289
- ref?: string | undefined;
290
- } | undefined;
291
- }, {
292
- event_type: string;
293
- captured_at: string;
294
- custom_event_properties?: Record<string, string | number | boolean | string[] | {}[] | {} | undefined> | undefined;
295
- event_properties?: {
296
- section?: string | undefined;
297
- prev_section?: string | undefined;
298
- recommendation_id?: string | undefined;
299
- price?: number | undefined;
300
- order_id?: string | undefined;
301
- rating?: number | undefined;
302
- prev_page?: string | undefined;
303
- page?: string | undefined;
304
- position?: number | undefined;
305
- item_id?: string | undefined;
306
- items?: {
307
- id: string;
308
- price: number;
309
- quantity?: number | undefined;
310
- custom_event_properties?: Record<string, string | number | boolean | string[] | {}[] | {} | undefined> | undefined;
311
- }[] | undefined;
312
- search_query?: string | undefined;
313
- order_amount?: number | undefined;
314
- paid_amount?: number | undefined;
315
- tracking?: {
316
- id: string;
317
- type: string;
318
- } | undefined;
319
- click_target?: string | undefined;
320
- } | undefined;
321
- internal_event_properties?: {
322
- click_target?: string | undefined;
323
- url?: string | undefined;
324
- ref?: string | undefined;
325
- } | undefined;
326
- }>, "many">;
327
- }, "strip", z.ZodTypeAny, {
328
- device_id: import("bson-objectid").default;
329
- events: {
330
- event_type: string;
331
- captured_at: Date;
332
- custom_event_properties?: Record<string, string | number | boolean | Date | string[] | {}[] | {} | undefined> | undefined;
333
- event_properties?: {
334
- section?: string | undefined;
335
- prev_section?: string | undefined;
336
- recommendation_id?: string | undefined;
337
- price?: number | undefined;
338
- order_id?: string | undefined;
339
- rating?: number | undefined;
340
- prev_page?: string | undefined;
341
- page?: string | undefined;
342
- position?: number | undefined;
343
- item_id?: string | undefined;
344
- items?: {
345
- id: string;
346
- price: number;
347
- quantity?: number | undefined;
348
- custom_event_properties?: Record<string, string | number | boolean | Date | string[] | {}[] | {} | undefined> | undefined;
349
- }[] | undefined;
350
- search_query?: string | undefined;
351
- order_amount?: number | undefined;
352
- paid_amount?: number | undefined;
353
- tracking?: {
354
- id: string;
355
- type: string;
356
- } | undefined;
357
- click_target?: string | undefined;
358
- } | undefined;
359
- internal_event_properties?: {
360
- click_target?: string | undefined;
361
- url?: string | undefined;
362
- ref?: string | undefined;
363
- } | undefined;
364
- }[];
365
- }, {
366
- device_id: string;
367
- events: {
368
- event_type: string;
369
- captured_at: string;
370
- custom_event_properties?: Record<string, string | number | boolean | string[] | {}[] | {} | undefined> | undefined;
371
- event_properties?: {
372
- section?: string | undefined;
373
- prev_section?: string | undefined;
374
- recommendation_id?: string | undefined;
375
- price?: number | undefined;
376
- order_id?: string | undefined;
377
- rating?: number | undefined;
378
- prev_page?: string | undefined;
379
- page?: string | undefined;
380
- position?: number | undefined;
381
- item_id?: string | undefined;
382
- items?: {
383
- id: string;
384
- price: number;
385
- quantity?: number | undefined;
386
- custom_event_properties?: Record<string, string | number | boolean | string[] | {}[] | {} | undefined> | undefined;
387
- }[] | undefined;
388
- search_query?: string | undefined;
389
- order_amount?: number | undefined;
390
- paid_amount?: number | undefined;
391
- tracking?: {
392
- id: string;
393
- type: string;
394
- } | undefined;
395
- click_target?: string | undefined;
396
- } | undefined;
397
- internal_event_properties?: {
398
- click_target?: string | undefined;
399
- url?: string | undefined;
400
- ref?: string | undefined;
401
- } | undefined;
402
- }[];
403
- }>;
362
+ }, z.core.$strip>>;
363
+ captured_at: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
364
+ }, z.core.$strip>>;
365
+ }, z.core.$strip>;
404
366
  type Body = Serialize<z.input<typeof bodySchema>>;
405
367
  type ResponseData = {
406
368
  nextPollDelayMs: number;
@@ -427,76 +389,16 @@ declare namespace APIs {
427
389
  marketing_notification_kakao_consent: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
428
390
  marketing_notification_push_consent: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
429
391
  is_all_notification_blocked: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
430
- gender: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof Gender>>>;
392
+ gender: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof Gender>>>;
431
393
  age: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
432
- }, "strip", z.ZodTypeAny, {
433
- phone_number?: string | null | undefined;
434
- email_address?: string | null | undefined;
435
- nighttime_notification_consent?: boolean | null | undefined;
436
- marketing_notification_consent?: boolean | null | undefined;
437
- marketing_notification_sms_consent?: boolean | null | undefined;
438
- marketing_notification_email_consent?: boolean | null | undefined;
439
- marketing_notification_kakao_consent?: boolean | null | undefined;
440
- marketing_notification_push_consent?: boolean | null | undefined;
441
- is_all_notification_blocked?: boolean | null | undefined;
442
- gender?: Gender | null | undefined;
443
- age?: number | null | undefined;
444
- }, {
445
- phone_number?: string | null | undefined;
446
- email_address?: string | null | undefined;
447
- nighttime_notification_consent?: boolean | null | undefined;
448
- marketing_notification_consent?: boolean | null | undefined;
449
- marketing_notification_sms_consent?: boolean | null | undefined;
450
- marketing_notification_email_consent?: boolean | null | undefined;
451
- marketing_notification_kakao_consent?: boolean | null | undefined;
452
- marketing_notification_push_consent?: boolean | null | undefined;
453
- is_all_notification_blocked?: boolean | null | undefined;
454
- gender?: Gender | null | undefined;
455
- age?: number | null | undefined;
456
- }>>;
457
- custom_user_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.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodNull, z.ZodUndefined]>>>;
458
- }, "strip", z.ZodTypeAny, {
459
- user_properties?: {
460
- phone_number?: string | null | undefined;
461
- email_address?: string | null | undefined;
462
- nighttime_notification_consent?: boolean | null | undefined;
463
- marketing_notification_consent?: boolean | null | undefined;
464
- marketing_notification_sms_consent?: boolean | null | undefined;
465
- marketing_notification_email_consent?: boolean | null | undefined;
466
- marketing_notification_kakao_consent?: boolean | null | undefined;
467
- marketing_notification_push_consent?: boolean | null | undefined;
468
- is_all_notification_blocked?: boolean | null | undefined;
469
- gender?: Gender | null | undefined;
470
- age?: number | null | undefined;
471
- } | undefined;
472
- custom_user_properties?: Record<string, string | number | boolean | Date | string[] | {}[] | {} | null | undefined> | undefined;
473
- }, {
474
- user_properties?: {
475
- phone_number?: string | null | undefined;
476
- email_address?: string | null | undefined;
477
- nighttime_notification_consent?: boolean | null | undefined;
478
- marketing_notification_consent?: boolean | null | undefined;
479
- marketing_notification_sms_consent?: boolean | null | undefined;
480
- marketing_notification_email_consent?: boolean | null | undefined;
481
- marketing_notification_kakao_consent?: boolean | null | undefined;
482
- marketing_notification_push_consent?: boolean | null | undefined;
483
- is_all_notification_blocked?: boolean | null | undefined;
484
- gender?: Gender | null | undefined;
485
- age?: number | null | undefined;
486
- } | undefined;
487
- custom_user_properties?: Record<string, string | number | boolean | string[] | {}[] | {} | null | undefined> | undefined;
488
- }>;
394
+ }, z.core.$strip>>;
395
+ custom_user_properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodObject<{}, z.core.$strip>>, z.ZodObject<{}, z.core.$strip>, z.ZodNull, z.ZodUndefined]>>>;
396
+ }, z.core.$strip>;
489
397
  type Body = Serialize<z.input<typeof bodySchema>>;
490
398
  const pathSchema: z.ZodObject<{
491
399
  application_id: z.ZodString;
492
- blux_user_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
493
- }, "strip", z.ZodTypeAny, {
494
- blux_user_id: import("bson-objectid").default;
495
- application_id: string;
496
- }, {
497
- blux_user_id: string;
498
- application_id: string;
499
- }>;
400
+ blux_user_id: z.ZodPipe<z.ZodString, z.ZodTransform<import("bson-objectid").default, string>>;
401
+ }, z.core.$strip>;
500
402
  type PathParam = Serialize<z.input<typeof pathSchema>>;
501
403
  type ResponseData = {
502
404
  blux_user_id: string;
@@ -506,53 +408,19 @@ declare namespace APIs {
506
408
  const name = "bluxUsersGetItemRecommendationsV2";
507
409
  const path = "/v2/applications/{application_id}/blux-users/{blux_user_id}/item-recommendations";
508
410
  const method = HttpMethod.POST;
509
- const bodySchema: z.ZodObject<z.objectUtil.extendShape<Pick<{
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>>>;
512
- pipeline: z.ZodArray<z.ZodObject<{
513
- name: z.ZodString;
514
- kwargs: z.ZodRecord<z.ZodString, z.ZodAny>;
515
- }, "strip", z.ZodTypeAny, {
516
- name: string;
517
- kwargs: Record<string, any>;
518
- }, {
519
- name: string;
520
- kwargs: Record<string, any>;
521
- }>, "many">;
411
+ const bodySchema: z.ZodObject<{
522
412
  item_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
523
- item_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
413
+ item_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
524
414
  limit: z.ZodNumber;
525
415
  offset: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
526
- options: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
527
- }, "item_id" | "item_ids" | "limit" | "offset">, {
528
416
  call_type: z.ZodString;
529
417
  category_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
530
- }>, "strip", z.ZodTypeAny, {
531
- limit: number;
532
- offset: number | null;
533
- call_type: string;
534
- item_id?: string | null | undefined;
535
- item_ids?: string[] | null | undefined;
536
- category_id?: string | null | undefined;
537
- }, {
538
- limit: number;
539
- call_type: string;
540
- item_id?: string | null | undefined;
541
- item_ids?: string[] | null | undefined;
542
- offset?: number | null | undefined;
543
- category_id?: string | null | undefined;
544
- }>;
418
+ }, z.core.$strip>;
545
419
  type Body = Serialize<z.input<typeof bodySchema>>;
546
420
  const pathSchema: z.ZodObject<{
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>;
549
- }, "strip", z.ZodTypeAny, {
550
- blux_user_id: import("bson-objectid").default;
551
- application_id: import("bson-objectid").default;
552
- }, {
553
- blux_user_id: string;
554
- application_id: string;
555
- }>;
421
+ application_id: z.ZodPipe<z.ZodString, z.ZodTransform<import("bson-objectid").default, string>>;
422
+ blux_user_id: z.ZodPipe<z.ZodString, z.ZodTransform<import("bson-objectid").default, string>>;
423
+ }, z.core.$strip>;
556
424
  type PathParam = Serialize<z.input<typeof pathSchema>>;
557
425
  type ResponseData = RecResponse;
558
426
  }
@@ -561,29 +429,15 @@ declare namespace APIs {
561
429
  const path = "/applications/{application_id}/crm-events";
562
430
  const method = HttpMethod.POST;
563
431
  const bodySchema: z.ZodObject<{
564
- notification_id: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("bson-objectid").default, string>;
565
- crm_event_type: z.ZodUnion<[z.ZodLiteral<"push_opened">, z.ZodLiteral<"button_clicked">, z.ZodLiteral<"landing_clicked">, z.ZodLiteral<"inapp_opened">]>;
566
- captured_at: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>;
432
+ notification_id: z.ZodPipe<z.ZodString, z.ZodTransform<import("bson-objectid").default, string>>;
433
+ crm_event_type: z.ZodUnion<readonly [z.ZodLiteral<"push_opened">, z.ZodLiteral<"button_clicked">, z.ZodLiteral<"landing_clicked">, z.ZodLiteral<"inapp_opened">]>;
434
+ captured_at: z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>;
567
435
  item_id: z.ZodOptional<z.ZodString>;
568
- }, "strip", z.ZodTypeAny, {
569
- captured_at: Date;
570
- notification_id: import("bson-objectid").default;
571
- crm_event_type: "push_opened" | "button_clicked" | "landing_clicked" | "inapp_opened";
572
- item_id?: string | undefined;
573
- }, {
574
- captured_at: string;
575
- notification_id: string;
576
- crm_event_type: "push_opened" | "button_clicked" | "landing_clicked" | "inapp_opened";
577
- item_id?: string | undefined;
578
- }>;
436
+ }, z.core.$strip>;
579
437
  type Body = Serialize<z.input<typeof bodySchema>>;
580
438
  const pathSchema: z.ZodObject<{
581
439
  application_id: z.ZodString;
582
- }, "strip", z.ZodTypeAny, {
583
- application_id: string;
584
- }, {
585
- application_id: string;
586
- }>;
440
+ }, z.core.$strip>;
587
441
  type PathParam = Serialize<z.input<typeof pathSchema>>;
588
442
  type ResponseData = boolean;
589
443
  }
@@ -592,23 +446,13 @@ declare namespace APIs {
592
446
  const path = "/applications/{application_id}/notifications/{notification_id}";
593
447
  const method = HttpMethod.POST;
594
448
  const pathSchema: z.ZodObject<{
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>;
597
- }, "strip", z.ZodTypeAny, {
598
- application_id: import("bson-objectid").default;
599
- notification_id: import("bson-objectid").default;
600
- }, {
601
- application_id: string;
602
- notification_id: string;
603
- }>;
449
+ application_id: z.ZodPipe<z.ZodString, z.ZodTransform<import("bson-objectid").default, string>>;
450
+ notification_id: z.ZodPipe<z.ZodString, z.ZodTransform<import("bson-objectid").default, string>>;
451
+ }, z.core.$strip>;
604
452
  type PathParam = Serialize<z.input<typeof pathSchema>>;
605
453
  const bodySchema: z.ZodObject<{
606
454
  status: z.ZodLiteral<"received">;
607
- }, "strip", z.ZodTypeAny, {
608
- status: "received";
609
- }, {
610
- status: "received";
611
- }>;
455
+ }, z.core.$strip>;
612
456
  type Body = Serialize<z.input<typeof bodySchema>>;
613
457
  type ResponseData = boolean;
614
458
  }
@@ -617,15 +461,9 @@ declare namespace APIs {
617
461
  const path = "/applications/{application_id}/blux-users/{blux_user_id}/notifications";
618
462
  const method = HttpMethod.GET;
619
463
  const pathSchema: z.ZodObject<{
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>;
622
- }, "strip", z.ZodTypeAny, {
623
- blux_user_id: import("bson-objectid").default;
624
- application_id: import("bson-objectid").default;
625
- }, {
626
- blux_user_id: string;
627
- application_id: string;
628
- }>;
464
+ application_id: z.ZodPipe<z.ZodString, z.ZodTransform<import("bson-objectid").default, string>>;
465
+ blux_user_id: z.ZodPipe<z.ZodString, z.ZodTransform<import("bson-objectid").default, string>>;
466
+ }, z.core.$strip>;
629
467
  type PathParam = Serialize<z.input<typeof pathSchema>>;
630
468
  type Query = {
631
469
  limit?: number;
package/dist/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "2.2.30";
2
+ var version = "2.2.32";
3
3
 
4
4
  //#endregion
5
5
  export { version };
@@ -1,8 +1,10 @@
1
1
  import ObjectId from "bson-objectid";
2
2
  import { z } from "zod";
3
3
  //#region src/utils/zodSchemas.d.ts
4
- declare const customPropertiesSchema: 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.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodUndefined]>>;
5
- type CustomProperties = z.infer<typeof customPropertiesSchema>;
4
+ type CustomPropertiesRequest = { [K in keyof CustomProperties]: CustomProperties[K] | null; };
5
+ type CustomProperties = {
6
+ [x: string]: string | number | boolean | {} | Date | string[] | {}[] | undefined;
7
+ };
6
8
  declare const eventPropertiesSchema: z.ZodObject<{
7
9
  section: z.ZodOptional<z.ZodString>;
8
10
  prev_section: z.ZodOptional<z.ZodString>;
@@ -18,97 +20,23 @@ declare const eventPropertiesSchema: z.ZodObject<{
18
20
  id: z.ZodString;
19
21
  price: z.ZodNumber;
20
22
  quantity: z.ZodOptional<z.ZodNumber>;
21
- 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.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodUndefined]>>>;
22
- }, "strip", z.ZodTypeAny, {
23
- id: string;
24
- price: number;
25
- quantity?: number | undefined;
26
- custom_event_properties?: Record<string, string | number | boolean | Date | string[] | {}[] | {} | undefined> | undefined;
27
- }, {
28
- id: string;
29
- price: number;
30
- quantity?: number | undefined;
31
- custom_event_properties?: Record<string, string | number | boolean | string[] | {}[] | {} | undefined> | undefined;
32
- }>, "many">>;
23
+ custom_event_properties: z.ZodOptional<z.ZodType<CustomProperties, CustomPropertiesRequest, z.core.$ZodTypeInternals<CustomProperties, CustomPropertiesRequest>>>;
24
+ }, z.core.$strip>>>;
33
25
  search_query: z.ZodOptional<z.ZodString>;
34
26
  order_amount: z.ZodOptional<z.ZodNumber>;
35
27
  paid_amount: z.ZodOptional<z.ZodNumber>;
36
28
  tracking: z.ZodOptional<z.ZodObject<{
37
29
  id: z.ZodString;
38
30
  type: z.ZodString;
39
- }, "strip", z.ZodTypeAny, {
40
- id: string;
41
- type: string;
42
- }, {
43
- id: string;
44
- type: string;
45
- }>>;
31
+ }, z.core.$strip>>;
46
32
  click_target: z.ZodOptional<z.ZodString>;
47
- }, "strip", z.ZodTypeAny, {
48
- section?: string | undefined;
49
- prev_section?: string | undefined;
50
- recommendation_id?: string | undefined;
51
- price?: number | undefined;
52
- order_id?: string | undefined;
53
- rating?: number | undefined;
54
- prev_page?: string | undefined;
55
- page?: string | undefined;
56
- position?: number | undefined;
57
- item_id?: string | undefined;
58
- items?: {
59
- id: string;
60
- price: number;
61
- quantity?: number | undefined;
62
- custom_event_properties?: Record<string, string | number | boolean | Date | string[] | {}[] | {} | undefined> | undefined;
63
- }[] | undefined;
64
- search_query?: string | undefined;
65
- order_amount?: number | undefined;
66
- paid_amount?: number | undefined;
67
- tracking?: {
68
- id: string;
69
- type: string;
70
- } | undefined;
71
- click_target?: string | undefined;
72
- }, {
73
- section?: string | undefined;
74
- prev_section?: string | undefined;
75
- recommendation_id?: string | undefined;
76
- price?: number | undefined;
77
- order_id?: string | undefined;
78
- rating?: number | undefined;
79
- prev_page?: string | undefined;
80
- page?: string | undefined;
81
- position?: number | undefined;
82
- item_id?: string | undefined;
83
- items?: {
84
- id: string;
85
- price: number;
86
- quantity?: number | undefined;
87
- custom_event_properties?: Record<string, string | number | boolean | string[] | {}[] | {} | undefined> | undefined;
88
- }[] | undefined;
89
- search_query?: string | undefined;
90
- order_amount?: number | undefined;
91
- paid_amount?: number | undefined;
92
- tracking?: {
93
- id: string;
94
- type: string;
95
- } | undefined;
96
- click_target?: string | undefined;
97
- }>;
33
+ }, z.core.$strip>;
98
34
  type EventProperties = z.infer<typeof eventPropertiesSchema>;
99
35
  declare const internalEventPropertiesSchema: z.ZodObject<{
100
36
  url: z.ZodOptional<z.ZodString>;
101
37
  ref: z.ZodOptional<z.ZodString>;
102
38
  click_target: z.ZodOptional<z.ZodString>;
103
- }, "strip", z.ZodTypeAny, {
104
- click_target?: string | undefined;
105
- url?: string | undefined;
106
- ref?: string | undefined;
107
- }, {
108
- click_target?: string | undefined;
109
- url?: string | undefined;
110
- ref?: string | undefined;
111
- }>;
39
+ }, z.core.$strip>;
112
40
  type InternalEventProperties = z.infer<typeof internalEventPropertiesSchema>;
113
41
  type RecResponse = {
114
42
  item_ids: string[];
@@ -116,5 +44,5 @@ type RecResponse = {
116
44
  recommendation_id: string | null;
117
45
  };
118
46
  //#endregion
119
- export { CustomProperties, EventProperties, InternalEventProperties, RecResponse, customPropertiesSchema, eventPropertiesSchema, internalEventPropertiesSchema };
47
+ export { CustomProperties, EventProperties, InternalEventProperties, RecResponse, eventPropertiesSchema, internalEventPropertiesSchema };
120
48
  //# sourceMappingURL=zodSchemas.d.ts.map
@@ -2,17 +2,13 @@ import "./assertEqualTypes.js";
2
2
  import { COUNTRY_CODES } from "../constants/COUNTRIES.js";
3
3
  import { ISO8601_REGEX } from "../constants/ISO8601_REGEX.js";
4
4
  import ObjectId from "bson-objectid";
5
- import { ZodError, z } from "zod";
5
+ import { z } from "zod";
6
6
 
7
7
  //#region src/utils/zodSchemas.ts
8
8
  function isObjectIdString(value) {
9
9
  return typeof value === "string" && value.length === 24 && ObjectId.isValid(value);
10
10
  }
11
- const objectIdSchema = z.string().refine((v) => isObjectIdString(v), (v) => new ZodError([{
12
- code: "custom",
13
- message: `Invalid ObjectId: ${v}`,
14
- path: ["some_path"]
15
- }])).transform((v) => new ObjectId(v));
11
+ const objectIdSchema = z.string().refine((v) => isObjectIdString(v), { error: (issue) => `Invalid ObjectId: ${issue.input}` }).transform((v) => new ObjectId(v));
16
12
  const stringToNumberSchema = z.union([z.string(), z.number()]).refine((v) => {
17
13
  if (typeof v === "number") return true;
18
14
  const parsed = Number(v);
@@ -22,7 +18,7 @@ const dateSchema = z.string().refine((dateString) => {
22
18
  return ISO8601_REGEX.test(dateString);
23
19
  }, { message: "Invalid date string" }).transform((dateString) => new Date(dateString));
24
20
  const countryCodeWithLowerCaseSchema = z.string().transform((v) => v.toUpperCase()).pipe(z.union([z.literal("419"), z.enum(COUNTRY_CODES)])).transform((v) => v === "419" ? void 0 : v);
25
- const customPropertiesRequestSchema = z.record(z.union([
21
+ const customPropertiesRequestSchema = z.record(z.string(), z.union([
26
22
  dateSchema,
27
23
  z.string(),
28
24
  z.number(),
@@ -33,7 +29,7 @@ const customPropertiesRequestSchema = z.record(z.union([
33
29
  z.null(),
34
30
  z.undefined()
35
31
  ]));
36
- const customPropertiesSchema = z.record(z.union([
32
+ const customPropertiesSchema = z.record(z.string(), z.union([
37
33
  dateSchema,
38
34
  z.string(),
39
35
  z.number(),
@@ -80,7 +76,7 @@ const inferenceRequestSchema = z.object({
80
76
  blux_user_id: objectIdSchema.nullish(),
81
77
  pipeline: z.array(z.object({
82
78
  name: z.string(),
83
- kwargs: z.record(z.any())
79
+ kwargs: z.record(z.string(), z.any())
84
80
  })),
85
81
  item_id: z.string().nullish(),
86
82
  item_ids: z.array(z.string()).nullish(),
@@ -1 +1 @@
1
- {"version":3,"file":"zodSchemas.js","names":[],"sources":["../../src/utils/zodSchemas.ts"],"sourcesContent":["import ObjectId from \"bson-objectid\";\nimport { z, ZodError } from \"zod\";\n\nimport { assertEqualTypes } from \"./assertEqualTypes\";\nimport { COUNTRY_CODES } from \"../constants/COUNTRIES\";\nimport { ISO8601_REGEX } from \"../constants/ISO8601_REGEX\";\n\nimport type { CountryCode } from \"../constants/COUNTRIES\";\n\nexport function isObjectIdString(value: unknown): value is string {\n return (\n typeof value === \"string\" && value.length === 24 && ObjectId.isValid(value)\n );\n}\n\nexport const objectIdSchema = z\n .string()\n .refine(\n (v) => isObjectIdString(v),\n (v) =>\n new ZodError([\n {\n code: \"custom\",\n message: `Invalid ObjectId: ${v}`,\n path: [\"some_path\"],\n },\n ]),\n )\n .transform((v) => new ObjectId(v));\n\nexport const stringToNumberSchema = z\n .union([z.string(), z.number()])\n .refine(\n (v) => {\n if (typeof v === \"number\") return true;\n const parsed = Number(v);\n return !isNaN(parsed);\n },\n {\n message: \"Invalid number or string in stringToNumberSchema\",\n },\n )\n .transform((v): number => (typeof v === \"number\" ? v : Number(v)));\n\nexport const dateSchema = z\n .string()\n .refine(\n (dateString) => {\n return ISO8601_REGEX.test(dateString);\n },\n {\n message: \"Invalid date string\",\n },\n )\n .transform((dateString) => new Date(dateString));\n\nfunction convertAllObjectId(input: unknown): unknown {\n if (Array.isArray(input)) {\n return input.map((item) => convertAllObjectId(item));\n } else if (isObjectIdString(input)) {\n return new ObjectId(input);\n } else if (\n typeof input === \"string\" &&\n /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z$/.test(input)\n ) {\n return new Date(input);\n } else if (input !== null && typeof input === \"object\") {\n return Object.entries(input).reduce<Record<string, unknown>>(\n (acc, [key, value]) => {\n acc[key] = convertAllObjectId(value);\n return acc;\n },\n {},\n );\n }\n return input;\n}\n\nexport const anonymousObjectSchema = <T extends object = object>() =>\n z\n .object({})\n .passthrough()\n .transform((v) => convertAllObjectId(v) as T);\n\nexport const countryCodeWithLowerCaseSchema = z\n .string()\n .transform((v) => v.toUpperCase())\n .pipe(\n z.union([\n z.literal(\"419\"), // https://en.wikipedia.org/wiki/Language_code\n z.enum(COUNTRY_CODES as [CountryCode, ...CountryCode[]]),\n ]),\n )\n .transform((v) => (v === \"419\" ? undefined : v));\n\nexport const customPropertiesRequestSchema = z.record(\n z.union([\n dateSchema,\n z.string(),\n z.number(),\n z.boolean(),\n z.array(z.string()),\n z.array(z.object({})),\n z.object({}),\n z.null(),\n z.undefined(),\n ]),\n);\n\ntype CustomPropertiesRequest = z.infer<typeof customPropertiesRequestSchema>;\n\nexport const customPropertiesSchema = z.record(\n z.union([\n dateSchema,\n z.string(),\n z.number(),\n z.boolean(),\n z.array(z.string()),\n z.array(z.object({})),\n z.object({}),\n z.undefined(),\n ]),\n);\n\nexport type CustomProperties = z.infer<typeof customPropertiesSchema>;\n\nassertEqualTypes<\n {\n [K in keyof CustomPropertiesRequest]: Exclude<\n CustomPropertiesRequest[K],\n null\n >;\n },\n CustomProperties\n>(true);\n\nexport const stringToArraySchema = z\n .string()\n .transform((v) => v.split(\",\").map((item) => item.trim()))\n .refine((arr) => arr.every((item) => item.length > 0), {\n message: \"Each item should not be empty\",\n });\n\nexport const eventPropertiesSchema = z.object({\n section: z.string().optional(),\n prev_section: z.string().optional(),\n recommendation_id: z.string().optional(),\n price: z.number().optional(),\n order_id: z.string().optional(),\n rating: z.number().optional(),\n prev_page: z.string().optional(),\n page: z.string().optional(),\n position: z.number().optional(),\n item_id: z.string().optional(),\n items: z\n .array(\n z.object({\n id: z.string(),\n price: z.number(),\n quantity: z.number().optional(),\n custom_event_properties: customPropertiesSchema.optional(),\n }),\n )\n .optional(),\n search_query: z.string().optional(),\n order_amount: z.number().optional(),\n paid_amount: z.number().optional(),\n tracking: z\n .object({\n id: z.string(),\n type: z.string(),\n })\n .optional(),\n click_target: z.string().optional(),\n});\n\nexport type EventProperties = z.infer<typeof eventPropertiesSchema>;\n\nexport const internalEventPropertiesSchema = z.object({\n url: z.string().optional(),\n ref: z.string().optional(),\n click_target: z.string().optional(),\n});\n\nexport type InternalEventProperties = z.infer<\n typeof internalEventPropertiesSchema\n>;\n\n// Schema for Inference API\nconst inferenceRequestSchema = z.object({\n application_id: objectIdSchema,\n blux_user_id: objectIdSchema.nullish(),\n\n pipeline: z.array(\n z.object({\n name: z.string(),\n kwargs: z.record(z.any()),\n }),\n ),\n item_id: z.string().nullish(),\n item_ids: z.array(z.string()).nullish(),\n\n limit: z.number(),\n offset: z.number().nullish().default(0),\n options: z.record(z.string(), z.any()).nullish(), // TODO: @all legacy 클라이언트 migration만을 위한 필드라는 점을 고려하여 필드명 수정 필요 ex. legacy_options\n});\n\nexport const recommendationRequestSchema = inferenceRequestSchema\n .pick({\n item_id: true,\n item_ids: true,\n limit: true,\n offset: true,\n })\n .extend({\n call_type: z.string(),\n category_id: z.string().nullish(),\n });\n\nexport type RecResponse = {\n item_ids: string[];\n metadata: Record<string, unknown>;\n recommendation_id: string | null;\n};\n"],"mappings":";;;;;;;AASA,SAAgB,iBAAiB,OAAiC;CAChE,OACE,OAAO,UAAU,YAAY,MAAM,WAAW,MAAM,SAAS,QAAQ,KAAK;AAE9E;AAEA,MAAa,iBAAiB,EAC3B,OAAO,CAAC,CACR,QACE,MAAM,iBAAiB,CAAC,IACxB,MACC,IAAI,SAAS,CACX;CACE,MAAM;CACN,SAAS,qBAAqB;CAC9B,MAAM,CAAC,WAAW;AACpB,CACF,CAAC,CACL,CAAC,CACA,WAAW,MAAM,IAAI,SAAS,CAAC,CAAC;AAEnC,MAAa,uBAAuB,EACjC,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,CAC/B,QACE,MAAM;CACL,IAAI,OAAO,MAAM,UAAU,OAAO;CAClC,MAAM,SAAS,OAAO,CAAC;CACvB,OAAO,CAAC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AAE,OAAO,EAAE,IAAI,CAAC;CAC1B,CAAC,CACH;CACA,SAAS,EAAE,OAAO,CAAC,CAAC,QAAQ;CAC5B,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ;CAEtC,OAAO,EAAE,OAAO;CAChB,QAAQ,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;CACtC,SAAS,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,QAAQ;AACjD,CAAC;AAED,MAAa,8BAA8B,uBACxC,KAAK;CACJ,SAAS;CACT,UAAU;CACV,OAAO;CACP,QAAQ;AACV,CAAC,CAAC,CACD,OAAO;CACN,WAAW,EAAE,OAAO;CACpB,aAAa,EAAE,OAAO,CAAC,CAAC,QAAQ;AAClC,CAAC"}
1
+ {"version":3,"file":"zodSchemas.js","names":[],"sources":["../../src/utils/zodSchemas.ts"],"sourcesContent":["import ObjectId from \"bson-objectid\";\nimport { z } from \"zod\";\n\nimport { assertEqualTypes } from \"./assertEqualTypes\";\nimport { COUNTRY_CODES } from \"../constants/COUNTRIES\";\nimport { ISO8601_REGEX } from \"../constants/ISO8601_REGEX\";\n\nimport type { CountryCode } from \"../constants/COUNTRIES\";\n\nexport function isObjectIdString(value: unknown): value is string {\n return (\n typeof value === \"string\" && value.length === 24 && ObjectId.isValid(value)\n );\n}\n\nexport const objectIdSchema = z\n .string()\n .refine((v) => isObjectIdString(v), {\n error: (issue) => `Invalid ObjectId: ${issue.input}`,\n })\n .transform((v) => new ObjectId(v));\n\nexport const stringToNumberSchema = z\n .union([z.string(), z.number()])\n .refine(\n (v) => {\n if (typeof v === \"number\") return true;\n const parsed = Number(v);\n return !isNaN(parsed);\n },\n {\n message: \"Invalid number or string in stringToNumberSchema\",\n },\n )\n .transform((v): number => (typeof v === \"number\" ? v : Number(v)));\n\nexport const dateSchema = z\n .string()\n .refine(\n (dateString) => {\n return ISO8601_REGEX.test(dateString);\n },\n {\n message: \"Invalid date string\",\n },\n )\n .transform((dateString) => new Date(dateString));\n\nfunction convertAllObjectId(input: unknown): unknown {\n if (Array.isArray(input)) {\n return input.map((item) => convertAllObjectId(item));\n } else if (isObjectIdString(input)) {\n return new ObjectId(input);\n } else if (\n typeof input === \"string\" &&\n /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z$/.test(input)\n ) {\n return new Date(input);\n } else if (input !== null && typeof input === \"object\") {\n return Object.entries(input).reduce<Record<string, unknown>>(\n (acc, [key, value]) => {\n acc[key] = convertAllObjectId(value);\n return acc;\n },\n {},\n );\n }\n return input;\n}\n\nexport const anonymousObjectSchema = <T extends object = object>() =>\n z\n .object({})\n .passthrough()\n .transform((v) => convertAllObjectId(v) as T);\n\nexport const countryCodeWithLowerCaseSchema = z\n .string()\n .transform((v) => v.toUpperCase())\n .pipe(\n z.union([\n z.literal(\"419\"), // https://en.wikipedia.org/wiki/Language_code\n z.enum(COUNTRY_CODES as [CountryCode, ...CountryCode[]]),\n ]),\n )\n .transform((v) => (v === \"419\" ? undefined : v));\n\nexport const customPropertiesRequestSchema = z.record(\n z.string(),\n z.union([\n dateSchema,\n z.string(),\n z.number(),\n z.boolean(),\n z.array(z.string()),\n z.array(z.object({})),\n z.object({}),\n z.null(),\n z.undefined(),\n ]),\n);\n\n// z.object({})의 추론 출력은 Record<string, never>라 중첩 객체를 담지 못한다.\n// 커스텀 속성 값으로 임의 객체를 허용하는 계약은 타입을 직접 적어 유지한다.\ntype CustomPropertiesRequest = {\n [K in keyof CustomProperties]: CustomProperties[K] | null;\n};\n\nexport const customPropertiesSchema: z.ZodType<\n CustomProperties,\n CustomPropertiesRequest\n> = z.record(\n z.string(),\n z.union([\n dateSchema,\n z.string(),\n z.number(),\n z.boolean(),\n z.array(z.string()),\n z.array(z.object({})),\n z.object({}),\n z.undefined(),\n ]),\n);\n\nexport type CustomProperties = {\n [x: string]:\n | string\n | number\n | boolean\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n | {}\n | Date\n | string[]\n // eslint-disable-next-line @typescript-eslint/no-empty-object-type\n | {}[]\n | undefined;\n};\n\nassertEqualTypes<\n {\n [K in keyof CustomPropertiesRequest]: Exclude<\n CustomPropertiesRequest[K],\n null\n >;\n },\n CustomProperties\n>(true);\n\nexport const stringToArraySchema = z\n .string()\n .transform((v) => v.split(\",\").map((item) => item.trim()))\n .refine((arr) => arr.every((item) => item.length > 0), {\n message: \"Each item should not be empty\",\n });\n\nexport const eventPropertiesSchema = z.object({\n section: z.string().optional(),\n prev_section: z.string().optional(),\n recommendation_id: z.string().optional(),\n price: z.number().optional(),\n order_id: z.string().optional(),\n rating: z.number().optional(),\n prev_page: z.string().optional(),\n page: z.string().optional(),\n position: z.number().optional(),\n item_id: z.string().optional(),\n items: z\n .array(\n z.object({\n id: z.string(),\n price: z.number(),\n quantity: z.number().optional(),\n custom_event_properties: customPropertiesSchema.optional(),\n }),\n )\n .optional(),\n search_query: z.string().optional(),\n order_amount: z.number().optional(),\n paid_amount: z.number().optional(),\n tracking: z\n .object({\n id: z.string(),\n type: z.string(),\n })\n .optional(),\n click_target: z.string().optional(),\n});\n\nexport type EventProperties = z.infer<typeof eventPropertiesSchema>;\n\nexport const internalEventPropertiesSchema = z.object({\n url: z.string().optional(),\n ref: z.string().optional(),\n click_target: z.string().optional(),\n});\n\nexport type InternalEventProperties = z.infer<\n typeof internalEventPropertiesSchema\n>;\n\n// Schema for Inference API\nconst inferenceRequestSchema = z.object({\n application_id: objectIdSchema,\n blux_user_id: objectIdSchema.nullish(),\n\n pipeline: z.array(\n z.object({\n name: z.string(),\n kwargs: z.record(z.string(), z.any()),\n }),\n ),\n item_id: z.string().nullish(),\n item_ids: z.array(z.string()).nullish(),\n\n limit: z.number(),\n offset: z.number().nullish().default(0),\n options: z.record(z.string(), z.any()).nullish(), // TODO: @all legacy 클라이언트 migration만을 위한 필드라는 점을 고려하여 필드명 수정 필요 ex. legacy_options\n});\n\nexport const recommendationRequestSchema = inferenceRequestSchema\n .pick({\n item_id: true,\n item_ids: true,\n limit: true,\n offset: true,\n })\n .extend({\n call_type: z.string(),\n category_id: z.string().nullish(),\n });\n\nexport type RecResponse = {\n item_ids: string[];\n metadata: Record<string, unknown>;\n recommendation_id: string | null;\n};\n"],"mappings":";;;;;;;AASA,SAAgB,iBAAiB,OAAiC;CAChE,OACE,OAAO,UAAU,YAAY,MAAM,WAAW,MAAM,SAAS,QAAQ,KAAK;AAE9E;AAEA,MAAa,iBAAiB,EAC3B,OAAO,CAAC,CACR,QAAQ,MAAM,iBAAiB,CAAC,GAAG,EAClC,QAAQ,UAAU,qBAAqB,MAAM,QAC/C,CAAC,CAAC,CACD,WAAW,MAAM,IAAI,SAAS,CAAC,CAAC;AAEnC,MAAa,uBAAuB,EACjC,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,CAC/B,QACE,MAAM;CACL,IAAI,OAAO,MAAM,UAAU,OAAO;CAClC,MAAM,SAAS,OAAO,CAAC;CACvB,OAAO,CAAC,MAAM,MAAM;AACtB,GACA,EACE,SAAS,mDACX,CACF,CAAC,CACA,WAAW,MAAe,OAAO,MAAM,WAAW,IAAI,OAAO,CAAC,CAAE;AAEnE,MAAa,aAAa,EACvB,OAAO,CAAC,CACR,QACE,eAAe;CACd,OAAO,cAAc,KAAK,UAAU;AACtC,GACA,EACE,SAAS,sBACX,CACF,CAAC,CACA,WAAW,eAAe,IAAI,KAAK,UAAU,CAAC;AA8BjD,MAAa,iCAAiC,EAC3C,OAAO,CAAC,CACR,WAAW,MAAM,EAAE,YAAY,CAAC,CAAC,CACjC,KACC,EAAE,MAAM,CACN,EAAE,QAAQ,KAAK,GACf,EAAE,KAAK,aAAgD,CACzD,CAAC,CACH,CAAC,CACA,WAAW,MAAO,MAAM,QAAQ,SAAY,CAAE;AAEjD,MAAa,gCAAgC,EAAE,OAC7C,EAAE,OAAO,GACT,EAAE,MAAM;CACN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;AAClC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blux.ai/web-sdk",
3
- "version": "2.2.30",
3
+ "version": "2.2.32",
4
4
  "description": "The official Blux JavaScript browser client library",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -44,6 +44,6 @@
44
44
  "bson-objectid": "^2.0.4",
45
45
  "rxjs": "7.8.1",
46
46
  "uuid": "10.0.0",
47
- "zod": "3.23.8"
47
+ "zod": "4.4.3"
48
48
  }
49
49
  }