@adtrackify/at-service-common 4.0.1 → 4.0.2

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 (759) hide show
  1. package/dist/cjs/__tests__/clients/acuity-client.spec.d.ts +1 -1
  2. package/dist/cjs/__tests__/clients/acuity-client.spec.js +43 -43
  3. package/dist/cjs/__tests__/clients/cross-platform-compression.spec.d.ts +1 -1
  4. package/dist/cjs/__tests__/clients/cross-platform-compression.spec.js +354 -354
  5. package/dist/cjs/__tests__/clients/dynamodb-client.spec.d.ts +1 -1
  6. package/dist/cjs/__tests__/clients/dynamodb-client.spec.js +194 -194
  7. package/dist/cjs/__tests__/clients/sqs-bundled-client.spec.d.ts +1 -1
  8. package/dist/cjs/__tests__/clients/sqs-bundled-client.spec.js +931 -931
  9. package/dist/cjs/__tests__/clients/sqs-bundling-contracts.spec.d.ts +1 -1
  10. package/dist/cjs/__tests__/clients/sqs-bundling-contracts.spec.js +563 -563
  11. package/dist/cjs/__tests__/clients/sqs-client.spec.d.ts +1 -1
  12. package/dist/cjs/__tests__/clients/sqs-client.spec.js +191 -191
  13. package/dist/cjs/__tests__/clients/sqs-unbundle.spec.d.ts +1 -1
  14. package/dist/cjs/__tests__/clients/sqs-unbundle.spec.js +1357 -1357
  15. package/dist/cjs/__tests__/db/contact-enrichments-db-service.spec.d.ts +1 -1
  16. package/dist/cjs/__tests__/db/contact-enrichments-db-service.spec.js +68 -68
  17. package/dist/cjs/__tests__/db/destinations-db-service.spec.d.ts +1 -1
  18. package/dist/cjs/__tests__/db/destinations-db-service.spec.js +125 -125
  19. package/dist/cjs/__tests__/db/products-db-service.spec.d.ts +1 -0
  20. package/dist/cjs/__tests__/db/products-db-service.spec.js +90 -0
  21. package/dist/cjs/__tests__/db/products-db-service.spec.js.map +1 -0
  22. package/dist/cjs/__tests__/db/shared-read-db-services.spec.d.ts +1 -1
  23. package/dist/cjs/__tests__/db/shared-read-db-services.spec.js +89 -89
  24. package/dist/cjs/__tests__/db/shopify-app-installs-db-service.spec.d.ts +1 -1
  25. package/dist/cjs/__tests__/db/shopify-app-installs-db-service.spec.js +104 -104
  26. package/dist/cjs/__tests__/db/subscriptions-db-service.spec.d.ts +1 -1
  27. package/dist/cjs/__tests__/db/subscriptions-db-service.spec.js +95 -95
  28. package/dist/cjs/__tests__/db/user-accounts-db-service.spec.d.ts +1 -1
  29. package/dist/cjs/__tests__/db/user-accounts-db-service.spec.js +76 -76
  30. package/dist/cjs/__tests__/helpers/account-users-helper.spec.d.ts +1 -1
  31. package/dist/cjs/__tests__/helpers/account-users-helper.spec.js +220 -220
  32. package/dist/cjs/__tests__/helpers/acuity-helper.spec.d.ts +1 -1
  33. package/dist/cjs/__tests__/helpers/acuity-helper.spec.js +69 -69
  34. package/dist/cjs/__tests__/helpers/api-key-auth-helper.spec.d.ts +1 -1
  35. package/dist/cjs/__tests__/helpers/api-key-auth-helper.spec.js +82 -82
  36. package/dist/cjs/__tests__/identity-cache/identity-cache-db-service.spec.d.ts +1 -1
  37. package/dist/cjs/__tests__/identity-cache/identity-cache-db-service.spec.js +676 -676
  38. package/dist/cjs/__tests__/identity-cache/identity-cache-dynamodb-service.spec.d.ts +1 -1
  39. package/dist/cjs/__tests__/identity-cache/identity-cache-dynamodb-service.spec.js +1140 -1140
  40. package/dist/cjs/__tests__/identity-cache/identity-cache-tier-routing.spec.d.ts +1 -1
  41. package/dist/cjs/__tests__/identity-cache/identity-cache-tier-routing.spec.js +851 -851
  42. package/dist/cjs/__tests__/identity-cache/identity-cache-tier-routing.spec.js.map +1 -1
  43. package/dist/cjs/__tests__/identity-cache/trait-merging-and-staleness.spec.d.ts +1 -1
  44. package/dist/cjs/__tests__/identity-cache/trait-merging-and-staleness.spec.js +1060 -1060
  45. package/dist/cjs/__tests__/identity-cache/volatile-traits-optimization.spec.d.ts +1 -1
  46. package/dist/cjs/__tests__/identity-cache/volatile-traits-optimization.spec.js +818 -818
  47. package/dist/cjs/__tests__/integration/sqs-bundling-roundtrip.spec.d.ts +1 -1
  48. package/dist/cjs/__tests__/integration/sqs-bundling-roundtrip.spec.js +584 -584
  49. package/dist/cjs/__tests__/libs/compress-decompress.spec.d.ts +1 -1
  50. package/dist/cjs/__tests__/libs/compress-decompress.spec.js +16 -16
  51. package/dist/cjs/__tests__/libs/contacts.spec.d.ts +1 -1
  52. package/dist/cjs/__tests__/libs/contacts.spec.js +294 -294
  53. package/dist/cjs/__tests__/libs/currency.spec.d.ts +1 -1
  54. package/dist/cjs/__tests__/libs/currency.spec.js +220 -220
  55. package/dist/cjs/__tests__/libs/dates.spec.d.ts +1 -1
  56. package/dist/cjs/__tests__/libs/dates.spec.js +130 -130
  57. package/dist/cjs/__tests__/libs/domain.spec.d.ts +1 -1
  58. package/dist/cjs/__tests__/libs/domain.spec.js +107 -107
  59. package/dist/cjs/__tests__/libs/numbers.spec.d.ts +1 -1
  60. package/dist/cjs/__tests__/libs/numbers.spec.js +261 -261
  61. package/dist/cjs/__tests__/s3-client/s3-client.spec.d.ts +1 -1
  62. package/dist/cjs/__tests__/s3-client/s3-client.spec.js +33 -33
  63. package/dist/cjs/__tests__/services/acuity-api-service.spec.d.ts +1 -1
  64. package/dist/cjs/__tests__/services/acuity-api-service.spec.js +71 -71
  65. package/dist/cjs/__tests__/services/cost/cost-calculation-types.spec.d.ts +1 -0
  66. package/dist/cjs/__tests__/services/cost/cost-calculation-types.spec.js +24 -0
  67. package/dist/cjs/__tests__/services/cost/cost-calculation-types.spec.js.map +1 -0
  68. package/dist/cjs/__tests__/services/cost/cost-calculator-service.spec.d.ts +1 -0
  69. package/dist/cjs/__tests__/services/cost/cost-calculator-service.spec.js +3320 -0
  70. package/dist/cjs/__tests__/services/cost/cost-calculator-service.spec.js.map +1 -0
  71. package/dist/cjs/__tests__/services/cost/cost-currency-service.spec.d.ts +1 -0
  72. package/dist/cjs/__tests__/services/cost/cost-currency-service.spec.js +115 -0
  73. package/dist/cjs/__tests__/services/cost/cost-currency-service.spec.js.map +1 -0
  74. package/dist/cjs/__tests__/services/cost/cost-filter-service.spec.d.ts +1 -0
  75. package/dist/cjs/__tests__/services/cost/cost-filter-service.spec.js +469 -0
  76. package/dist/cjs/__tests__/services/cost/cost-filter-service.spec.js.map +1 -0
  77. package/dist/cjs/__tests__/services/cost/order-cost/order-cost-resolution-service.spec.d.ts +1 -0
  78. package/dist/cjs/__tests__/services/cost/order-cost/order-cost-resolution-service.spec.js +207 -0
  79. package/dist/cjs/__tests__/services/cost/order-cost/order-cost-resolution-service.spec.js.map +1 -0
  80. package/dist/cjs/__tests__/services/currency-exchange-rate-lookup-service.spec.d.ts +1 -0
  81. package/dist/cjs/__tests__/services/currency-exchange-rate-lookup-service.spec.js +35 -0
  82. package/dist/cjs/__tests__/services/currency-exchange-rate-lookup-service.spec.js.map +1 -0
  83. package/dist/cjs/__tests__/services/email-verification/contact-email-verification-service.spec.d.ts +1 -1
  84. package/dist/cjs/__tests__/services/email-verification/contact-email-verification-service.spec.js +93 -93
  85. package/dist/cjs/__tests__/services/email-verification/email-verification-service.spec.d.ts +1 -1
  86. package/dist/cjs/__tests__/services/email-verification/email-verification-service.spec.js +57 -57
  87. package/dist/cjs/__tests__/shopify/shopify-graphql-transformer.spec.d.ts +1 -1
  88. package/dist/cjs/__tests__/shopify/shopify-graphql-transformer.spec.js +35 -35
  89. package/dist/cjs/__tests__/unit/libs/api-router/public-api-router.spec.d.ts +1 -1
  90. package/dist/cjs/__tests__/unit/libs/api-router/public-api-router.spec.js +181 -181
  91. package/dist/cjs/__tests__/unit/libs/api-router/route-matcher.spec.d.ts +1 -1
  92. package/dist/cjs/__tests__/unit/libs/api-router/route-matcher.spec.js +69 -69
  93. package/dist/cjs/__tests__/utils/custom-measure-formula-utils.spec.d.ts +1 -1
  94. package/dist/cjs/__tests__/utils/custom-measure-formula-utils.spec.js +139 -139
  95. package/dist/cjs/clients/generic/cognito-client.d.ts +23 -23
  96. package/dist/cjs/clients/generic/cognito-client.js +209 -209
  97. package/dist/cjs/clients/generic/dynamodb-client.d.ts +20 -20
  98. package/dist/cjs/clients/generic/dynamodb-client.js +235 -235
  99. package/dist/cjs/clients/generic/eventbridge-client.d.ts +14 -14
  100. package/dist/cjs/clients/generic/eventbridge-client.js +51 -51
  101. package/dist/cjs/clients/generic/http-client.d.ts +14 -14
  102. package/dist/cjs/clients/generic/http-client.js +61 -61
  103. package/dist/cjs/clients/generic/index.d.ts +13 -13
  104. package/dist/cjs/clients/generic/index.js +29 -29
  105. package/dist/cjs/clients/generic/lambda-invoke-client.d.ts +10 -10
  106. package/dist/cjs/clients/generic/lambda-invoke-client.js +39 -39
  107. package/dist/cjs/clients/generic/location-client.d.ts +8 -8
  108. package/dist/cjs/clients/generic/location-client.js +31 -31
  109. package/dist/cjs/clients/generic/redis-client.d.ts +33 -33
  110. package/dist/cjs/clients/generic/redis-client.js +191 -191
  111. package/dist/cjs/clients/generic/s3-client.d.ts +23 -23
  112. package/dist/cjs/clients/generic/s3-client.js +216 -216
  113. package/dist/cjs/clients/generic/singlestore-db-client.d.ts +14 -14
  114. package/dist/cjs/clients/generic/singlestore-db-client.js +67 -67
  115. package/dist/cjs/clients/generic/sqs-bundled-client.d.ts +15 -15
  116. package/dist/cjs/clients/generic/sqs-bundled-client.js +311 -311
  117. package/dist/cjs/clients/generic/sqs-bundled-client.types.d.ts +53 -53
  118. package/dist/cjs/clients/generic/sqs-bundled-client.types.js +17 -17
  119. package/dist/cjs/clients/generic/sqs-client.d.ts +53 -53
  120. package/dist/cjs/clients/generic/sqs-client.js +285 -285
  121. package/dist/cjs/clients/generic/sqs-unbundle.d.ts +32 -32
  122. package/dist/cjs/clients/generic/sqs-unbundle.js +144 -144
  123. package/dist/cjs/clients/index.d.ts +3 -3
  124. package/dist/cjs/clients/index.js +19 -19
  125. package/dist/cjs/clients/internal-api/accounts-client.d.ts +91 -91
  126. package/dist/cjs/clients/internal-api/accounts-client.js +129 -129
  127. package/dist/cjs/clients/internal-api/cache-lambda-client.d.ts +26 -26
  128. package/dist/cjs/clients/internal-api/cache-lambda-client.js +89 -89
  129. package/dist/cjs/clients/internal-api/db-management-client.d.ts +18 -18
  130. package/dist/cjs/clients/internal-api/db-management-client.js +36 -36
  131. package/dist/cjs/clients/internal-api/destinations-client.d.ts +34 -34
  132. package/dist/cjs/clients/internal-api/destinations-client.js +79 -79
  133. package/dist/cjs/clients/internal-api/event-collector-client.d.ts +20 -20
  134. package/dist/cjs/clients/internal-api/event-collector-client.js +36 -36
  135. package/dist/cjs/clients/internal-api/identity-client.d.ts +31 -31
  136. package/dist/cjs/clients/internal-api/identity-client.js +91 -91
  137. package/dist/cjs/clients/internal-api/index.d.ts +9 -9
  138. package/dist/cjs/clients/internal-api/index.js +25 -25
  139. package/dist/cjs/clients/internal-api/shopify-app-install-client.d.ts +37 -37
  140. package/dist/cjs/clients/internal-api/shopify-app-install-client.js +81 -81
  141. package/dist/cjs/clients/internal-api/subscriptions-client.d.ts +26 -26
  142. package/dist/cjs/clients/internal-api/subscriptions-client.js +77 -77
  143. package/dist/cjs/clients/internal-api/users-auth-client.d.ts +35 -35
  144. package/dist/cjs/clients/internal-api/users-auth-client.js +110 -110
  145. package/dist/cjs/clients/third-party/acuity-client.d.ts +10 -10
  146. package/dist/cjs/clients/third-party/acuity-client.js +40 -40
  147. package/dist/cjs/clients/third-party/emailable-client.d.ts +7 -7
  148. package/dist/cjs/clients/third-party/emailable-client.js +25 -25
  149. package/dist/cjs/clients/third-party/exchange-rate-api-client.d.ts +17 -17
  150. package/dist/cjs/clients/third-party/exchange-rate-api-client.js +19 -19
  151. package/dist/cjs/clients/third-party/index.d.ts +5 -5
  152. package/dist/cjs/clients/third-party/index.js +21 -21
  153. package/dist/cjs/clients/third-party/loops-client.d.ts +10 -10
  154. package/dist/cjs/clients/third-party/loops-client.js +30 -30
  155. package/dist/cjs/clients/third-party/shopify/graphql-order-queries.d.ts +25 -25
  156. package/dist/cjs/clients/third-party/shopify/graphql-order-queries.js +4 -4
  157. package/dist/cjs/clients/third-party/shopify/graphql-product-queries.d.ts +2 -2
  158. package/dist/cjs/clients/third-party/shopify/graphql-product-queries.js +5 -5
  159. package/dist/cjs/clients/third-party/shopify/shopify-graphql-client.d.ts +10 -10
  160. package/dist/cjs/clients/third-party/shopify/shopify-graphql-client.js +161 -161
  161. package/dist/cjs/clients/third-party/shopify-client.d.ts +29 -29
  162. package/dist/cjs/clients/third-party/shopify-client.js +146 -146
  163. package/dist/cjs/constants/index.d.ts +1 -1
  164. package/dist/cjs/constants/index.js +17 -17
  165. package/dist/cjs/constants/sqs.d.ts +20 -20
  166. package/dist/cjs/constants/sqs.js +26 -26
  167. package/dist/cjs/helpers/account-users-helper.d.ts +2 -2
  168. package/dist/cjs/helpers/account-users-helper.js +22 -22
  169. package/dist/cjs/helpers/acuity-helper.d.ts +4 -4
  170. package/dist/cjs/helpers/acuity-helper.js +56 -56
  171. package/dist/cjs/helpers/api-key-auth-helper.d.ts +9 -9
  172. package/dist/cjs/helpers/api-key-auth-helper.js +40 -40
  173. package/dist/cjs/helpers/api-key-authorizer-helper.d.ts +36 -36
  174. package/dist/cjs/helpers/api-key-authorizer-helper.js +87 -87
  175. package/dist/cjs/helpers/identity-cache-helper.d.ts +30 -30
  176. package/dist/cjs/helpers/identity-cache-helper.js +253 -253
  177. package/dist/cjs/helpers/identity-cache-helper.js.map +1 -1
  178. package/dist/cjs/helpers/index.d.ts +10 -10
  179. package/dist/cjs/helpers/index.js +26 -26
  180. package/dist/cjs/helpers/input-validation-helper.d.ts +3 -3
  181. package/dist/cjs/helpers/input-validation-helper.js +22 -22
  182. package/dist/cjs/helpers/logging-helper.d.ts +16 -16
  183. package/dist/cjs/helpers/logging-helper.js +84 -84
  184. package/dist/cjs/helpers/response-helper.d.ts +18 -18
  185. package/dist/cjs/helpers/response-helper.js +43 -43
  186. package/dist/cjs/helpers/shopify-helper.d.ts +9 -9
  187. package/dist/cjs/helpers/shopify-helper.js +26 -26
  188. package/dist/cjs/helpers/sqs-utils.d.ts +6 -6
  189. package/dist/cjs/helpers/sqs-utils.js +14 -14
  190. package/dist/cjs/index.d.ts +7 -7
  191. package/dist/cjs/index.js +23 -23
  192. package/dist/cjs/libs/api-router/index.d.ts +2 -2
  193. package/dist/cjs/libs/api-router/index.js +18 -18
  194. package/dist/cjs/libs/api-router/public-api-router.d.ts +3 -3
  195. package/dist/cjs/libs/api-router/public-api-router.js +36 -36
  196. package/dist/cjs/libs/api-router/route-matcher.d.ts +21 -21
  197. package/dist/cjs/libs/api-router/route-matcher.js +36 -36
  198. package/dist/cjs/libs/click-id-parser.d.ts +23 -23
  199. package/dist/cjs/libs/click-id-parser.js +49 -49
  200. package/dist/cjs/libs/compression.d.ts +2 -2
  201. package/dist/cjs/libs/compression.js +33 -33
  202. package/dist/cjs/libs/contacts.d.ts +7 -7
  203. package/dist/cjs/libs/contacts.js +152 -152
  204. package/dist/cjs/libs/cookie.d.ts +17 -17
  205. package/dist/cjs/libs/cookie.js +76 -76
  206. package/dist/cjs/libs/crypto.d.ts +4 -4
  207. package/dist/cjs/libs/crypto.js +25 -25
  208. package/dist/cjs/libs/csv.d.ts +2 -2
  209. package/dist/cjs/libs/csv.js +35 -35
  210. package/dist/cjs/libs/currency.d.ts +1 -1
  211. package/dist/cjs/libs/currency.js +29 -29
  212. package/dist/cjs/libs/dates.d.ts +12 -12
  213. package/dist/cjs/libs/dates.js +96 -96
  214. package/dist/cjs/libs/domain.d.ts +2 -2
  215. package/dist/cjs/libs/domain.js +38 -38
  216. package/dist/cjs/libs/emails.d.ts +8 -8
  217. package/dist/cjs/libs/emails.js +154 -154
  218. package/dist/cjs/libs/http-error.d.ts +21 -21
  219. package/dist/cjs/libs/http-error.js +63 -63
  220. package/dist/cjs/libs/http-status-codes.d.ts +58 -58
  221. package/dist/cjs/libs/http-status-codes.js +62 -62
  222. package/dist/cjs/libs/index.d.ts +19 -19
  223. package/dist/cjs/libs/index.js +35 -35
  224. package/dist/cjs/libs/numbers.d.ts +1 -1
  225. package/dist/cjs/libs/numbers.js +15 -15
  226. package/dist/cjs/libs/referrer-parser/index.d.ts +2 -2
  227. package/dist/cjs/libs/referrer-parser/index.js +18 -18
  228. package/dist/cjs/libs/referrer-parser/referrer-data.d.ts +9 -9
  229. package/dist/cjs/libs/referrer-parser/referrer-data.js +3307 -3307
  230. package/dist/cjs/libs/referrer-parser/referrer-parser-util.d.ts +20 -20
  231. package/dist/cjs/libs/referrer-parser/referrer-parser-util.js +131 -131
  232. package/dist/cjs/libs/strings.d.ts +3 -3
  233. package/dist/cjs/libs/strings.js +46 -46
  234. package/dist/cjs/libs/traits.d.ts +6 -6
  235. package/dist/cjs/libs/traits.js +65 -65
  236. package/dist/cjs/libs/url.d.ts +1 -1
  237. package/dist/cjs/libs/url.js +13 -13
  238. package/dist/cjs/services/acuity-api-service.d.ts +9 -9
  239. package/dist/cjs/services/acuity-api-service.js +73 -73
  240. package/dist/cjs/services/cache/generic-cached-object.d.ts +5 -5
  241. package/dist/cjs/services/cache/generic-cached-object.js +2 -2
  242. package/dist/cjs/services/cache/index.d.ts +1 -1
  243. package/dist/cjs/services/cache/index.js +17 -17
  244. package/dist/cjs/services/cache/product-cache-service.d.ts +21 -21
  245. package/dist/cjs/services/cache/product-cache-service.js +76 -76
  246. package/dist/cjs/services/cost/cost-calculation-types.d.ts +69 -0
  247. package/dist/cjs/services/cost/cost-calculation-types.js +20 -0
  248. package/dist/cjs/services/cost/cost-calculation-types.js.map +1 -0
  249. package/dist/cjs/services/cost/cost-calculator-service.d.ts +24 -0
  250. package/dist/cjs/services/cost/cost-calculator-service.js +457 -0
  251. package/dist/cjs/services/cost/cost-calculator-service.js.map +1 -0
  252. package/dist/cjs/services/cost/cost-currency-service.d.ts +6 -0
  253. package/dist/cjs/services/cost/cost-currency-service.js +88 -0
  254. package/dist/cjs/services/cost/cost-currency-service.js.map +1 -0
  255. package/dist/cjs/services/cost/cost-filter-service.d.ts +10 -0
  256. package/dist/cjs/services/cost/cost-filter-service.js +122 -0
  257. package/dist/cjs/services/cost/cost-filter-service.js.map +1 -0
  258. package/dist/cjs/services/cost/index.d.ts +5 -0
  259. package/dist/cjs/services/cost/index.js +22 -0
  260. package/dist/cjs/services/cost/index.js.map +1 -0
  261. package/dist/cjs/services/cost/order-cost/index.d.ts +2 -0
  262. package/dist/cjs/services/cost/order-cost/index.js +19 -0
  263. package/dist/cjs/services/cost/order-cost/index.js.map +1 -0
  264. package/dist/cjs/services/cost/order-cost/order-cost-resolution-service.d.ts +23 -0
  265. package/dist/cjs/services/cost/order-cost/order-cost-resolution-service.js +362 -0
  266. package/dist/cjs/services/cost/order-cost/order-cost-resolution-service.js.map +1 -0
  267. package/dist/cjs/services/cost/order-cost/order-cost-resolution-types.d.ts +37 -0
  268. package/dist/cjs/services/cost/order-cost/order-cost-resolution-types.js +3 -0
  269. package/dist/cjs/services/cost/order-cost/order-cost-resolution-types.js.map +1 -0
  270. package/dist/cjs/services/currency-exchange-rate-lookup-service.d.ts +12 -11
  271. package/dist/cjs/services/currency-exchange-rate-lookup-service.js +94 -66
  272. package/dist/cjs/services/currency-exchange-rate-lookup-service.js.map +1 -1
  273. package/dist/cjs/services/db/accounts-db-service.d.ts +9 -9
  274. package/dist/cjs/services/db/accounts-db-service.js +33 -33
  275. package/dist/cjs/services/db/api-keys-db-service.d.ts +10 -10
  276. package/dist/cjs/services/db/api-keys-db-service.js +36 -36
  277. package/dist/cjs/services/db/contact-enrichments-db-service.d.ts +15 -15
  278. package/dist/cjs/services/db/contact-enrichments-db-service.js +94 -94
  279. package/dist/cjs/services/db/currency-exchange-rates-db-service.d.ts +21 -21
  280. package/dist/cjs/services/db/currency-exchange-rates-db-service.js +39 -39
  281. package/dist/cjs/services/db/custom-measures-db-service.d.ts +14 -14
  282. package/dist/cjs/services/db/custom-measures-db-service.js +48 -48
  283. package/dist/cjs/services/db/destinations-db-service.d.ts +13 -13
  284. package/dist/cjs/services/db/destinations-db-service.js +74 -74
  285. package/dist/cjs/services/db/identity-cache-db-service.d.ts +28 -28
  286. package/dist/cjs/services/db/identity-cache-db-service.js +320 -320
  287. package/dist/cjs/services/db/identity-cache-dynamodb-service.d.ts +44 -44
  288. package/dist/cjs/services/db/identity-cache-dynamodb-service.js +734 -734
  289. package/dist/cjs/services/db/identity-cache-dynamodb-service.js.map +1 -1
  290. package/dist/cjs/services/db/index.d.ts +19 -17
  291. package/dist/cjs/services/db/index.js +35 -33
  292. package/dist/cjs/services/db/index.js.map +1 -1
  293. package/dist/cjs/services/db/log-events-db-service.d.ts +11 -11
  294. package/dist/cjs/services/db/log-events-db-service.js +181 -181
  295. package/dist/cjs/services/db/pixels-db-service.d.ts +8 -8
  296. package/dist/cjs/services/db/pixels-db-service.js +35 -35
  297. package/dist/cjs/services/db/products-db-service-types.d.ts +10 -0
  298. package/dist/cjs/services/db/products-db-service-types.js +3 -0
  299. package/dist/cjs/services/db/products-db-service-types.js.map +1 -0
  300. package/dist/cjs/services/db/products-db-service.d.ts +19 -0
  301. package/dist/cjs/services/db/products-db-service.js +282 -0
  302. package/dist/cjs/services/db/products-db-service.js.map +1 -0
  303. package/dist/cjs/services/db/purchasable-contacts-db-service.d.ts +9 -9
  304. package/dist/cjs/services/db/purchasable-contacts-db-service.js +43 -43
  305. package/dist/cjs/services/db/purchased-contacts/index.d.ts +2 -2
  306. package/dist/cjs/services/db/purchased-contacts/index.js +18 -18
  307. package/dist/cjs/services/db/purchased-contacts/purchased-contacts-db-service.d.ts +18 -18
  308. package/dist/cjs/services/db/purchased-contacts/purchased-contacts-db-service.js +152 -152
  309. package/dist/cjs/services/db/purchased-contacts/types.d.ts +11 -11
  310. package/dist/cjs/services/db/purchased-contacts/types.js +2 -2
  311. package/dist/cjs/services/db/shopify-app-installs-db-service.d.ts +10 -10
  312. package/dist/cjs/services/db/shopify-app-installs-db-service.js +52 -52
  313. package/dist/cjs/services/db/shopify-products-cache-db-service.d.ts +16 -16
  314. package/dist/cjs/services/db/shopify-products-cache-db-service.js +73 -73
  315. package/dist/cjs/services/db/subscriptions-db-service.d.ts +11 -11
  316. package/dist/cjs/services/db/subscriptions-db-service.js +38 -38
  317. package/dist/cjs/services/db/tracking-events-db-service.d.ts +21 -21
  318. package/dist/cjs/services/db/tracking-events-db-service.js +188 -188
  319. package/dist/cjs/services/db/user-accounts-db-service.d.ts +7 -7
  320. package/dist/cjs/services/db/user-accounts-db-service.js +17 -17
  321. package/dist/cjs/services/email-verification/contact-email-verification-service.d.ts +7 -7
  322. package/dist/cjs/services/email-verification/contact-email-verification-service.js +101 -101
  323. package/dist/cjs/services/email-verification/email-verification-service.d.ts +19 -19
  324. package/dist/cjs/services/email-verification/email-verification-service.js +131 -131
  325. package/dist/cjs/services/email-verification/index.d.ts +2 -2
  326. package/dist/cjs/services/email-verification/index.js +18 -18
  327. package/dist/cjs/services/eventbridge-integration-service.d.ts +9 -9
  328. package/dist/cjs/services/eventbridge-integration-service.js +28 -28
  329. package/dist/cjs/services/events/index.d.ts +3 -3
  330. package/dist/cjs/services/events/index.js +19 -19
  331. package/dist/cjs/services/events/log-event-service.d.ts +19 -19
  332. package/dist/cjs/services/events/log-event-service.js +77 -77
  333. package/dist/cjs/services/events/metric-event-service.d.ts +9 -9
  334. package/dist/cjs/services/events/metric-event-service.js +49 -49
  335. package/dist/cjs/services/events/tracking-event-sqs-service.d.ts +8 -8
  336. package/dist/cjs/services/events/tracking-event-sqs-service.js +34 -34
  337. package/dist/cjs/services/generic-cache-service.d.ts +7 -7
  338. package/dist/cjs/services/generic-cache-service.js +33 -33
  339. package/dist/cjs/services/index.d.ts +11 -10
  340. package/dist/cjs/services/index.js +27 -26
  341. package/dist/cjs/services/index.js.map +1 -1
  342. package/dist/cjs/services/ipdata-lookup-service.d.ts +20 -20
  343. package/dist/cjs/services/ipdata-lookup-service.js +112 -112
  344. package/dist/cjs/services/shopify/index.d.ts +2 -2
  345. package/dist/cjs/services/shopify/index.js +18 -18
  346. package/dist/cjs/services/shopify/products/index.d.ts +1 -1
  347. package/dist/cjs/services/shopify/products/index.js +17 -17
  348. package/dist/cjs/services/shopify/products/shopify-products-serviceV2.d.ts +17 -17
  349. package/dist/cjs/services/shopify/products/shopify-products-serviceV2.js +112 -112
  350. package/dist/cjs/services/shopify/shopify-graphql-transformer.d.ts +8 -8
  351. package/dist/cjs/services/shopify/shopify-graphql-transformer.js +141 -141
  352. package/dist/cjs/types/acuity-types.d.ts +74 -74
  353. package/dist/cjs/types/acuity-types.js +2 -2
  354. package/dist/cjs/types/api-response.d.ts +6 -6
  355. package/dist/cjs/types/api-response.js +2 -2
  356. package/dist/cjs/types/index.d.ts +4 -4
  357. package/dist/cjs/types/index.js +33 -33
  358. package/dist/cjs/types/internal-events/event-detail-types.d.ts +20 -20
  359. package/dist/cjs/types/internal-events/event-detail-types.js +27 -27
  360. package/dist/cjs/types/internal-events/index.d.ts +1 -1
  361. package/dist/cjs/types/internal-events/index.js +17 -17
  362. package/dist/cjs/types/shopify-graphql-types/admin.generated.d.ts +123 -123
  363. package/dist/cjs/types/shopify-graphql-types/admin.generated.js +2 -2
  364. package/dist/cjs/types/shopify-graphql-types/admin.types.d.ts +26289 -26289
  365. package/dist/cjs/types/shopify-graphql-types/admin.types.js +5311 -5311
  366. package/dist/cjs/types/shopify-graphql-types/index.d.ts +2 -2
  367. package/dist/cjs/types/shopify-graphql-types/index.js +18 -18
  368. package/dist/cjs/types/shopify-rest-types.d.ts +767 -767
  369. package/dist/cjs/types/shopify-rest-types.js +2 -2
  370. package/dist/cjs/utils/compression.d.ts +36 -36
  371. package/dist/cjs/utils/compression.js +198 -198
  372. package/dist/cjs/utils/custom-measure-formula-utils.d.ts +6 -6
  373. package/dist/cjs/utils/custom-measure-formula-utils.js +209 -209
  374. package/dist/cjs/utils/index.d.ts +4 -4
  375. package/dist/cjs/utils/index.js +20 -20
  376. package/dist/cjs/utils/retry-envelope.d.ts +12 -12
  377. package/dist/cjs/utils/retry-envelope.js +28 -28
  378. package/dist/cjs/utils/size.d.ts +2 -2
  379. package/dist/cjs/utils/size.js +49 -49
  380. package/dist/esm/__tests__/clients/acuity-client.spec.d.ts +1 -1
  381. package/dist/esm/__tests__/clients/acuity-client.spec.js +41 -41
  382. package/dist/esm/__tests__/clients/cross-platform-compression.spec.d.ts +1 -1
  383. package/dist/esm/__tests__/clients/cross-platform-compression.spec.js +329 -329
  384. package/dist/esm/__tests__/clients/dynamodb-client.spec.d.ts +1 -1
  385. package/dist/esm/__tests__/clients/dynamodb-client.spec.js +192 -192
  386. package/dist/esm/__tests__/clients/sqs-bundled-client.spec.d.ts +1 -1
  387. package/dist/esm/__tests__/clients/sqs-bundled-client.spec.js +906 -906
  388. package/dist/esm/__tests__/clients/sqs-bundling-contracts.spec.d.ts +1 -1
  389. package/dist/esm/__tests__/clients/sqs-bundling-contracts.spec.js +538 -538
  390. package/dist/esm/__tests__/clients/sqs-client.spec.d.ts +1 -1
  391. package/dist/esm/__tests__/clients/sqs-client.spec.js +189 -189
  392. package/dist/esm/__tests__/clients/sqs-unbundle.spec.d.ts +1 -1
  393. package/dist/esm/__tests__/clients/sqs-unbundle.spec.js +1355 -1355
  394. package/dist/esm/__tests__/db/contact-enrichments-db-service.spec.d.ts +1 -1
  395. package/dist/esm/__tests__/db/contact-enrichments-db-service.spec.js +66 -66
  396. package/dist/esm/__tests__/db/destinations-db-service.spec.d.ts +1 -1
  397. package/dist/esm/__tests__/db/destinations-db-service.spec.js +123 -123
  398. package/dist/esm/__tests__/db/products-db-service.spec.d.ts +1 -0
  399. package/dist/esm/__tests__/db/products-db-service.spec.js +88 -0
  400. package/dist/esm/__tests__/db/products-db-service.spec.js.map +1 -0
  401. package/dist/esm/__tests__/db/shared-read-db-services.spec.d.ts +1 -1
  402. package/dist/esm/__tests__/db/shared-read-db-services.spec.js +87 -87
  403. package/dist/esm/__tests__/db/shopify-app-installs-db-service.spec.d.ts +1 -1
  404. package/dist/esm/__tests__/db/shopify-app-installs-db-service.spec.js +102 -102
  405. package/dist/esm/__tests__/db/subscriptions-db-service.spec.d.ts +1 -1
  406. package/dist/esm/__tests__/db/subscriptions-db-service.spec.js +93 -93
  407. package/dist/esm/__tests__/db/user-accounts-db-service.spec.d.ts +1 -1
  408. package/dist/esm/__tests__/db/user-accounts-db-service.spec.js +74 -74
  409. package/dist/esm/__tests__/helpers/account-users-helper.spec.d.ts +1 -1
  410. package/dist/esm/__tests__/helpers/account-users-helper.spec.js +218 -218
  411. package/dist/esm/__tests__/helpers/acuity-helper.spec.d.ts +1 -1
  412. package/dist/esm/__tests__/helpers/acuity-helper.spec.js +67 -67
  413. package/dist/esm/__tests__/helpers/api-key-auth-helper.spec.d.ts +1 -1
  414. package/dist/esm/__tests__/helpers/api-key-auth-helper.spec.js +80 -80
  415. package/dist/esm/__tests__/identity-cache/identity-cache-db-service.spec.d.ts +1 -1
  416. package/dist/esm/__tests__/identity-cache/identity-cache-db-service.spec.js +674 -674
  417. package/dist/esm/__tests__/identity-cache/identity-cache-dynamodb-service.spec.d.ts +1 -1
  418. package/dist/esm/__tests__/identity-cache/identity-cache-dynamodb-service.spec.js +1138 -1138
  419. package/dist/esm/__tests__/identity-cache/identity-cache-tier-routing.spec.d.ts +1 -1
  420. package/dist/esm/__tests__/identity-cache/identity-cache-tier-routing.spec.js +849 -849
  421. package/dist/esm/__tests__/identity-cache/identity-cache-tier-routing.spec.js.map +1 -1
  422. package/dist/esm/__tests__/identity-cache/trait-merging-and-staleness.spec.d.ts +1 -1
  423. package/dist/esm/__tests__/identity-cache/trait-merging-and-staleness.spec.js +1058 -1058
  424. package/dist/esm/__tests__/identity-cache/volatile-traits-optimization.spec.d.ts +1 -1
  425. package/dist/esm/__tests__/identity-cache/volatile-traits-optimization.spec.js +816 -816
  426. package/dist/esm/__tests__/integration/sqs-bundling-roundtrip.spec.d.ts +1 -1
  427. package/dist/esm/__tests__/integration/sqs-bundling-roundtrip.spec.js +582 -582
  428. package/dist/esm/__tests__/libs/compress-decompress.spec.d.ts +1 -1
  429. package/dist/esm/__tests__/libs/compress-decompress.spec.js +14 -14
  430. package/dist/esm/__tests__/libs/contacts.spec.d.ts +1 -1
  431. package/dist/esm/__tests__/libs/contacts.spec.js +292 -292
  432. package/dist/esm/__tests__/libs/currency.spec.d.ts +1 -1
  433. package/dist/esm/__tests__/libs/currency.spec.js +218 -218
  434. package/dist/esm/__tests__/libs/dates.spec.d.ts +1 -1
  435. package/dist/esm/__tests__/libs/dates.spec.js +128 -128
  436. package/dist/esm/__tests__/libs/domain.spec.d.ts +1 -1
  437. package/dist/esm/__tests__/libs/domain.spec.js +105 -105
  438. package/dist/esm/__tests__/libs/numbers.spec.d.ts +1 -1
  439. package/dist/esm/__tests__/libs/numbers.spec.js +259 -259
  440. package/dist/esm/__tests__/s3-client/s3-client.spec.d.ts +1 -1
  441. package/dist/esm/__tests__/s3-client/s3-client.spec.js +31 -31
  442. package/dist/esm/__tests__/services/acuity-api-service.spec.d.ts +1 -1
  443. package/dist/esm/__tests__/services/acuity-api-service.spec.js +69 -69
  444. package/dist/esm/__tests__/services/cost/cost-calculation-types.spec.d.ts +1 -0
  445. package/dist/esm/__tests__/services/cost/cost-calculation-types.spec.js +22 -0
  446. package/dist/esm/__tests__/services/cost/cost-calculation-types.spec.js.map +1 -0
  447. package/dist/esm/__tests__/services/cost/cost-calculator-service.spec.d.ts +1 -0
  448. package/dist/esm/__tests__/services/cost/cost-calculator-service.spec.js +3318 -0
  449. package/dist/esm/__tests__/services/cost/cost-calculator-service.spec.js.map +1 -0
  450. package/dist/esm/__tests__/services/cost/cost-currency-service.spec.d.ts +1 -0
  451. package/dist/esm/__tests__/services/cost/cost-currency-service.spec.js +113 -0
  452. package/dist/esm/__tests__/services/cost/cost-currency-service.spec.js.map +1 -0
  453. package/dist/esm/__tests__/services/cost/cost-filter-service.spec.d.ts +1 -0
  454. package/dist/esm/__tests__/services/cost/cost-filter-service.spec.js +467 -0
  455. package/dist/esm/__tests__/services/cost/cost-filter-service.spec.js.map +1 -0
  456. package/dist/esm/__tests__/services/cost/order-cost/order-cost-resolution-service.spec.d.ts +1 -0
  457. package/dist/esm/__tests__/services/cost/order-cost/order-cost-resolution-service.spec.js +205 -0
  458. package/dist/esm/__tests__/services/cost/order-cost/order-cost-resolution-service.spec.js.map +1 -0
  459. package/dist/esm/__tests__/services/currency-exchange-rate-lookup-service.spec.d.ts +1 -0
  460. package/dist/esm/__tests__/services/currency-exchange-rate-lookup-service.spec.js +33 -0
  461. package/dist/esm/__tests__/services/currency-exchange-rate-lookup-service.spec.js.map +1 -0
  462. package/dist/esm/__tests__/services/email-verification/contact-email-verification-service.spec.d.ts +1 -1
  463. package/dist/esm/__tests__/services/email-verification/contact-email-verification-service.spec.js +91 -91
  464. package/dist/esm/__tests__/services/email-verification/email-verification-service.spec.d.ts +1 -1
  465. package/dist/esm/__tests__/services/email-verification/email-verification-service.spec.js +55 -55
  466. package/dist/esm/__tests__/shopify/shopify-graphql-transformer.spec.d.ts +1 -1
  467. package/dist/esm/__tests__/shopify/shopify-graphql-transformer.spec.js +33 -33
  468. package/dist/esm/__tests__/unit/libs/api-router/public-api-router.spec.d.ts +1 -1
  469. package/dist/esm/__tests__/unit/libs/api-router/public-api-router.spec.js +156 -156
  470. package/dist/esm/__tests__/unit/libs/api-router/route-matcher.spec.d.ts +1 -1
  471. package/dist/esm/__tests__/unit/libs/api-router/route-matcher.spec.js +67 -67
  472. package/dist/esm/__tests__/utils/custom-measure-formula-utils.spec.d.ts +1 -1
  473. package/dist/esm/__tests__/utils/custom-measure-formula-utils.spec.js +137 -137
  474. package/dist/esm/clients/generic/cognito-client.d.ts +23 -23
  475. package/dist/esm/clients/generic/cognito-client.js +204 -204
  476. package/dist/esm/clients/generic/dynamodb-client.d.ts +20 -20
  477. package/dist/esm/clients/generic/dynamodb-client.js +231 -231
  478. package/dist/esm/clients/generic/eventbridge-client.d.ts +14 -14
  479. package/dist/esm/clients/generic/eventbridge-client.js +47 -47
  480. package/dist/esm/clients/generic/http-client.d.ts +14 -14
  481. package/dist/esm/clients/generic/http-client.js +53 -53
  482. package/dist/esm/clients/generic/index.d.ts +13 -13
  483. package/dist/esm/clients/generic/index.js +13 -13
  484. package/dist/esm/clients/generic/lambda-invoke-client.d.ts +10 -10
  485. package/dist/esm/clients/generic/lambda-invoke-client.js +35 -35
  486. package/dist/esm/clients/generic/location-client.d.ts +8 -8
  487. package/dist/esm/clients/generic/location-client.js +27 -27
  488. package/dist/esm/clients/generic/redis-client.d.ts +33 -33
  489. package/dist/esm/clients/generic/redis-client.js +184 -184
  490. package/dist/esm/clients/generic/s3-client.d.ts +23 -23
  491. package/dist/esm/clients/generic/s3-client.js +209 -209
  492. package/dist/esm/clients/generic/singlestore-db-client.d.ts +14 -14
  493. package/dist/esm/clients/generic/singlestore-db-client.js +40 -40
  494. package/dist/esm/clients/generic/sqs-bundled-client.d.ts +15 -15
  495. package/dist/esm/clients/generic/sqs-bundled-client.js +307 -307
  496. package/dist/esm/clients/generic/sqs-bundled-client.types.d.ts +53 -53
  497. package/dist/esm/clients/generic/sqs-bundled-client.types.js +14 -14
  498. package/dist/esm/clients/generic/sqs-client.d.ts +53 -53
  499. package/dist/esm/clients/generic/sqs-client.js +281 -281
  500. package/dist/esm/clients/generic/sqs-unbundle.d.ts +32 -32
  501. package/dist/esm/clients/generic/sqs-unbundle.js +137 -137
  502. package/dist/esm/clients/index.d.ts +3 -3
  503. package/dist/esm/clients/index.js +3 -3
  504. package/dist/esm/clients/internal-api/accounts-client.d.ts +91 -91
  505. package/dist/esm/clients/internal-api/accounts-client.js +125 -125
  506. package/dist/esm/clients/internal-api/cache-lambda-client.d.ts +26 -26
  507. package/dist/esm/clients/internal-api/cache-lambda-client.js +85 -85
  508. package/dist/esm/clients/internal-api/db-management-client.d.ts +18 -18
  509. package/dist/esm/clients/internal-api/db-management-client.js +32 -32
  510. package/dist/esm/clients/internal-api/destinations-client.d.ts +34 -34
  511. package/dist/esm/clients/internal-api/destinations-client.js +75 -75
  512. package/dist/esm/clients/internal-api/event-collector-client.d.ts +20 -20
  513. package/dist/esm/clients/internal-api/event-collector-client.js +32 -32
  514. package/dist/esm/clients/internal-api/identity-client.d.ts +31 -31
  515. package/dist/esm/clients/internal-api/identity-client.js +87 -87
  516. package/dist/esm/clients/internal-api/index.d.ts +9 -9
  517. package/dist/esm/clients/internal-api/index.js +9 -9
  518. package/dist/esm/clients/internal-api/shopify-app-install-client.d.ts +37 -37
  519. package/dist/esm/clients/internal-api/shopify-app-install-client.js +77 -77
  520. package/dist/esm/clients/internal-api/subscriptions-client.d.ts +26 -26
  521. package/dist/esm/clients/internal-api/subscriptions-client.js +73 -73
  522. package/dist/esm/clients/internal-api/users-auth-client.d.ts +35 -35
  523. package/dist/esm/clients/internal-api/users-auth-client.js +106 -106
  524. package/dist/esm/clients/third-party/acuity-client.d.ts +10 -10
  525. package/dist/esm/clients/third-party/acuity-client.js +36 -36
  526. package/dist/esm/clients/third-party/emailable-client.d.ts +7 -7
  527. package/dist/esm/clients/third-party/emailable-client.js +21 -21
  528. package/dist/esm/clients/third-party/exchange-rate-api-client.d.ts +17 -17
  529. package/dist/esm/clients/third-party/exchange-rate-api-client.js +15 -15
  530. package/dist/esm/clients/third-party/index.d.ts +5 -5
  531. package/dist/esm/clients/third-party/index.js +5 -5
  532. package/dist/esm/clients/third-party/loops-client.d.ts +10 -10
  533. package/dist/esm/clients/third-party/loops-client.js +26 -26
  534. package/dist/esm/clients/third-party/shopify/graphql-order-queries.d.ts +25 -25
  535. package/dist/esm/clients/third-party/shopify/graphql-order-queries.js +1 -1
  536. package/dist/esm/clients/third-party/shopify/graphql-product-queries.d.ts +2 -2
  537. package/dist/esm/clients/third-party/shopify/graphql-product-queries.js +2 -2
  538. package/dist/esm/clients/third-party/shopify/shopify-graphql-client.d.ts +10 -10
  539. package/dist/esm/clients/third-party/shopify/shopify-graphql-client.js +157 -157
  540. package/dist/esm/clients/third-party/shopify-client.d.ts +29 -29
  541. package/dist/esm/clients/third-party/shopify-client.js +142 -142
  542. package/dist/esm/constants/index.d.ts +1 -1
  543. package/dist/esm/constants/index.js +1 -1
  544. package/dist/esm/constants/sqs.d.ts +20 -20
  545. package/dist/esm/constants/sqs.js +22 -22
  546. package/dist/esm/helpers/account-users-helper.d.ts +2 -2
  547. package/dist/esm/helpers/account-users-helper.js +18 -18
  548. package/dist/esm/helpers/acuity-helper.d.ts +4 -4
  549. package/dist/esm/helpers/acuity-helper.js +51 -51
  550. package/dist/esm/helpers/api-key-auth-helper.d.ts +9 -9
  551. package/dist/esm/helpers/api-key-auth-helper.js +35 -35
  552. package/dist/esm/helpers/api-key-authorizer-helper.d.ts +36 -36
  553. package/dist/esm/helpers/api-key-authorizer-helper.js +83 -83
  554. package/dist/esm/helpers/identity-cache-helper.d.ts +30 -30
  555. package/dist/esm/helpers/identity-cache-helper.js +248 -248
  556. package/dist/esm/helpers/identity-cache-helper.js.map +1 -1
  557. package/dist/esm/helpers/index.d.ts +10 -10
  558. package/dist/esm/helpers/index.js +10 -10
  559. package/dist/esm/helpers/input-validation-helper.d.ts +3 -3
  560. package/dist/esm/helpers/input-validation-helper.js +18 -18
  561. package/dist/esm/helpers/logging-helper.d.ts +16 -16
  562. package/dist/esm/helpers/logging-helper.js +56 -56
  563. package/dist/esm/helpers/response-helper.d.ts +18 -18
  564. package/dist/esm/helpers/response-helper.js +37 -37
  565. package/dist/esm/helpers/shopify-helper.d.ts +9 -9
  566. package/dist/esm/helpers/shopify-helper.js +21 -21
  567. package/dist/esm/helpers/sqs-utils.d.ts +6 -6
  568. package/dist/esm/helpers/sqs-utils.js +9 -9
  569. package/dist/esm/index.d.ts +7 -7
  570. package/dist/esm/index.js +7 -7
  571. package/dist/esm/libs/api-router/index.d.ts +2 -2
  572. package/dist/esm/libs/api-router/index.js +2 -2
  573. package/dist/esm/libs/api-router/public-api-router.d.ts +3 -3
  574. package/dist/esm/libs/api-router/public-api-router.js +32 -32
  575. package/dist/esm/libs/api-router/route-matcher.d.ts +21 -21
  576. package/dist/esm/libs/api-router/route-matcher.js +30 -30
  577. package/dist/esm/libs/click-id-parser.d.ts +23 -23
  578. package/dist/esm/libs/click-id-parser.js +45 -45
  579. package/dist/esm/libs/compression.d.ts +2 -2
  580. package/dist/esm/libs/compression.js +25 -25
  581. package/dist/esm/libs/contacts.d.ts +7 -7
  582. package/dist/esm/libs/contacts.js +143 -143
  583. package/dist/esm/libs/cookie.d.ts +17 -17
  584. package/dist/esm/libs/cookie.js +70 -70
  585. package/dist/esm/libs/crypto.d.ts +4 -4
  586. package/dist/esm/libs/crypto.js +15 -15
  587. package/dist/esm/libs/csv.d.ts +2 -2
  588. package/dist/esm/libs/csv.js +30 -30
  589. package/dist/esm/libs/currency.d.ts +1 -1
  590. package/dist/esm/libs/currency.js +22 -22
  591. package/dist/esm/libs/dates.d.ts +12 -12
  592. package/dist/esm/libs/dates.js +83 -83
  593. package/dist/esm/libs/domain.d.ts +2 -2
  594. package/dist/esm/libs/domain.js +33 -33
  595. package/dist/esm/libs/emails.d.ts +8 -8
  596. package/dist/esm/libs/emails.js +146 -146
  597. package/dist/esm/libs/http-error.d.ts +21 -21
  598. package/dist/esm/libs/http-error.js +59 -59
  599. package/dist/esm/libs/http-status-codes.d.ts +58 -58
  600. package/dist/esm/libs/http-status-codes.js +59 -59
  601. package/dist/esm/libs/index.d.ts +19 -19
  602. package/dist/esm/libs/index.js +19 -19
  603. package/dist/esm/libs/numbers.d.ts +1 -1
  604. package/dist/esm/libs/numbers.js +11 -11
  605. package/dist/esm/libs/referrer-parser/index.d.ts +2 -2
  606. package/dist/esm/libs/referrer-parser/index.js +2 -2
  607. package/dist/esm/libs/referrer-parser/referrer-data.d.ts +9 -9
  608. package/dist/esm/libs/referrer-parser/referrer-data.js +3304 -3304
  609. package/dist/esm/libs/referrer-parser/referrer-parser-util.d.ts +20 -20
  610. package/dist/esm/libs/referrer-parser/referrer-parser-util.js +124 -124
  611. package/dist/esm/libs/strings.d.ts +3 -3
  612. package/dist/esm/libs/strings.js +40 -40
  613. package/dist/esm/libs/traits.d.ts +6 -6
  614. package/dist/esm/libs/traits.js +54 -54
  615. package/dist/esm/libs/url.d.ts +1 -1
  616. package/dist/esm/libs/url.js +9 -9
  617. package/dist/esm/services/acuity-api-service.d.ts +9 -9
  618. package/dist/esm/services/acuity-api-service.js +69 -69
  619. package/dist/esm/services/cache/generic-cached-object.d.ts +5 -5
  620. package/dist/esm/services/cache/generic-cached-object.js +1 -1
  621. package/dist/esm/services/cache/index.d.ts +1 -1
  622. package/dist/esm/services/cache/index.js +1 -1
  623. package/dist/esm/services/cache/product-cache-service.d.ts +21 -21
  624. package/dist/esm/services/cache/product-cache-service.js +68 -68
  625. package/dist/esm/services/cost/cost-calculation-types.d.ts +69 -0
  626. package/dist/esm/services/cost/cost-calculation-types.js +16 -0
  627. package/dist/esm/services/cost/cost-calculation-types.js.map +1 -0
  628. package/dist/esm/services/cost/cost-calculator-service.d.ts +24 -0
  629. package/dist/esm/services/cost/cost-calculator-service.js +451 -0
  630. package/dist/esm/services/cost/cost-calculator-service.js.map +1 -0
  631. package/dist/esm/services/cost/cost-currency-service.d.ts +6 -0
  632. package/dist/esm/services/cost/cost-currency-service.js +85 -0
  633. package/dist/esm/services/cost/cost-currency-service.js.map +1 -0
  634. package/dist/esm/services/cost/cost-filter-service.d.ts +10 -0
  635. package/dist/esm/services/cost/cost-filter-service.js +119 -0
  636. package/dist/esm/services/cost/cost-filter-service.js.map +1 -0
  637. package/dist/esm/services/cost/index.d.ts +5 -0
  638. package/dist/esm/services/cost/index.js +6 -0
  639. package/dist/esm/services/cost/index.js.map +1 -0
  640. package/dist/esm/services/cost/order-cost/index.d.ts +2 -0
  641. package/dist/esm/services/cost/order-cost/index.js +3 -0
  642. package/dist/esm/services/cost/order-cost/index.js.map +1 -0
  643. package/dist/esm/services/cost/order-cost/order-cost-resolution-service.d.ts +23 -0
  644. package/dist/esm/services/cost/order-cost/order-cost-resolution-service.js +356 -0
  645. package/dist/esm/services/cost/order-cost/order-cost-resolution-service.js.map +1 -0
  646. package/dist/esm/services/cost/order-cost/order-cost-resolution-types.d.ts +37 -0
  647. package/dist/esm/services/cost/order-cost/order-cost-resolution-types.js +2 -0
  648. package/dist/esm/services/cost/order-cost/order-cost-resolution-types.js.map +1 -0
  649. package/dist/esm/services/currency-exchange-rate-lookup-service.d.ts +12 -11
  650. package/dist/esm/services/currency-exchange-rate-lookup-service.js +90 -62
  651. package/dist/esm/services/currency-exchange-rate-lookup-service.js.map +1 -1
  652. package/dist/esm/services/db/accounts-db-service.d.ts +9 -9
  653. package/dist/esm/services/db/accounts-db-service.js +29 -29
  654. package/dist/esm/services/db/api-keys-db-service.d.ts +10 -10
  655. package/dist/esm/services/db/api-keys-db-service.js +32 -32
  656. package/dist/esm/services/db/contact-enrichments-db-service.d.ts +15 -15
  657. package/dist/esm/services/db/contact-enrichments-db-service.js +90 -90
  658. package/dist/esm/services/db/currency-exchange-rates-db-service.d.ts +21 -21
  659. package/dist/esm/services/db/currency-exchange-rates-db-service.js +35 -35
  660. package/dist/esm/services/db/custom-measures-db-service.d.ts +14 -14
  661. package/dist/esm/services/db/custom-measures-db-service.js +44 -44
  662. package/dist/esm/services/db/destinations-db-service.d.ts +13 -13
  663. package/dist/esm/services/db/destinations-db-service.js +70 -70
  664. package/dist/esm/services/db/identity-cache-db-service.d.ts +28 -28
  665. package/dist/esm/services/db/identity-cache-db-service.js +313 -313
  666. package/dist/esm/services/db/identity-cache-dynamodb-service.d.ts +44 -44
  667. package/dist/esm/services/db/identity-cache-dynamodb-service.js +727 -727
  668. package/dist/esm/services/db/identity-cache-dynamodb-service.js.map +1 -1
  669. package/dist/esm/services/db/index.d.ts +19 -17
  670. package/dist/esm/services/db/index.js +19 -17
  671. package/dist/esm/services/db/index.js.map +1 -1
  672. package/dist/esm/services/db/log-events-db-service.d.ts +11 -11
  673. package/dist/esm/services/db/log-events-db-service.js +177 -177
  674. package/dist/esm/services/db/pixels-db-service.d.ts +8 -8
  675. package/dist/esm/services/db/pixels-db-service.js +31 -31
  676. package/dist/esm/services/db/products-db-service-types.d.ts +10 -0
  677. package/dist/esm/services/db/products-db-service-types.js +2 -0
  678. package/dist/esm/services/db/products-db-service-types.js.map +1 -0
  679. package/dist/esm/services/db/products-db-service.d.ts +19 -0
  680. package/dist/esm/services/db/products-db-service.js +278 -0
  681. package/dist/esm/services/db/products-db-service.js.map +1 -0
  682. package/dist/esm/services/db/purchasable-contacts-db-service.d.ts +9 -9
  683. package/dist/esm/services/db/purchasable-contacts-db-service.js +39 -39
  684. package/dist/esm/services/db/purchased-contacts/index.d.ts +2 -2
  685. package/dist/esm/services/db/purchased-contacts/index.js +2 -2
  686. package/dist/esm/services/db/purchased-contacts/purchased-contacts-db-service.d.ts +18 -18
  687. package/dist/esm/services/db/purchased-contacts/purchased-contacts-db-service.js +148 -148
  688. package/dist/esm/services/db/purchased-contacts/types.d.ts +11 -11
  689. package/dist/esm/services/db/purchased-contacts/types.js +1 -1
  690. package/dist/esm/services/db/shopify-app-installs-db-service.d.ts +10 -10
  691. package/dist/esm/services/db/shopify-app-installs-db-service.js +48 -48
  692. package/dist/esm/services/db/shopify-products-cache-db-service.d.ts +16 -16
  693. package/dist/esm/services/db/shopify-products-cache-db-service.js +66 -66
  694. package/dist/esm/services/db/subscriptions-db-service.d.ts +11 -11
  695. package/dist/esm/services/db/subscriptions-db-service.js +34 -34
  696. package/dist/esm/services/db/tracking-events-db-service.d.ts +21 -21
  697. package/dist/esm/services/db/tracking-events-db-service.js +184 -184
  698. package/dist/esm/services/db/user-accounts-db-service.d.ts +7 -7
  699. package/dist/esm/services/db/user-accounts-db-service.js +13 -13
  700. package/dist/esm/services/email-verification/contact-email-verification-service.d.ts +7 -7
  701. package/dist/esm/services/email-verification/contact-email-verification-service.js +97 -97
  702. package/dist/esm/services/email-verification/email-verification-service.d.ts +19 -19
  703. package/dist/esm/services/email-verification/email-verification-service.js +127 -127
  704. package/dist/esm/services/email-verification/index.d.ts +2 -2
  705. package/dist/esm/services/email-verification/index.js +2 -2
  706. package/dist/esm/services/eventbridge-integration-service.d.ts +9 -9
  707. package/dist/esm/services/eventbridge-integration-service.js +24 -24
  708. package/dist/esm/services/events/index.d.ts +3 -3
  709. package/dist/esm/services/events/index.js +3 -3
  710. package/dist/esm/services/events/log-event-service.d.ts +19 -19
  711. package/dist/esm/services/events/log-event-service.js +73 -73
  712. package/dist/esm/services/events/metric-event-service.d.ts +9 -9
  713. package/dist/esm/services/events/metric-event-service.js +45 -45
  714. package/dist/esm/services/events/tracking-event-sqs-service.d.ts +8 -8
  715. package/dist/esm/services/events/tracking-event-sqs-service.js +30 -30
  716. package/dist/esm/services/generic-cache-service.d.ts +7 -7
  717. package/dist/esm/services/generic-cache-service.js +29 -29
  718. package/dist/esm/services/index.d.ts +11 -10
  719. package/dist/esm/services/index.js +11 -10
  720. package/dist/esm/services/index.js.map +1 -1
  721. package/dist/esm/services/ipdata-lookup-service.d.ts +20 -20
  722. package/dist/esm/services/ipdata-lookup-service.js +108 -108
  723. package/dist/esm/services/shopify/index.d.ts +2 -2
  724. package/dist/esm/services/shopify/index.js +2 -2
  725. package/dist/esm/services/shopify/products/index.d.ts +1 -1
  726. package/dist/esm/services/shopify/products/index.js +1 -1
  727. package/dist/esm/services/shopify/products/shopify-products-serviceV2.d.ts +17 -17
  728. package/dist/esm/services/shopify/products/shopify-products-serviceV2.js +108 -108
  729. package/dist/esm/services/shopify/shopify-graphql-transformer.d.ts +8 -8
  730. package/dist/esm/services/shopify/shopify-graphql-transformer.js +138 -138
  731. package/dist/esm/types/acuity-types.d.ts +74 -74
  732. package/dist/esm/types/acuity-types.js +1 -1
  733. package/dist/esm/types/api-response.d.ts +6 -6
  734. package/dist/esm/types/api-response.js +1 -1
  735. package/dist/esm/types/index.d.ts +4 -4
  736. package/dist/esm/types/index.js +4 -4
  737. package/dist/esm/types/internal-events/event-detail-types.d.ts +20 -20
  738. package/dist/esm/types/internal-events/event-detail-types.js +24 -24
  739. package/dist/esm/types/internal-events/index.d.ts +1 -1
  740. package/dist/esm/types/internal-events/index.js +1 -1
  741. package/dist/esm/types/shopify-graphql-types/admin.generated.d.ts +123 -123
  742. package/dist/esm/types/shopify-graphql-types/admin.generated.js +1 -1
  743. package/dist/esm/types/shopify-graphql-types/admin.types.d.ts +26289 -26289
  744. package/dist/esm/types/shopify-graphql-types/admin.types.js +5299 -5299
  745. package/dist/esm/types/shopify-graphql-types/index.d.ts +2 -2
  746. package/dist/esm/types/shopify-graphql-types/index.js +2 -2
  747. package/dist/esm/types/shopify-rest-types.d.ts +767 -767
  748. package/dist/esm/types/shopify-rest-types.js +1 -1
  749. package/dist/esm/utils/compression.d.ts +36 -36
  750. package/dist/esm/utils/compression.js +187 -187
  751. package/dist/esm/utils/custom-measure-formula-utils.d.ts +6 -6
  752. package/dist/esm/utils/custom-measure-formula-utils.js +201 -201
  753. package/dist/esm/utils/index.d.ts +4 -4
  754. package/dist/esm/utils/index.js +4 -4
  755. package/dist/esm/utils/retry-envelope.d.ts +12 -12
  756. package/dist/esm/utils/retry-envelope.js +22 -22
  757. package/dist/esm/utils/size.d.ts +2 -2
  758. package/dist/esm/utils/size.js +44 -44
  759. package/package.json +134 -134
@@ -1,36 +1,36 @@
1
- import { DateTime } from 'luxon';
2
- import { DynamoDbClient } from '../../clients';
3
- import { getCurrentTimestamp } from '../../libs/dates';
4
- export class CurrencyExchangeRatesDbService {
5
- TABLE_NAME;
6
- TABLE_KEY;
7
- constructor(tableName, tableKey) {
8
- this.TABLE_NAME = tableName;
9
- this.TABLE_KEY = tableKey;
10
- }
11
- getCurrencyExchangeRate = async (currencyCode) => {
12
- const record = await DynamoDbClient.safeGet(this.TABLE_NAME, this.TABLE_KEY, currencyCode);
13
- return record ?? null;
14
- };
15
- buildCurrencyExchangeRateRecord = (currency, rates, ttlInDays, provider, providerLastUpdatedAtEpoch, providerNextUpdateAtEpoch) => {
16
- const expiresAt = DateTime.utc().plus({ days: ttlInDays }).toSeconds();
17
- const currentTimestamp = getCurrentTimestamp();
18
- return {
19
- currency,
20
- rates,
21
- expiresAt,
22
- cachedAt: currentTimestamp,
23
- cachedAtEpoch: DateTime.utc().toSeconds(),
24
- createdAt: currentTimestamp,
25
- updatedAt: currentTimestamp,
26
- provider,
27
- providerLastUpdatedAtEpoch,
28
- providerNextUpdateAtEpoch,
29
- };
30
- };
31
- putCurrencyExchangeRate = async (record) => {
32
- await DynamoDbClient.safePut(this.TABLE_NAME, record);
33
- return record;
34
- };
35
- }
1
+ import { DateTime } from 'luxon';
2
+ import { DynamoDbClient } from '../../clients';
3
+ import { getCurrentTimestamp } from '../../libs/dates';
4
+ export class CurrencyExchangeRatesDbService {
5
+ TABLE_NAME;
6
+ TABLE_KEY;
7
+ constructor(tableName, tableKey) {
8
+ this.TABLE_NAME = tableName;
9
+ this.TABLE_KEY = tableKey;
10
+ }
11
+ getCurrencyExchangeRate = async (currencyCode) => {
12
+ const record = await DynamoDbClient.safeGet(this.TABLE_NAME, this.TABLE_KEY, currencyCode);
13
+ return record ?? null;
14
+ };
15
+ buildCurrencyExchangeRateRecord = (currency, rates, ttlInDays, provider, providerLastUpdatedAtEpoch, providerNextUpdateAtEpoch) => {
16
+ const expiresAt = DateTime.utc().plus({ days: ttlInDays }).toSeconds();
17
+ const currentTimestamp = getCurrentTimestamp();
18
+ return {
19
+ currency,
20
+ rates,
21
+ expiresAt,
22
+ cachedAt: currentTimestamp,
23
+ cachedAtEpoch: DateTime.utc().toSeconds(),
24
+ createdAt: currentTimestamp,
25
+ updatedAt: currentTimestamp,
26
+ provider,
27
+ providerLastUpdatedAtEpoch,
28
+ providerNextUpdateAtEpoch,
29
+ };
30
+ };
31
+ putCurrencyExchangeRate = async (record) => {
32
+ await DynamoDbClient.safePut(this.TABLE_NAME, record);
33
+ return record;
34
+ };
35
+ }
36
36
  //# sourceMappingURL=currency-exchange-rates-db-service.js.map
@@ -1,14 +1,14 @@
1
- import { type CustomMeasureRecord } from '@adtrackify/at-tracking-event-types';
2
- export declare class CustomMeasuresDbService {
3
- TABLE_NAME: string;
4
- TABLE_KEY: string;
5
- constructor(tableName: string, tableKey?: string);
6
- listByPixelId: (gsiName: string, pixelId: string) => Promise<CustomMeasureRecord[]>;
7
- listPageByPixelId: (gsiName: string, pixelId: string, limit: number, exclusiveStartKey?: Record<string, any>) => Promise<{
8
- items: CustomMeasureRecord[];
9
- lastEvaluatedKey?: Record<string, any>;
10
- }>;
11
- getById: (id: string) => Promise<CustomMeasureRecord | null>;
12
- putMeasure: (record: CustomMeasureRecord) => Promise<CustomMeasureRecord>;
13
- deleteMeasure: (id: string) => Promise<void>;
14
- }
1
+ import { type CustomMeasureRecord } from '@adtrackify/at-tracking-event-types';
2
+ export declare class CustomMeasuresDbService {
3
+ TABLE_NAME: string;
4
+ TABLE_KEY: string;
5
+ constructor(tableName: string, tableKey?: string);
6
+ listByPixelId: (gsiName: string, pixelId: string) => Promise<CustomMeasureRecord[]>;
7
+ listPageByPixelId: (gsiName: string, pixelId: string, limit: number, exclusiveStartKey?: Record<string, any>) => Promise<{
8
+ items: CustomMeasureRecord[];
9
+ lastEvaluatedKey?: Record<string, any>;
10
+ }>;
11
+ getById: (id: string) => Promise<CustomMeasureRecord | null>;
12
+ putMeasure: (record: CustomMeasureRecord) => Promise<CustomMeasureRecord>;
13
+ deleteMeasure: (id: string) => Promise<void>;
14
+ }
@@ -1,45 +1,45 @@
1
- import { DynamoDbClient } from '../../clients/generic/dynamodb-client.js';
2
- import { HttpError } from '../../libs/http-error.js';
3
- import { Logger } from '../../helpers/logging-helper.js';
4
- export class CustomMeasuresDbService {
5
- TABLE_NAME;
6
- TABLE_KEY;
7
- constructor(tableName, tableKey = 'id') {
8
- this.TABLE_NAME = tableName;
9
- this.TABLE_KEY = tableKey;
10
- }
11
- listByPixelId = async (gsiName, pixelId) => {
12
- const records = await DynamoDbClient.safeQueryByGSI(this.TABLE_NAME, gsiName, 'pixelId', pixelId);
13
- return records || [];
14
- };
15
- listPageByPixelId = async (gsiName, pixelId, limit, exclusiveStartKey) => {
16
- const result = await DynamoDbClient.query({
17
- TableName: this.TABLE_NAME,
18
- IndexName: gsiName,
19
- KeyConditionExpression: 'pixelId = :pixelId',
20
- ExpressionAttributeValues: { ':pixelId': pixelId },
21
- Limit: limit,
22
- ExclusiveStartKey: exclusiveStartKey,
23
- });
24
- return {
25
- items: result.Items || [],
26
- lastEvaluatedKey: result.LastEvaluatedKey,
27
- };
28
- };
29
- getById = async (id) => {
30
- const result = await DynamoDbClient.safeGet(this.TABLE_NAME, this.TABLE_KEY, id);
31
- return result ?? null;
32
- };
33
- putMeasure = async (record) => {
34
- const res = await DynamoDbClient.safePut(this.TABLE_NAME, record);
35
- if (!res) {
36
- Logger.error('CustomMeasuresDbService: putMeasure failed', { record });
37
- throw HttpError.internal();
38
- }
39
- return record;
40
- };
41
- deleteMeasure = async (id) => {
42
- await DynamoDbClient.safeDelete(this.TABLE_NAME, this.TABLE_KEY, id);
43
- };
44
- }
1
+ import { DynamoDbClient } from '../../clients/generic/dynamodb-client.js';
2
+ import { HttpError } from '../../libs/http-error.js';
3
+ import { Logger } from '../../helpers/logging-helper.js';
4
+ export class CustomMeasuresDbService {
5
+ TABLE_NAME;
6
+ TABLE_KEY;
7
+ constructor(tableName, tableKey = 'id') {
8
+ this.TABLE_NAME = tableName;
9
+ this.TABLE_KEY = tableKey;
10
+ }
11
+ listByPixelId = async (gsiName, pixelId) => {
12
+ const records = await DynamoDbClient.safeQueryByGSI(this.TABLE_NAME, gsiName, 'pixelId', pixelId);
13
+ return records || [];
14
+ };
15
+ listPageByPixelId = async (gsiName, pixelId, limit, exclusiveStartKey) => {
16
+ const result = await DynamoDbClient.query({
17
+ TableName: this.TABLE_NAME,
18
+ IndexName: gsiName,
19
+ KeyConditionExpression: 'pixelId = :pixelId',
20
+ ExpressionAttributeValues: { ':pixelId': pixelId },
21
+ Limit: limit,
22
+ ExclusiveStartKey: exclusiveStartKey,
23
+ });
24
+ return {
25
+ items: result.Items || [],
26
+ lastEvaluatedKey: result.LastEvaluatedKey,
27
+ };
28
+ };
29
+ getById = async (id) => {
30
+ const result = await DynamoDbClient.safeGet(this.TABLE_NAME, this.TABLE_KEY, id);
31
+ return result ?? null;
32
+ };
33
+ putMeasure = async (record) => {
34
+ const res = await DynamoDbClient.safePut(this.TABLE_NAME, record);
35
+ if (!res) {
36
+ Logger.error('CustomMeasuresDbService: putMeasure failed', { record });
37
+ throw HttpError.internal();
38
+ }
39
+ return record;
40
+ };
41
+ deleteMeasure = async (id) => {
42
+ await DynamoDbClient.safeDelete(this.TABLE_NAME, this.TABLE_KEY, id);
43
+ };
44
+ }
45
45
  //# sourceMappingURL=custom-measures-db-service.js.map
@@ -1,13 +1,13 @@
1
- import { Destination } from '@adtrackify/at-tracking-event-types';
2
- export declare class DestinationsDbService {
3
- TABLE_NAME: string;
4
- TABLE_KEY: string;
5
- constructor(tableName: string);
6
- getDestinationById: (id: string) => Promise<Destination | null>;
7
- getDestinationsByPixel: (indexName: string, pixelId: string) => Promise<Destination[]>;
8
- getDestinationsByAccountId: (indexName: string, accountId: string) => Promise<Destination[]>;
9
- getDestinationsByDestinationType: (indexName: string, destinationType: string) => Promise<Destination[]>;
10
- batchGetDestinationsById: (ids: string[]) => Promise<Destination[]>;
11
- batchGetByPixelIds: (indexName: string, pixelIds: string[], concurrency?: number) => Promise<Destination[]>;
12
- getDestinationsByDestination: (indexName: string, destinationKey: string) => Promise<Destination[]>;
13
- }
1
+ import { Destination } from '@adtrackify/at-tracking-event-types';
2
+ export declare class DestinationsDbService {
3
+ TABLE_NAME: string;
4
+ TABLE_KEY: string;
5
+ constructor(tableName: string);
6
+ getDestinationById: (id: string) => Promise<Destination | null>;
7
+ getDestinationsByPixel: (indexName: string, pixelId: string) => Promise<Destination[]>;
8
+ getDestinationsByAccountId: (indexName: string, accountId: string) => Promise<Destination[]>;
9
+ getDestinationsByDestinationType: (indexName: string, destinationType: string) => Promise<Destination[]>;
10
+ batchGetDestinationsById: (ids: string[]) => Promise<Destination[]>;
11
+ batchGetByPixelIds: (indexName: string, pixelIds: string[], concurrency?: number) => Promise<Destination[]>;
12
+ getDestinationsByDestination: (indexName: string, destinationKey: string) => Promise<Destination[]>;
13
+ }
@@ -1,71 +1,71 @@
1
- import { DynamoDbClient } from '../../clients';
2
- export class DestinationsDbService {
3
- TABLE_NAME;
4
- TABLE_KEY;
5
- constructor(tableName) {
6
- this.TABLE_NAME = tableName;
7
- this.TABLE_KEY = 'id';
8
- }
9
- getDestinationById = async (id) => {
10
- const destination = await DynamoDbClient.safeGet(this.TABLE_NAME, this.TABLE_KEY, id);
11
- return destination ?? null;
12
- };
13
- getDestinationsByPixel = async (indexName, pixelId) => {
14
- const query = {
15
- TableName: this.TABLE_NAME,
16
- IndexName: indexName,
17
- KeyConditionExpression: 'pixelId = :pixelId',
18
- ExpressionAttributeValues: {
19
- ':pixelId': pixelId,
20
- },
21
- };
22
- const destinations = await DynamoDbClient.queryAll(query);
23
- return destinations || [];
24
- };
25
- getDestinationsByAccountId = async (indexName, accountId) => {
26
- const query = {
27
- TableName: this.TABLE_NAME,
28
- IndexName: indexName,
29
- KeyConditionExpression: 'accountId = :accountId',
30
- ExpressionAttributeValues: {
31
- ':accountId': accountId,
32
- },
33
- };
34
- const destinations = await DynamoDbClient.queryAll(query);
35
- return destinations || [];
36
- };
37
- getDestinationsByDestinationType = async (indexName, destinationType) => {
38
- const query = {
39
- TableName: this.TABLE_NAME,
40
- IndexName: indexName,
41
- KeyConditionExpression: 'destinationType = :destinationType',
42
- ExpressionAttributeValues: {
43
- ':destinationType': destinationType,
44
- },
45
- };
46
- const destinations = await DynamoDbClient.queryAll(query);
47
- return destinations || [];
48
- };
49
- batchGetDestinationsById = async (ids) => {
50
- const keys = ids.map((id) => ({ [this.TABLE_KEY]: id }));
51
- const destinations = await DynamoDbClient.safeBatchGet(this.TABLE_NAME, keys);
52
- return (destinations ?? []);
53
- };
54
- batchGetByPixelIds = async (indexName, pixelIds, concurrency = 10) => {
55
- const destinations = await DynamoDbClient.safeBatchQueryByGSI(this.TABLE_NAME, indexName, 'pixelId', pixelIds, concurrency);
56
- return destinations;
57
- };
58
- getDestinationsByDestination = async (indexName, destinationKey) => {
59
- const query = {
60
- TableName: this.TABLE_NAME,
61
- IndexName: indexName,
62
- KeyConditionExpression: 'destination = :destination',
63
- ExpressionAttributeValues: {
64
- ':destination': destinationKey,
65
- },
66
- };
67
- const destinations = await DynamoDbClient.queryAll(query);
68
- return destinations || [];
69
- };
70
- }
1
+ import { DynamoDbClient } from '../../clients';
2
+ export class DestinationsDbService {
3
+ TABLE_NAME;
4
+ TABLE_KEY;
5
+ constructor(tableName) {
6
+ this.TABLE_NAME = tableName;
7
+ this.TABLE_KEY = 'id';
8
+ }
9
+ getDestinationById = async (id) => {
10
+ const destination = await DynamoDbClient.safeGet(this.TABLE_NAME, this.TABLE_KEY, id);
11
+ return destination ?? null;
12
+ };
13
+ getDestinationsByPixel = async (indexName, pixelId) => {
14
+ const query = {
15
+ TableName: this.TABLE_NAME,
16
+ IndexName: indexName,
17
+ KeyConditionExpression: 'pixelId = :pixelId',
18
+ ExpressionAttributeValues: {
19
+ ':pixelId': pixelId,
20
+ },
21
+ };
22
+ const destinations = await DynamoDbClient.queryAll(query);
23
+ return destinations || [];
24
+ };
25
+ getDestinationsByAccountId = async (indexName, accountId) => {
26
+ const query = {
27
+ TableName: this.TABLE_NAME,
28
+ IndexName: indexName,
29
+ KeyConditionExpression: 'accountId = :accountId',
30
+ ExpressionAttributeValues: {
31
+ ':accountId': accountId,
32
+ },
33
+ };
34
+ const destinations = await DynamoDbClient.queryAll(query);
35
+ return destinations || [];
36
+ };
37
+ getDestinationsByDestinationType = async (indexName, destinationType) => {
38
+ const query = {
39
+ TableName: this.TABLE_NAME,
40
+ IndexName: indexName,
41
+ KeyConditionExpression: 'destinationType = :destinationType',
42
+ ExpressionAttributeValues: {
43
+ ':destinationType': destinationType,
44
+ },
45
+ };
46
+ const destinations = await DynamoDbClient.queryAll(query);
47
+ return destinations || [];
48
+ };
49
+ batchGetDestinationsById = async (ids) => {
50
+ const keys = ids.map((id) => ({ [this.TABLE_KEY]: id }));
51
+ const destinations = await DynamoDbClient.safeBatchGet(this.TABLE_NAME, keys);
52
+ return (destinations ?? []);
53
+ };
54
+ batchGetByPixelIds = async (indexName, pixelIds, concurrency = 10) => {
55
+ const destinations = await DynamoDbClient.safeBatchQueryByGSI(this.TABLE_NAME, indexName, 'pixelId', pixelIds, concurrency);
56
+ return destinations;
57
+ };
58
+ getDestinationsByDestination = async (indexName, destinationKey) => {
59
+ const query = {
60
+ TableName: this.TABLE_NAME,
61
+ IndexName: indexName,
62
+ KeyConditionExpression: 'destination = :destination',
63
+ ExpressionAttributeValues: {
64
+ ':destination': destinationKey,
65
+ },
66
+ };
67
+ const destinations = await DynamoDbClient.queryAll(query);
68
+ return destinations || [];
69
+ };
70
+ }
71
71
  //# sourceMappingURL=destinations-db-service.js.map
@@ -1,28 +1,28 @@
1
- import { EventIdentity } from '@adtrackify/at-tracking-event-types';
2
- export interface IdentityCache {
3
- identityId: string;
4
- request?: EventIdentity;
5
- response: EventIdentity;
6
- createdAt?: string;
7
- updatedAt: string;
8
- expiresAt?: number;
9
- }
10
- export declare class IdentityCacheDbService {
11
- private cacheLambdaClient;
12
- private identifyPrivateLambdaArn;
13
- private lambdaInvokeClient;
14
- constructor(cacheLambdaFunctionArn: string, identifyPrivateLambdaArn: string);
15
- getIdentityWithCaching: (pixelId: string, incomingIdentity?: EventIdentity) => Promise<EventIdentity | undefined>;
16
- identifyPrivateLambda(pixelId: string, incomingIdentity: EventIdentity): Promise<{
17
- resolvedIdentity?: EventIdentity;
18
- }>;
19
- getIdentityFromCache(pixelId: string, incomingIdentity: EventIdentity): Promise<{
20
- resolvedIdentity?: EventIdentity;
21
- isCacheStale: boolean;
22
- }>;
23
- getIdentityCacheFromSecondaryKeys(pixelId: string, incomingIdentity: EventIdentity): Promise<IdentityCache | undefined>;
24
- deleteIdentityCache(pixelId: string, incomingIdentity: EventIdentity, resolvedIdentity: EventIdentity): Promise<void>;
25
- private deleteIdentityCacheRedis;
26
- private getIdentityCache;
27
- updateIdentityCacheRedis: (pixelId: string, request: EventIdentity, response: EventIdentity, enableSecondaryCacheKeys?: boolean) => Promise<import("../../clients").CacheRequestCommandResponse[] | undefined>;
28
- }
1
+ import { EventIdentity } from '@adtrackify/at-tracking-event-types';
2
+ export interface IdentityCache {
3
+ identityId: string;
4
+ request?: EventIdentity;
5
+ response: EventIdentity;
6
+ createdAt?: string;
7
+ updatedAt: string;
8
+ expiresAt?: number;
9
+ }
10
+ export declare class IdentityCacheDbService {
11
+ private cacheLambdaClient;
12
+ private identifyPrivateLambdaArn;
13
+ private lambdaInvokeClient;
14
+ constructor(cacheLambdaFunctionArn: string, identifyPrivateLambdaArn: string);
15
+ getIdentityWithCaching: (pixelId: string, incomingIdentity?: EventIdentity) => Promise<EventIdentity | undefined>;
16
+ identifyPrivateLambda(pixelId: string, incomingIdentity: EventIdentity): Promise<{
17
+ resolvedIdentity?: EventIdentity;
18
+ }>;
19
+ getIdentityFromCache(pixelId: string, incomingIdentity: EventIdentity): Promise<{
20
+ resolvedIdentity?: EventIdentity;
21
+ isCacheStale: boolean;
22
+ }>;
23
+ getIdentityCacheFromSecondaryKeys(pixelId: string, incomingIdentity: EventIdentity): Promise<IdentityCache | undefined>;
24
+ deleteIdentityCache(pixelId: string, incomingIdentity: EventIdentity, resolvedIdentity: EventIdentity): Promise<void>;
25
+ private deleteIdentityCacheRedis;
26
+ private getIdentityCache;
27
+ updateIdentityCacheRedis: (pixelId: string, request: EventIdentity, response: EventIdentity, enableSecondaryCacheKeys?: boolean) => Promise<import("../../clients").CacheRequestCommandResponse[] | undefined>;
28
+ }