@contentstack/delivery-sdk 4.11.2 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (549) hide show
  1. package/README.md +31 -2
  2. package/dist/{modern/lib → legacy/assets}/asset.cjs +15 -34
  3. package/dist/legacy/assets/asset.cjs.map +1 -0
  4. package/dist/legacy/{lib/asset.cjs → assets/asset.js} +13 -34
  5. package/dist/legacy/assets/asset.js.map +1 -0
  6. package/dist/{modern/lib/cache.cjs → legacy/cache/index.cjs} +14 -35
  7. package/dist/legacy/cache/index.cjs.map +1 -0
  8. package/dist/legacy/{lib/cache.js → cache/index.js} +10 -8
  9. package/dist/legacy/cache/index.js.map +1 -0
  10. package/dist/legacy/{lib → common}/error-messages.cjs +8 -34
  11. package/dist/legacy/common/error-messages.cjs.map +1 -0
  12. package/dist/legacy/{lib → common}/error-messages.js +6 -9
  13. package/dist/legacy/common/error-messages.js.map +1 -0
  14. package/dist/{modern/lib → legacy/common}/pagination.cjs +10 -32
  15. package/dist/legacy/common/pagination.cjs.map +1 -0
  16. package/dist/legacy/{lib/pagination.cjs → common/pagination.js} +10 -34
  17. package/dist/legacy/common/pagination.js.map +1 -0
  18. package/dist/legacy/common/string-extensions.cjs +11 -0
  19. package/dist/legacy/common/string-extensions.cjs.map +1 -0
  20. package/dist/legacy/{lib → common}/string-extensions.js +1 -2
  21. package/dist/legacy/common/string-extensions.js.map +1 -0
  22. package/dist/legacy/{lib → common}/types.cjs +17 -55
  23. package/dist/legacy/common/types.cjs.map +1 -0
  24. package/dist/legacy/{lib → common}/types.js +3 -18
  25. package/dist/legacy/common/types.js.map +1 -0
  26. package/dist/legacy/common/utils.cjs +29 -0
  27. package/dist/legacy/common/utils.cjs.map +1 -0
  28. package/dist/legacy/{lib → common}/utils.js +7 -10
  29. package/dist/legacy/common/utils.js.map +1 -0
  30. package/dist/legacy/content-type/index.cjs +43 -0
  31. package/dist/legacy/content-type/index.cjs.map +1 -0
  32. package/dist/legacy/content-type/index.js +41 -0
  33. package/dist/legacy/content-type/index.js.map +1 -0
  34. package/dist/legacy/{lib → entries}/entries.cjs +21 -41
  35. package/dist/legacy/entries/entries.cjs.map +1 -0
  36. package/dist/{modern/lib → legacy/entries}/entries.js +15 -12
  37. package/dist/legacy/entries/entries.js.map +1 -0
  38. package/dist/{modern/lib → legacy/entries}/entry.cjs +20 -36
  39. package/dist/legacy/entries/entry.cjs.map +1 -0
  40. package/dist/legacy/{lib/entry.cjs → entries/entry.js} +18 -36
  41. package/dist/legacy/entries/entry.js.map +1 -0
  42. package/dist/{modern/lib/global-field.cjs → legacy/global-field/index.cjs} +15 -34
  43. package/dist/legacy/global-field/index.cjs.map +1 -0
  44. package/dist/legacy/{lib/global-field.cjs → global-field/index.js} +13 -34
  45. package/dist/legacy/global-field/index.js.map +1 -0
  46. package/dist/legacy/index.cjs +28 -48
  47. package/dist/legacy/index.cjs.map +1 -1
  48. package/dist/legacy/index.js +9 -11
  49. package/dist/legacy/index.js.map +1 -1
  50. package/dist/legacy/{lib → query}/asset-query.cjs +10 -34
  51. package/dist/legacy/query/asset-query.cjs.map +1 -0
  52. package/dist/{modern/lib → legacy/query}/asset-query.js +8 -9
  53. package/dist/legacy/query/asset-query.js.map +1 -0
  54. package/dist/{modern/lib → legacy/query}/base-query.cjs +20 -37
  55. package/dist/legacy/query/base-query.cjs.map +1 -0
  56. package/dist/legacy/{lib/base-query.cjs → query/base-query.js} +18 -37
  57. package/dist/legacy/query/base-query.js.map +1 -0
  58. package/dist/legacy/query/contenttype-query.cjs +51 -0
  59. package/dist/legacy/query/contenttype-query.cjs.map +1 -0
  60. package/dist/legacy/query/contenttype-query.js +49 -0
  61. package/dist/legacy/query/contenttype-query.js.map +1 -0
  62. package/dist/legacy/query/global-field-query.cjs +30 -0
  63. package/dist/legacy/query/global-field-query.cjs.map +1 -0
  64. package/dist/{modern/lib → legacy/query}/global-field-query.js +7 -8
  65. package/dist/legacy/query/global-field-query.js.map +1 -0
  66. package/dist/legacy/{lib → query}/query.cjs +48 -68
  67. package/dist/legacy/query/query.cjs.map +1 -0
  68. package/dist/{modern/lib → legacy/query}/query.js +17 -14
  69. package/dist/legacy/query/query.js.map +1 -0
  70. package/dist/legacy/query/taxonomy-query.cjs +14 -0
  71. package/dist/legacy/query/taxonomy-query.cjs.map +1 -0
  72. package/dist/legacy/query/taxonomy-query.js +12 -0
  73. package/dist/legacy/query/taxonomy-query.js.map +1 -0
  74. package/dist/{modern/lib → legacy/stack}/contentstack.cjs +44 -56
  75. package/dist/legacy/stack/contentstack.cjs.map +1 -0
  76. package/dist/{modern/lib → legacy/stack}/contentstack.js +19 -16
  77. package/dist/legacy/stack/contentstack.js.map +1 -0
  78. package/dist/legacy/stack/index.cjs +11 -0
  79. package/dist/legacy/stack/index.cjs.map +1 -0
  80. package/dist/legacy/stack/index.js +7 -0
  81. package/dist/legacy/stack/index.js.map +1 -0
  82. package/dist/{modern/lib → legacy/stack}/stack.cjs +30 -49
  83. package/dist/legacy/stack/stack.cjs.map +1 -0
  84. package/dist/legacy/{lib → stack}/stack.js +20 -16
  85. package/dist/legacy/stack/stack.js.map +1 -0
  86. package/dist/legacy/sync/synchronization.cjs +30 -0
  87. package/dist/legacy/sync/synchronization.cjs.map +1 -0
  88. package/dist/{modern/lib → legacy/sync}/synchronization.js +11 -13
  89. package/dist/legacy/sync/synchronization.js.map +1 -0
  90. package/dist/modern/{lib/asset.js → assets/asset.cjs} +13 -10
  91. package/dist/modern/assets/asset.cjs.map +1 -0
  92. package/dist/modern/{lib → assets}/asset.d.ts +2 -4
  93. package/dist/modern/assets/asset.d.ts.map +1 -0
  94. package/dist/{legacy/lib → modern/assets}/asset.js +10 -9
  95. package/dist/modern/assets/asset.js.map +1 -0
  96. package/dist/modern/{lib/string-extensions.d.ts → assets/image-transform.d.ts} +3 -16
  97. package/dist/modern/assets/image-transform.d.ts.map +1 -0
  98. package/dist/modern/assets/index.d.ts +3 -0
  99. package/dist/modern/assets/index.d.ts.map +1 -0
  100. package/dist/{legacy/lib/cache.cjs → modern/cache/index.cjs} +14 -35
  101. package/dist/modern/cache/index.cjs.map +1 -0
  102. package/dist/{legacy/lib/cache.d.ts → modern/cache/index.d.ts} +3 -10
  103. package/dist/modern/cache/index.d.ts.map +1 -0
  104. package/dist/modern/{lib/cache.js → cache/index.js} +10 -8
  105. package/dist/modern/cache/index.js.map +1 -0
  106. package/dist/modern/{lib → common}/error-messages.cjs +8 -34
  107. package/dist/modern/common/error-messages.cjs.map +1 -0
  108. package/dist/{legacy/lib → modern/common}/error-messages.d.ts +4 -5
  109. package/dist/modern/common/error-messages.d.ts.map +1 -0
  110. package/dist/modern/{lib → common}/error-messages.js +6 -9
  111. package/dist/modern/common/error-messages.js.map +1 -0
  112. package/dist/{legacy/lib/pagination.js → modern/common/pagination.cjs} +10 -12
  113. package/dist/modern/common/pagination.cjs.map +1 -0
  114. package/dist/{legacy/lib → modern/common}/pagination.d.ts +3 -10
  115. package/dist/modern/common/pagination.d.ts.map +1 -0
  116. package/dist/modern/{lib → common}/pagination.js +6 -10
  117. package/dist/modern/common/pagination.js.map +1 -0
  118. package/dist/modern/common/string-extensions.cjs +11 -0
  119. package/dist/modern/common/string-extensions.cjs.map +1 -0
  120. package/dist/modern/common/string-extensions.d.ts +8 -0
  121. package/dist/modern/common/string-extensions.d.ts.map +1 -0
  122. package/dist/modern/{lib → common}/string-extensions.js +1 -2
  123. package/dist/modern/common/string-extensions.js.map +1 -0
  124. package/dist/modern/{lib → common}/types.cjs +17 -55
  125. package/dist/modern/common/types.cjs.map +1 -0
  126. package/dist/{legacy/lib → modern/common}/types.d.ts +60 -41
  127. package/dist/modern/common/types.d.ts.map +1 -0
  128. package/dist/modern/{lib → common}/types.js +3 -18
  129. package/dist/modern/common/types.js.map +1 -0
  130. package/dist/modern/common/utils.cjs +29 -0
  131. package/dist/modern/common/utils.cjs.map +1 -0
  132. package/dist/modern/common/utils.d.ts +14 -0
  133. package/dist/modern/common/utils.d.ts.map +1 -0
  134. package/dist/modern/{lib → common}/utils.js +7 -10
  135. package/dist/modern/common/utils.js.map +1 -0
  136. package/dist/{legacy/lib/content-type.js → modern/content-type/index.cjs} +18 -14
  137. package/dist/modern/content-type/index.cjs.map +1 -0
  138. package/dist/{legacy/lib/content-type.d.ts → modern/content-type/index.d.ts} +4 -13
  139. package/dist/modern/content-type/index.d.ts.map +1 -0
  140. package/dist/modern/{lib/content-type.js → content-type/index.js} +13 -11
  141. package/dist/modern/content-type/index.js.map +1 -0
  142. package/dist/modern/{lib → entries}/entries.cjs +18 -41
  143. package/dist/modern/entries/entries.cjs.map +1 -0
  144. package/dist/modern/{lib → entries}/entries.d.ts +5 -11
  145. package/dist/modern/entries/entries.d.ts.map +1 -0
  146. package/dist/{legacy/lib → modern/entries}/entries.js +12 -12
  147. package/dist/modern/entries/entries.js.map +1 -0
  148. package/dist/modern/{lib/entry.js → entries/entry.cjs} +18 -12
  149. package/dist/modern/entries/entry.cjs.map +1 -0
  150. package/dist/modern/{lib → entries}/entry.d.ts +2 -4
  151. package/dist/modern/entries/entry.d.ts.map +1 -0
  152. package/dist/{legacy/lib → modern/entries}/entry.js +14 -10
  153. package/dist/modern/entries/entry.js.map +1 -0
  154. package/dist/modern/entries/index.d.ts +3 -0
  155. package/dist/modern/entries/index.d.ts.map +1 -0
  156. package/dist/modern/{lib/global-field.js → global-field/index.cjs} +13 -10
  157. package/dist/modern/global-field/index.cjs.map +1 -0
  158. package/dist/{legacy/lib/global-field.d.cts → modern/global-field/index.d.ts} +2 -4
  159. package/dist/modern/global-field/index.d.ts.map +1 -0
  160. package/dist/{legacy/lib/global-field.js → modern/global-field/index.js} +10 -9
  161. package/dist/modern/global-field/index.js.map +1 -0
  162. package/dist/modern/index.cjs +28 -48
  163. package/dist/modern/index.cjs.map +1 -1
  164. package/dist/modern/index.d.ts +17 -26
  165. package/dist/modern/index.d.ts.map +1 -0
  166. package/dist/modern/index.js +9 -11
  167. package/dist/modern/index.js.map +1 -1
  168. package/dist/modern/{lib → query}/asset-query.cjs +10 -34
  169. package/dist/modern/query/asset-query.cjs.map +1 -0
  170. package/dist/{legacy/lib → modern/query}/asset-query.d.ts +4 -11
  171. package/dist/modern/query/asset-query.d.ts.map +1 -0
  172. package/dist/{legacy/lib → modern/query}/asset-query.js +8 -9
  173. package/dist/modern/query/asset-query.js.map +1 -0
  174. package/dist/{legacy/lib/base-query.js → modern/query/base-query.cjs} +18 -16
  175. package/dist/modern/query/base-query.cjs.map +1 -0
  176. package/dist/modern/query/base-query.d.ts +174 -0
  177. package/dist/modern/query/base-query.d.ts.map +1 -0
  178. package/dist/modern/{lib → query}/base-query.js +14 -14
  179. package/dist/modern/query/base-query.js.map +1 -0
  180. package/dist/{legacy/lib/contenttype-query.js → modern/query/contenttype-query.cjs} +13 -10
  181. package/dist/modern/query/contenttype-query.cjs.map +1 -0
  182. package/dist/modern/{lib → query}/contenttype-query.d.ts +3 -9
  183. package/dist/modern/query/contenttype-query.d.ts.map +1 -0
  184. package/dist/modern/{lib → query}/contenttype-query.js +10 -9
  185. package/dist/modern/query/contenttype-query.js.map +1 -0
  186. package/dist/modern/query/entry-queryable.d.ts +4 -0
  187. package/dist/modern/query/entry-queryable.d.ts.map +1 -0
  188. package/dist/modern/query/global-field-query.cjs +30 -0
  189. package/dist/modern/query/global-field-query.cjs.map +1 -0
  190. package/dist/modern/{lib → query}/global-field-query.d.ts +3 -11
  191. package/dist/modern/query/global-field-query.d.ts.map +1 -0
  192. package/dist/{legacy/lib → modern/query}/global-field-query.js +7 -8
  193. package/dist/modern/query/global-field-query.js.map +1 -0
  194. package/dist/modern/query/index.d.ts +8 -0
  195. package/dist/modern/query/index.d.ts.map +1 -0
  196. package/dist/modern/{lib → query}/query.cjs +45 -68
  197. package/dist/modern/query/query.cjs.map +1 -0
  198. package/dist/{legacy/base-query-B4_k3n_p.d.ts → modern/query/query.d.ts} +4 -176
  199. package/dist/modern/query/query.d.ts.map +1 -0
  200. package/dist/{legacy/lib → modern/query}/query.js +14 -14
  201. package/dist/modern/query/query.js.map +1 -0
  202. package/dist/modern/query/taxonomy-query.cjs +14 -0
  203. package/dist/modern/query/taxonomy-query.cjs.map +1 -0
  204. package/dist/modern/query/taxonomy-query.d.ts +6 -0
  205. package/dist/modern/query/taxonomy-query.d.ts.map +1 -0
  206. package/dist/modern/query/taxonomy-query.js +12 -0
  207. package/dist/modern/query/taxonomy-query.js.map +1 -0
  208. package/dist/{legacy/lib → modern/stack}/contentstack.cjs +51 -66
  209. package/dist/modern/stack/contentstack.cjs.map +1 -0
  210. package/dist/modern/{contentstack-BmTB3Y49.d.cts → stack/contentstack.d.ts} +8 -13
  211. package/dist/modern/stack/contentstack.d.ts.map +1 -0
  212. package/dist/{legacy/lib → modern/stack}/contentstack.js +26 -26
  213. package/dist/modern/stack/contentstack.js.map +1 -0
  214. package/dist/modern/stack/index.cjs +11 -0
  215. package/dist/modern/stack/index.cjs.map +1 -0
  216. package/dist/modern/stack/index.d.ts +6 -0
  217. package/dist/modern/stack/index.d.ts.map +1 -0
  218. package/dist/modern/stack/index.js +7 -0
  219. package/dist/modern/stack/index.js.map +1 -0
  220. package/dist/{legacy/lib → modern/stack}/stack.cjs +27 -49
  221. package/dist/modern/stack/stack.cjs.map +1 -0
  222. package/dist/{legacy/lib → modern/stack}/stack.d.ts +11 -21
  223. package/dist/modern/stack/stack.d.ts.map +1 -0
  224. package/dist/modern/{lib → stack}/stack.js +17 -16
  225. package/dist/modern/stack/stack.js.map +1 -0
  226. package/dist/modern/sync/index.d.ts +3 -0
  227. package/dist/modern/sync/index.d.ts.map +1 -0
  228. package/dist/modern/sync/synchronization.cjs +30 -0
  229. package/dist/modern/sync/synchronization.cjs.map +1 -0
  230. package/dist/modern/sync/synchronization.d.ts +4 -0
  231. package/dist/modern/sync/synchronization.d.ts.map +1 -0
  232. package/dist/{legacy/lib → modern/sync}/synchronization.js +11 -13
  233. package/dist/modern/sync/synchronization.js.map +1 -0
  234. package/package.json +19 -21
  235. package/dist/legacy/base-query-DrXtYoPl.d.cts +0 -548
  236. package/dist/legacy/contentstack-BmTB3Y49.d.cts +0 -35
  237. package/dist/legacy/contentstack-DajCqJdu.d.ts +0 -35
  238. package/dist/legacy/index.d.cts +0 -26
  239. package/dist/legacy/index.d.ts +0 -26
  240. package/dist/legacy/lib/asset-query.cjs.map +0 -1
  241. package/dist/legacy/lib/asset-query.d.cts +0 -110
  242. package/dist/legacy/lib/asset-query.js.map +0 -1
  243. package/dist/legacy/lib/asset.cjs.map +0 -1
  244. package/dist/legacy/lib/asset.d.cts +0 -108
  245. package/dist/legacy/lib/asset.d.ts +0 -108
  246. package/dist/legacy/lib/asset.js.map +0 -1
  247. package/dist/legacy/lib/base-query.cjs.map +0 -1
  248. package/dist/legacy/lib/base-query.d.cts +0 -8
  249. package/dist/legacy/lib/base-query.d.ts +0 -8
  250. package/dist/legacy/lib/base-query.js.map +0 -1
  251. package/dist/legacy/lib/cache.cjs.map +0 -1
  252. package/dist/legacy/lib/cache.d.cts +0 -20
  253. package/dist/legacy/lib/cache.js.map +0 -1
  254. package/dist/legacy/lib/content-type.cjs +0 -61
  255. package/dist/legacy/lib/content-type.cjs.map +0 -1
  256. package/dist/legacy/lib/content-type.d.cts +0 -50
  257. package/dist/legacy/lib/content-type.js.map +0 -1
  258. package/dist/legacy/lib/contentstack.cjs.map +0 -1
  259. package/dist/legacy/lib/contentstack.d.cts +0 -21
  260. package/dist/legacy/lib/contentstack.d.ts +0 -21
  261. package/dist/legacy/lib/contentstack.js.map +0 -1
  262. package/dist/legacy/lib/contenttype-query.cjs +0 -70
  263. package/dist/legacy/lib/contenttype-query.cjs.map +0 -1
  264. package/dist/legacy/lib/contenttype-query.d.cts +0 -43
  265. package/dist/legacy/lib/contenttype-query.d.ts +0 -43
  266. package/dist/legacy/lib/contenttype-query.js.map +0 -1
  267. package/dist/legacy/lib/entries.cjs.map +0 -1
  268. package/dist/legacy/lib/entries.d.cts +0 -191
  269. package/dist/legacy/lib/entries.d.ts +0 -191
  270. package/dist/legacy/lib/entries.js.map +0 -1
  271. package/dist/legacy/lib/entry-queryable.cjs +0 -33
  272. package/dist/legacy/lib/entry-queryable.cjs.map +0 -1
  273. package/dist/legacy/lib/entry-queryable.d.cts +0 -13
  274. package/dist/legacy/lib/entry-queryable.d.ts +0 -13
  275. package/dist/legacy/lib/entry-queryable.js +0 -8
  276. package/dist/legacy/lib/entry-queryable.js.map +0 -1
  277. package/dist/legacy/lib/entry.cjs.map +0 -1
  278. package/dist/legacy/lib/entry.d.cts +0 -170
  279. package/dist/legacy/lib/entry.d.ts +0 -170
  280. package/dist/legacy/lib/entry.js.map +0 -1
  281. package/dist/legacy/lib/error-messages.cjs.map +0 -1
  282. package/dist/legacy/lib/error-messages.d.cts +0 -31
  283. package/dist/legacy/lib/error-messages.js.map +0 -1
  284. package/dist/legacy/lib/global-field-query.cjs +0 -54
  285. package/dist/legacy/lib/global-field-query.cjs.map +0 -1
  286. package/dist/legacy/lib/global-field-query.d.cts +0 -27
  287. package/dist/legacy/lib/global-field-query.d.ts +0 -27
  288. package/dist/legacy/lib/global-field-query.js.map +0 -1
  289. package/dist/legacy/lib/global-field.cjs.map +0 -1
  290. package/dist/legacy/lib/global-field.d.ts +0 -38
  291. package/dist/legacy/lib/global-field.js.map +0 -1
  292. package/dist/legacy/lib/image-transform.cjs +0 -528
  293. package/dist/legacy/lib/image-transform.cjs.map +0 -1
  294. package/dist/legacy/lib/image-transform.d.cts +0 -7
  295. package/dist/legacy/lib/image-transform.d.ts +0 -7
  296. package/dist/legacy/lib/image-transform.js +0 -506
  297. package/dist/legacy/lib/image-transform.js.map +0 -1
  298. package/dist/legacy/lib/pagination.cjs.map +0 -1
  299. package/dist/legacy/lib/pagination.d.cts +0 -99
  300. package/dist/legacy/lib/pagination.js.map +0 -1
  301. package/dist/legacy/lib/query.cjs.map +0 -1
  302. package/dist/legacy/lib/query.d.cts +0 -8
  303. package/dist/legacy/lib/query.d.ts +0 -8
  304. package/dist/legacy/lib/query.js.map +0 -1
  305. package/dist/legacy/lib/stack.cjs.map +0 -1
  306. package/dist/legacy/lib/stack.d.cts +0 -170
  307. package/dist/legacy/lib/stack.js.map +0 -1
  308. package/dist/legacy/lib/string-extensions.cjs +0 -27
  309. package/dist/legacy/lib/string-extensions.cjs.map +0 -1
  310. package/dist/legacy/lib/string-extensions.d.cts +0 -404
  311. package/dist/legacy/lib/string-extensions.d.ts +0 -404
  312. package/dist/legacy/lib/string-extensions.js.map +0 -1
  313. package/dist/legacy/lib/synchronization.cjs +0 -65
  314. package/dist/legacy/lib/synchronization.cjs.map +0 -1
  315. package/dist/legacy/lib/synchronization.d.cts +0 -10
  316. package/dist/legacy/lib/synchronization.d.ts +0 -10
  317. package/dist/legacy/lib/synchronization.js.map +0 -1
  318. package/dist/legacy/lib/taxonomy-query.cjs +0 -38
  319. package/dist/legacy/lib/taxonomy-query.cjs.map +0 -1
  320. package/dist/legacy/lib/taxonomy-query.d.cts +0 -14
  321. package/dist/legacy/lib/taxonomy-query.d.ts +0 -14
  322. package/dist/legacy/lib/taxonomy-query.js +0 -13
  323. package/dist/legacy/lib/taxonomy-query.js.map +0 -1
  324. package/dist/legacy/lib/types.cjs.map +0 -1
  325. package/dist/legacy/lib/types.d.cts +0 -318
  326. package/dist/legacy/lib/types.js.map +0 -1
  327. package/dist/legacy/lib/utils.cjs +0 -55
  328. package/dist/legacy/lib/utils.cjs.map +0 -1
  329. package/dist/legacy/lib/utils.d.cts +0 -21
  330. package/dist/legacy/lib/utils.d.ts +0 -21
  331. package/dist/legacy/lib/utils.js.map +0 -1
  332. package/dist/legacy/persistance/config/persistance-storage-config.cjs +0 -19
  333. package/dist/legacy/persistance/config/persistance-storage-config.cjs.map +0 -1
  334. package/dist/legacy/persistance/config/persistance-storage-config.d.cts +0 -33
  335. package/dist/legacy/persistance/config/persistance-storage-config.d.ts +0 -33
  336. package/dist/legacy/persistance/config/persistance-storage-config.js +0 -1
  337. package/dist/legacy/persistance/config/persistance-storage-config.js.map +0 -1
  338. package/dist/legacy/persistance/helper/utils.cjs +0 -31
  339. package/dist/legacy/persistance/helper/utils.cjs.map +0 -1
  340. package/dist/legacy/persistance/helper/utils.d.cts +0 -4
  341. package/dist/legacy/persistance/helper/utils.d.ts +0 -4
  342. package/dist/legacy/persistance/helper/utils.js +0 -6
  343. package/dist/legacy/persistance/helper/utils.js.map +0 -1
  344. package/dist/legacy/persistance/index.cjs +0 -31
  345. package/dist/legacy/persistance/index.cjs.map +0 -1
  346. package/dist/legacy/persistance/index.d.cts +0 -7
  347. package/dist/legacy/persistance/index.d.ts +0 -7
  348. package/dist/legacy/persistance/index.js +0 -6
  349. package/dist/legacy/persistance/index.js.map +0 -1
  350. package/dist/legacy/persistance/persistance-store.cjs +0 -162
  351. package/dist/legacy/persistance/persistance-store.cjs.map +0 -1
  352. package/dist/legacy/persistance/persistance-store.d.cts +0 -51
  353. package/dist/legacy/persistance/persistance-store.d.ts +0 -51
  354. package/dist/legacy/persistance/persistance-store.js +0 -137
  355. package/dist/legacy/persistance/persistance-store.js.map +0 -1
  356. package/dist/legacy/persistance/storages/index.cjs +0 -34
  357. package/dist/legacy/persistance/storages/index.cjs.map +0 -1
  358. package/dist/legacy/persistance/storages/index.d.cts +0 -4
  359. package/dist/legacy/persistance/storages/index.d.ts +0 -4
  360. package/dist/legacy/persistance/storages/index.js +0 -8
  361. package/dist/legacy/persistance/storages/index.js.map +0 -1
  362. package/dist/legacy/persistance/storages/local-storage.cjs +0 -66
  363. package/dist/legacy/persistance/storages/local-storage.cjs.map +0 -1
  364. package/dist/legacy/persistance/storages/local-storage.d.cts +0 -6
  365. package/dist/legacy/persistance/storages/local-storage.d.ts +0 -6
  366. package/dist/legacy/persistance/storages/local-storage.js +0 -41
  367. package/dist/legacy/persistance/storages/local-storage.js.map +0 -1
  368. package/dist/legacy/persistance/storages/memory-storage.cjs +0 -60
  369. package/dist/legacy/persistance/storages/memory-storage.cjs.map +0 -1
  370. package/dist/legacy/persistance/storages/memory-storage.d.cts +0 -6
  371. package/dist/legacy/persistance/storages/memory-storage.d.ts +0 -6
  372. package/dist/legacy/persistance/storages/memory-storage.js +0 -35
  373. package/dist/legacy/persistance/storages/memory-storage.js.map +0 -1
  374. package/dist/legacy/persistance/types/index.cjs +0 -19
  375. package/dist/legacy/persistance/types/index.cjs.map +0 -1
  376. package/dist/legacy/persistance/types/index.d.cts +0 -3
  377. package/dist/legacy/persistance/types/index.d.ts +0 -3
  378. package/dist/legacy/persistance/types/index.js +0 -1
  379. package/dist/legacy/persistance/types/index.js.map +0 -1
  380. package/dist/legacy/persistance/types/storage-type.cjs +0 -19
  381. package/dist/legacy/persistance/types/storage-type.cjs.map +0 -1
  382. package/dist/legacy/persistance/types/storage-type.d.cts +0 -3
  383. package/dist/legacy/persistance/types/storage-type.d.ts +0 -3
  384. package/dist/legacy/persistance/types/storage-type.js +0 -1
  385. package/dist/legacy/persistance/types/storage-type.js.map +0 -1
  386. package/dist/legacy/persistance/types/storage.cjs +0 -19
  387. package/dist/legacy/persistance/types/storage.cjs.map +0 -1
  388. package/dist/legacy/persistance/types/storage.d.cts +0 -12
  389. package/dist/legacy/persistance/types/storage.d.ts +0 -12
  390. package/dist/legacy/persistance/types/storage.js +0 -1
  391. package/dist/legacy/persistance/types/storage.js.map +0 -1
  392. package/dist/modern/base-query-B4_k3n_p.d.ts +0 -548
  393. package/dist/modern/base-query-DrXtYoPl.d.cts +0 -548
  394. package/dist/modern/contentstack-DajCqJdu.d.ts +0 -35
  395. package/dist/modern/index.d.cts +0 -26
  396. package/dist/modern/lib/asset-query.cjs.map +0 -1
  397. package/dist/modern/lib/asset-query.d.cts +0 -110
  398. package/dist/modern/lib/asset-query.d.ts +0 -110
  399. package/dist/modern/lib/asset-query.js.map +0 -1
  400. package/dist/modern/lib/asset.cjs.map +0 -1
  401. package/dist/modern/lib/asset.d.cts +0 -108
  402. package/dist/modern/lib/asset.js.map +0 -1
  403. package/dist/modern/lib/base-query.cjs.map +0 -1
  404. package/dist/modern/lib/base-query.d.cts +0 -8
  405. package/dist/modern/lib/base-query.d.ts +0 -8
  406. package/dist/modern/lib/base-query.js.map +0 -1
  407. package/dist/modern/lib/cache.cjs.map +0 -1
  408. package/dist/modern/lib/cache.d.cts +0 -20
  409. package/dist/modern/lib/cache.d.ts +0 -20
  410. package/dist/modern/lib/cache.js.map +0 -1
  411. package/dist/modern/lib/content-type.cjs +0 -61
  412. package/dist/modern/lib/content-type.cjs.map +0 -1
  413. package/dist/modern/lib/content-type.d.cts +0 -50
  414. package/dist/modern/lib/content-type.d.ts +0 -50
  415. package/dist/modern/lib/content-type.js.map +0 -1
  416. package/dist/modern/lib/contentstack.cjs.map +0 -1
  417. package/dist/modern/lib/contentstack.d.cts +0 -21
  418. package/dist/modern/lib/contentstack.d.ts +0 -21
  419. package/dist/modern/lib/contentstack.js.map +0 -1
  420. package/dist/modern/lib/contenttype-query.cjs +0 -70
  421. package/dist/modern/lib/contenttype-query.cjs.map +0 -1
  422. package/dist/modern/lib/contenttype-query.d.cts +0 -43
  423. package/dist/modern/lib/contenttype-query.js.map +0 -1
  424. package/dist/modern/lib/entries.cjs.map +0 -1
  425. package/dist/modern/lib/entries.d.cts +0 -191
  426. package/dist/modern/lib/entries.js.map +0 -1
  427. package/dist/modern/lib/entry-queryable.cjs +0 -33
  428. package/dist/modern/lib/entry-queryable.cjs.map +0 -1
  429. package/dist/modern/lib/entry-queryable.d.cts +0 -13
  430. package/dist/modern/lib/entry-queryable.d.ts +0 -13
  431. package/dist/modern/lib/entry-queryable.js +0 -8
  432. package/dist/modern/lib/entry-queryable.js.map +0 -1
  433. package/dist/modern/lib/entry.cjs.map +0 -1
  434. package/dist/modern/lib/entry.d.cts +0 -170
  435. package/dist/modern/lib/entry.js.map +0 -1
  436. package/dist/modern/lib/error-messages.cjs.map +0 -1
  437. package/dist/modern/lib/error-messages.d.cts +0 -31
  438. package/dist/modern/lib/error-messages.d.ts +0 -31
  439. package/dist/modern/lib/error-messages.js.map +0 -1
  440. package/dist/modern/lib/global-field-query.cjs +0 -54
  441. package/dist/modern/lib/global-field-query.cjs.map +0 -1
  442. package/dist/modern/lib/global-field-query.d.cts +0 -27
  443. package/dist/modern/lib/global-field-query.js.map +0 -1
  444. package/dist/modern/lib/global-field.cjs.map +0 -1
  445. package/dist/modern/lib/global-field.d.cts +0 -38
  446. package/dist/modern/lib/global-field.d.ts +0 -38
  447. package/dist/modern/lib/global-field.js.map +0 -1
  448. package/dist/modern/lib/image-transform.cjs +0 -528
  449. package/dist/modern/lib/image-transform.cjs.map +0 -1
  450. package/dist/modern/lib/image-transform.d.cts +0 -7
  451. package/dist/modern/lib/image-transform.d.ts +0 -7
  452. package/dist/modern/lib/image-transform.js +0 -506
  453. package/dist/modern/lib/image-transform.js.map +0 -1
  454. package/dist/modern/lib/pagination.cjs.map +0 -1
  455. package/dist/modern/lib/pagination.d.cts +0 -99
  456. package/dist/modern/lib/pagination.d.ts +0 -99
  457. package/dist/modern/lib/pagination.js.map +0 -1
  458. package/dist/modern/lib/query.cjs.map +0 -1
  459. package/dist/modern/lib/query.d.cts +0 -8
  460. package/dist/modern/lib/query.d.ts +0 -8
  461. package/dist/modern/lib/query.js.map +0 -1
  462. package/dist/modern/lib/stack.cjs.map +0 -1
  463. package/dist/modern/lib/stack.d.cts +0 -170
  464. package/dist/modern/lib/stack.d.ts +0 -170
  465. package/dist/modern/lib/stack.js.map +0 -1
  466. package/dist/modern/lib/string-extensions.cjs +0 -27
  467. package/dist/modern/lib/string-extensions.cjs.map +0 -1
  468. package/dist/modern/lib/string-extensions.d.cts +0 -404
  469. package/dist/modern/lib/string-extensions.js.map +0 -1
  470. package/dist/modern/lib/synchronization.cjs +0 -65
  471. package/dist/modern/lib/synchronization.cjs.map +0 -1
  472. package/dist/modern/lib/synchronization.d.cts +0 -10
  473. package/dist/modern/lib/synchronization.d.ts +0 -10
  474. package/dist/modern/lib/synchronization.js.map +0 -1
  475. package/dist/modern/lib/taxonomy-query.cjs +0 -38
  476. package/dist/modern/lib/taxonomy-query.cjs.map +0 -1
  477. package/dist/modern/lib/taxonomy-query.d.cts +0 -14
  478. package/dist/modern/lib/taxonomy-query.d.ts +0 -14
  479. package/dist/modern/lib/taxonomy-query.js +0 -13
  480. package/dist/modern/lib/taxonomy-query.js.map +0 -1
  481. package/dist/modern/lib/types.cjs.map +0 -1
  482. package/dist/modern/lib/types.d.cts +0 -318
  483. package/dist/modern/lib/types.d.ts +0 -318
  484. package/dist/modern/lib/types.js.map +0 -1
  485. package/dist/modern/lib/utils.cjs +0 -55
  486. package/dist/modern/lib/utils.cjs.map +0 -1
  487. package/dist/modern/lib/utils.d.cts +0 -21
  488. package/dist/modern/lib/utils.d.ts +0 -21
  489. package/dist/modern/lib/utils.js.map +0 -1
  490. package/dist/modern/persistance/config/persistance-storage-config.cjs +0 -19
  491. package/dist/modern/persistance/config/persistance-storage-config.cjs.map +0 -1
  492. package/dist/modern/persistance/config/persistance-storage-config.d.cts +0 -33
  493. package/dist/modern/persistance/config/persistance-storage-config.d.ts +0 -33
  494. package/dist/modern/persistance/config/persistance-storage-config.js +0 -1
  495. package/dist/modern/persistance/config/persistance-storage-config.js.map +0 -1
  496. package/dist/modern/persistance/helper/utils.cjs +0 -31
  497. package/dist/modern/persistance/helper/utils.cjs.map +0 -1
  498. package/dist/modern/persistance/helper/utils.d.cts +0 -4
  499. package/dist/modern/persistance/helper/utils.d.ts +0 -4
  500. package/dist/modern/persistance/helper/utils.js +0 -6
  501. package/dist/modern/persistance/helper/utils.js.map +0 -1
  502. package/dist/modern/persistance/index.cjs +0 -31
  503. package/dist/modern/persistance/index.cjs.map +0 -1
  504. package/dist/modern/persistance/index.d.cts +0 -7
  505. package/dist/modern/persistance/index.d.ts +0 -7
  506. package/dist/modern/persistance/index.js +0 -6
  507. package/dist/modern/persistance/index.js.map +0 -1
  508. package/dist/modern/persistance/persistance-store.cjs +0 -162
  509. package/dist/modern/persistance/persistance-store.cjs.map +0 -1
  510. package/dist/modern/persistance/persistance-store.d.cts +0 -51
  511. package/dist/modern/persistance/persistance-store.d.ts +0 -51
  512. package/dist/modern/persistance/persistance-store.js +0 -137
  513. package/dist/modern/persistance/persistance-store.js.map +0 -1
  514. package/dist/modern/persistance/storages/index.cjs +0 -34
  515. package/dist/modern/persistance/storages/index.cjs.map +0 -1
  516. package/dist/modern/persistance/storages/index.d.cts +0 -4
  517. package/dist/modern/persistance/storages/index.d.ts +0 -4
  518. package/dist/modern/persistance/storages/index.js +0 -8
  519. package/dist/modern/persistance/storages/index.js.map +0 -1
  520. package/dist/modern/persistance/storages/local-storage.cjs +0 -66
  521. package/dist/modern/persistance/storages/local-storage.cjs.map +0 -1
  522. package/dist/modern/persistance/storages/local-storage.d.cts +0 -6
  523. package/dist/modern/persistance/storages/local-storage.d.ts +0 -6
  524. package/dist/modern/persistance/storages/local-storage.js +0 -41
  525. package/dist/modern/persistance/storages/local-storage.js.map +0 -1
  526. package/dist/modern/persistance/storages/memory-storage.cjs +0 -60
  527. package/dist/modern/persistance/storages/memory-storage.cjs.map +0 -1
  528. package/dist/modern/persistance/storages/memory-storage.d.cts +0 -6
  529. package/dist/modern/persistance/storages/memory-storage.d.ts +0 -6
  530. package/dist/modern/persistance/storages/memory-storage.js +0 -35
  531. package/dist/modern/persistance/storages/memory-storage.js.map +0 -1
  532. package/dist/modern/persistance/types/index.cjs +0 -19
  533. package/dist/modern/persistance/types/index.cjs.map +0 -1
  534. package/dist/modern/persistance/types/index.d.cts +0 -3
  535. package/dist/modern/persistance/types/index.d.ts +0 -3
  536. package/dist/modern/persistance/types/index.js +0 -1
  537. package/dist/modern/persistance/types/index.js.map +0 -1
  538. package/dist/modern/persistance/types/storage-type.cjs +0 -19
  539. package/dist/modern/persistance/types/storage-type.cjs.map +0 -1
  540. package/dist/modern/persistance/types/storage-type.d.cts +0 -3
  541. package/dist/modern/persistance/types/storage-type.d.ts +0 -3
  542. package/dist/modern/persistance/types/storage-type.js +0 -1
  543. package/dist/modern/persistance/types/storage-type.js.map +0 -1
  544. package/dist/modern/persistance/types/storage.cjs +0 -19
  545. package/dist/modern/persistance/types/storage.cjs.map +0 -1
  546. package/dist/modern/persistance/types/storage.d.cts +0 -12
  547. package/dist/modern/persistance/types/storage.d.ts +0 -12
  548. package/dist/modern/persistance/types/storage.js +0 -1
  549. package/dist/modern/persistance/types/storage.js.map +0 -1
@@ -1,404 +0,0 @@
1
- import { TransformData, Format, CropBy, FitBy, Orientation, OverlayAlign, OverlayRepeat, ResizeFilter, CanvasBy } from './types.cjs';
2
- import '@contentstack/core';
3
- import '../persistance/types/storage-type.cjs';
4
- import '../persistance/config/persistance-storage-config.cjs';
5
- import '../persistance/types/storage.cjs';
6
- import '../persistance/helper/utils.cjs';
7
-
8
- declare global {
9
- interface String {
10
- transform(imageTransform: ImageTransform): string;
11
- }
12
- }
13
-
14
- declare class ImageTransform {
15
- obj: TransformData;
16
- /**
17
- * @method auto
18
- * @memberof ImageTransform
19
- * @description The auto parameter lets you enable the functionality that automates certain image optimization features.
20
- * @returns {ImageTransform}
21
- * @example
22
- * const url = 'www.example.com';
23
- * const transformObj = new ImageTransform().auto();
24
- *
25
- * const transformURL = url.transform(transformObj);
26
- */
27
- auto(): ImageTransform;
28
- /**
29
- * @method quality
30
- * @memberof ImageTransform
31
- * @description The quality parameter lets you control the compression level of images that have Lossy file format.
32
- * @param {number} qualityNum - Quality range: 1-100.
33
- * @returns {ImageTransform}
34
- * @example
35
- * const url = 'www.example.com';
36
- * const transformObj = new ImageTransform().quality(50);
37
- *
38
- * const transformURL = url.transform(transformObj);
39
- */
40
- quality(qualityNum: number): ImageTransform;
41
- /**
42
- * @method format
43
- * @memberof ImageTransform
44
- * @description The format parameter lets you convert a given image from one format to another.
45
- * @param {Format} format - Specifies the format to change to.
46
- * @returns {ImageTransform}
47
- * @example
48
- * const url = 'www.example.com';
49
- * const transformObj = new ImageTransform().format(Format.PJPG);
50
- *
51
- * const transformURL = url.transform(transformObj);
52
- */
53
- format(format: Format): ImageTransform;
54
- /**
55
- * @method resize
56
- * @memberof ImageTransform
57
- * @description The resize parameter lets you resize the image in terms of width, height, upscaling the image.
58
- * @param {object} options - Resize options object
59
- * @param {string | number} [options.width] - Specifies the width to resize the image to.
60
- * The value can be in pixels (for example, 400) or in percentage (for example, 0.60 OR '60p')
61
- * @param {string | number} [options.height] - Specifies the height to resize the image to.
62
- * The value can be in pixels (for example, 400) or in percentage (for example, 0.60 OR '60p')
63
- * @param {string} [options.disable] - The disable parameter disables the functionality that is enabled by default.
64
- * As of now, there is only one value, i.e., upscale, that you can use with the disable parameter.
65
- * @returns {ImageTransform}
66
- * @example
67
- * const url = 'www.example.com';
68
- * const transformObj = new ImageTransform().resize({ width: 200, height: 200, disable: 'upscale' });
69
- *
70
- * const transformURL = url.transform(transformObj);
71
- */
72
- resize({ width, height, disable, }: {
73
- width?: string | number;
74
- height?: string | number;
75
- disable?: string;
76
- }): ImageTransform;
77
- /**
78
- * @method crop
79
- * @memberof ImageTransform
80
- * @description The crop parameter allows you to remove pixels from an image. You can crop an image by specifying
81
- * the height and width in pixels or percentage value, or defining height and width in aspect ratio.
82
- * You can also define a sub region (i.e., define the starting point for crop) before cropping the image,
83
- * or you can offset the image on its X and Y axis (i.e., define the centre point of the crop) before cropping the image.
84
- * @param {object} options - Crop options object
85
- * @param {string | number} options.width - Specifies the width to resize the image to.
86
- * The value can be in pixels (for example, 400) or in percentage (for example, 0.60 OR '60p')
87
- * @param {string | number} options.height - Specifies the height to resize the image to.
88
- * The value can be in pixels (for example, 400) or in percentage (for example, 0.60 OR '60p')
89
- * @param {string | number} [options.xval] - (Optional) For CropBy Region, xval defines the X-axis position
90
- * of the top left corner of the crop. For CropBy Offset, xval defines the horizontal offset of the crop region.
91
- * @param {string | number} [options.yval] - (Optional) For CropBy Region, yval defines the Y-axis position
92
- * of the top left corner of the crop. For CropBy Offset, yval defines the vertical offset of the crop region.
93
- * @param {CropBy} [options.cropBy] - (Optional) Specifies the CropBy type. Values are DEFAULT, ASPECTRATIO, REGION, OFFSET.
94
- * @param {boolean} [options.safe] - (Optional) Ensures that the output image never returns an error due to the specified crop area being
95
- * out of bounds. The output image is returned as an intersection of the source image and the defined crop area.
96
- * @param {boolean} [options.smart] - (Optional) Ensures crop is done using content-aware algorithms. Content-aware image cropping returns a
97
- * cropped image that automatically fits the defined dimensions while intelligently including the most important components of the image.
98
- * @returns {ImageTransform}
99
- * @example
100
- * const url = 'www.example.com';
101
- * const transformObj = new ImageTransform().crop({ width: 100, height: 200 })
102
- *
103
- * const transformURL = url.transform(transformObj);
104
- * @example
105
- * const url = 'www.example.com';
106
- * const transformObj = new ImageTransform().crop({ width: 2, height: 3, cropBy: CropBy.ASPECTRATIO })
107
- *
108
- * const transformURL = url.transform(transformObj);
109
- * @example
110
- * const url = 'www.example.com';
111
- * const transformObj = new ImageTransform().crop({ width: 200, height: 300, cropBy: CropBy.REGION, xval: 100, yval: 150 })
112
- *
113
- * const transformURL = url.transform(transformObj);
114
- * @example
115
- * const url = 'www.example.com';
116
- * const transformObj = new ImageTransform().crop({ width: 200, height: 300, cropBy: CropBy.OFFSET, xval: 100, yval: 150 })
117
- *
118
- * const transformURL = url.transform(transformObj);
119
- */
120
- crop({ width, height, xval, yval, cropBy, safe, smart, }: {
121
- width: string | number;
122
- height: string | number;
123
- xval?: string | number;
124
- yval?: string | number;
125
- cropBy?: CropBy;
126
- safe?: boolean;
127
- smart?: boolean;
128
- }): ImageTransform;
129
- /**
130
- * @method fit
131
- * @memberof ImageTransform
132
- * @description The fit parameter enables you to fit the given image properly within the specified height and width.
133
- * @param {FitBy} type - Specifies fit type (BOUNDS or CROP).
134
- * @returns {ImageTransform}
135
- * @example
136
- * const url = 'www.example.com';
137
- * const transformObj = new ImageTransform().resize({ width: 200, height: 200 }).fit(FitBy.BOUNDS);
138
- *
139
- * const transformURL = url.transform(transformObj);
140
- */
141
- fit(type: FitBy): ImageTransform;
142
- /**
143
- * @method trim
144
- * @memberof ImageTransform
145
- * @description The trim parameter lets you trim an image from the edges. This is especially useful for removing border or white spaces.
146
- * @param {number | number[]} trimValues - specifies values for top, right, bottom, and left edges of an image.
147
- * @returns {ImageTransform}
148
- * @example
149
- * const url = 'www.example.com';
150
- * const transformObj = new ImageTransform().trim([25, 50, 75, 90]);
151
- *
152
- * const transformURL = url.transform(transformObj);
153
- * @example
154
- * const url = 'www.example.com';
155
- * const transformObj = new ImageTransform().trim([25, 50, 25]);
156
- *
157
- * const transformURL = url.transform(transformObj);
158
- * @example
159
- * const url = 'www.example.com';
160
- * const transformObj = new ImageTransform().trim(50);
161
- *
162
- * const transformURL = url.transform(transformObj);
163
- */
164
- trim(trimValues: number | number[]): ImageTransform;
165
- /**
166
- * @method orient
167
- * @memberof ImageTransform
168
- * @description The orient parameter lets you control the cardinal orientation of the given image. Using this parameter,
169
- * you can orient the image right or left, flip horizontally or vertically or both
170
- * @param {Orientation} orientType - Type of Orientation. Values are DEFAULT, FLIP_HORIZONTAL, FLIP_HORIZONTAL_VERTICAL,
171
- * FLIP_VERTICAL, FLIP_HORIZONTAL_LEFT, RIGHT, FLIP_HORIZONTAL_RIGHT, LEFT.
172
- * @returns {ImageTransform}
173
- * @example
174
- * const url = 'www.example.com';
175
- * const transformObj = new ImageTransform().orient(Orientation.FLIP_HORIZONTAL);
176
- *
177
- * const transformURL = url.transform(transformObj);
178
- */
179
- orient(orientType: Orientation): ImageTransform;
180
- /**
181
- * @method overlay
182
- * @memberof ImageTransform
183
- * @description The overlay parameter allows you to put one image on top of another.
184
- * You need to specify the relative URL of the image as value for this parameter.
185
- * @param {object} options - Overlay options object
186
- * @param {string} options.relativeURL - URL of the image to overlay on base image
187
- * @param {OverlayAlign | OverlayAlign[]} [options.align] - lets you define the position of the overlay image.
188
- * Accepted values are TOP, BOTTOM, LEFT, RIGHT, MIDDLE, CENTER.
189
- * @param {OverlayRepeat} [options.repeat] - lets you define how the overlay image will be repeated on the given image.
190
- * Accepted values are X, Y, BOTH.
191
- * @param {string | number} [options.width] - lets you define the width of the overlay image.
192
- * For pixels, use any whole number between 1 and 8192. For percentages, use any decimal number between 0.0 and 0.99.
193
- * @param {string | number} [options.height] - lets you define the height of the overlay image.
194
- * For pixels, use any whole number between 1 and 8192. For percentages, use any decimal number between 0.0 and 0.99
195
- * @param {number | number[]} [options.pad] - lets you add extra pixels to the edges of an image.
196
- * This is useful if you want to add whitespace or border to an image.
197
- * @returns {ImageTransform}
198
- * @example
199
- * const url = 'www.example.com';
200
- * const transformObj = new ImageTransform().overlay({ relativeURL: overlayImgURL });
201
- *
202
- * const transformURL = url.transform(transformObj);
203
- * @example
204
- * const url = 'www.example.com';
205
- * const transformObj = new ImageTransform().overlay({ relativeURL: overlayImgURL, align: OverlayAlign.BOTTOM });
206
- *
207
- * const transformURL = url.transform(transformObj);
208
- * @example
209
- * const url = 'www.example.com';
210
- * const transformObj = new ImageTransform().overlay({
211
- * relativeURL: overlayImgURL,
212
- * align: OverlayAlign.BOTTOM,
213
- * repeat: OverlayRepeat.Y,
214
- * width: '50p',
215
- * });
216
- *
217
- * const transformURL = url.transform(transformObj);
218
- */
219
- overlay({ relativeURL, align, repeat, width, height, }: {
220
- relativeURL: string;
221
- align?: OverlayAlign | OverlayAlign[];
222
- repeat?: OverlayRepeat;
223
- width?: string | number;
224
- height?: string | number;
225
- pad?: number | number[];
226
- }): ImageTransform;
227
- /**
228
- * @method padding
229
- * @memberof ImageTransform
230
- * @description The padding parameter lets you add extra pixels to the edges of an image.
231
- * This is useful if you want to add whitespace or border to an image.
232
- * @param {number | number[]} padding - padding value in pixels or percentages
233
- * @returns {ImageTransform}
234
- * @example
235
- * const url = 'www.example.com';
236
- * const transformObj = new ImageTransform().padding([25, 50, 75, 90]);
237
- *
238
- * const transformURL = url.transform(transformObj);
239
- * @example
240
- * const url = 'www.example.com';
241
- * const transformObj = new ImageTransform().padding(50);
242
- *
243
- * const transformURL = url.transform(transformObj);
244
- */
245
- padding(padding: number | number[]): ImageTransform;
246
- /**
247
- * @method bgColor
248
- * @memberof ImageTransform
249
- * @description The bgColor parameter lets you set a background color for the given image.
250
- * @param {string | number[]} color - color of the background
251
- * @returns {ImageTransform}
252
- * @example
253
- * const url = 'www.example.com';
254
- * const transformObj = new ImageTransform().bgColor('cccccc');
255
- *
256
- * const transformURL = url.transform(transformObj);
257
- * @example
258
- * const url = 'www.example.com';
259
- * const transformObj = new ImageTransform().bgColor([140, 220, 123, 0.5] );
260
- *
261
- * const transformURL = url.transform(transformObj);
262
- */
263
- bgColor(color: string | number[]): ImageTransform;
264
- /**
265
- * @method dpr
266
- * @memberof ImageTransform
267
- * @description The dpr parameter lets you deliver images with appropriate size to devices that come with a defined device pixel ratio.
268
- * @param {number} dprValue - value of device pixel ratio 1-10000 or 0.0 to 9999.999
269
- * @returns {ImageTransform}
270
- * @example
271
- * const url = 'www.example.com';
272
- * const transformObj = new ImageTransform().resize({ width: 300, height: 500 }).dpr(10);
273
- *
274
- * const transformURL = url.transform(transformObj);
275
- */
276
- dpr(dprValue: number): ImageTransform;
277
- /**
278
- * @method blur
279
- * @memberof ImageTransform
280
- * @description The blur parameter allows you to decrease the focus and clarity of a given image.
281
- * @param {number} blurValue - to set the blur intensity between 1-1000.
282
- * @returns {ImageTransform}
283
- * @example
284
- * const url = 'www.example.com';
285
- * const transformObj = new ImageTransform().blur(10);
286
- *
287
- * const transformURL = url.transform(transformObj);
288
- */
289
- blur(blurValue: number): ImageTransform;
290
- /**
291
- * @method frame
292
- * @memberof ImageTransform
293
- * @description The frame parameter fetches the first frame from an animated GIF (Graphics Interchange Format)
294
- * file that comprises a sequence of moving images.
295
- * @returns {ImageTransform}
296
- * @example
297
- * const url = 'www.example.com';
298
- * const transformObj = new ImageTransform().frame();
299
- *
300
- * const transformURL = url.transform(transformObj);
301
- */
302
- frame(): ImageTransform;
303
- /**
304
- * @method sharpen
305
- * @memberof ImageTransform
306
- * @description The sharpen parameter allows you to increase the definition of the edges of objects in an image.
307
- * @param {number} amount - [0-10] specifies the amount of contrast to be set for the image edges
308
- * @param {number} radius - [1-1000] specifies the radius of the image edges
309
- * @param {number} threshold - [0-255] specifies the range of image edges that need to be ignored while sharpening
310
- * @returns {ImageTransform}
311
- * @example
312
- * const url = 'www.example.com';
313
- * const transformObj = new ImageTransform().sharpen(5, 1000, 2);
314
- *
315
- * const transformURL = url.transform(transformObj);
316
- */
317
- sharpen(amount: number, radius: number, threshold: number): ImageTransform;
318
- /**
319
- * @method saturation
320
- * @memberof ImageTransform
321
- * @description The saturation parameter allows you to increase or decrease the intensity of the colors in a given image.
322
- * @param {number} saturationValue - to set the saturation of image between -100 to 100
323
- * @returns {ImageTransform}
324
- * @example
325
- * const url = 'www.example.com';
326
- * const transformObj = new ImageTransform().saturation(-80.99);
327
- *
328
- * const transformURL = url.transform(transformObj);
329
- */
330
- saturation(saturationValue: number): ImageTransform;
331
- /**
332
- * @method contrast
333
- * @memberof ImageTransform
334
- * @description The contrast parameter lets you adjust the contrast level of the image.
335
- * @param {number} contrastValue - to set the contrast of image between -100 to 100
336
- * @returns {ImageTransform}
337
- * @example
338
- * const url = 'www.example.com';
339
- * const transformObj = new ImageTransform().contrast(-80.99);
340
- *
341
- * const transformURL = url.transform(transformObj);
342
- */
343
- contrast(contrastValue: number): ImageTransform;
344
- /**
345
- * @method brightness
346
- * @memberof ImageTransform
347
- * @description The brightness parameter lets you adjust the brightness level of the image.
348
- * @param {number} brightnessValue - to set the brightness of image between -100 to 100
349
- * @returns {ImageTransform}
350
- * @example
351
- * const url = 'www.example.com';
352
- * const transformObj = new ImageTransform().brightness(80.50);
353
- *
354
- * const transformURL = url.transform(transformObj);
355
- */
356
- brightness(brightnessValue: number): ImageTransform;
357
- /**
358
- * @method resizeFilter
359
- * @memberof ImageTransform
360
- * @description The resizeFilter parameter allows you to use the resizing filter to increase or
361
- * decrease the number of pixels in a given image.
362
- * @param {ResizeFilter} type - type of Filter to apply
363
- * Values are NEAREST, BILINEAR, BICUBIC, LANCZOS2, LANCZOS3.
364
- * @returns {ImageTransform}
365
- * @example
366
- * const url = 'www.example.com';
367
- * const transformObj = new ImageTransform().resize({ width: 500, height: 550 }).resizeFilter(ResizeFilter.NEAREST);
368
- *
369
- * const transformURL = url.transform(transformObj);
370
- */
371
- resizeFilter(type: ResizeFilter): ImageTransform;
372
- /**
373
- * @method canvas
374
- * @memberof ImageTransform
375
- * @description The canvas parameter allows you to increase the size of the canvas that surrounds an image.
376
- * You can specify the height and width of the canvas area in pixels or percentage or define the height and width
377
- * of the aspect ratio of the canvas. You can also define the starting point for the canvas area or offset the canvas on its X and Y axis.
378
- * @param {string | number} width - sets width of the canvas
379
- * @param {string | number} height - sets height of the canvas
380
- * @param {string | number} xval - defines the X-axis position of the top left corner or horizontal offset
381
- * @param {string | number} yval - defines the Y-axis position of the top left corner or vertical offset
382
- * @param {CanvasBy} canvasBy - Specifies the canvasBy type. Accepted values are DEFAULT, ASPECTRATIO, REGION, OFFSET.
383
- * @returns {ImageTransform}
384
- * @example
385
- * const url = 'www.example.com';
386
- * const transformObj = new ImageTransform().canvas({ width: 100, height: 200 });
387
- *
388
- * const transformURL = url.transform(transformObj);
389
- * @example
390
- * const url = 'www.example.com';
391
- * const transformObj = new ImageTransform().canvas({ width: 200, height: 300, canvasBy: CanvasBy.OFFSET, xval: 100, yval: 150 });
392
- *
393
- * const transformURL = url.transform(transformObj);
394
- */
395
- canvas({ width, height, xval, yval, canvasBy, }: {
396
- width: string | number;
397
- height: string | number;
398
- xval?: string | number;
399
- yval?: string | number;
400
- canvasBy?: CanvasBy;
401
- }): ImageTransform;
402
- }
403
-
404
- export { ImageTransform as I };