@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
@@ -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,EAC3B,eAAA,CAAA;AAAA,EAER,YAAY,MAAuBC,EAAAA,OAAAA,EAAgBC,YAA0B,EAAA,QAAA,EAAmB,KAAc,QAAmC,EAAA;AAC/I,IAAM,KAAA,EAAA,CAAA;AACN,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,GAAe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A,IAAID,YAAc,GAAA,EAAE,GAAG,IAAA,CAAK,WAAY,EAAA,CAAA;AAExC,MAAA,IAAI,MAAQ,EAAA;AACV,QAAAA,YAAAA,GAAcG,wBAAkBH,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,MAAMI,YAAA,CAAQ,KAAK,OAAS,EAAA,IAAA,CAAK,UAAU,iBAAiB,CAAA,CAAA;AAE7E,IAAO,OAAA,QAAA,CAAA;AAAA,GACT;AACF;;;;"}
@@ -1,8 +1,7 @@
1
1
  import { AxiosInstance } from '@contentstack/core';
2
- import { Pagination } from './lib/pagination.js';
3
- import { params, queryParams, QueryOperation, TaxonomyQueryOperation, QueryOperator, FindResponse } from './lib/types.js';
4
-
5
- declare class Query extends BaseQuery {
2
+ import { BaseQuery } from './base-query';
3
+ import { QueryOperation, QueryOperator, TaxonomyQueryOperation, params, queryParams, FindResponse } from '../common/types';
4
+ export declare class Query extends BaseQuery {
6
5
  private _contentTypeUid?;
7
6
  constructor(client: AxiosInstance, params: params, queryParams: queryParams, variants?: string, uid?: string, queryObj?: {
8
7
  [key: string]: any;
@@ -374,175 +373,4 @@ declare class Query extends BaseQuery {
374
373
  */
375
374
  find<T>(encode?: boolean): Promise<FindResponse<T>>;
376
375
  }
377
-
378
- declare class BaseQuery extends Pagination {
379
- _parameters: params;
380
- protected _client: AxiosInstance;
381
- protected _urlPath: string;
382
- protected _variants: string;
383
- /**
384
- * Helper method to cast this instance to Query type
385
- * @private
386
- */
387
- protected asQuery(): Query;
388
- /**
389
- * @method includeCount
390
- * @memberof BaseQuery
391
- * @description Retrieve count and data of objects in result
392
- * @example
393
- * import contentstack from '@contentstack/delivery-sdk'
394
- *
395
- * const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
396
- * const query = stack.contentType("contentTypeUid").entry().query();
397
- * const result = await query.includeCount().find()
398
- * // OR
399
- * const asset = await stack.asset().includeCount().find()
400
- *
401
- * @returns {Query}
402
- */
403
- includeCount(): Query;
404
- /**
405
- * @method orderByAscending
406
- * @memberof BaseQuery
407
- * @description Sorts the results in ascending order based on the specified field UID.
408
- * @example
409
- * import contentstack from '@contentstack/delivery-sdk'
410
- *
411
- * const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
412
- * const query = stack.contentType("contentTypeUid").entry().query();
413
- * const result = await query.orderByAscending("field_uid").find()
414
- * // OR
415
- * const asset = await stack.asset().orderByAscending("field_uid").find()
416
- *
417
- * @returns {Query}
418
- */
419
- orderByAscending(key: string): Query;
420
- /**
421
- * @method orderByDescending
422
- * @memberof BaseQuery
423
- * @description Sorts the results in descending order based on the specified key.
424
- * @example
425
- * import contentstack from '@contentstack/delivery-sdk'
426
- *
427
- * const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
428
- * const query = stack.contentType("contentTypeUid").entry().query();
429
- * const result = await query.orderByDescending("field_uid").find()
430
- * // OR
431
- * const asset = await stack.asset().orderByDescending("field_uid").find()
432
- *
433
- * @returns {Query}
434
- */
435
- orderByDescending(key: string): Query;
436
- /**
437
- * @method limit
438
- * @memberof BaseQuery
439
- * @description Returns a specific number of entries based on the set limit
440
- * @example
441
- * import contentstack from '@contentstack/delivery-sdk'
442
- *
443
- * const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
444
- * const query = stack.contentType("contentTypeUid").entry().query();
445
- * const result = await query.limit(10).find()
446
- * // OR
447
- * const asset = await stack.asset().limit(5).find()
448
- *
449
- * @returns {Query}
450
- */
451
- limit(key: number): Query;
452
- /**
453
- * @method skip
454
- * @memberof BaseQuery
455
- * @description Skips at specific number of entries.
456
- * @example
457
- * import contentstack from '@contentstack/delivery-sdk'
458
- *
459
- * const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
460
- * const query = stack.contentType("contentTypeUid").entry().query();
461
- * const result = await query.skip(10).find()
462
- * // OR
463
- * const asset = await stack.asset().skip(5).find()
464
- *
465
- * @returns {Query}
466
- */
467
- skip(key: number): Query;
468
- /**
469
- * @method param
470
- * @memberof BaseQuery
471
- * @description Adds query parameters to the URL.
472
- * @example
473
- * import contentstack from '@contentstack/delivery-sdk'
474
- *
475
- * const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
476
- * const query = stack.contentType("contentTypeUid").entry().query();
477
- * const result = await query.param("key", "value").find()
478
- * // OR
479
- * const asset = await stack.asset().param("key", "value").find()
480
- *
481
- * @returns {Query}
482
- */
483
- param(key: string, value: string | number): Query;
484
- /**
485
- * @method addParams
486
- * @memberof BaseQuery
487
- * @description Adds a query parameter to the query.
488
- * @example
489
- * import contentstack from '@contentstack/delivery-sdk'
490
- *
491
- * const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
492
- * const query = stack.contentType("contentTypeUid").entry().query();
493
- * const result = await query.addParams({"key": "value"}).find()
494
- * // OR
495
- * const asset = await stack.asset().addParams({"key": "value"}).find()
496
- *
497
- * @returns {Query}
498
- */
499
- addParams(paramObj: {
500
- [key: string]: string | boolean | number;
501
- }): Query;
502
- /**
503
- * @method removeParam
504
- * @memberof BaseQuery
505
- * @description Removes a query parameter from the query.
506
- * @example
507
- * import contentstack from '@contentstack/delivery-sdk'
508
- *
509
- * const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
510
- * const query = stack.contentType("contentTypeUid").entry().query();
511
- * const result = await query.removeParam("query_param_key").find()
512
- * // OR
513
- * const asset = await stack.asset().removeParam("query_param_key").find()
514
- *
515
- * @returns {Query}
516
- */
517
- removeParam(key: string): Query;
518
- /**
519
- * @method find
520
- * @memberof BaseQuery
521
- * @description Fetches the data based on the query parameters
522
- * @param {boolean} encode - Whether to encode query parameters
523
- * @returns {Promise<FindResponse<T>>} Promise that resolves to the find response
524
- * @example
525
- * import contentstack from '@contentstack/delivery-sdk'
526
- *
527
- * const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
528
- * const result = await stack.asset().find();
529
- * @example
530
- * import contentstack from '@contentstack/delivery-sdk'
531
- *
532
- * const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
533
- * const result = await stack.contentType("contentType1Uid").entry().query().find();
534
- * @example
535
- * import contentstack from '@contentstack/delivery-sdk'
536
- *
537
- * const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
538
- * const result = await stack.contentType("contentTypeUid").entry().query().find();
539
- */
540
- find<T>(encode?: boolean): Promise<FindResponse<T>>;
541
- /**
542
- * Extracts content type UID from the URL path
543
- * @returns content type UID if found, null otherwise
544
- */
545
- private extractContentTypeUidFromUrl;
546
- }
547
-
548
- export { BaseQuery as B, Query as Q };
376
+ //# sourceMappingURL=query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/query/query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAW,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAuB,cAAc,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM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;IAS1B;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,KAAK;IActD;;;;;;;;;;;;;OAaG;IACH,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,KAAK;IAa/D;;;;;;;;;;;;;OAaG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,KAAK;IAazD;;;;;;;;;;;;;OAaG;IACH,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,KAAK;IAalE;;OAEG;IACY,IAAI,CAAC,CAAC,EAAE,MAAM,GAAE,OAAe,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;CA6B1E"}
@@ -1,10 +1,11 @@
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
+ class Query extends BaseQuery {
8
+ _contentTypeUid;
8
9
  constructor(client, params2, queryParams2, variants, uid, queryObj) {
9
10
  super();
10
11
  this._client = client;
@@ -25,9 +26,9 @@ var Query = class extends BaseQuery {
25
26
  const alphanumericRegex = /^[a-zA-Z0-9_.-]+$/;
26
27
  return alphanumericRegex.test(input);
27
28
  }
28
- // Validate if input matches any of the safe, pre-approved patterns
29
+ // Validate if input matches safe regex patterns
29
30
  isValidRegexPattern(input) {
30
- const validRegex = /^[a-zA-Z0-9|^$.*+?()[\]{}\\-]+$/;
31
+ const validRegex = /^[a-zA-Z0-9|^$.*+?()[\]{}:,;&@#%=/!'"_~<> -]+$/;
31
32
  if (!validRegex.test(input)) {
32
33
  return false;
33
34
  }
@@ -613,8 +614,7 @@ var Query = class extends BaseQuery {
613
614
  const response = await getData(this._client, this._urlPath, getRequestOptions);
614
615
  return response;
615
616
  }
616
- };
617
- export {
618
- Query
619
- };
620
- //# sourceMappingURL=query.js.map
617
+ }
618
+
619
+ export { Query };
620
+ //# 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,EAC3B,eAAA,CAAA;AAAA,EAER,YAAY,MAAuBA,EAAAA,OAAAA,EAAgBC,YAA0B,EAAA,QAAA,EAAmB,KAAc,QAAmC,EAAA;AAC/I,IAAM,KAAA,EAAA,CAAA;AACN,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,C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WAAW,CAAA,CAAE,SAAS,CAAG,EAAA;AAC5C,MAAA,IAAIA,YAAc,GAAA,EAAE,GAAG,IAAA,CAAK,WAAY,EAAA,CAAA;AAExC,MAAA,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,6 @@
1
+ import { Query } from "./query";
2
+ import { AxiosInstance } from "@contentstack/core";
3
+ export declare class TaxonomyQuery extends Query {
4
+ constructor(client: AxiosInstance);
5
+ }
6
+ //# sourceMappingURL=taxonomy-query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taxonomy-query.d.ts","sourceRoot":"","sources":["../../../src/query/taxonomy-query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,qBAAa,aAAc,SAAQ,KAAK;gBACxB,MAAM,EAAE,aAAa;CAKpC"}
@@ -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;;;;"}