@contentstack/delivery-sdk 4.11.2 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (549) hide show
  1. package/README.md +31 -2
  2. package/dist/{modern/lib → legacy/assets}/asset.cjs +15 -34
  3. package/dist/legacy/assets/asset.cjs.map +1 -0
  4. package/dist/legacy/{lib/asset.cjs → assets/asset.js} +13 -34
  5. package/dist/legacy/assets/asset.js.map +1 -0
  6. package/dist/{modern/lib/cache.cjs → legacy/cache/index.cjs} +14 -35
  7. package/dist/legacy/cache/index.cjs.map +1 -0
  8. package/dist/legacy/{lib/cache.js → cache/index.js} +10 -8
  9. package/dist/legacy/cache/index.js.map +1 -0
  10. package/dist/legacy/{lib → common}/error-messages.cjs +8 -34
  11. package/dist/legacy/common/error-messages.cjs.map +1 -0
  12. package/dist/legacy/{lib → common}/error-messages.js +6 -9
  13. package/dist/legacy/common/error-messages.js.map +1 -0
  14. package/dist/{modern/lib → legacy/common}/pagination.cjs +10 -32
  15. package/dist/legacy/common/pagination.cjs.map +1 -0
  16. package/dist/legacy/{lib/pagination.cjs → common/pagination.js} +10 -34
  17. package/dist/legacy/common/pagination.js.map +1 -0
  18. package/dist/legacy/common/string-extensions.cjs +11 -0
  19. package/dist/legacy/common/string-extensions.cjs.map +1 -0
  20. package/dist/legacy/{lib → common}/string-extensions.js +1 -2
  21. package/dist/legacy/common/string-extensions.js.map +1 -0
  22. package/dist/legacy/{lib → common}/types.cjs +17 -55
  23. package/dist/legacy/common/types.cjs.map +1 -0
  24. package/dist/legacy/{lib → common}/types.js +3 -18
  25. package/dist/legacy/common/types.js.map +1 -0
  26. package/dist/legacy/common/utils.cjs +29 -0
  27. package/dist/legacy/common/utils.cjs.map +1 -0
  28. package/dist/legacy/{lib → common}/utils.js +7 -10
  29. package/dist/legacy/common/utils.js.map +1 -0
  30. package/dist/legacy/content-type/index.cjs +43 -0
  31. package/dist/legacy/content-type/index.cjs.map +1 -0
  32. package/dist/legacy/content-type/index.js +41 -0
  33. package/dist/legacy/content-type/index.js.map +1 -0
  34. package/dist/legacy/{lib → entries}/entries.cjs +21 -41
  35. package/dist/legacy/entries/entries.cjs.map +1 -0
  36. package/dist/{modern/lib → legacy/entries}/entries.js +15 -12
  37. package/dist/legacy/entries/entries.js.map +1 -0
  38. package/dist/{modern/lib → legacy/entries}/entry.cjs +20 -36
  39. package/dist/legacy/entries/entry.cjs.map +1 -0
  40. package/dist/legacy/{lib/entry.cjs → entries/entry.js} +18 -36
  41. package/dist/legacy/entries/entry.js.map +1 -0
  42. package/dist/{modern/lib/global-field.cjs → legacy/global-field/index.cjs} +15 -34
  43. package/dist/legacy/global-field/index.cjs.map +1 -0
  44. package/dist/legacy/{lib/global-field.cjs → global-field/index.js} +13 -34
  45. package/dist/legacy/global-field/index.js.map +1 -0
  46. package/dist/legacy/index.cjs +28 -48
  47. package/dist/legacy/index.cjs.map +1 -1
  48. package/dist/legacy/index.js +9 -11
  49. package/dist/legacy/index.js.map +1 -1
  50. package/dist/legacy/{lib → query}/asset-query.cjs +10 -34
  51. package/dist/legacy/query/asset-query.cjs.map +1 -0
  52. package/dist/{modern/lib → legacy/query}/asset-query.js +8 -9
  53. package/dist/legacy/query/asset-query.js.map +1 -0
  54. package/dist/{modern/lib → legacy/query}/base-query.cjs +20 -37
  55. package/dist/legacy/query/base-query.cjs.map +1 -0
  56. package/dist/legacy/{lib/base-query.cjs → query/base-query.js} +18 -37
  57. package/dist/legacy/query/base-query.js.map +1 -0
  58. package/dist/legacy/query/contenttype-query.cjs +51 -0
  59. package/dist/legacy/query/contenttype-query.cjs.map +1 -0
  60. package/dist/legacy/query/contenttype-query.js +49 -0
  61. package/dist/legacy/query/contenttype-query.js.map +1 -0
  62. package/dist/legacy/query/global-field-query.cjs +30 -0
  63. package/dist/legacy/query/global-field-query.cjs.map +1 -0
  64. package/dist/{modern/lib → legacy/query}/global-field-query.js +7 -8
  65. package/dist/legacy/query/global-field-query.js.map +1 -0
  66. package/dist/legacy/{lib → query}/query.cjs +48 -68
  67. package/dist/legacy/query/query.cjs.map +1 -0
  68. package/dist/{modern/lib → legacy/query}/query.js +17 -14
  69. package/dist/legacy/query/query.js.map +1 -0
  70. package/dist/legacy/query/taxonomy-query.cjs +14 -0
  71. package/dist/legacy/query/taxonomy-query.cjs.map +1 -0
  72. package/dist/legacy/query/taxonomy-query.js +12 -0
  73. package/dist/legacy/query/taxonomy-query.js.map +1 -0
  74. package/dist/{modern/lib → legacy/stack}/contentstack.cjs +44 -56
  75. package/dist/legacy/stack/contentstack.cjs.map +1 -0
  76. package/dist/{modern/lib → legacy/stack}/contentstack.js +19 -16
  77. package/dist/legacy/stack/contentstack.js.map +1 -0
  78. package/dist/legacy/stack/index.cjs +11 -0
  79. package/dist/legacy/stack/index.cjs.map +1 -0
  80. package/dist/legacy/stack/index.js +7 -0
  81. package/dist/legacy/stack/index.js.map +1 -0
  82. package/dist/{modern/lib → legacy/stack}/stack.cjs +30 -49
  83. package/dist/legacy/stack/stack.cjs.map +1 -0
  84. package/dist/legacy/{lib → stack}/stack.js +20 -16
  85. package/dist/legacy/stack/stack.js.map +1 -0
  86. package/dist/legacy/sync/synchronization.cjs +30 -0
  87. package/dist/legacy/sync/synchronization.cjs.map +1 -0
  88. package/dist/{modern/lib → legacy/sync}/synchronization.js +11 -13
  89. package/dist/legacy/sync/synchronization.js.map +1 -0
  90. package/dist/modern/{lib/asset.js → assets/asset.cjs} +13 -10
  91. package/dist/modern/assets/asset.cjs.map +1 -0
  92. package/dist/modern/{lib → assets}/asset.d.ts +2 -4
  93. package/dist/modern/assets/asset.d.ts.map +1 -0
  94. package/dist/{legacy/lib → modern/assets}/asset.js +10 -9
  95. package/dist/modern/assets/asset.js.map +1 -0
  96. package/dist/modern/{lib/string-extensions.d.ts → assets/image-transform.d.ts} +3 -16
  97. package/dist/modern/assets/image-transform.d.ts.map +1 -0
  98. package/dist/modern/assets/index.d.ts +3 -0
  99. package/dist/modern/assets/index.d.ts.map +1 -0
  100. package/dist/{legacy/lib/cache.cjs → modern/cache/index.cjs} +14 -35
  101. package/dist/modern/cache/index.cjs.map +1 -0
  102. package/dist/{legacy/lib/cache.d.ts → modern/cache/index.d.ts} +3 -10
  103. package/dist/modern/cache/index.d.ts.map +1 -0
  104. package/dist/modern/{lib/cache.js → cache/index.js} +10 -8
  105. package/dist/modern/cache/index.js.map +1 -0
  106. package/dist/modern/{lib → common}/error-messages.cjs +8 -34
  107. package/dist/modern/common/error-messages.cjs.map +1 -0
  108. package/dist/{legacy/lib → modern/common}/error-messages.d.ts +4 -5
  109. package/dist/modern/common/error-messages.d.ts.map +1 -0
  110. package/dist/modern/{lib → common}/error-messages.js +6 -9
  111. package/dist/modern/common/error-messages.js.map +1 -0
  112. package/dist/{legacy/lib/pagination.js → modern/common/pagination.cjs} +10 -12
  113. package/dist/modern/common/pagination.cjs.map +1 -0
  114. package/dist/{legacy/lib → modern/common}/pagination.d.ts +3 -10
  115. package/dist/modern/common/pagination.d.ts.map +1 -0
  116. package/dist/modern/{lib → common}/pagination.js +6 -10
  117. package/dist/modern/common/pagination.js.map +1 -0
  118. package/dist/modern/common/string-extensions.cjs +11 -0
  119. package/dist/modern/common/string-extensions.cjs.map +1 -0
  120. package/dist/modern/common/string-extensions.d.ts +8 -0
  121. package/dist/modern/common/string-extensions.d.ts.map +1 -0
  122. package/dist/modern/{lib → common}/string-extensions.js +1 -2
  123. package/dist/modern/common/string-extensions.js.map +1 -0
  124. package/dist/modern/{lib → common}/types.cjs +17 -55
  125. package/dist/modern/common/types.cjs.map +1 -0
  126. package/dist/{legacy/lib → modern/common}/types.d.ts +60 -41
  127. package/dist/modern/common/types.d.ts.map +1 -0
  128. package/dist/modern/{lib → common}/types.js +3 -18
  129. package/dist/modern/common/types.js.map +1 -0
  130. package/dist/modern/common/utils.cjs +29 -0
  131. package/dist/modern/common/utils.cjs.map +1 -0
  132. package/dist/modern/common/utils.d.ts +14 -0
  133. package/dist/modern/common/utils.d.ts.map +1 -0
  134. package/dist/modern/{lib → common}/utils.js +7 -10
  135. package/dist/modern/common/utils.js.map +1 -0
  136. package/dist/{legacy/lib/content-type.js → modern/content-type/index.cjs} +18 -14
  137. package/dist/modern/content-type/index.cjs.map +1 -0
  138. package/dist/{legacy/lib/content-type.d.ts → modern/content-type/index.d.ts} +4 -13
  139. package/dist/modern/content-type/index.d.ts.map +1 -0
  140. package/dist/modern/{lib/content-type.js → content-type/index.js} +13 -11
  141. package/dist/modern/content-type/index.js.map +1 -0
  142. package/dist/modern/{lib → entries}/entries.cjs +18 -41
  143. package/dist/modern/entries/entries.cjs.map +1 -0
  144. package/dist/modern/{lib → entries}/entries.d.ts +5 -11
  145. package/dist/modern/entries/entries.d.ts.map +1 -0
  146. package/dist/{legacy/lib → modern/entries}/entries.js +12 -12
  147. package/dist/modern/entries/entries.js.map +1 -0
  148. package/dist/modern/{lib/entry.js → entries/entry.cjs} +18 -12
  149. package/dist/modern/entries/entry.cjs.map +1 -0
  150. package/dist/modern/{lib → entries}/entry.d.ts +2 -4
  151. package/dist/modern/entries/entry.d.ts.map +1 -0
  152. package/dist/{legacy/lib → modern/entries}/entry.js +14 -10
  153. package/dist/modern/entries/entry.js.map +1 -0
  154. package/dist/modern/entries/index.d.ts +3 -0
  155. package/dist/modern/entries/index.d.ts.map +1 -0
  156. package/dist/modern/{lib/global-field.js → global-field/index.cjs} +13 -10
  157. package/dist/modern/global-field/index.cjs.map +1 -0
  158. package/dist/{legacy/lib/global-field.d.cts → modern/global-field/index.d.ts} +2 -4
  159. package/dist/modern/global-field/index.d.ts.map +1 -0
  160. package/dist/{legacy/lib/global-field.js → modern/global-field/index.js} +10 -9
  161. package/dist/modern/global-field/index.js.map +1 -0
  162. package/dist/modern/index.cjs +28 -48
  163. package/dist/modern/index.cjs.map +1 -1
  164. package/dist/modern/index.d.ts +17 -26
  165. package/dist/modern/index.d.ts.map +1 -0
  166. package/dist/modern/index.js +9 -11
  167. package/dist/modern/index.js.map +1 -1
  168. package/dist/modern/{lib → query}/asset-query.cjs +10 -34
  169. package/dist/modern/query/asset-query.cjs.map +1 -0
  170. package/dist/{legacy/lib → modern/query}/asset-query.d.ts +4 -11
  171. package/dist/modern/query/asset-query.d.ts.map +1 -0
  172. package/dist/{legacy/lib → modern/query}/asset-query.js +8 -9
  173. package/dist/modern/query/asset-query.js.map +1 -0
  174. package/dist/{legacy/lib/base-query.js → modern/query/base-query.cjs} +18 -16
  175. package/dist/modern/query/base-query.cjs.map +1 -0
  176. package/dist/modern/query/base-query.d.ts +174 -0
  177. package/dist/modern/query/base-query.d.ts.map +1 -0
  178. package/dist/modern/{lib → query}/base-query.js +14 -14
  179. package/dist/modern/query/base-query.js.map +1 -0
  180. package/dist/{legacy/lib/contenttype-query.js → modern/query/contenttype-query.cjs} +13 -10
  181. package/dist/modern/query/contenttype-query.cjs.map +1 -0
  182. package/dist/modern/{lib → query}/contenttype-query.d.ts +3 -9
  183. package/dist/modern/query/contenttype-query.d.ts.map +1 -0
  184. package/dist/modern/{lib → query}/contenttype-query.js +10 -9
  185. package/dist/modern/query/contenttype-query.js.map +1 -0
  186. package/dist/modern/query/entry-queryable.d.ts +4 -0
  187. package/dist/modern/query/entry-queryable.d.ts.map +1 -0
  188. package/dist/modern/query/global-field-query.cjs +30 -0
  189. package/dist/modern/query/global-field-query.cjs.map +1 -0
  190. package/dist/modern/{lib → query}/global-field-query.d.ts +3 -11
  191. package/dist/modern/query/global-field-query.d.ts.map +1 -0
  192. package/dist/{legacy/lib → modern/query}/global-field-query.js +7 -8
  193. package/dist/modern/query/global-field-query.js.map +1 -0
  194. package/dist/modern/query/index.d.ts +8 -0
  195. package/dist/modern/query/index.d.ts.map +1 -0
  196. package/dist/modern/{lib → query}/query.cjs +45 -68
  197. package/dist/modern/query/query.cjs.map +1 -0
  198. package/dist/{legacy/base-query-B4_k3n_p.d.ts → modern/query/query.d.ts} +4 -176
  199. package/dist/modern/query/query.d.ts.map +1 -0
  200. package/dist/{legacy/lib → modern/query}/query.js +14 -14
  201. package/dist/modern/query/query.js.map +1 -0
  202. package/dist/modern/query/taxonomy-query.cjs +14 -0
  203. package/dist/modern/query/taxonomy-query.cjs.map +1 -0
  204. package/dist/modern/query/taxonomy-query.d.ts +6 -0
  205. package/dist/modern/query/taxonomy-query.d.ts.map +1 -0
  206. package/dist/modern/query/taxonomy-query.js +12 -0
  207. package/dist/modern/query/taxonomy-query.js.map +1 -0
  208. package/dist/{legacy/lib → modern/stack}/contentstack.cjs +51 -66
  209. package/dist/modern/stack/contentstack.cjs.map +1 -0
  210. package/dist/modern/{contentstack-BmTB3Y49.d.cts → stack/contentstack.d.ts} +8 -13
  211. package/dist/modern/stack/contentstack.d.ts.map +1 -0
  212. package/dist/{legacy/lib → modern/stack}/contentstack.js +26 -26
  213. package/dist/modern/stack/contentstack.js.map +1 -0
  214. package/dist/modern/stack/index.cjs +11 -0
  215. package/dist/modern/stack/index.cjs.map +1 -0
  216. package/dist/modern/stack/index.d.ts +6 -0
  217. package/dist/modern/stack/index.d.ts.map +1 -0
  218. package/dist/modern/stack/index.js +7 -0
  219. package/dist/modern/stack/index.js.map +1 -0
  220. package/dist/{legacy/lib → modern/stack}/stack.cjs +27 -49
  221. package/dist/modern/stack/stack.cjs.map +1 -0
  222. package/dist/{legacy/lib → modern/stack}/stack.d.ts +11 -21
  223. package/dist/modern/stack/stack.d.ts.map +1 -0
  224. package/dist/modern/{lib → stack}/stack.js +17 -16
  225. package/dist/modern/stack/stack.js.map +1 -0
  226. package/dist/modern/sync/index.d.ts +3 -0
  227. package/dist/modern/sync/index.d.ts.map +1 -0
  228. package/dist/modern/sync/synchronization.cjs +30 -0
  229. package/dist/modern/sync/synchronization.cjs.map +1 -0
  230. package/dist/modern/sync/synchronization.d.ts +4 -0
  231. package/dist/modern/sync/synchronization.d.ts.map +1 -0
  232. package/dist/{legacy/lib → modern/sync}/synchronization.js +11 -13
  233. package/dist/modern/sync/synchronization.js.map +1 -0
  234. package/package.json +19 -21
  235. package/dist/legacy/base-query-DrXtYoPl.d.cts +0 -548
  236. package/dist/legacy/contentstack-BmTB3Y49.d.cts +0 -35
  237. package/dist/legacy/contentstack-DajCqJdu.d.ts +0 -35
  238. package/dist/legacy/index.d.cts +0 -26
  239. package/dist/legacy/index.d.ts +0 -26
  240. package/dist/legacy/lib/asset-query.cjs.map +0 -1
  241. package/dist/legacy/lib/asset-query.d.cts +0 -110
  242. package/dist/legacy/lib/asset-query.js.map +0 -1
  243. package/dist/legacy/lib/asset.cjs.map +0 -1
  244. package/dist/legacy/lib/asset.d.cts +0 -108
  245. package/dist/legacy/lib/asset.d.ts +0 -108
  246. package/dist/legacy/lib/asset.js.map +0 -1
  247. package/dist/legacy/lib/base-query.cjs.map +0 -1
  248. package/dist/legacy/lib/base-query.d.cts +0 -8
  249. package/dist/legacy/lib/base-query.d.ts +0 -8
  250. package/dist/legacy/lib/base-query.js.map +0 -1
  251. package/dist/legacy/lib/cache.cjs.map +0 -1
  252. package/dist/legacy/lib/cache.d.cts +0 -20
  253. package/dist/legacy/lib/cache.js.map +0 -1
  254. package/dist/legacy/lib/content-type.cjs +0 -61
  255. package/dist/legacy/lib/content-type.cjs.map +0 -1
  256. package/dist/legacy/lib/content-type.d.cts +0 -50
  257. package/dist/legacy/lib/content-type.js.map +0 -1
  258. package/dist/legacy/lib/contentstack.cjs.map +0 -1
  259. package/dist/legacy/lib/contentstack.d.cts +0 -21
  260. package/dist/legacy/lib/contentstack.d.ts +0 -21
  261. package/dist/legacy/lib/contentstack.js.map +0 -1
  262. package/dist/legacy/lib/contenttype-query.cjs +0 -70
  263. package/dist/legacy/lib/contenttype-query.cjs.map +0 -1
  264. package/dist/legacy/lib/contenttype-query.d.cts +0 -43
  265. package/dist/legacy/lib/contenttype-query.d.ts +0 -43
  266. package/dist/legacy/lib/contenttype-query.js.map +0 -1
  267. package/dist/legacy/lib/entries.cjs.map +0 -1
  268. package/dist/legacy/lib/entries.d.cts +0 -191
  269. package/dist/legacy/lib/entries.d.ts +0 -191
  270. package/dist/legacy/lib/entries.js.map +0 -1
  271. package/dist/legacy/lib/entry-queryable.cjs +0 -33
  272. package/dist/legacy/lib/entry-queryable.cjs.map +0 -1
  273. package/dist/legacy/lib/entry-queryable.d.cts +0 -13
  274. package/dist/legacy/lib/entry-queryable.d.ts +0 -13
  275. package/dist/legacy/lib/entry-queryable.js +0 -8
  276. package/dist/legacy/lib/entry-queryable.js.map +0 -1
  277. package/dist/legacy/lib/entry.cjs.map +0 -1
  278. package/dist/legacy/lib/entry.d.cts +0 -170
  279. package/dist/legacy/lib/entry.d.ts +0 -170
  280. package/dist/legacy/lib/entry.js.map +0 -1
  281. package/dist/legacy/lib/error-messages.cjs.map +0 -1
  282. package/dist/legacy/lib/error-messages.d.cts +0 -31
  283. package/dist/legacy/lib/error-messages.js.map +0 -1
  284. package/dist/legacy/lib/global-field-query.cjs +0 -54
  285. package/dist/legacy/lib/global-field-query.cjs.map +0 -1
  286. package/dist/legacy/lib/global-field-query.d.cts +0 -27
  287. package/dist/legacy/lib/global-field-query.d.ts +0 -27
  288. package/dist/legacy/lib/global-field-query.js.map +0 -1
  289. package/dist/legacy/lib/global-field.cjs.map +0 -1
  290. package/dist/legacy/lib/global-field.d.ts +0 -38
  291. package/dist/legacy/lib/global-field.js.map +0 -1
  292. package/dist/legacy/lib/image-transform.cjs +0 -528
  293. package/dist/legacy/lib/image-transform.cjs.map +0 -1
  294. package/dist/legacy/lib/image-transform.d.cts +0 -7
  295. package/dist/legacy/lib/image-transform.d.ts +0 -7
  296. package/dist/legacy/lib/image-transform.js +0 -506
  297. package/dist/legacy/lib/image-transform.js.map +0 -1
  298. package/dist/legacy/lib/pagination.cjs.map +0 -1
  299. package/dist/legacy/lib/pagination.d.cts +0 -99
  300. package/dist/legacy/lib/pagination.js.map +0 -1
  301. package/dist/legacy/lib/query.cjs.map +0 -1
  302. package/dist/legacy/lib/query.d.cts +0 -8
  303. package/dist/legacy/lib/query.d.ts +0 -8
  304. package/dist/legacy/lib/query.js.map +0 -1
  305. package/dist/legacy/lib/stack.cjs.map +0 -1
  306. package/dist/legacy/lib/stack.d.cts +0 -170
  307. package/dist/legacy/lib/stack.js.map +0 -1
  308. package/dist/legacy/lib/string-extensions.cjs +0 -27
  309. package/dist/legacy/lib/string-extensions.cjs.map +0 -1
  310. package/dist/legacy/lib/string-extensions.d.cts +0 -404
  311. package/dist/legacy/lib/string-extensions.d.ts +0 -404
  312. package/dist/legacy/lib/string-extensions.js.map +0 -1
  313. package/dist/legacy/lib/synchronization.cjs +0 -65
  314. package/dist/legacy/lib/synchronization.cjs.map +0 -1
  315. package/dist/legacy/lib/synchronization.d.cts +0 -10
  316. package/dist/legacy/lib/synchronization.d.ts +0 -10
  317. package/dist/legacy/lib/synchronization.js.map +0 -1
  318. package/dist/legacy/lib/taxonomy-query.cjs +0 -38
  319. package/dist/legacy/lib/taxonomy-query.cjs.map +0 -1
  320. package/dist/legacy/lib/taxonomy-query.d.cts +0 -14
  321. package/dist/legacy/lib/taxonomy-query.d.ts +0 -14
  322. package/dist/legacy/lib/taxonomy-query.js +0 -13
  323. package/dist/legacy/lib/taxonomy-query.js.map +0 -1
  324. package/dist/legacy/lib/types.cjs.map +0 -1
  325. package/dist/legacy/lib/types.d.cts +0 -318
  326. package/dist/legacy/lib/types.js.map +0 -1
  327. package/dist/legacy/lib/utils.cjs +0 -55
  328. package/dist/legacy/lib/utils.cjs.map +0 -1
  329. package/dist/legacy/lib/utils.d.cts +0 -21
  330. package/dist/legacy/lib/utils.d.ts +0 -21
  331. package/dist/legacy/lib/utils.js.map +0 -1
  332. package/dist/legacy/persistance/config/persistance-storage-config.cjs +0 -19
  333. package/dist/legacy/persistance/config/persistance-storage-config.cjs.map +0 -1
  334. package/dist/legacy/persistance/config/persistance-storage-config.d.cts +0 -33
  335. package/dist/legacy/persistance/config/persistance-storage-config.d.ts +0 -33
  336. package/dist/legacy/persistance/config/persistance-storage-config.js +0 -1
  337. package/dist/legacy/persistance/config/persistance-storage-config.js.map +0 -1
  338. package/dist/legacy/persistance/helper/utils.cjs +0 -31
  339. package/dist/legacy/persistance/helper/utils.cjs.map +0 -1
  340. package/dist/legacy/persistance/helper/utils.d.cts +0 -4
  341. package/dist/legacy/persistance/helper/utils.d.ts +0 -4
  342. package/dist/legacy/persistance/helper/utils.js +0 -6
  343. package/dist/legacy/persistance/helper/utils.js.map +0 -1
  344. package/dist/legacy/persistance/index.cjs +0 -31
  345. package/dist/legacy/persistance/index.cjs.map +0 -1
  346. package/dist/legacy/persistance/index.d.cts +0 -7
  347. package/dist/legacy/persistance/index.d.ts +0 -7
  348. package/dist/legacy/persistance/index.js +0 -6
  349. package/dist/legacy/persistance/index.js.map +0 -1
  350. package/dist/legacy/persistance/persistance-store.cjs +0 -162
  351. package/dist/legacy/persistance/persistance-store.cjs.map +0 -1
  352. package/dist/legacy/persistance/persistance-store.d.cts +0 -51
  353. package/dist/legacy/persistance/persistance-store.d.ts +0 -51
  354. package/dist/legacy/persistance/persistance-store.js +0 -137
  355. package/dist/legacy/persistance/persistance-store.js.map +0 -1
  356. package/dist/legacy/persistance/storages/index.cjs +0 -34
  357. package/dist/legacy/persistance/storages/index.cjs.map +0 -1
  358. package/dist/legacy/persistance/storages/index.d.cts +0 -4
  359. package/dist/legacy/persistance/storages/index.d.ts +0 -4
  360. package/dist/legacy/persistance/storages/index.js +0 -8
  361. package/dist/legacy/persistance/storages/index.js.map +0 -1
  362. package/dist/legacy/persistance/storages/local-storage.cjs +0 -66
  363. package/dist/legacy/persistance/storages/local-storage.cjs.map +0 -1
  364. package/dist/legacy/persistance/storages/local-storage.d.cts +0 -6
  365. package/dist/legacy/persistance/storages/local-storage.d.ts +0 -6
  366. package/dist/legacy/persistance/storages/local-storage.js +0 -41
  367. package/dist/legacy/persistance/storages/local-storage.js.map +0 -1
  368. package/dist/legacy/persistance/storages/memory-storage.cjs +0 -60
  369. package/dist/legacy/persistance/storages/memory-storage.cjs.map +0 -1
  370. package/dist/legacy/persistance/storages/memory-storage.d.cts +0 -6
  371. package/dist/legacy/persistance/storages/memory-storage.d.ts +0 -6
  372. package/dist/legacy/persistance/storages/memory-storage.js +0 -35
  373. package/dist/legacy/persistance/storages/memory-storage.js.map +0 -1
  374. package/dist/legacy/persistance/types/index.cjs +0 -19
  375. package/dist/legacy/persistance/types/index.cjs.map +0 -1
  376. package/dist/legacy/persistance/types/index.d.cts +0 -3
  377. package/dist/legacy/persistance/types/index.d.ts +0 -3
  378. package/dist/legacy/persistance/types/index.js +0 -1
  379. package/dist/legacy/persistance/types/index.js.map +0 -1
  380. package/dist/legacy/persistance/types/storage-type.cjs +0 -19
  381. package/dist/legacy/persistance/types/storage-type.cjs.map +0 -1
  382. package/dist/legacy/persistance/types/storage-type.d.cts +0 -3
  383. package/dist/legacy/persistance/types/storage-type.d.ts +0 -3
  384. package/dist/legacy/persistance/types/storage-type.js +0 -1
  385. package/dist/legacy/persistance/types/storage-type.js.map +0 -1
  386. package/dist/legacy/persistance/types/storage.cjs +0 -19
  387. package/dist/legacy/persistance/types/storage.cjs.map +0 -1
  388. package/dist/legacy/persistance/types/storage.d.cts +0 -12
  389. package/dist/legacy/persistance/types/storage.d.ts +0 -12
  390. package/dist/legacy/persistance/types/storage.js +0 -1
  391. package/dist/legacy/persistance/types/storage.js.map +0 -1
  392. package/dist/modern/base-query-B4_k3n_p.d.ts +0 -548
  393. package/dist/modern/base-query-DrXtYoPl.d.cts +0 -548
  394. package/dist/modern/contentstack-DajCqJdu.d.ts +0 -35
  395. package/dist/modern/index.d.cts +0 -26
  396. package/dist/modern/lib/asset-query.cjs.map +0 -1
  397. package/dist/modern/lib/asset-query.d.cts +0 -110
  398. package/dist/modern/lib/asset-query.d.ts +0 -110
  399. package/dist/modern/lib/asset-query.js.map +0 -1
  400. package/dist/modern/lib/asset.cjs.map +0 -1
  401. package/dist/modern/lib/asset.d.cts +0 -108
  402. package/dist/modern/lib/asset.js.map +0 -1
  403. package/dist/modern/lib/base-query.cjs.map +0 -1
  404. package/dist/modern/lib/base-query.d.cts +0 -8
  405. package/dist/modern/lib/base-query.d.ts +0 -8
  406. package/dist/modern/lib/base-query.js.map +0 -1
  407. package/dist/modern/lib/cache.cjs.map +0 -1
  408. package/dist/modern/lib/cache.d.cts +0 -20
  409. package/dist/modern/lib/cache.d.ts +0 -20
  410. package/dist/modern/lib/cache.js.map +0 -1
  411. package/dist/modern/lib/content-type.cjs +0 -61
  412. package/dist/modern/lib/content-type.cjs.map +0 -1
  413. package/dist/modern/lib/content-type.d.cts +0 -50
  414. package/dist/modern/lib/content-type.d.ts +0 -50
  415. package/dist/modern/lib/content-type.js.map +0 -1
  416. package/dist/modern/lib/contentstack.cjs.map +0 -1
  417. package/dist/modern/lib/contentstack.d.cts +0 -21
  418. package/dist/modern/lib/contentstack.d.ts +0 -21
  419. package/dist/modern/lib/contentstack.js.map +0 -1
  420. package/dist/modern/lib/contenttype-query.cjs +0 -70
  421. package/dist/modern/lib/contenttype-query.cjs.map +0 -1
  422. package/dist/modern/lib/contenttype-query.d.cts +0 -43
  423. package/dist/modern/lib/contenttype-query.js.map +0 -1
  424. package/dist/modern/lib/entries.cjs.map +0 -1
  425. package/dist/modern/lib/entries.d.cts +0 -191
  426. package/dist/modern/lib/entries.js.map +0 -1
  427. package/dist/modern/lib/entry-queryable.cjs +0 -33
  428. package/dist/modern/lib/entry-queryable.cjs.map +0 -1
  429. package/dist/modern/lib/entry-queryable.d.cts +0 -13
  430. package/dist/modern/lib/entry-queryable.d.ts +0 -13
  431. package/dist/modern/lib/entry-queryable.js +0 -8
  432. package/dist/modern/lib/entry-queryable.js.map +0 -1
  433. package/dist/modern/lib/entry.cjs.map +0 -1
  434. package/dist/modern/lib/entry.d.cts +0 -170
  435. package/dist/modern/lib/entry.js.map +0 -1
  436. package/dist/modern/lib/error-messages.cjs.map +0 -1
  437. package/dist/modern/lib/error-messages.d.cts +0 -31
  438. package/dist/modern/lib/error-messages.d.ts +0 -31
  439. package/dist/modern/lib/error-messages.js.map +0 -1
  440. package/dist/modern/lib/global-field-query.cjs +0 -54
  441. package/dist/modern/lib/global-field-query.cjs.map +0 -1
  442. package/dist/modern/lib/global-field-query.d.cts +0 -27
  443. package/dist/modern/lib/global-field-query.js.map +0 -1
  444. package/dist/modern/lib/global-field.cjs.map +0 -1
  445. package/dist/modern/lib/global-field.d.cts +0 -38
  446. package/dist/modern/lib/global-field.d.ts +0 -38
  447. package/dist/modern/lib/global-field.js.map +0 -1
  448. package/dist/modern/lib/image-transform.cjs +0 -528
  449. package/dist/modern/lib/image-transform.cjs.map +0 -1
  450. package/dist/modern/lib/image-transform.d.cts +0 -7
  451. package/dist/modern/lib/image-transform.d.ts +0 -7
  452. package/dist/modern/lib/image-transform.js +0 -506
  453. package/dist/modern/lib/image-transform.js.map +0 -1
  454. package/dist/modern/lib/pagination.cjs.map +0 -1
  455. package/dist/modern/lib/pagination.d.cts +0 -99
  456. package/dist/modern/lib/pagination.d.ts +0 -99
  457. package/dist/modern/lib/pagination.js.map +0 -1
  458. package/dist/modern/lib/query.cjs.map +0 -1
  459. package/dist/modern/lib/query.d.cts +0 -8
  460. package/dist/modern/lib/query.d.ts +0 -8
  461. package/dist/modern/lib/query.js.map +0 -1
  462. package/dist/modern/lib/stack.cjs.map +0 -1
  463. package/dist/modern/lib/stack.d.cts +0 -170
  464. package/dist/modern/lib/stack.d.ts +0 -170
  465. package/dist/modern/lib/stack.js.map +0 -1
  466. package/dist/modern/lib/string-extensions.cjs +0 -27
  467. package/dist/modern/lib/string-extensions.cjs.map +0 -1
  468. package/dist/modern/lib/string-extensions.d.cts +0 -404
  469. package/dist/modern/lib/string-extensions.js.map +0 -1
  470. package/dist/modern/lib/synchronization.cjs +0 -65
  471. package/dist/modern/lib/synchronization.cjs.map +0 -1
  472. package/dist/modern/lib/synchronization.d.cts +0 -10
  473. package/dist/modern/lib/synchronization.d.ts +0 -10
  474. package/dist/modern/lib/synchronization.js.map +0 -1
  475. package/dist/modern/lib/taxonomy-query.cjs +0 -38
  476. package/dist/modern/lib/taxonomy-query.cjs.map +0 -1
  477. package/dist/modern/lib/taxonomy-query.d.cts +0 -14
  478. package/dist/modern/lib/taxonomy-query.d.ts +0 -14
  479. package/dist/modern/lib/taxonomy-query.js +0 -13
  480. package/dist/modern/lib/taxonomy-query.js.map +0 -1
  481. package/dist/modern/lib/types.cjs.map +0 -1
  482. package/dist/modern/lib/types.d.cts +0 -318
  483. package/dist/modern/lib/types.d.ts +0 -318
  484. package/dist/modern/lib/types.js.map +0 -1
  485. package/dist/modern/lib/utils.cjs +0 -55
  486. package/dist/modern/lib/utils.cjs.map +0 -1
  487. package/dist/modern/lib/utils.d.cts +0 -21
  488. package/dist/modern/lib/utils.d.ts +0 -21
  489. package/dist/modern/lib/utils.js.map +0 -1
  490. package/dist/modern/persistance/config/persistance-storage-config.cjs +0 -19
  491. package/dist/modern/persistance/config/persistance-storage-config.cjs.map +0 -1
  492. package/dist/modern/persistance/config/persistance-storage-config.d.cts +0 -33
  493. package/dist/modern/persistance/config/persistance-storage-config.d.ts +0 -33
  494. package/dist/modern/persistance/config/persistance-storage-config.js +0 -1
  495. package/dist/modern/persistance/config/persistance-storage-config.js.map +0 -1
  496. package/dist/modern/persistance/helper/utils.cjs +0 -31
  497. package/dist/modern/persistance/helper/utils.cjs.map +0 -1
  498. package/dist/modern/persistance/helper/utils.d.cts +0 -4
  499. package/dist/modern/persistance/helper/utils.d.ts +0 -4
  500. package/dist/modern/persistance/helper/utils.js +0 -6
  501. package/dist/modern/persistance/helper/utils.js.map +0 -1
  502. package/dist/modern/persistance/index.cjs +0 -31
  503. package/dist/modern/persistance/index.cjs.map +0 -1
  504. package/dist/modern/persistance/index.d.cts +0 -7
  505. package/dist/modern/persistance/index.d.ts +0 -7
  506. package/dist/modern/persistance/index.js +0 -6
  507. package/dist/modern/persistance/index.js.map +0 -1
  508. package/dist/modern/persistance/persistance-store.cjs +0 -162
  509. package/dist/modern/persistance/persistance-store.cjs.map +0 -1
  510. package/dist/modern/persistance/persistance-store.d.cts +0 -51
  511. package/dist/modern/persistance/persistance-store.d.ts +0 -51
  512. package/dist/modern/persistance/persistance-store.js +0 -137
  513. package/dist/modern/persistance/persistance-store.js.map +0 -1
  514. package/dist/modern/persistance/storages/index.cjs +0 -34
  515. package/dist/modern/persistance/storages/index.cjs.map +0 -1
  516. package/dist/modern/persistance/storages/index.d.cts +0 -4
  517. package/dist/modern/persistance/storages/index.d.ts +0 -4
  518. package/dist/modern/persistance/storages/index.js +0 -8
  519. package/dist/modern/persistance/storages/index.js.map +0 -1
  520. package/dist/modern/persistance/storages/local-storage.cjs +0 -66
  521. package/dist/modern/persistance/storages/local-storage.cjs.map +0 -1
  522. package/dist/modern/persistance/storages/local-storage.d.cts +0 -6
  523. package/dist/modern/persistance/storages/local-storage.d.ts +0 -6
  524. package/dist/modern/persistance/storages/local-storage.js +0 -41
  525. package/dist/modern/persistance/storages/local-storage.js.map +0 -1
  526. package/dist/modern/persistance/storages/memory-storage.cjs +0 -60
  527. package/dist/modern/persistance/storages/memory-storage.cjs.map +0 -1
  528. package/dist/modern/persistance/storages/memory-storage.d.cts +0 -6
  529. package/dist/modern/persistance/storages/memory-storage.d.ts +0 -6
  530. package/dist/modern/persistance/storages/memory-storage.js +0 -35
  531. package/dist/modern/persistance/storages/memory-storage.js.map +0 -1
  532. package/dist/modern/persistance/types/index.cjs +0 -19
  533. package/dist/modern/persistance/types/index.cjs.map +0 -1
  534. package/dist/modern/persistance/types/index.d.cts +0 -3
  535. package/dist/modern/persistance/types/index.d.ts +0 -3
  536. package/dist/modern/persistance/types/index.js +0 -1
  537. package/dist/modern/persistance/types/index.js.map +0 -1
  538. package/dist/modern/persistance/types/storage-type.cjs +0 -19
  539. package/dist/modern/persistance/types/storage-type.cjs.map +0 -1
  540. package/dist/modern/persistance/types/storage-type.d.cts +0 -3
  541. package/dist/modern/persistance/types/storage-type.d.ts +0 -3
  542. package/dist/modern/persistance/types/storage-type.js +0 -1
  543. package/dist/modern/persistance/types/storage-type.js.map +0 -1
  544. package/dist/modern/persistance/types/storage.cjs +0 -19
  545. package/dist/modern/persistance/types/storage.cjs.map +0 -1
  546. package/dist/modern/persistance/types/storage.d.cts +0 -12
  547. package/dist/modern/persistance/types/storage.d.ts +0 -12
  548. package/dist/modern/persistance/types/storage.js +0 -1
  549. package/dist/modern/persistance/types/storage.js.map +0 -1
@@ -1,36 +1,18 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
1
+ 'use strict';
2
+
3
+ var core = require('@contentstack/core');
4
+ var baseQuery = require('./base-query.cjs');
5
+ var types = require('../common/types.cjs');
6
+ var utils = require('../common/utils.cjs');
7
+ var errorMessages = require('../common/error-messages.cjs');
19
8
 
20
- // src/lib/query.ts
21
- var query_exports = {};
22
- __export(query_exports, {
23
- Query: () => Query
24
- });
25
- module.exports = __toCommonJS(query_exports);
26
- var import_core = require("@contentstack/core");
27
- var import_base_query = require("./base-query.cjs");
28
- var import_types = require("./types.cjs");
29
- var import_utils = require("./utils.cjs");
30
- var import_error_messages = require("./error-messages.cjs");
31
- var Query = class extends import_base_query.BaseQuery {
9
+ var __defProp = Object.defineProperty;
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
12
+ class Query extends baseQuery.BaseQuery {
32
13
  constructor(client, params2, queryParams2, variants, uid, queryObj) {
33
14
  super();
15
+ __publicField(this, "_contentTypeUid");
34
16
  this._client = client;
35
17
  this._contentTypeUid = uid;
36
18
  this._urlPath = `/content_types/${this._contentTypeUid}/entries`;
@@ -49,9 +31,9 @@ var Query = class extends import_base_query.BaseQuery {
49
31
  const alphanumericRegex = /^[a-zA-Z0-9_.-]+$/;
50
32
  return alphanumericRegex.test(input);
51
33
  }
52
- // Validate if input matches any of the safe, pre-approved patterns
34
+ // Validate if input matches safe regex patterns
53
35
  isValidRegexPattern(input) {
54
- const validRegex = /^[a-zA-Z0-9|^$.*+?()[\]{}\\-]+$/;
36
+ const validRegex = /^[a-zA-Z0-9|^$.*+?()[\]{}:,;&@#%=/!'"_~<> -]+$/;
55
37
  if (!validRegex.test(input)) {
56
38
  return false;
57
39
  }
@@ -87,10 +69,10 @@ var Query = class extends import_base_query.BaseQuery {
87
69
  */
88
70
  where(fieldUid, queryOperation, fields, additionalData) {
89
71
  if (!this.isValidAlphanumeric(fieldUid)) {
90
- console.error(import_error_messages.ErrorMessages.INVALID_FIELD_UID);
72
+ console.error(errorMessages.ErrorMessages.INVALID_FIELD_UID);
91
73
  return this;
92
74
  }
93
- if (queryOperation == import_types.QueryOperation.EQUALS) {
75
+ if (queryOperation == types.QueryOperation.EQUALS) {
94
76
  this._parameters[fieldUid] = fields;
95
77
  } else {
96
78
  const parameterValue = { [queryOperation]: fields, ...additionalData };
@@ -114,11 +96,11 @@ var Query = class extends import_base_query.BaseQuery {
114
96
  */
115
97
  regex(fieldUid, regexPattern, options) {
116
98
  if (!this.isValidAlphanumeric(fieldUid)) {
117
- console.error(import_error_messages.ErrorMessages.INVALID_FIELD_UID);
99
+ console.error(errorMessages.ErrorMessages.INVALID_FIELD_UID);
118
100
  return this;
119
101
  }
120
102
  if (!this.isValidRegexPattern(regexPattern)) {
121
- throw new Error(import_error_messages.ErrorMessages.INVALID_REGEX_PATTERN);
103
+ throw new Error(errorMessages.ErrorMessages.INVALID_REGEX_PATTERN);
122
104
  } else {
123
105
  this._parameters[fieldUid] = { $regex: regexPattern };
124
106
  if (options) this._parameters[fieldUid].$options = options;
@@ -146,7 +128,7 @@ var Query = class extends import_base_query.BaseQuery {
146
128
  */
147
129
  whereIn(referenceUid, queryInstance) {
148
130
  if (!this.isValidAlphanumeric(referenceUid)) {
149
- throw new Error(import_error_messages.ErrorMessages.INVALID_REFERENCE_UID(referenceUid));
131
+ throw new Error(errorMessages.ErrorMessages.INVALID_REFERENCE_UID(referenceUid));
150
132
  }
151
133
  this._parameters[referenceUid] = { "$in_query": queryInstance._parameters };
152
134
  return this;
@@ -172,7 +154,7 @@ var Query = class extends import_base_query.BaseQuery {
172
154
  */
173
155
  whereNotIn(referenceUid, queryInstance) {
174
156
  if (!this.isValidAlphanumeric(referenceUid)) {
175
- throw new Error(import_error_messages.ErrorMessages.INVALID_REFERENCE_UID(referenceUid));
157
+ throw new Error(errorMessages.ErrorMessages.INVALID_REFERENCE_UID(referenceUid));
176
158
  }
177
159
  this._parameters[referenceUid] = { "$nin_query": queryInstance._parameters };
178
160
  return this;
@@ -240,11 +222,11 @@ var Query = class extends import_base_query.BaseQuery {
240
222
  */
241
223
  containedIn(key, value) {
242
224
  if (!this.isValidAlphanumeric(key)) {
243
- console.error(import_error_messages.ErrorMessages.INVALID_KEY);
225
+ console.error(errorMessages.ErrorMessages.INVALID_KEY);
244
226
  return this;
245
227
  }
246
228
  if (!this.isValidValue(value)) {
247
- console.error(import_error_messages.ErrorMessages.INVALID_VALUE_ARRAY);
229
+ console.error(errorMessages.ErrorMessages.INVALID_VALUE_ARRAY);
248
230
  return this;
249
231
  }
250
232
  this._parameters[key] = { "$in": value };
@@ -267,11 +249,11 @@ var Query = class extends import_base_query.BaseQuery {
267
249
  */
268
250
  notContainedIn(key, value) {
269
251
  if (!this.isValidAlphanumeric(key)) {
270
- console.error(import_error_messages.ErrorMessages.INVALID_KEY);
252
+ console.error(errorMessages.ErrorMessages.INVALID_KEY);
271
253
  return this;
272
254
  }
273
255
  if (!this.isValidValue(value)) {
274
- console.error(import_error_messages.ErrorMessages.INVALID_VALUE_ARRAY);
256
+ console.error(errorMessages.ErrorMessages.INVALID_VALUE_ARRAY);
275
257
  return this;
276
258
  }
277
259
  this._parameters[key] = { "$nin": value };
@@ -293,7 +275,7 @@ var Query = class extends import_base_query.BaseQuery {
293
275
  */
294
276
  exists(key) {
295
277
  if (!this.isValidAlphanumeric(key)) {
296
- console.error(import_error_messages.ErrorMessages.INVALID_KEY);
278
+ console.error(errorMessages.ErrorMessages.INVALID_KEY);
297
279
  return this;
298
280
  }
299
281
  this._parameters[key] = { "$exists": true };
@@ -315,7 +297,7 @@ var Query = class extends import_base_query.BaseQuery {
315
297
  */
316
298
  notExists(key) {
317
299
  if (!this.isValidAlphanumeric(key)) {
318
- console.error(import_error_messages.ErrorMessages.INVALID_KEY);
300
+ console.error(errorMessages.ErrorMessages.INVALID_KEY);
319
301
  return this;
320
302
  }
321
303
  this._parameters[key] = { "$exists": false };
@@ -383,11 +365,11 @@ var Query = class extends import_base_query.BaseQuery {
383
365
  */
384
366
  equalTo(key, value) {
385
367
  if (!this.isValidAlphanumeric(key)) {
386
- console.error(import_error_messages.ErrorMessages.INVALID_KEY);
368
+ console.error(errorMessages.ErrorMessages.INVALID_KEY);
387
369
  return this;
388
370
  }
389
371
  if (typeof value !== "string" && typeof value !== "number") {
390
- console.error(import_error_messages.ErrorMessages.INVALID_VALUE_STRING_OR_NUMBER);
372
+ console.error(errorMessages.ErrorMessages.INVALID_VALUE_STRING_OR_NUMBER);
391
373
  return this;
392
374
  }
393
375
  this._parameters[key] = value;
@@ -409,11 +391,11 @@ var Query = class extends import_base_query.BaseQuery {
409
391
  */
410
392
  notEqualTo(key, value) {
411
393
  if (!this.isValidAlphanumeric(key)) {
412
- console.error(import_error_messages.ErrorMessages.INVALID_KEY);
394
+ console.error(errorMessages.ErrorMessages.INVALID_KEY);
413
395
  return this;
414
396
  }
415
397
  if (typeof value !== "string" && typeof value !== "number") {
416
- console.error(import_error_messages.ErrorMessages.INVALID_VALUE_STRING_OR_NUMBER);
398
+ console.error(errorMessages.ErrorMessages.INVALID_VALUE_STRING_OR_NUMBER);
417
399
  return this;
418
400
  }
419
401
  this._parameters[key] = { "$ne": value };
@@ -436,7 +418,7 @@ var Query = class extends import_base_query.BaseQuery {
436
418
  */
437
419
  referenceIn(key, query) {
438
420
  if (!this.isValidAlphanumeric(key)) {
439
- console.error(import_error_messages.ErrorMessages.INVALID_KEY);
421
+ console.error(errorMessages.ErrorMessages.INVALID_KEY);
440
422
  return this;
441
423
  }
442
424
  this._parameters[key] = { "$in_query": query._parameters };
@@ -459,7 +441,7 @@ var Query = class extends import_base_query.BaseQuery {
459
441
  */
460
442
  referenceNotIn(key, query) {
461
443
  if (!this.isValidAlphanumeric(key)) {
462
- console.error(import_error_messages.ErrorMessages.INVALID_KEY);
444
+ console.error(errorMessages.ErrorMessages.INVALID_KEY);
463
445
  return this;
464
446
  }
465
447
  this._parameters[key] = { "$nin_query": query._parameters };
@@ -480,7 +462,7 @@ var Query = class extends import_base_query.BaseQuery {
480
462
  */
481
463
  tags(values) {
482
464
  if (!this.isValidValue(values)) {
483
- console.error(import_error_messages.ErrorMessages.INVALID_VALUE_ARRAY);
465
+ console.error(errorMessages.ErrorMessages.INVALID_VALUE_ARRAY);
484
466
  return this;
485
467
  }
486
468
  this._parameters["tags"] = values;
@@ -501,7 +483,7 @@ var Query = class extends import_base_query.BaseQuery {
501
483
  */
502
484
  search(key) {
503
485
  if (!this.isValidAlphanumeric(key)) {
504
- console.error(import_error_messages.ErrorMessages.INVALID_KEY);
486
+ console.error(errorMessages.ErrorMessages.INVALID_KEY);
505
487
  return this;
506
488
  }
507
489
  this._queryParams["typeahead"] = key;
@@ -523,11 +505,11 @@ var Query = class extends import_base_query.BaseQuery {
523
505
  */
524
506
  lessThan(key, value) {
525
507
  if (!this.isValidAlphanumeric(key)) {
526
- console.error(import_error_messages.ErrorMessages.INVALID_KEY);
508
+ console.error(errorMessages.ErrorMessages.INVALID_KEY);
527
509
  return this;
528
510
  }
529
511
  if (typeof value !== "string" && typeof value !== "number") {
530
- console.error(import_error_messages.ErrorMessages.INVALID_VALUE_STRING_OR_NUMBER);
512
+ console.error(errorMessages.ErrorMessages.INVALID_VALUE_STRING_OR_NUMBER);
531
513
  return this;
532
514
  }
533
515
  this._parameters[key] = { "$lt": value };
@@ -549,11 +531,11 @@ var Query = class extends import_base_query.BaseQuery {
549
531
  */
550
532
  lessThanOrEqualTo(key, value) {
551
533
  if (!this.isValidAlphanumeric(key)) {
552
- console.error(import_error_messages.ErrorMessages.INVALID_KEY);
534
+ console.error(errorMessages.ErrorMessages.INVALID_KEY);
553
535
  return this;
554
536
  }
555
537
  if (typeof value !== "string" && typeof value !== "number") {
556
- console.error(import_error_messages.ErrorMessages.INVALID_VALUE_STRING_OR_NUMBER);
538
+ console.error(errorMessages.ErrorMessages.INVALID_VALUE_STRING_OR_NUMBER);
557
539
  return this;
558
540
  }
559
541
  this._parameters[key] = { "$lte": value };
@@ -575,11 +557,11 @@ var Query = class extends import_base_query.BaseQuery {
575
557
  */
576
558
  greaterThan(key, value) {
577
559
  if (!this.isValidAlphanumeric(key)) {
578
- console.error(import_error_messages.ErrorMessages.INVALID_KEY);
560
+ console.error(errorMessages.ErrorMessages.INVALID_KEY);
579
561
  return this;
580
562
  }
581
563
  if (typeof value !== "string" && typeof value !== "number") {
582
- console.error(import_error_messages.ErrorMessages.INVALID_VALUE_STRING_OR_NUMBER);
564
+ console.error(errorMessages.ErrorMessages.INVALID_VALUE_STRING_OR_NUMBER);
583
565
  return this;
584
566
  }
585
567
  this._parameters[key] = { "$gt": value };
@@ -601,11 +583,11 @@ var Query = class extends import_base_query.BaseQuery {
601
583
  */
602
584
  greaterThanOrEqualTo(key, value) {
603
585
  if (!this.isValidAlphanumeric(key)) {
604
- console.error(import_error_messages.ErrorMessages.INVALID_KEY);
586
+ console.error(errorMessages.ErrorMessages.INVALID_KEY);
605
587
  return this;
606
588
  }
607
589
  if (typeof value !== "string" && typeof value !== "number") {
608
- console.error(import_error_messages.ErrorMessages.INVALID_VALUE_STRING_OR_NUMBER);
590
+ console.error(errorMessages.ErrorMessages.INVALID_VALUE_STRING_OR_NUMBER);
609
591
  return this;
610
592
  }
611
593
  this._parameters[key] = { "$gte": value };
@@ -619,7 +601,7 @@ var Query = class extends import_base_query.BaseQuery {
619
601
  if (Object.keys(this._parameters).length > 0) {
620
602
  let queryParams2 = { ...this._parameters };
621
603
  if (encode) {
622
- queryParams2 = (0, import_utils.encodeQueryParams)(queryParams2);
604
+ queryParams2 = utils.encodeQueryParams(queryParams2);
623
605
  }
624
606
  requestParams = { ...this._queryParams, query: queryParams2 };
625
607
  }
@@ -634,12 +616,10 @@ var Query = class extends import_base_query.BaseQuery {
634
616
  "x-cs-variant-uid": this._variants
635
617
  };
636
618
  }
637
- const response = await (0, import_core.getData)(this._client, this._urlPath, getRequestOptions);
619
+ const response = await core.getData(this._client, this._urlPath, getRequestOptions);
638
620
  return response;
639
621
  }
640
- };
641
- // Annotate the CommonJS export names for ESM import in node:
642
- 0 && (module.exports = {
643
- Query
644
- });
645
- //# sourceMappingURL=query.cjs.map
622
+ }
623
+
624
+ exports.Query = Query;
625
+ //# sourceMappingURL=query.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.cjs","sources":["../../../src/query/query.ts"],"sourcesContent":["import { AxiosInstance, getData } from '@contentstack/core';\nimport { BaseQuery } from './base-query';\nimport { BaseQueryParameters, QueryOperation, QueryOperator, TaxonomyQueryOperation, params, queryParams, FindResponse } from '../common/types';\nimport { encodeQueryParams } from '../common/utils';\nimport { ErrorMessages } from '../common/error-messages';\n\nexport class Query extends BaseQuery {\n private _contentTypeUid?: string;\n\n constructor(client: AxiosInstance, params: params, queryParams: queryParams, variants?: string, uid?: string, queryObj?: { [key: string]: any }) {\n super();\n this._client = client;\n this._contentTypeUid = uid;\n this._urlPath = `/content_types/${this._contentTypeUid}/entries`;\n this._parameters = params || {};\n this._queryParams = queryParams || {};\n this._variants = variants || '';\n\n if (!uid) {\n this._urlPath = `/assets`;\n }\n if (queryObj) {\n this._parameters = { ...this._parameters, ...queryObj };\n }\n }\n // Validate if input is alphanumeric \n private isValidAlphanumeric(input: string): boolean {\n const alphanumericRegex = /^[a-zA-Z0-9_.-]+$/;\n return alphanumericRegex.test(input);\n }\n\n // Validate if input matches safe regex patterns\n private isValidRegexPattern(input: string): boolean {\n // Expanded whitelist: includes spaces and common safe special characters\n // Allows: alphanumeric, regex metacharacters, regular spaces, and common punctuation\n // Blocks: control characters (newlines, tabs, null bytes), backticks, and other dangerous chars\n const validRegex = /^[a-zA-Z0-9|^$.*+?()[\\]{}:,;&@#%=/!'\"_~<> -]+$/;\n if (!validRegex.test(input)) {\n return false;\n }\n try {\n new RegExp(input);\n return true;\n } catch (e) {\n return false;\n }\n }\n\n private isValidValue(value: any[]): boolean {\n return Array.isArray(value) && value.every(item => typeof item === 'string' || typeof item === 'number' || typeof item === 'boolean');\n }\n\n /**\n * @method where\n * @memberof Query\n * @description Filters the results based on the specified criteria.\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const query = stack.contentType(\"contentTypeUid\").entry().query();\n * const result = await query.where(\"field_UID\", QueryOperation.IS_LESS_THAN, [\"field1\", \"field2\"]).find()\n * // OR\n * const asset = await stack.asset().query().where(\"field_UID\", QueryOperation.IS_LESS_THAN, [\"field1\", \"field2\"]).find()\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const query = stack.contentType(\"contentTypeUid\").entry().query();\n * const result = await query.where(\"field_UID\", QueryOperation.MATCHES, [\"field1\", \"field2\"]).find()\n * @returns {Query}\n */\n where(\n fieldUid: string,\n queryOperation: QueryOperation | TaxonomyQueryOperation,\n fields: string | string[] | number | number[] | object | boolean,\n additionalData?: object\n ): Query {\n if (!this.isValidAlphanumeric(fieldUid)) {\n console.error(ErrorMessages.INVALID_FIELD_UID);\n return this;\n }\n if (queryOperation == QueryOperation.EQUALS) {\n this._parameters[fieldUid] = fields;\n }\n else {\n const parameterValue: { [key in QueryOperation]?: string | string[] } = { [queryOperation]: fields, ...additionalData };\n this._parameters[fieldUid] = parameterValue;\n }\n return this;\n }\n\n /**\n * @method regex\n * @memberof Query\n * @description Retrieve entries that match the provided regular expressions\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const query = stack.contentType(\"contentTypeUid\").entry().query();\n * const result = await query.regex('title','^Demo').find()\n * // OR\n * const result = await query.regex('title','^Demo', 'i').find() // regex with options\n * @returns {Query}\n */\n regex(fieldUid: string, regexPattern: string, options?: string): Query {\n if (!this.isValidAlphanumeric(fieldUid)) {\n console.error(ErrorMessages.INVALID_FIELD_UID);\n return this;\n }\n if (!this.isValidRegexPattern(regexPattern)) {\n throw new Error(ErrorMessages.INVALID_REGEX_PATTERN);\n }\n else {\n this._parameters[fieldUid] = { $regex: regexPattern };\n if (options) this._parameters[fieldUid].$options = options;\n return this;\n }\n }\n\n /**\n * @method whereIn\n * @memberof Query\n * @description Get entries having values based on referenced fields.\n * The query retrieves all entries that satisfy the query conditions made on referenced fields\n * This method sets the '$in_query' parameter to a reference field UID and a query instance in the API request.\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const query = stack.contentType(\"contentTypeUid\").entry().query();\n * const subQuery = stack.contentType(\"referencedContentTypeUid\").entry().query().where(\"title\", QueryOperation.EQUALS, \"value\");\n * query.whereIn(\"brand\", subQuery)\n * const result = await query.find()\n *\n * @param {string} referenceUid - UID of the reference field to query.\n * @param {Query} queryInstance - The Query instance to include in the where clause.\n * @returns {Query} - Returns the Query instance for chaining.\n */\n whereIn(referenceUid: string, queryInstance: Query): Query {\n // eslint-disable-next-line @typescript-eslint/naming-convention, prettier/prettier\n if (!this.isValidAlphanumeric(referenceUid)) {\n throw new Error(ErrorMessages.INVALID_REFERENCE_UID(referenceUid));\n }\n this._parameters[referenceUid] = { '$in_query': queryInstance._parameters };\n return this;\n }\n\n /**\n * @method whereNotIn\n * @memberof Query\n * @description Get entries having values based on referenced fields.\n * This query works the opposite of $in_query and retrieves all entries that does not satisfy query conditions made on referenced fields.\n * This method sets the '$nin_query' parameter to a reference field UID and a query instance in the API request.\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const query = stack.contentType(\"contentTypeUid\").entry().query();\n * const subQuery = stack.contentType(\"referencedContentTypeUid\").entry().query().where(\"title\", QueryOperation.EQUALS, \"value\");\n * query.whereNotIn(\"brand\", subQuery)\n * const result = await query.find()\n *\n * @param {string} referenceUid - UID of the reference field to query.\n * @param {Query} queryInstance - The Query instance to include in the where clause.\n * @returns {Query} - Returns the Query instance for chaining.\n */\n whereNotIn(referenceUid: string, queryInstance: Query): Query {\n // eslint-disable-next-line @typescript-eslint/naming-convention, prettier/prettier\n if (!this.isValidAlphanumeric(referenceUid)) {\n throw new Error(ErrorMessages.INVALID_REFERENCE_UID(referenceUid));\n }\n this._parameters[referenceUid] = { '$nin_query': queryInstance._parameters };\n return this;\n }\n\n /**\n * @method queryOperator\n * @memberof Query\n * @description In case of '$and' get entries that satisfy all the conditions provided in the '$and' query and\n * in case of '$or' query get all entries that satisfy at least one of the given conditions provided in the '$or' query.\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const query = stack.contentType(\"contentType1Uid\").entry().query();\n * const subQuery1 = stack.contentType(\"contentType2Uid\").entry().query().where(\"price\", QueryOperation.IS_LESS_THAN, 90);\n * const subQuery2 = stack.contentType(\"contentType3Uid\").entry().query().where(\"discount\", QueryOperation.INCLUDES, [20, 45]);\n * query.queryOperator(QueryOperator.AND, subQuery1, subQuery2)\n * const result = await query.find()\n *\n * @param {QueryOperator} queryType - The type of query operator to apply.\n * @param {...Query[]} queryObjects - The Query instances to apply the query to.\n * @returns {Query} - Returns the Query instance for chaining.\n */\n queryOperator(queryType: QueryOperator, ...queryObjects: Query[]): Query {\n const paramsList: BaseQueryParameters[] = [];\n for (const queryItem of queryObjects) {\n paramsList.push(queryItem._parameters);\n }\n this._parameters[queryType] = paramsList;\n\n return this;\n }\n\n /**\n * @method getQuery\n * @memberof Query\n * @description Returns the raw (JSON) query based on the filters applied on Query object.\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const query = stack.contentType(\"contentTypeUid\").entry().query();\n * const result = query.getQuery()\n * // OR\n * const assetQuery = stack.asset().query();\n * const assetResult = assetQuery.getQuery()\n *\n * @returns {{ [key: string]: any }} The raw query object\n */\n getQuery(): { [key: string]: any } {\n return this._parameters;\n }\n\n /**\n * @method containedIn\n * @memberof Query\n * @description Filters entries where the field value is contained in the provided array of values\n * @param {string} key - The field UID to filter on\n * @param {(string | number | boolean)[]} value - Array of values to match against\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const query = stack.contentType(\"contentTypeUid\").entry().query();\n * const result = await query.containedIn('fieldUid', ['value1', 'value2']).find()\n * \n * @returns {Query}\n */\n containedIn(key: string, value: (string | number | boolean)[]): Query {\n if (!this.isValidAlphanumeric(key)) {\n console.error(ErrorMessages.INVALID_KEY);\n return this;\n }\n if (!this.isValidValue(value)) {\n console.error(ErrorMessages.INVALID_VALUE_ARRAY);\n return this;\n }\n this._parameters[key] = { '$in': value };\n return this;\n }\n\n /**\n * @method notContainedIn\n * @memberof Query\n * @description Filters entries where the field value is not contained in the provided array of values\n * @param {string} key - The field UID to filter on\n * @param {(string | number | boolean)[]} value - Array of values to exclude\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const query = stack.contentType(\"contentTypeUid\").entry().query();\n * const result = await query.notContainedIn('fieldUid', ['value1', 'value2']).find()\n * \n * @returns {Query}\n */\n notContainedIn(key: string, value: (string | number | boolean)[]): Query {\n if (!this.isValidAlphanumeric(key)) {\n console.error(ErrorMessages.INVALID_KEY);\n return this;\n }\n if (!this.isValidValue(value)) {\n console.error(ErrorMessages.INVALID_VALUE_ARRAY);\n return this;\n }\n this._parameters[key] = { '$nin': value };\n return this;\n }\n\n /**\n * @method exists\n * @memberof Query\n * @description Filters entries where the specified field exists\n * @param {string} key - The field UID to check for existence\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const query = stack.contentType(\"contentTypeUid\").entry().query();\n * const result = await query.exists('fieldUid').find()\n * \n * @returns {Query}\n */\n exists(key: string): Query {\n if (!this.isValidAlphanumeric(key)) {\n console.error(ErrorMessages.INVALID_KEY);\n return this;\n }\n this._parameters[key] = { '$exists': true };\n return this;\n }\n\n /**\n * @method notExists\n * @memberof Query\n * @description Filters entries where the specified field does not exist\n * @param {string} key - The field UID to check for non-existence\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const query = stack.contentType(\"contentTypeUid\").entry().query();\n * const result = await query.notExists('fieldUid').find()\n * \n * @returns {Query}\n */\n notExists(key: string): Query {\n if (!this.isValidAlphanumeric(key)) {\n console.error(ErrorMessages.INVALID_KEY);\n return this;\n }\n this._parameters[key] = { '$exists': false };\n return this;\n }\n\n /**\n * @method or\n * @memberof Query\n * @description Combines multiple queries with OR logic - returns entries that match at least one of the provided queries\n * @param {...Query} queries - Query instances to combine with OR logic\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const query1 = stack.contentType('contenttype_uid').entry().query().containedIn('fieldUID', ['value']);\n * const query2 = stack.contentType('contenttype_uid').entry().query().where('fieldUID', QueryOperation.EQUALS, 'value2');\n * const result = await stack.contentType('contenttype_uid').entry().query().or(query1, query2).find();\n * \n * @returns {Query}\n */\n or(...queries: Query[]): Query {\n const paramsList: BaseQueryParameters[] = [];\n for (const queryItem of queries) {\n paramsList.push(queryItem._parameters);\n }\n this._parameters.$or = paramsList;\n return this;\n }\n\n /**\n * @method and\n * @memberof Query\n * @description Combines multiple queries with AND logic - returns entries that match all of the provided queries\n * @param {...Query} queries - Query instances to combine with AND logic\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const query1 = stack.contentType('contenttype_uid').entry().query().containedIn('fieldUID', ['value']);\n * const query2 = stack.contentType('contenttype_uid').entry().query().where('fieldUID', QueryOperation.EQUALS, 'value2');\n * const result = await stack.contentType('contenttype_uid').entry().query().and(query1, query2).find();\n * \n * @returns {Query}\n */\n and(...queries: Query[]): Query {\n const paramsList: BaseQueryParameters[] = [];\n for (const queryItem of queries) {\n paramsList.push(queryItem._parameters);\n }\n this._parameters.$and = paramsList;\n return this;\n }\n\n /**\n * @method equalTo\n * @memberof Query\n * @description Filters entries where the field value equals the specified value\n * @param {string} key - The field UID to filter on\n * @param {string | number | boolean} value - The value to match\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const result = await stack.contentType('contenttype_uid').entry().query().equalTo('fieldUid', 'value').find();\n * \n * @returns {Query}\n */\n equalTo(key: string, value: string | number | boolean): Query {\n if (!this.isValidAlphanumeric(key)) {\n console.error(ErrorMessages.INVALID_KEY);\n return this;\n }\n if (typeof value !== 'string' && typeof value !== 'number') {\n console.error(ErrorMessages.INVALID_VALUE_STRING_OR_NUMBER);\n return this;\n }\n this._parameters[key] = value;\n return this;\n }\n\n /**\n * @method notEqualTo\n * @memberof Query\n * @description Filters entries where the field value does not equal the specified value\n * @param {string} key - The field UID to filter on\n * @param {string | number | boolean} value - The value to exclude\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const result = await stack.contentType('contenttype_uid').entry().query().notEqualTo('fieldUid', 'value').find();\n * \n * @returns {Query}\n */\n notEqualTo(key: string, value: string | number | boolean): Query {\n if (!this.isValidAlphanumeric(key)) {\n console.error(ErrorMessages.INVALID_KEY);\n return this;\n }\n if (typeof value !== 'string' && typeof value !== 'number') {\n console.error(ErrorMessages.INVALID_VALUE_STRING_OR_NUMBER);\n return this;\n }\n this._parameters[key] = { '$ne': value };\n return this;\n }\n\n /**\n * @method referenceIn\n * @memberof Query\n * @description Filters entries where the reference field matches entries from the provided query\n * @param {string} key - The reference field UID to filter on\n * @param {Query} query - Query instance to match referenced entries against\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const subQuery = stack.contentType('contenttype_uid').entry().query().where('title', QueryOperation.EQUALS, 'value');\n * const result = await stack.contentType('contenttype_uid').entry().query().referenceIn('reference_uid', subQuery).find();\n * \n * @returns {Query}\n */\n referenceIn(key: string, query: Query): Query {\n if (!this.isValidAlphanumeric(key)) {\n console.error(ErrorMessages.INVALID_KEY);\n return this;\n }\n this._parameters[key] = { '$in_query': query._parameters }\n return this;\n }\n\n /**\n * @method referenceNotIn\n * @memberof Query\n * @description Filters entries where the reference field does not match entries from the provided query\n * @param {string} key - The reference field UID to filter on\n * @param {Query} query - Query instance to exclude referenced entries against\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const subQuery = stack.contentType('contenttype_uid').entry().query().where('title', QueryOperation.EQUALS, 'value');\n * const result = await stack.contentType('contenttype_uid').entry().query().referenceNotIn('reference_uid', subQuery).find();\n * \n * @returns {Query}\n */\n referenceNotIn(key: string, query: Query): Query {\n if (!this.isValidAlphanumeric(key)) {\n console.error(ErrorMessages.INVALID_KEY);\n return this;\n }\n this._parameters[key] = { '$nin_query': query._parameters }\n return this;\n }\n\n /**\n * @method tags\n * @memberof Query\n * @description Filters entries that have any of the specified tags\n * @param {(string | number | boolean)[]} values - Array of tag values to filter by\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const result = await stack.contentType('contenttype_uid').entry().query().tags(['tag1']).find();\n * \n * @returns {Query}\n */\n tags(values: (string | number | boolean)[]): Query {\n if (!this.isValidValue(values)) {\n console.error(ErrorMessages.INVALID_VALUE_ARRAY);\n return this;\n }\n this._parameters['tags'] = values;\n return this;\n }\n\n /**\n * @method search\n * @memberof Query\n * @description Enables typeahead search functionality for the query\n * @param {string} key - The search term to use for typeahead search\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const result = await stack.contentType('contenttype_uid').entry().query().search('key').find();\n * \n * @returns {Query}\n */\n search(key: string): Query {\n if (!this.isValidAlphanumeric(key)) {\n console.error(ErrorMessages.INVALID_KEY);\n return this;\n }\n this._queryParams['typeahead'] = key\n return this\n }\n\n /**\n * @method lessThan\n * @memberof Query\n * @description Filters entries where the field value is less than the specified value\n * @param {string} key - The field UID to filter on\n * @param {string | number} value - The value to compare against\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const result = await stack.contentType('contenttype_uid').entry().query().lessThan('fieldUid', 100).find();\n * \n * @returns {Query}\n */\n lessThan(key: string, value: (string | number)): Query {\n if (!this.isValidAlphanumeric(key)) {\n console.error(ErrorMessages.INVALID_KEY);\n return this;\n }\n if (typeof value !== 'string' && typeof value !== 'number') {\n console.error(ErrorMessages.INVALID_VALUE_STRING_OR_NUMBER);\n return this;\n }\n\n this._parameters[key] = { '$lt': value };\n return this;\n }\n\n /**\n * @method lessThanOrEqualTo\n * @memberof Query\n * @description Filters entries where the field value is less than or equal to the specified value\n * @param {string} key - The field UID to filter on\n * @param {string | number} value - The value to compare against\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const result = await stack.contentType('contenttype_uid').entry().query().lessThanOrEqualTo('fieldUid', 100).find();\n * \n * @returns {Query}\n */\n lessThanOrEqualTo(key: string, value: (string | number)): Query {\n if (!this.isValidAlphanumeric(key)) {\n console.error(ErrorMessages.INVALID_KEY);\n return this;\n }\n if (typeof value !== 'string' && typeof value !== 'number') {\n console.error(ErrorMessages.INVALID_VALUE_STRING_OR_NUMBER);\n return this;\n }\n this._parameters[key] = { '$lte': value };\n return this;\n }\n\n /**\n * @method greaterThan\n * @memberof Query\n * @description Filters entries where the field value is greater than the specified value\n * @param {string} key - The field UID to filter on\n * @param {string | number} value - The value to compare against\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const result = await stack.contentType('contenttype_uid').entry().query().greaterThan('fieldUid', 100).find();\n * \n * @returns {Query}\n */\n greaterThan(key: string, value: (string | number)): Query {\n if (!this.isValidAlphanumeric(key)) {\n console.error(ErrorMessages.INVALID_KEY);\n return this;\n }\n if (typeof value !== 'string' && typeof value !== 'number') {\n console.error(ErrorMessages.INVALID_VALUE_STRING_OR_NUMBER);\n return this;\n }\n this._parameters[key] = { '$gt': value };\n return this;\n }\n\n /**\n * @method greaterThanOrEqualTo\n * @memberof Query\n * @description Filters entries where the field value is greater than or equal to the specified value\n * @param {string} key - The field UID to filter on\n * @param {string | number} value - The value to compare against\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const result = await stack.contentType('contenttype_uid').entry().query().greaterThanOrEqualTo('fieldUid', 100).find();\n * \n * @returns {Query}\n */\n greaterThanOrEqualTo(key: string, value: (string | number)): Query {\n if (!this.isValidAlphanumeric(key)) {\n console.error(ErrorMessages.INVALID_KEY);\n return this;\n }\n if (typeof value !== 'string' && typeof value !== 'number') {\n console.error(ErrorMessages.INVALID_VALUE_STRING_OR_NUMBER);\n return this;\n }\n this._parameters[key] = { '$gte': value };\n return this;\n }\n\n /**\n * Override find method to include content type UID directly for better caching\n */\n override async find<T>(encode: boolean = false): Promise<FindResponse<T>> {\n let requestParams: { [key: string]: any } = this._queryParams;\n\n if (Object.keys(this._parameters).length > 0) {\n let queryParams = { ...this._parameters };\n \n if (encode) {\n queryParams = encodeQueryParams(queryParams);\n }\n \n requestParams = { ...this._queryParams, query: queryParams };\n }\n\n const getRequestOptions: any = { \n params: requestParams,\n // Add contentTypeUid directly for improved caching\n contentTypeUid: this._contentTypeUid\n };\n\n if (this._variants) {\n getRequestOptions.headers = {\n ...getRequestOptions.headers,\n 'x-cs-variant-uid': this._variants\n };\n }\n const response = await getData(this._client, this._urlPath, getRequestOptions);\n\n return response as FindResponse<T>;\n }\n}\n"],"names":["BaseQuery","params","queryParams","ErrorMessages","QueryOperation","encodeQueryParams","getData"],"mappings":";;;;;;;;;;;AAMO,MAAM,cAAcA,mBAAU,CAAA;AAAA,EAGnC,YAAY,MAAuBC,EAAAA,OAAAA,EAAgBC,YAA0B,EAAA,QAAA,EAAmB,KAAc,QAAmC,EAAA;AAC/I,IAAM,KAAA,EAAA,CAAA;AAHR,IAAQ,aAAA,CAAA,IAAA,EAAA,iBAAA,CAAA,CAAA;AAIN,IAAA,IAAA,CAAK,OAAU,GAAA,MAAA,CAAA;AACf,IAAA,IAAA,CAAK,eAAkB,GAAA,GAAA,CAAA;AACvB,IAAK,IAAA,CAAA,QAAA,GAAW,CAAkB,eAAA,EAAA,IAAA,CAAK,eAAe,CAAA,QAAA,CAAA,CAAA;AACtD,IAAK,IAAA,CAAA,WAAA,GAAcD,WAAU,EAAC,CAAA;AAC9B,IAAK,IAAA,CAAA,YAAA,GAAeC,gBAAe,EAAC,CAAA;AACpC,IAAA,IAAA,CAAK,YAAY,QAAY,IAAA,EAAA,CAAA;AAE7B,IAAA,IAAI,CAAC,GAAK,EAAA;AACR,MAAA,IAAA,CAAK,QAAW,GAAA,CAAA,OAAA,CAAA,CAAA;AAAA,KAClB;AACA,IAAA,IAAI,QAAU,EAAA;AACZ,MAAA,IAAA,CAAK,cAAc,EAAE,GAAG,IAAK,CAAA,WAAA,EAAa,GAAG,QAAS,EAAA,CAAA;AAAA,KACxD;AAAA,GACF;AAAA;AAAA,EAEQ,oBAAoB,KAAwB,EAAA;AAClD,IAAA,MAAM,iBAAoB,GAAA,mBAAA,CAAA;AAC1B,IAAO,OAAA,iBAAA,CAAkB,KAAK,KAAK,CAAA,CAAA;AAAA,GACrC;AAAA;AAAA,EAGQ,oBAAoB,KAAwB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AAoB,IAAK,CAAA,SAAA;AAAA,OAC3B,CAAA;AAAA,KACF;AACA,IAAA,MAAM,WAAW,MAAMI,YAAA,CAAQ,KAAK,OAAS,EAAA,IAAA,CAAK,UAAU,iBAAiB,CAAA,CAAA;AAE7E,IAAO,OAAA,QAAA,CAAA;AAAA,GACT;AACF;;;;"}
@@ -1,12 +1,16 @@
1
- // src/lib/query.ts
2
- import { getData } from "@contentstack/core";
3
- import { BaseQuery } from "./base-query.js";
4
- import { QueryOperation } from "./types.js";
5
- import { encodeQueryParams } from "./utils.js";
6
- import { ErrorMessages } from "./error-messages.js";
7
- var Query = class extends BaseQuery {
1
+ import { getData } from '@contentstack/core';
2
+ import { BaseQuery } from './base-query.js';
3
+ import { QueryOperation } from '../common/types.js';
4
+ import { encodeQueryParams } from '../common/utils.js';
5
+ import { ErrorMessages } from '../common/error-messages.js';
6
+
7
+ var __defProp = Object.defineProperty;
8
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
10
+ class Query extends BaseQuery {
8
11
  constructor(client, params2, queryParams2, variants, uid, queryObj) {
9
12
  super();
13
+ __publicField(this, "_contentTypeUid");
10
14
  this._client = client;
11
15
  this._contentTypeUid = uid;
12
16
  this._urlPath = `/content_types/${this._contentTypeUid}/entries`;
@@ -25,9 +29,9 @@ var Query = class extends BaseQuery {
25
29
  const alphanumericRegex = /^[a-zA-Z0-9_.-]+$/;
26
30
  return alphanumericRegex.test(input);
27
31
  }
28
- // Validate if input matches any of the safe, pre-approved patterns
32
+ // Validate if input matches safe regex patterns
29
33
  isValidRegexPattern(input) {
30
- const validRegex = /^[a-zA-Z0-9|^$.*+?()[\]{}\\-]+$/;
34
+ const validRegex = /^[a-zA-Z0-9|^$.*+?()[\]{}:,;&@#%=/!'"_~<> -]+$/;
31
35
  if (!validRegex.test(input)) {
32
36
  return false;
33
37
  }
@@ -613,8 +617,7 @@ var Query = class extends BaseQuery {
613
617
  const response = await getData(this._client, this._urlPath, getRequestOptions);
614
618
  return response;
615
619
  }
616
- };
617
- export {
618
- Query
619
- };
620
- //# sourceMappingURL=query.js.map
620
+ }
621
+
622
+ export { Query };
623
+ //# sourceMappingURL=query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.js","sources":["../../../src/query/query.ts"],"sourcesContent":["import { AxiosInstance, getData } from '@contentstack/core';\nimport { BaseQuery } from './base-query';\nimport { BaseQueryParameters, QueryOperation, QueryOperator, TaxonomyQueryOperation, params, queryParams, FindResponse } from '../common/types';\nimport { encodeQueryParams } from '../common/utils';\nimport { ErrorMessages } from '../common/error-messages';\n\nexport class Query extends BaseQuery {\n private _contentTypeUid?: string;\n\n constructor(client: AxiosInstance, params: params, queryParams: queryParams, variants?: string, uid?: string, queryObj?: { [key: string]: any }) {\n super();\n this._client = client;\n this._contentTypeUid = uid;\n this._urlPath = `/content_types/${this._contentTypeUid}/entries`;\n this._parameters = params || {};\n this._queryParams = queryParams || {};\n this._variants = variants || '';\n\n if (!uid) {\n this._urlPath = `/assets`;\n }\n if (queryObj) {\n this._parameters = { ...this._parameters, ...queryObj };\n }\n }\n // Validate if input is alphanumeric \n private isValidAlphanumeric(input: string): boolean {\n const alphanumericRegex = /^[a-zA-Z0-9_.-]+$/;\n return alphanumericRegex.test(input);\n }\n\n // Validate if input matches safe regex patterns\n private isValidRegexPattern(input: string): boolean {\n // Expanded whitelist: includes spaces and common safe special characters\n // Allows: alphanumeric, regex metacharacters, regular spaces, and common punctuation\n // Blocks: control characters (newlines, tabs, null bytes), backticks, and other dangerous chars\n const validRegex = /^[a-zA-Z0-9|^$.*+?()[\\]{}:,;&@#%=/!'\"_~<> -]+$/;\n if (!validRegex.test(input)) {\n return false;\n }\n try {\n new RegExp(input);\n return true;\n } catch (e) {\n return false;\n }\n }\n\n private isValidValue(value: any[]): boolean {\n return Array.isArray(value) && value.every(item => typeof item === 'string' || typeof item === 'number' || typeof item === 'boolean');\n }\n\n /**\n * @method where\n * @memberof Query\n * @description Filters the results based on the specified criteria.\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const query = stack.contentType(\"contentTypeUid\").entry().query();\n * const result = await query.where(\"field_UID\", QueryOperation.IS_LESS_THAN, [\"field1\", \"field2\"]).find()\n * // OR\n * const asset = await stack.asset().query().where(\"field_UID\", QueryOperation.IS_LESS_THAN, [\"field1\", \"field2\"]).find()\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const query = stack.contentType(\"contentTypeUid\").entry().query();\n * const result = await query.where(\"field_UID\", QueryOperation.MATCHES, [\"field1\", \"field2\"]).find()\n * @returns {Query}\n */\n where(\n fieldUid: string,\n queryOperation: QueryOperation | TaxonomyQueryOperation,\n fields: string | string[] | number | number[] | object | boolean,\n additionalData?: object\n ): Query {\n if (!this.isValidAlphanumeric(fieldUid)) {\n console.error(ErrorMessages.INVALID_FIELD_UID);\n return this;\n }\n if (queryOperation == QueryOperation.EQUALS) {\n this._parameters[fieldUid] = fields;\n }\n else {\n const parameterValue: { [key in QueryOperation]?: string | string[] } = { [queryOperation]: fields, ...additionalData };\n this._parameters[fieldUid] = parameterValue;\n }\n return this;\n }\n\n /**\n * @method regex\n * @memberof Query\n * @description Retrieve entries that match the provided regular expressions\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const query = stack.contentType(\"contentTypeUid\").entry().query();\n * const result = await query.regex('title','^Demo').find()\n * // OR\n * const result = await query.regex('title','^Demo', 'i').find() // regex with options\n * @returns {Query}\n */\n regex(fieldUid: string, regexPattern: string, options?: string): Query {\n if (!this.isValidAlphanumeric(fieldUid)) {\n console.error(ErrorMessages.INVALID_FIELD_UID);\n return this;\n }\n if (!this.isValidRegexPattern(regexPattern)) {\n throw new Error(ErrorMessages.INVALID_REGEX_PATTERN);\n }\n else {\n this._parameters[fieldUid] = { $regex: regexPattern };\n if (options) this._parameters[fieldUid].$options = options;\n return this;\n }\n }\n\n /**\n * @method whereIn\n * @memberof Query\n * @description Get entries having values based on referenced fields.\n * The query retrieves all entries that satisfy the query conditions made on referenced fields\n * This method sets the '$in_query' parameter to a reference field UID and a query instance in the API request.\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const query = stack.contentType(\"contentTypeUid\").entry().query();\n * const subQuery = stack.contentType(\"referencedContentTypeUid\").entry().query().where(\"title\", QueryOperation.EQUALS, \"value\");\n * query.whereIn(\"brand\", subQuery)\n * const result = await query.find()\n *\n * @param {string} referenceUid - UID of the reference field to query.\n * @param {Query} queryInstance - The Query instance to include in the where clause.\n * @returns {Query} - Returns the Query instance for chaining.\n */\n whereIn(referenceUid: string, queryInstance: Query): Query {\n // eslint-disable-next-line @typescript-eslint/naming-convention, prettier/prettier\n if (!this.isValidAlphanumeric(referenceUid)) {\n throw new Error(ErrorMessages.INVALID_REFERENCE_UID(referenceUid));\n }\n this._parameters[referenceUid] = { '$in_query': queryInstance._parameters };\n return this;\n }\n\n /**\n * @method whereNotIn\n * @memberof Query\n * @description Get entries having values based on referenced fields.\n * This query works the opposite of $in_query and retrieves all entries that does not satisfy query conditions made on referenced fields.\n * This method sets the '$nin_query' parameter to a reference field UID and a query instance in the API request.\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const query = stack.contentType(\"contentTypeUid\").entry().query();\n * const subQuery = stack.contentType(\"referencedContentTypeUid\").entry().query().where(\"title\", QueryOperation.EQUALS, \"value\");\n * query.whereNotIn(\"brand\", subQuery)\n * const result = await query.find()\n *\n * @param {string} referenceUid - UID of the reference field to query.\n * @param {Query} queryInstance - The Query instance to include in the where clause.\n * @returns {Query} - Returns the Query instance for chaining.\n */\n whereNotIn(referenceUid: string, queryInstance: Query): Query {\n // eslint-disable-next-line @typescript-eslint/naming-convention, prettier/prettier\n if (!this.isValidAlphanumeric(referenceUid)) {\n throw new Error(ErrorMessages.INVALID_REFERENCE_UID(referenceUid));\n }\n this._parameters[referenceUid] = { '$nin_query': queryInstance._parameters };\n return this;\n }\n\n /**\n * @method queryOperator\n * @memberof Query\n * @description In case of '$and' get entries that satisfy all the conditions provided in the '$and' query and\n * in case of '$or' query get all entries that satisfy at least one of the given conditions provided in the '$or' query.\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const query = stack.contentType(\"contentType1Uid\").entry().query();\n * const subQuery1 = stack.contentType(\"contentType2Uid\").entry().query().where(\"price\", QueryOperation.IS_LESS_THAN, 90);\n * const subQuery2 = stack.contentType(\"contentType3Uid\").entry().query().where(\"discount\", QueryOperation.INCLUDES, [20, 45]);\n * query.queryOperator(QueryOperator.AND, subQuery1, subQuery2)\n * const result = await query.find()\n *\n * @param {QueryOperator} queryType - The type of query operator to apply.\n * @param {...Query[]} queryObjects - The Query instances to apply the query to.\n * @returns {Query} - Returns the Query instance for chaining.\n */\n queryOperator(queryType: QueryOperator, ...queryObjects: Query[]): Query {\n const paramsList: BaseQueryParameters[] = [];\n for (const queryItem of queryObjects) {\n paramsList.push(queryItem._parameters);\n }\n this._parameters[queryType] = paramsList;\n\n return this;\n }\n\n /**\n * @method getQuery\n * @memberof Query\n * @description Returns the raw (JSON) query based on the filters applied on Query object.\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const query = stack.contentType(\"contentTypeUid\").entry().query();\n * const result = query.getQuery()\n * // OR\n * const assetQuery = stack.asset().query();\n * const assetResult = assetQuery.getQuery()\n *\n * @returns {{ [key: string]: any }} The raw query object\n */\n getQuery(): { [key: string]: any } {\n return this._parameters;\n }\n\n /**\n * @method containedIn\n * @memberof Query\n * @description Filters entries where the field value is contained in the provided array of values\n * @param {string} key - The field UID to filter on\n * @param {(string | number | boolean)[]} value - Array of values to match against\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const query = stack.contentType(\"contentTypeUid\").entry().query();\n * const result = await query.containedIn('fieldUid', ['value1', 'value2']).find()\n * \n * @returns {Query}\n */\n containedIn(key: string, value: (string | number | boolean)[]): Query {\n if (!this.isValidAlphanumeric(key)) {\n console.error(ErrorMessages.INVALID_KEY);\n return this;\n }\n if (!this.isValidValue(value)) {\n console.error(ErrorMessages.INVALID_VALUE_ARRAY);\n return this;\n }\n this._parameters[key] = { '$in': value };\n return this;\n }\n\n /**\n * @method notContainedIn\n * @memberof Query\n * @description Filters entries where the field value is not contained in the provided array of values\n * @param {string} key - The field UID to filter on\n * @param {(string | number | boolean)[]} value - Array of values to exclude\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const query = stack.contentType(\"contentTypeUid\").entry().query();\n * const result = await query.notContainedIn('fieldUid', ['value1', 'value2']).find()\n * \n * @returns {Query}\n */\n notContainedIn(key: string, value: (string | number | boolean)[]): Query {\n if (!this.isValidAlphanumeric(key)) {\n console.error(ErrorMessages.INVALID_KEY);\n return this;\n }\n if (!this.isValidValue(value)) {\n console.error(ErrorMessages.INVALID_VALUE_ARRAY);\n return this;\n }\n this._parameters[key] = { '$nin': value };\n return this;\n }\n\n /**\n * @method exists\n * @memberof Query\n * @description Filters entries where the specified field exists\n * @param {string} key - The field UID to check for existence\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const query = stack.contentType(\"contentTypeUid\").entry().query();\n * const result = await query.exists('fieldUid').find()\n * \n * @returns {Query}\n */\n exists(key: string): Query {\n if (!this.isValidAlphanumeric(key)) {\n console.error(ErrorMessages.INVALID_KEY);\n return this;\n }\n this._parameters[key] = { '$exists': true };\n return this;\n }\n\n /**\n * @method notExists\n * @memberof Query\n * @description Filters entries where the specified field does not exist\n * @param {string} key - The field UID to check for non-existence\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const query = stack.contentType(\"contentTypeUid\").entry().query();\n * const result = await query.notExists('fieldUid').find()\n * \n * @returns {Query}\n */\n notExists(key: string): Query {\n if (!this.isValidAlphanumeric(key)) {\n console.error(ErrorMessages.INVALID_KEY);\n return this;\n }\n this._parameters[key] = { '$exists': false };\n return this;\n }\n\n /**\n * @method or\n * @memberof Query\n * @description Combines multiple queries with OR logic - returns entries that match at least one of the provided queries\n * @param {...Query} queries - Query instances to combine with OR logic\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const query1 = stack.contentType('contenttype_uid').entry().query().containedIn('fieldUID', ['value']);\n * const query2 = stack.contentType('contenttype_uid').entry().query().where('fieldUID', QueryOperation.EQUALS, 'value2');\n * const result = await stack.contentType('contenttype_uid').entry().query().or(query1, query2).find();\n * \n * @returns {Query}\n */\n or(...queries: Query[]): Query {\n const paramsList: BaseQueryParameters[] = [];\n for (const queryItem of queries) {\n paramsList.push(queryItem._parameters);\n }\n this._parameters.$or = paramsList;\n return this;\n }\n\n /**\n * @method and\n * @memberof Query\n * @description Combines multiple queries with AND logic - returns entries that match all of the provided queries\n * @param {...Query} queries - Query instances to combine with AND logic\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const query1 = stack.contentType('contenttype_uid').entry().query().containedIn('fieldUID', ['value']);\n * const query2 = stack.contentType('contenttype_uid').entry().query().where('fieldUID', QueryOperation.EQUALS, 'value2');\n * const result = await stack.contentType('contenttype_uid').entry().query().and(query1, query2).find();\n * \n * @returns {Query}\n */\n and(...queries: Query[]): Query {\n const paramsList: BaseQueryParameters[] = [];\n for (const queryItem of queries) {\n paramsList.push(queryItem._parameters);\n }\n this._parameters.$and = paramsList;\n return this;\n }\n\n /**\n * @method equalTo\n * @memberof Query\n * @description Filters entries where the field value equals the specified value\n * @param {string} key - The field UID to filter on\n * @param {string | number | boolean} value - The value to match\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const result = await stack.contentType('contenttype_uid').entry().query().equalTo('fieldUid', 'value').find();\n * \n * @returns {Query}\n */\n equalTo(key: string, value: string | number | boolean): Query {\n if (!this.isValidAlphanumeric(key)) {\n console.error(ErrorMessages.INVALID_KEY);\n return this;\n }\n if (typeof value !== 'string' && typeof value !== 'number') {\n console.error(ErrorMessages.INVALID_VALUE_STRING_OR_NUMBER);\n return this;\n }\n this._parameters[key] = value;\n return this;\n }\n\n /**\n * @method notEqualTo\n * @memberof Query\n * @description Filters entries where the field value does not equal the specified value\n * @param {string} key - The field UID to filter on\n * @param {string | number | boolean} value - The value to exclude\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const result = await stack.contentType('contenttype_uid').entry().query().notEqualTo('fieldUid', 'value').find();\n * \n * @returns {Query}\n */\n notEqualTo(key: string, value: string | number | boolean): Query {\n if (!this.isValidAlphanumeric(key)) {\n console.error(ErrorMessages.INVALID_KEY);\n return this;\n }\n if (typeof value !== 'string' && typeof value !== 'number') {\n console.error(ErrorMessages.INVALID_VALUE_STRING_OR_NUMBER);\n return this;\n }\n this._parameters[key] = { '$ne': value };\n return this;\n }\n\n /**\n * @method referenceIn\n * @memberof Query\n * @description Filters entries where the reference field matches entries from the provided query\n * @param {string} key - The reference field UID to filter on\n * @param {Query} query - Query instance to match referenced entries against\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const subQuery = stack.contentType('contenttype_uid').entry().query().where('title', QueryOperation.EQUALS, 'value');\n * const result = await stack.contentType('contenttype_uid').entry().query().referenceIn('reference_uid', subQuery).find();\n * \n * @returns {Query}\n */\n referenceIn(key: string, query: Query): Query {\n if (!this.isValidAlphanumeric(key)) {\n console.error(ErrorMessages.INVALID_KEY);\n return this;\n }\n this._parameters[key] = { '$in_query': query._parameters }\n return this;\n }\n\n /**\n * @method referenceNotIn\n * @memberof Query\n * @description Filters entries where the reference field does not match entries from the provided query\n * @param {string} key - The reference field UID to filter on\n * @param {Query} query - Query instance to exclude referenced entries against\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const subQuery = stack.contentType('contenttype_uid').entry().query().where('title', QueryOperation.EQUALS, 'value');\n * const result = await stack.contentType('contenttype_uid').entry().query().referenceNotIn('reference_uid', subQuery).find();\n * \n * @returns {Query}\n */\n referenceNotIn(key: string, query: Query): Query {\n if (!this.isValidAlphanumeric(key)) {\n console.error(ErrorMessages.INVALID_KEY);\n return this;\n }\n this._parameters[key] = { '$nin_query': query._parameters }\n return this;\n }\n\n /**\n * @method tags\n * @memberof Query\n * @description Filters entries that have any of the specified tags\n * @param {(string | number | boolean)[]} values - Array of tag values to filter by\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const result = await stack.contentType('contenttype_uid').entry().query().tags(['tag1']).find();\n * \n * @returns {Query}\n */\n tags(values: (string | number | boolean)[]): Query {\n if (!this.isValidValue(values)) {\n console.error(ErrorMessages.INVALID_VALUE_ARRAY);\n return this;\n }\n this._parameters['tags'] = values;\n return this;\n }\n\n /**\n * @method search\n * @memberof Query\n * @description Enables typeahead search functionality for the query\n * @param {string} key - The search term to use for typeahead search\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const result = await stack.contentType('contenttype_uid').entry().query().search('key').find();\n * \n * @returns {Query}\n */\n search(key: string): Query {\n if (!this.isValidAlphanumeric(key)) {\n console.error(ErrorMessages.INVALID_KEY);\n return this;\n }\n this._queryParams['typeahead'] = key\n return this\n }\n\n /**\n * @method lessThan\n * @memberof Query\n * @description Filters entries where the field value is less than the specified value\n * @param {string} key - The field UID to filter on\n * @param {string | number} value - The value to compare against\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const result = await stack.contentType('contenttype_uid').entry().query().lessThan('fieldUid', 100).find();\n * \n * @returns {Query}\n */\n lessThan(key: string, value: (string | number)): Query {\n if (!this.isValidAlphanumeric(key)) {\n console.error(ErrorMessages.INVALID_KEY);\n return this;\n }\n if (typeof value !== 'string' && typeof value !== 'number') {\n console.error(ErrorMessages.INVALID_VALUE_STRING_OR_NUMBER);\n return this;\n }\n\n this._parameters[key] = { '$lt': value };\n return this;\n }\n\n /**\n * @method lessThanOrEqualTo\n * @memberof Query\n * @description Filters entries where the field value is less than or equal to the specified value\n * @param {string} key - The field UID to filter on\n * @param {string | number} value - The value to compare against\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const result = await stack.contentType('contenttype_uid').entry().query().lessThanOrEqualTo('fieldUid', 100).find();\n * \n * @returns {Query}\n */\n lessThanOrEqualTo(key: string, value: (string | number)): Query {\n if (!this.isValidAlphanumeric(key)) {\n console.error(ErrorMessages.INVALID_KEY);\n return this;\n }\n if (typeof value !== 'string' && typeof value !== 'number') {\n console.error(ErrorMessages.INVALID_VALUE_STRING_OR_NUMBER);\n return this;\n }\n this._parameters[key] = { '$lte': value };\n return this;\n }\n\n /**\n * @method greaterThan\n * @memberof Query\n * @description Filters entries where the field value is greater than the specified value\n * @param {string} key - The field UID to filter on\n * @param {string | number} value - The value to compare against\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const result = await stack.contentType('contenttype_uid').entry().query().greaterThan('fieldUid', 100).find();\n * \n * @returns {Query}\n */\n greaterThan(key: string, value: (string | number)): Query {\n if (!this.isValidAlphanumeric(key)) {\n console.error(ErrorMessages.INVALID_KEY);\n return this;\n }\n if (typeof value !== 'string' && typeof value !== 'number') {\n console.error(ErrorMessages.INVALID_VALUE_STRING_OR_NUMBER);\n return this;\n }\n this._parameters[key] = { '$gt': value };\n return this;\n }\n\n /**\n * @method greaterThanOrEqualTo\n * @memberof Query\n * @description Filters entries where the field value is greater than or equal to the specified value\n * @param {string} key - The field UID to filter on\n * @param {string | number} value - The value to compare against\n * @example\n * import contentstack from '@contentstack/delivery-sdk'\n *\n * const stack = contentstack.stack({ apiKey: \"apiKey\", deliveryToken: \"deliveryToken\", environment: \"environment\" });\n * const result = await stack.contentType('contenttype_uid').entry().query().greaterThanOrEqualTo('fieldUid', 100).find();\n * \n * @returns {Query}\n */\n greaterThanOrEqualTo(key: string, value: (string | number)): Query {\n if (!this.isValidAlphanumeric(key)) {\n console.error(ErrorMessages.INVALID_KEY);\n return this;\n }\n if (typeof value !== 'string' && typeof value !== 'number') {\n console.error(ErrorMessages.INVALID_VALUE_STRING_OR_NUMBER);\n return this;\n }\n this._parameters[key] = { '$gte': value };\n return this;\n }\n\n /**\n * Override find method to include content type UID directly for better caching\n */\n override async find<T>(encode: boolean = false): Promise<FindResponse<T>> {\n let requestParams: { [key: string]: any } = this._queryParams;\n\n if (Object.keys(this._parameters).length > 0) {\n let queryParams = { ...this._parameters };\n \n if (encode) {\n queryParams = encodeQueryParams(queryParams);\n }\n \n requestParams = { ...this._queryParams, query: queryParams };\n }\n\n const getRequestOptions: any = { \n params: requestParams,\n // Add contentTypeUid directly for improved caching\n contentTypeUid: this._contentTypeUid\n };\n\n if (this._variants) {\n getRequestOptions.headers = {\n ...getRequestOptions.headers,\n 'x-cs-variant-uid': this._variants\n };\n }\n const response = await getData(this._client, this._urlPath, getRequestOptions);\n\n return response as FindResponse<T>;\n }\n}\n"],"names":["params","queryParams"],"mappings":";;;;;;;;;AAMO,MAAM,cAAc,SAAU,CAAA;AAAA,EAGnC,YAAY,MAAuBA,EAAAA,OAAAA,EAAgBC,YAA0B,EAAA,QAAA,EAAmB,KAAc,QAAmC,EAAA;AAC/I,IAAM,KAAA,EAAA,CAAA;AAHR,IAAQ,aAAA,CAAA,IAAA,EAAA,iBAAA,CAAA,CAAA;AAIN,IAAA,IAAA,CAAK,OAAU,GAAA,MAAA,CAAA;AACf,IAAA,IAAA,CAAK,eAAkB,GAAA,GAAA,CAAA;AACvB,IAAK,IAAA,CAAA,QAAA,GAAW,CAAkB,eAAA,EAAA,IAAA,CAAK,eAAe,CAAA,QAAA,CAAA,CAAA;AACtD,IAAK,IAAA,CAAA,WAAA,GAAcD,WAAU,EAAC,CAAA;AAC9B,IAAK,IAAA,CAAA,YAAA,GAAeC,gBA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A,IAAI,MAAQ,EAAA;AACV,QAAAA,YAAAA,GAAc,kBAAkBA,YAAW,CAAA,CAAA;AAAA,OAC7C;AAEA,MAAA,aAAA,GAAgB,EAAE,GAAG,IAAK,CAAA,YAAA,EAAc,OAAOA,YAAY,EAAA,CAAA;AAAA,KAC7D;AAEA,IAAA,MAAM,iBAAyB,GAAA;AAAA,MAC7B,MAAQ,EAAA,aAAA;AAAA;AAAA,MAER,gBAAgB,IAAK,CAAA,eAAA;AAAA,KACvB,CAAA;AAEA,IAAA,IAAI,KAAK,SAAW,EAAA;AAClB,MAAA,iBAAA,CAAkB,OAAU,GAAA;AAAA,QAC1B,GAAG,iBAAkB,CAAA,OAAA;AAAA,QACrB,oBAAoB,IAAK,CAAA,SAAA;AAAA,OAC3B,CAAA;AAAA,KACF;AACA,IAAA,MAAM,WAAW,MAAM,OAAA,CAAQ,KAAK,OAAS,EAAA,IAAA,CAAK,UAAU,iBAAiB,CAAA,CAAA;AAE7E,IAAO,OAAA,QAAA,CAAA;AAAA,GACT;AACF;;;;"}
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var query = require('./query.cjs');
4
+
5
+ class TaxonomyQuery extends query.Query {
6
+ constructor(client) {
7
+ super(client, {}, {});
8
+ this._client = client;
9
+ this._urlPath = `/taxonomies/entries`;
10
+ }
11
+ }
12
+
13
+ exports.TaxonomyQuery = TaxonomyQuery;
14
+ //# sourceMappingURL=taxonomy-query.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taxonomy-query.cjs","sources":["../../../src/query/taxonomy-query.ts"],"sourcesContent":["import { Query } from \"./query\";\nimport { AxiosInstance } from \"@contentstack/core\";\n\nexport class TaxonomyQuery extends Query {\n constructor(client: AxiosInstance) {\n super(client, {}, {}); // will need make changes to Query class so that CT uid is not mandatory\n this._client = client;\n this._urlPath = `/taxonomies/entries`;\n }\n};\n"],"names":["Query"],"mappings":";;;;AAGO,MAAM,sBAAsBA,WAAM,CAAA;AAAA,EACrC,YAAY,MAAuB,EAAA;AAC/B,IAAA,KAAA,CAAM,MAAQ,EAAA,EAAI,EAAA,EAAE,CAAA,CAAA;AACpB,IAAA,IAAA,CAAK,OAAU,GAAA,MAAA,CAAA;AACf,IAAA,IAAA,CAAK,QAAW,GAAA,CAAA,mBAAA,CAAA,CAAA;AAAA,GACpB;AACJ;;;;"}
@@ -0,0 +1,12 @@
1
+ import { Query } from './query.js';
2
+
3
+ class TaxonomyQuery extends Query {
4
+ constructor(client) {
5
+ super(client, {}, {});
6
+ this._client = client;
7
+ this._urlPath = `/taxonomies/entries`;
8
+ }
9
+ }
10
+
11
+ export { TaxonomyQuery };
12
+ //# sourceMappingURL=taxonomy-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taxonomy-query.js","sources":["../../../src/query/taxonomy-query.ts"],"sourcesContent":["import { Query } from \"./query\";\nimport { AxiosInstance } from \"@contentstack/core\";\n\nexport class TaxonomyQuery extends Query {\n constructor(client: AxiosInstance) {\n super(client, {}, {}); // will need make changes to Query class so that CT uid is not mandatory\n this._client = client;\n this._urlPath = `/taxonomies/entries`;\n }\n};\n"],"names":[],"mappings":";;AAGO,MAAM,sBAAsB,KAAM,CAAA;AAAA,EACrC,YAAY,MAAuB,EAAA;AAC/B,IAAA,KAAA,CAAM,MAAQ,EAAA,EAAI,EAAA,EAAE,CAAA,CAAA;AACpB,IAAA,IAAA,CAAK,OAAU,GAAA,MAAA,CAAA;AACf,IAAA,IAAA,CAAK,QAAW,GAAA,CAAA,mBAAA,CAAA,CAAA;AAAA,GACpB;AACJ;;;;"}