@adtrackify/at-service-common 4.0.2 → 4.0.3

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 (753) 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/shared-read-db-services.spec.d.ts +1 -1
  20. package/dist/cjs/__tests__/db/shared-read-db-services.spec.js +89 -89
  21. package/dist/cjs/__tests__/db/shopify-app-installs-db-service.spec.d.ts +1 -1
  22. package/dist/cjs/__tests__/db/shopify-app-installs-db-service.spec.js +104 -104
  23. package/dist/cjs/__tests__/db/subscriptions-db-service.spec.d.ts +1 -1
  24. package/dist/cjs/__tests__/db/subscriptions-db-service.spec.js +95 -95
  25. package/dist/cjs/__tests__/db/user-accounts-db-service.spec.d.ts +1 -1
  26. package/dist/cjs/__tests__/db/user-accounts-db-service.spec.js +76 -76
  27. package/dist/cjs/__tests__/helpers/account-users-helper.spec.d.ts +1 -1
  28. package/dist/cjs/__tests__/helpers/account-users-helper.spec.js +220 -220
  29. package/dist/cjs/__tests__/helpers/acuity-helper.spec.d.ts +1 -1
  30. package/dist/cjs/__tests__/helpers/acuity-helper.spec.js +69 -69
  31. package/dist/cjs/__tests__/helpers/api-key-auth-helper.spec.d.ts +1 -1
  32. package/dist/cjs/__tests__/helpers/api-key-auth-helper.spec.js +82 -82
  33. package/dist/cjs/__tests__/identity-cache/identity-cache-db-service.spec.d.ts +1 -1
  34. package/dist/cjs/__tests__/identity-cache/identity-cache-db-service.spec.js +676 -676
  35. package/dist/cjs/__tests__/identity-cache/identity-cache-dynamodb-service.spec.d.ts +1 -1
  36. package/dist/cjs/__tests__/identity-cache/identity-cache-dynamodb-service.spec.js +1140 -1140
  37. package/dist/cjs/__tests__/identity-cache/identity-cache-tier-routing.spec.d.ts +1 -1
  38. package/dist/cjs/__tests__/identity-cache/identity-cache-tier-routing.spec.js +851 -851
  39. package/dist/cjs/__tests__/identity-cache/trait-merging-and-staleness.spec.d.ts +1 -1
  40. package/dist/cjs/__tests__/identity-cache/trait-merging-and-staleness.spec.js +1060 -1060
  41. package/dist/cjs/__tests__/identity-cache/volatile-traits-optimization.spec.d.ts +1 -1
  42. package/dist/cjs/__tests__/identity-cache/volatile-traits-optimization.spec.js +818 -818
  43. package/dist/cjs/__tests__/integration/sqs-bundling-roundtrip.spec.d.ts +1 -1
  44. package/dist/cjs/__tests__/integration/sqs-bundling-roundtrip.spec.js +584 -584
  45. package/dist/cjs/__tests__/libs/compress-decompress.spec.d.ts +1 -1
  46. package/dist/cjs/__tests__/libs/compress-decompress.spec.js +16 -16
  47. package/dist/cjs/__tests__/libs/contacts.spec.d.ts +1 -1
  48. package/dist/cjs/__tests__/libs/contacts.spec.js +294 -294
  49. package/dist/cjs/__tests__/libs/currency.spec.d.ts +1 -1
  50. package/dist/cjs/__tests__/libs/currency.spec.js +220 -220
  51. package/dist/cjs/__tests__/libs/dates.spec.d.ts +1 -1
  52. package/dist/cjs/__tests__/libs/dates.spec.js +130 -130
  53. package/dist/cjs/__tests__/libs/domain.spec.d.ts +1 -1
  54. package/dist/cjs/__tests__/libs/domain.spec.js +107 -107
  55. package/dist/cjs/__tests__/libs/numbers.spec.d.ts +1 -1
  56. package/dist/cjs/__tests__/libs/numbers.spec.js +261 -261
  57. package/dist/cjs/__tests__/s3-client/s3-client.spec.d.ts +1 -1
  58. package/dist/cjs/__tests__/s3-client/s3-client.spec.js +33 -33
  59. package/dist/cjs/__tests__/services/acuity-api-service.spec.d.ts +1 -1
  60. package/dist/cjs/__tests__/services/acuity-api-service.spec.js +71 -71
  61. package/dist/cjs/__tests__/services/email-verification/contact-email-verification-service.spec.d.ts +1 -1
  62. package/dist/cjs/__tests__/services/email-verification/contact-email-verification-service.spec.js +93 -93
  63. package/dist/cjs/__tests__/services/email-verification/email-verification-service.spec.d.ts +1 -1
  64. package/dist/cjs/__tests__/services/email-verification/email-verification-service.spec.js +57 -57
  65. package/dist/cjs/__tests__/shopify/shopify-graphql-transformer.spec.d.ts +1 -1
  66. package/dist/cjs/__tests__/shopify/shopify-graphql-transformer.spec.js +35 -35
  67. package/dist/cjs/__tests__/unit/libs/api-router/public-api-router.spec.d.ts +1 -1
  68. package/dist/cjs/__tests__/unit/libs/api-router/public-api-router.spec.js +181 -181
  69. package/dist/cjs/__tests__/unit/libs/api-router/route-matcher.spec.d.ts +1 -1
  70. package/dist/cjs/__tests__/unit/libs/api-router/route-matcher.spec.js +69 -69
  71. package/dist/cjs/__tests__/utils/custom-measure-formula-utils.spec.d.ts +1 -1
  72. package/dist/cjs/__tests__/utils/custom-measure-formula-utils.spec.js +139 -139
  73. package/dist/cjs/clients/generic/cognito-client.d.ts +23 -23
  74. package/dist/cjs/clients/generic/cognito-client.js +209 -209
  75. package/dist/cjs/clients/generic/dynamodb-client.d.ts +20 -20
  76. package/dist/cjs/clients/generic/dynamodb-client.js +235 -235
  77. package/dist/cjs/clients/generic/eventbridge-client.d.ts +14 -14
  78. package/dist/cjs/clients/generic/eventbridge-client.js +51 -51
  79. package/dist/cjs/clients/generic/http-client.d.ts +14 -14
  80. package/dist/cjs/clients/generic/http-client.js +61 -61
  81. package/dist/cjs/clients/generic/index.d.ts +13 -13
  82. package/dist/cjs/clients/generic/index.js +29 -29
  83. package/dist/cjs/clients/generic/lambda-invoke-client.d.ts +10 -10
  84. package/dist/cjs/clients/generic/lambda-invoke-client.js +39 -39
  85. package/dist/cjs/clients/generic/location-client.d.ts +8 -8
  86. package/dist/cjs/clients/generic/location-client.js +31 -31
  87. package/dist/cjs/clients/generic/redis-client.d.ts +33 -33
  88. package/dist/cjs/clients/generic/redis-client.js +191 -191
  89. package/dist/cjs/clients/generic/s3-client.d.ts +23 -23
  90. package/dist/cjs/clients/generic/s3-client.js +216 -216
  91. package/dist/cjs/clients/generic/singlestore-db-client.d.ts +14 -14
  92. package/dist/cjs/clients/generic/singlestore-db-client.js +67 -67
  93. package/dist/cjs/clients/generic/sqs-bundled-client.d.ts +15 -15
  94. package/dist/cjs/clients/generic/sqs-bundled-client.js +311 -311
  95. package/dist/cjs/clients/generic/sqs-bundled-client.types.d.ts +53 -53
  96. package/dist/cjs/clients/generic/sqs-bundled-client.types.js +17 -17
  97. package/dist/cjs/clients/generic/sqs-client.d.ts +53 -53
  98. package/dist/cjs/clients/generic/sqs-client.js +285 -285
  99. package/dist/cjs/clients/generic/sqs-unbundle.d.ts +32 -32
  100. package/dist/cjs/clients/generic/sqs-unbundle.js +144 -144
  101. package/dist/cjs/clients/index.d.ts +3 -3
  102. package/dist/cjs/clients/index.js +19 -19
  103. package/dist/cjs/clients/internal-api/accounts-client.d.ts +91 -91
  104. package/dist/cjs/clients/internal-api/accounts-client.js +129 -129
  105. package/dist/cjs/clients/internal-api/cache-lambda-client.d.ts +26 -26
  106. package/dist/cjs/clients/internal-api/cache-lambda-client.js +89 -89
  107. package/dist/cjs/clients/internal-api/db-management-client.d.ts +18 -18
  108. package/dist/cjs/clients/internal-api/db-management-client.js +36 -36
  109. package/dist/cjs/clients/internal-api/destinations-client.d.ts +34 -34
  110. package/dist/cjs/clients/internal-api/destinations-client.js +79 -79
  111. package/dist/cjs/clients/internal-api/event-collector-client.d.ts +20 -20
  112. package/dist/cjs/clients/internal-api/event-collector-client.js +36 -36
  113. package/dist/cjs/clients/internal-api/identity-client.d.ts +31 -31
  114. package/dist/cjs/clients/internal-api/identity-client.js +91 -91
  115. package/dist/cjs/clients/internal-api/index.d.ts +9 -9
  116. package/dist/cjs/clients/internal-api/index.js +25 -25
  117. package/dist/cjs/clients/internal-api/shopify-app-install-client.d.ts +37 -37
  118. package/dist/cjs/clients/internal-api/shopify-app-install-client.js +81 -81
  119. package/dist/cjs/clients/internal-api/subscriptions-client.d.ts +26 -26
  120. package/dist/cjs/clients/internal-api/subscriptions-client.js +77 -77
  121. package/dist/cjs/clients/internal-api/users-auth-client.d.ts +35 -35
  122. package/dist/cjs/clients/internal-api/users-auth-client.js +110 -110
  123. package/dist/cjs/clients/third-party/acuity-client.d.ts +10 -10
  124. package/dist/cjs/clients/third-party/acuity-client.js +40 -40
  125. package/dist/cjs/clients/third-party/emailable-client.d.ts +7 -7
  126. package/dist/cjs/clients/third-party/emailable-client.js +25 -25
  127. package/dist/cjs/clients/third-party/exchange-rate-api-client.d.ts +17 -17
  128. package/dist/cjs/clients/third-party/exchange-rate-api-client.js +19 -19
  129. package/dist/cjs/clients/third-party/index.d.ts +5 -5
  130. package/dist/cjs/clients/third-party/index.js +21 -21
  131. package/dist/cjs/clients/third-party/loops-client.d.ts +10 -10
  132. package/dist/cjs/clients/third-party/loops-client.js +30 -30
  133. package/dist/cjs/clients/third-party/shopify/graphql-order-queries.d.ts +25 -25
  134. package/dist/cjs/clients/third-party/shopify/graphql-order-queries.js +4 -4
  135. package/dist/cjs/clients/third-party/shopify/graphql-product-queries.d.ts +2 -2
  136. package/dist/cjs/clients/third-party/shopify/graphql-product-queries.js +5 -5
  137. package/dist/cjs/clients/third-party/shopify/shopify-graphql-client.d.ts +10 -10
  138. package/dist/cjs/clients/third-party/shopify/shopify-graphql-client.js +161 -161
  139. package/dist/cjs/clients/third-party/shopify-client.d.ts +29 -29
  140. package/dist/cjs/clients/third-party/shopify-client.js +146 -146
  141. package/dist/cjs/constants/index.d.ts +1 -1
  142. package/dist/cjs/constants/index.js +17 -17
  143. package/dist/cjs/constants/sqs.d.ts +20 -20
  144. package/dist/cjs/constants/sqs.js +26 -26
  145. package/dist/cjs/helpers/account-users-helper.d.ts +2 -2
  146. package/dist/cjs/helpers/account-users-helper.js +22 -22
  147. package/dist/cjs/helpers/acuity-helper.d.ts +4 -4
  148. package/dist/cjs/helpers/acuity-helper.js +56 -56
  149. package/dist/cjs/helpers/api-key-auth-helper.d.ts +9 -9
  150. package/dist/cjs/helpers/api-key-auth-helper.js +40 -40
  151. package/dist/cjs/helpers/api-key-authorizer-helper.d.ts +36 -36
  152. package/dist/cjs/helpers/api-key-authorizer-helper.js +87 -87
  153. package/dist/cjs/helpers/identity-cache-helper.d.ts +30 -30
  154. package/dist/cjs/helpers/identity-cache-helper.js +253 -253
  155. package/dist/cjs/helpers/index.d.ts +10 -10
  156. package/dist/cjs/helpers/index.js +26 -26
  157. package/dist/cjs/helpers/input-validation-helper.d.ts +3 -3
  158. package/dist/cjs/helpers/input-validation-helper.js +22 -22
  159. package/dist/cjs/helpers/logging-helper.d.ts +16 -16
  160. package/dist/cjs/helpers/logging-helper.js +84 -84
  161. package/dist/cjs/helpers/response-helper.d.ts +18 -18
  162. package/dist/cjs/helpers/response-helper.js +43 -43
  163. package/dist/cjs/helpers/shopify-helper.d.ts +9 -9
  164. package/dist/cjs/helpers/shopify-helper.js +26 -26
  165. package/dist/cjs/helpers/sqs-utils.d.ts +6 -6
  166. package/dist/cjs/helpers/sqs-utils.js +14 -14
  167. package/dist/cjs/index.d.ts +7 -7
  168. package/dist/cjs/index.js +23 -23
  169. package/dist/cjs/libs/api-router/index.d.ts +2 -2
  170. package/dist/cjs/libs/api-router/index.js +18 -18
  171. package/dist/cjs/libs/api-router/public-api-router.d.ts +3 -3
  172. package/dist/cjs/libs/api-router/public-api-router.js +36 -36
  173. package/dist/cjs/libs/api-router/route-matcher.d.ts +21 -21
  174. package/dist/cjs/libs/api-router/route-matcher.js +36 -36
  175. package/dist/cjs/libs/click-id-parser.d.ts +23 -23
  176. package/dist/cjs/libs/click-id-parser.js +49 -49
  177. package/dist/cjs/libs/compression.d.ts +2 -2
  178. package/dist/cjs/libs/compression.js +33 -33
  179. package/dist/cjs/libs/contacts.d.ts +7 -7
  180. package/dist/cjs/libs/contacts.js +152 -152
  181. package/dist/cjs/libs/cookie.d.ts +17 -17
  182. package/dist/cjs/libs/cookie.js +76 -76
  183. package/dist/cjs/libs/crypto.d.ts +4 -4
  184. package/dist/cjs/libs/crypto.js +25 -25
  185. package/dist/cjs/libs/csv.d.ts +2 -2
  186. package/dist/cjs/libs/csv.js +35 -35
  187. package/dist/cjs/libs/currency.d.ts +1 -1
  188. package/dist/cjs/libs/currency.js +29 -29
  189. package/dist/cjs/libs/dates.d.ts +12 -12
  190. package/dist/cjs/libs/dates.js +96 -96
  191. package/dist/cjs/libs/domain.d.ts +2 -2
  192. package/dist/cjs/libs/domain.js +38 -38
  193. package/dist/cjs/libs/emails.d.ts +8 -8
  194. package/dist/cjs/libs/emails.js +154 -154
  195. package/dist/cjs/libs/http-error.d.ts +21 -21
  196. package/dist/cjs/libs/http-error.js +63 -63
  197. package/dist/cjs/libs/http-status-codes.d.ts +58 -58
  198. package/dist/cjs/libs/http-status-codes.js +62 -62
  199. package/dist/cjs/libs/index.d.ts +19 -19
  200. package/dist/cjs/libs/index.js +35 -35
  201. package/dist/cjs/libs/numbers.d.ts +1 -1
  202. package/dist/cjs/libs/numbers.js +15 -15
  203. package/dist/cjs/libs/referrer-parser/index.d.ts +2 -2
  204. package/dist/cjs/libs/referrer-parser/index.js +18 -18
  205. package/dist/cjs/libs/referrer-parser/referrer-data.d.ts +9 -9
  206. package/dist/cjs/libs/referrer-parser/referrer-data.js +3307 -3307
  207. package/dist/cjs/libs/referrer-parser/referrer-parser-util.d.ts +20 -20
  208. package/dist/cjs/libs/referrer-parser/referrer-parser-util.js +131 -131
  209. package/dist/cjs/libs/strings.d.ts +3 -3
  210. package/dist/cjs/libs/strings.js +46 -46
  211. package/dist/cjs/libs/traits.d.ts +6 -6
  212. package/dist/cjs/libs/traits.js +65 -65
  213. package/dist/cjs/libs/url.d.ts +1 -1
  214. package/dist/cjs/libs/url.js +13 -13
  215. package/dist/cjs/services/acuity-api-service.d.ts +9 -9
  216. package/dist/cjs/services/acuity-api-service.js +73 -73
  217. package/dist/cjs/services/cache/generic-cached-object.d.ts +5 -5
  218. package/dist/cjs/services/cache/generic-cached-object.js +2 -2
  219. package/dist/cjs/services/cache/index.d.ts +1 -1
  220. package/dist/cjs/services/cache/index.js +17 -17
  221. package/dist/cjs/services/cache/product-cache-service.d.ts +21 -21
  222. package/dist/cjs/services/cache/product-cache-service.js +76 -76
  223. package/dist/cjs/services/currency-exchange-rate-lookup-service.d.ts +11 -12
  224. package/dist/cjs/services/currency-exchange-rate-lookup-service.js +66 -94
  225. package/dist/cjs/services/currency-exchange-rate-lookup-service.js.map +1 -1
  226. package/dist/cjs/services/db/accounts-db-service.d.ts +9 -9
  227. package/dist/cjs/services/db/accounts-db-service.js +33 -33
  228. package/dist/cjs/services/db/api-keys-db-service.d.ts +10 -10
  229. package/dist/cjs/services/db/api-keys-db-service.js +36 -36
  230. package/dist/cjs/services/db/contact-enrichments-db-service.d.ts +15 -15
  231. package/dist/cjs/services/db/contact-enrichments-db-service.js +94 -94
  232. package/dist/cjs/services/db/currency-exchange-rates-db-service.d.ts +21 -21
  233. package/dist/cjs/services/db/currency-exchange-rates-db-service.js +39 -39
  234. package/dist/cjs/services/db/custom-measures-db-service.d.ts +14 -14
  235. package/dist/cjs/services/db/custom-measures-db-service.js +48 -48
  236. package/dist/cjs/services/db/destinations-db-service.d.ts +13 -13
  237. package/dist/cjs/services/db/destinations-db-service.js +74 -74
  238. package/dist/cjs/services/db/identity-cache-db-service.d.ts +28 -28
  239. package/dist/cjs/services/db/identity-cache-db-service.js +320 -320
  240. package/dist/cjs/services/db/identity-cache-dynamodb-service.d.ts +44 -44
  241. package/dist/cjs/services/db/identity-cache-dynamodb-service.js +734 -734
  242. package/dist/cjs/services/db/index.d.ts +17 -19
  243. package/dist/cjs/services/db/index.js +33 -35
  244. package/dist/cjs/services/db/index.js.map +1 -1
  245. package/dist/cjs/services/db/log-events-db-service.d.ts +11 -11
  246. package/dist/cjs/services/db/log-events-db-service.js +181 -181
  247. package/dist/cjs/services/db/pixels-db-service.d.ts +8 -8
  248. package/dist/cjs/services/db/pixels-db-service.js +35 -35
  249. package/dist/cjs/services/db/purchasable-contacts-db-service.d.ts +9 -9
  250. package/dist/cjs/services/db/purchasable-contacts-db-service.js +43 -43
  251. package/dist/cjs/services/db/purchased-contacts/index.d.ts +2 -2
  252. package/dist/cjs/services/db/purchased-contacts/index.js +18 -18
  253. package/dist/cjs/services/db/purchased-contacts/purchased-contacts-db-service.d.ts +18 -18
  254. package/dist/cjs/services/db/purchased-contacts/purchased-contacts-db-service.js +152 -152
  255. package/dist/cjs/services/db/purchased-contacts/types.d.ts +11 -11
  256. package/dist/cjs/services/db/purchased-contacts/types.js +2 -2
  257. package/dist/cjs/services/db/shopify-app-installs-db-service.d.ts +10 -10
  258. package/dist/cjs/services/db/shopify-app-installs-db-service.js +52 -52
  259. package/dist/cjs/services/db/shopify-products-cache-db-service.d.ts +16 -16
  260. package/dist/cjs/services/db/shopify-products-cache-db-service.js +73 -73
  261. package/dist/cjs/services/db/subscriptions-db-service.d.ts +11 -11
  262. package/dist/cjs/services/db/subscriptions-db-service.js +38 -38
  263. package/dist/cjs/services/db/tracking-events-db-service.d.ts +21 -21
  264. package/dist/cjs/services/db/tracking-events-db-service.js +188 -188
  265. package/dist/cjs/services/db/user-accounts-db-service.d.ts +7 -7
  266. package/dist/cjs/services/db/user-accounts-db-service.js +17 -17
  267. package/dist/cjs/services/email-verification/contact-email-verification-service.d.ts +7 -7
  268. package/dist/cjs/services/email-verification/contact-email-verification-service.js +101 -101
  269. package/dist/cjs/services/email-verification/email-verification-service.d.ts +19 -19
  270. package/dist/cjs/services/email-verification/email-verification-service.js +131 -131
  271. package/dist/cjs/services/email-verification/index.d.ts +2 -2
  272. package/dist/cjs/services/email-verification/index.js +18 -18
  273. package/dist/cjs/services/eventbridge-integration-service.d.ts +9 -9
  274. package/dist/cjs/services/eventbridge-integration-service.js +28 -28
  275. package/dist/cjs/services/events/index.d.ts +3 -3
  276. package/dist/cjs/services/events/index.js +19 -19
  277. package/dist/cjs/services/events/log-event-service.d.ts +19 -19
  278. package/dist/cjs/services/events/log-event-service.js +77 -77
  279. package/dist/cjs/services/events/metric-event-service.d.ts +9 -9
  280. package/dist/cjs/services/events/metric-event-service.js +49 -49
  281. package/dist/cjs/services/events/tracking-event-sqs-service.d.ts +8 -8
  282. package/dist/cjs/services/events/tracking-event-sqs-service.js +34 -34
  283. package/dist/cjs/services/generic-cache-service.d.ts +7 -7
  284. package/dist/cjs/services/generic-cache-service.js +33 -33
  285. package/dist/cjs/services/index.d.ts +10 -11
  286. package/dist/cjs/services/index.js +26 -27
  287. package/dist/cjs/services/index.js.map +1 -1
  288. package/dist/cjs/services/ipdata-lookup-service.d.ts +20 -20
  289. package/dist/cjs/services/ipdata-lookup-service.js +112 -112
  290. package/dist/cjs/services/shopify/index.d.ts +2 -2
  291. package/dist/cjs/services/shopify/index.js +18 -18
  292. package/dist/cjs/services/shopify/products/index.d.ts +1 -1
  293. package/dist/cjs/services/shopify/products/index.js +17 -17
  294. package/dist/cjs/services/shopify/products/shopify-products-serviceV2.d.ts +17 -17
  295. package/dist/cjs/services/shopify/products/shopify-products-serviceV2.js +112 -112
  296. package/dist/cjs/services/shopify/shopify-graphql-transformer.d.ts +8 -8
  297. package/dist/cjs/services/shopify/shopify-graphql-transformer.js +141 -141
  298. package/dist/cjs/types/acuity-types.d.ts +74 -74
  299. package/dist/cjs/types/acuity-types.js +2 -2
  300. package/dist/cjs/types/api-response.d.ts +6 -6
  301. package/dist/cjs/types/api-response.js +2 -2
  302. package/dist/cjs/types/index.d.ts +4 -4
  303. package/dist/cjs/types/index.js +33 -33
  304. package/dist/cjs/types/internal-events/event-detail-types.d.ts +20 -20
  305. package/dist/cjs/types/internal-events/event-detail-types.js +27 -27
  306. package/dist/cjs/types/internal-events/index.d.ts +1 -1
  307. package/dist/cjs/types/internal-events/index.js +17 -17
  308. package/dist/cjs/types/shopify-graphql-types/admin.generated.d.ts +123 -123
  309. package/dist/cjs/types/shopify-graphql-types/admin.generated.js +2 -2
  310. package/dist/cjs/types/shopify-graphql-types/admin.types.d.ts +26289 -26289
  311. package/dist/cjs/types/shopify-graphql-types/admin.types.js +5311 -5311
  312. package/dist/cjs/types/shopify-graphql-types/index.d.ts +2 -2
  313. package/dist/cjs/types/shopify-graphql-types/index.js +18 -18
  314. package/dist/cjs/types/shopify-rest-types.d.ts +767 -767
  315. package/dist/cjs/types/shopify-rest-types.js +2 -2
  316. package/dist/cjs/utils/compression.d.ts +36 -36
  317. package/dist/cjs/utils/compression.js +198 -198
  318. package/dist/cjs/utils/custom-measure-formula-utils.d.ts +6 -6
  319. package/dist/cjs/utils/custom-measure-formula-utils.js +209 -209
  320. package/dist/cjs/utils/index.d.ts +4 -4
  321. package/dist/cjs/utils/index.js +20 -20
  322. package/dist/cjs/utils/retry-envelope.d.ts +12 -12
  323. package/dist/cjs/utils/retry-envelope.js +28 -28
  324. package/dist/cjs/utils/size.d.ts +2 -2
  325. package/dist/cjs/utils/size.js +49 -49
  326. package/dist/esm/__tests__/clients/acuity-client.spec.d.ts +1 -1
  327. package/dist/esm/__tests__/clients/acuity-client.spec.js +41 -41
  328. package/dist/esm/__tests__/clients/cross-platform-compression.spec.d.ts +1 -1
  329. package/dist/esm/__tests__/clients/cross-platform-compression.spec.js +329 -329
  330. package/dist/esm/__tests__/clients/dynamodb-client.spec.d.ts +1 -1
  331. package/dist/esm/__tests__/clients/dynamodb-client.spec.js +192 -192
  332. package/dist/esm/__tests__/clients/sqs-bundled-client.spec.d.ts +1 -1
  333. package/dist/esm/__tests__/clients/sqs-bundled-client.spec.js +906 -906
  334. package/dist/esm/__tests__/clients/sqs-bundling-contracts.spec.d.ts +1 -1
  335. package/dist/esm/__tests__/clients/sqs-bundling-contracts.spec.js +538 -538
  336. package/dist/esm/__tests__/clients/sqs-client.spec.d.ts +1 -1
  337. package/dist/esm/__tests__/clients/sqs-client.spec.js +189 -189
  338. package/dist/esm/__tests__/clients/sqs-unbundle.spec.d.ts +1 -1
  339. package/dist/esm/__tests__/clients/sqs-unbundle.spec.js +1355 -1355
  340. package/dist/esm/__tests__/db/contact-enrichments-db-service.spec.d.ts +1 -1
  341. package/dist/esm/__tests__/db/contact-enrichments-db-service.spec.js +66 -66
  342. package/dist/esm/__tests__/db/destinations-db-service.spec.d.ts +1 -1
  343. package/dist/esm/__tests__/db/destinations-db-service.spec.js +123 -123
  344. package/dist/esm/__tests__/db/shared-read-db-services.spec.d.ts +1 -1
  345. package/dist/esm/__tests__/db/shared-read-db-services.spec.js +87 -87
  346. package/dist/esm/__tests__/db/shopify-app-installs-db-service.spec.d.ts +1 -1
  347. package/dist/esm/__tests__/db/shopify-app-installs-db-service.spec.js +102 -102
  348. package/dist/esm/__tests__/db/subscriptions-db-service.spec.d.ts +1 -1
  349. package/dist/esm/__tests__/db/subscriptions-db-service.spec.js +93 -93
  350. package/dist/esm/__tests__/db/user-accounts-db-service.spec.d.ts +1 -1
  351. package/dist/esm/__tests__/db/user-accounts-db-service.spec.js +74 -74
  352. package/dist/esm/__tests__/helpers/account-users-helper.spec.d.ts +1 -1
  353. package/dist/esm/__tests__/helpers/account-users-helper.spec.js +218 -218
  354. package/dist/esm/__tests__/helpers/acuity-helper.spec.d.ts +1 -1
  355. package/dist/esm/__tests__/helpers/acuity-helper.spec.js +67 -67
  356. package/dist/esm/__tests__/helpers/api-key-auth-helper.spec.d.ts +1 -1
  357. package/dist/esm/__tests__/helpers/api-key-auth-helper.spec.js +80 -80
  358. package/dist/esm/__tests__/identity-cache/identity-cache-db-service.spec.d.ts +1 -1
  359. package/dist/esm/__tests__/identity-cache/identity-cache-db-service.spec.js +674 -674
  360. package/dist/esm/__tests__/identity-cache/identity-cache-dynamodb-service.spec.d.ts +1 -1
  361. package/dist/esm/__tests__/identity-cache/identity-cache-dynamodb-service.spec.js +1138 -1138
  362. package/dist/esm/__tests__/identity-cache/identity-cache-tier-routing.spec.d.ts +1 -1
  363. package/dist/esm/__tests__/identity-cache/identity-cache-tier-routing.spec.js +849 -849
  364. package/dist/esm/__tests__/identity-cache/trait-merging-and-staleness.spec.d.ts +1 -1
  365. package/dist/esm/__tests__/identity-cache/trait-merging-and-staleness.spec.js +1058 -1058
  366. package/dist/esm/__tests__/identity-cache/volatile-traits-optimization.spec.d.ts +1 -1
  367. package/dist/esm/__tests__/identity-cache/volatile-traits-optimization.spec.js +816 -816
  368. package/dist/esm/__tests__/integration/sqs-bundling-roundtrip.spec.d.ts +1 -1
  369. package/dist/esm/__tests__/integration/sqs-bundling-roundtrip.spec.js +582 -582
  370. package/dist/esm/__tests__/libs/compress-decompress.spec.d.ts +1 -1
  371. package/dist/esm/__tests__/libs/compress-decompress.spec.js +14 -14
  372. package/dist/esm/__tests__/libs/contacts.spec.d.ts +1 -1
  373. package/dist/esm/__tests__/libs/contacts.spec.js +292 -292
  374. package/dist/esm/__tests__/libs/currency.spec.d.ts +1 -1
  375. package/dist/esm/__tests__/libs/currency.spec.js +218 -218
  376. package/dist/esm/__tests__/libs/dates.spec.d.ts +1 -1
  377. package/dist/esm/__tests__/libs/dates.spec.js +128 -128
  378. package/dist/esm/__tests__/libs/domain.spec.d.ts +1 -1
  379. package/dist/esm/__tests__/libs/domain.spec.js +105 -105
  380. package/dist/esm/__tests__/libs/numbers.spec.d.ts +1 -1
  381. package/dist/esm/__tests__/libs/numbers.spec.js +259 -259
  382. package/dist/esm/__tests__/s3-client/s3-client.spec.d.ts +1 -1
  383. package/dist/esm/__tests__/s3-client/s3-client.spec.js +31 -31
  384. package/dist/esm/__tests__/services/acuity-api-service.spec.d.ts +1 -1
  385. package/dist/esm/__tests__/services/acuity-api-service.spec.js +69 -69
  386. package/dist/esm/__tests__/services/email-verification/contact-email-verification-service.spec.d.ts +1 -1
  387. package/dist/esm/__tests__/services/email-verification/contact-email-verification-service.spec.js +91 -91
  388. package/dist/esm/__tests__/services/email-verification/email-verification-service.spec.d.ts +1 -1
  389. package/dist/esm/__tests__/services/email-verification/email-verification-service.spec.js +55 -55
  390. package/dist/esm/__tests__/shopify/shopify-graphql-transformer.spec.d.ts +1 -1
  391. package/dist/esm/__tests__/shopify/shopify-graphql-transformer.spec.js +33 -33
  392. package/dist/esm/__tests__/unit/libs/api-router/public-api-router.spec.d.ts +1 -1
  393. package/dist/esm/__tests__/unit/libs/api-router/public-api-router.spec.js +156 -156
  394. package/dist/esm/__tests__/unit/libs/api-router/route-matcher.spec.d.ts +1 -1
  395. package/dist/esm/__tests__/unit/libs/api-router/route-matcher.spec.js +67 -67
  396. package/dist/esm/__tests__/utils/custom-measure-formula-utils.spec.d.ts +1 -1
  397. package/dist/esm/__tests__/utils/custom-measure-formula-utils.spec.js +137 -137
  398. package/dist/esm/clients/generic/cognito-client.d.ts +23 -23
  399. package/dist/esm/clients/generic/cognito-client.js +204 -204
  400. package/dist/esm/clients/generic/dynamodb-client.d.ts +20 -20
  401. package/dist/esm/clients/generic/dynamodb-client.js +231 -231
  402. package/dist/esm/clients/generic/eventbridge-client.d.ts +14 -14
  403. package/dist/esm/clients/generic/eventbridge-client.js +47 -47
  404. package/dist/esm/clients/generic/http-client.d.ts +14 -14
  405. package/dist/esm/clients/generic/http-client.js +53 -53
  406. package/dist/esm/clients/generic/index.d.ts +13 -13
  407. package/dist/esm/clients/generic/index.js +13 -13
  408. package/dist/esm/clients/generic/lambda-invoke-client.d.ts +10 -10
  409. package/dist/esm/clients/generic/lambda-invoke-client.js +35 -35
  410. package/dist/esm/clients/generic/location-client.d.ts +8 -8
  411. package/dist/esm/clients/generic/location-client.js +27 -27
  412. package/dist/esm/clients/generic/redis-client.d.ts +33 -33
  413. package/dist/esm/clients/generic/redis-client.js +184 -184
  414. package/dist/esm/clients/generic/s3-client.d.ts +23 -23
  415. package/dist/esm/clients/generic/s3-client.js +209 -209
  416. package/dist/esm/clients/generic/singlestore-db-client.d.ts +14 -14
  417. package/dist/esm/clients/generic/singlestore-db-client.js +40 -40
  418. package/dist/esm/clients/generic/sqs-bundled-client.d.ts +15 -15
  419. package/dist/esm/clients/generic/sqs-bundled-client.js +307 -307
  420. package/dist/esm/clients/generic/sqs-bundled-client.types.d.ts +53 -53
  421. package/dist/esm/clients/generic/sqs-bundled-client.types.js +14 -14
  422. package/dist/esm/clients/generic/sqs-client.d.ts +53 -53
  423. package/dist/esm/clients/generic/sqs-client.js +281 -281
  424. package/dist/esm/clients/generic/sqs-unbundle.d.ts +32 -32
  425. package/dist/esm/clients/generic/sqs-unbundle.js +137 -137
  426. package/dist/esm/clients/index.d.ts +3 -3
  427. package/dist/esm/clients/index.js +3 -3
  428. package/dist/esm/clients/internal-api/accounts-client.d.ts +91 -91
  429. package/dist/esm/clients/internal-api/accounts-client.js +125 -125
  430. package/dist/esm/clients/internal-api/cache-lambda-client.d.ts +26 -26
  431. package/dist/esm/clients/internal-api/cache-lambda-client.js +85 -85
  432. package/dist/esm/clients/internal-api/db-management-client.d.ts +18 -18
  433. package/dist/esm/clients/internal-api/db-management-client.js +32 -32
  434. package/dist/esm/clients/internal-api/destinations-client.d.ts +34 -34
  435. package/dist/esm/clients/internal-api/destinations-client.js +75 -75
  436. package/dist/esm/clients/internal-api/event-collector-client.d.ts +20 -20
  437. package/dist/esm/clients/internal-api/event-collector-client.js +32 -32
  438. package/dist/esm/clients/internal-api/identity-client.d.ts +31 -31
  439. package/dist/esm/clients/internal-api/identity-client.js +87 -87
  440. package/dist/esm/clients/internal-api/index.d.ts +9 -9
  441. package/dist/esm/clients/internal-api/index.js +9 -9
  442. package/dist/esm/clients/internal-api/shopify-app-install-client.d.ts +37 -37
  443. package/dist/esm/clients/internal-api/shopify-app-install-client.js +77 -77
  444. package/dist/esm/clients/internal-api/subscriptions-client.d.ts +26 -26
  445. package/dist/esm/clients/internal-api/subscriptions-client.js +73 -73
  446. package/dist/esm/clients/internal-api/users-auth-client.d.ts +35 -35
  447. package/dist/esm/clients/internal-api/users-auth-client.js +106 -106
  448. package/dist/esm/clients/third-party/acuity-client.d.ts +10 -10
  449. package/dist/esm/clients/third-party/acuity-client.js +36 -36
  450. package/dist/esm/clients/third-party/emailable-client.d.ts +7 -7
  451. package/dist/esm/clients/third-party/emailable-client.js +21 -21
  452. package/dist/esm/clients/third-party/exchange-rate-api-client.d.ts +17 -17
  453. package/dist/esm/clients/third-party/exchange-rate-api-client.js +15 -15
  454. package/dist/esm/clients/third-party/index.d.ts +5 -5
  455. package/dist/esm/clients/third-party/index.js +5 -5
  456. package/dist/esm/clients/third-party/loops-client.d.ts +10 -10
  457. package/dist/esm/clients/third-party/loops-client.js +26 -26
  458. package/dist/esm/clients/third-party/shopify/graphql-order-queries.d.ts +25 -25
  459. package/dist/esm/clients/third-party/shopify/graphql-order-queries.js +1 -1
  460. package/dist/esm/clients/third-party/shopify/graphql-product-queries.d.ts +2 -2
  461. package/dist/esm/clients/third-party/shopify/graphql-product-queries.js +2 -2
  462. package/dist/esm/clients/third-party/shopify/shopify-graphql-client.d.ts +10 -10
  463. package/dist/esm/clients/third-party/shopify/shopify-graphql-client.js +157 -157
  464. package/dist/esm/clients/third-party/shopify-client.d.ts +29 -29
  465. package/dist/esm/clients/third-party/shopify-client.js +142 -142
  466. package/dist/esm/constants/index.d.ts +1 -1
  467. package/dist/esm/constants/index.js +1 -1
  468. package/dist/esm/constants/sqs.d.ts +20 -20
  469. package/dist/esm/constants/sqs.js +22 -22
  470. package/dist/esm/helpers/account-users-helper.d.ts +2 -2
  471. package/dist/esm/helpers/account-users-helper.js +18 -18
  472. package/dist/esm/helpers/acuity-helper.d.ts +4 -4
  473. package/dist/esm/helpers/acuity-helper.js +51 -51
  474. package/dist/esm/helpers/api-key-auth-helper.d.ts +9 -9
  475. package/dist/esm/helpers/api-key-auth-helper.js +35 -35
  476. package/dist/esm/helpers/api-key-authorizer-helper.d.ts +36 -36
  477. package/dist/esm/helpers/api-key-authorizer-helper.js +83 -83
  478. package/dist/esm/helpers/identity-cache-helper.d.ts +30 -30
  479. package/dist/esm/helpers/identity-cache-helper.js +248 -248
  480. package/dist/esm/helpers/index.d.ts +10 -10
  481. package/dist/esm/helpers/index.js +10 -10
  482. package/dist/esm/helpers/input-validation-helper.d.ts +3 -3
  483. package/dist/esm/helpers/input-validation-helper.js +18 -18
  484. package/dist/esm/helpers/logging-helper.d.ts +16 -16
  485. package/dist/esm/helpers/logging-helper.js +56 -56
  486. package/dist/esm/helpers/response-helper.d.ts +18 -18
  487. package/dist/esm/helpers/response-helper.js +37 -37
  488. package/dist/esm/helpers/shopify-helper.d.ts +9 -9
  489. package/dist/esm/helpers/shopify-helper.js +21 -21
  490. package/dist/esm/helpers/sqs-utils.d.ts +6 -6
  491. package/dist/esm/helpers/sqs-utils.js +9 -9
  492. package/dist/esm/index.d.ts +7 -7
  493. package/dist/esm/index.js +7 -7
  494. package/dist/esm/libs/api-router/index.d.ts +2 -2
  495. package/dist/esm/libs/api-router/index.js +2 -2
  496. package/dist/esm/libs/api-router/public-api-router.d.ts +3 -3
  497. package/dist/esm/libs/api-router/public-api-router.js +32 -32
  498. package/dist/esm/libs/api-router/route-matcher.d.ts +21 -21
  499. package/dist/esm/libs/api-router/route-matcher.js +30 -30
  500. package/dist/esm/libs/click-id-parser.d.ts +23 -23
  501. package/dist/esm/libs/click-id-parser.js +45 -45
  502. package/dist/esm/libs/compression.d.ts +2 -2
  503. package/dist/esm/libs/compression.js +25 -25
  504. package/dist/esm/libs/contacts.d.ts +7 -7
  505. package/dist/esm/libs/contacts.js +143 -143
  506. package/dist/esm/libs/cookie.d.ts +17 -17
  507. package/dist/esm/libs/cookie.js +70 -70
  508. package/dist/esm/libs/crypto.d.ts +4 -4
  509. package/dist/esm/libs/crypto.js +15 -15
  510. package/dist/esm/libs/csv.d.ts +2 -2
  511. package/dist/esm/libs/csv.js +30 -30
  512. package/dist/esm/libs/currency.d.ts +1 -1
  513. package/dist/esm/libs/currency.js +22 -22
  514. package/dist/esm/libs/dates.d.ts +12 -12
  515. package/dist/esm/libs/dates.js +83 -83
  516. package/dist/esm/libs/domain.d.ts +2 -2
  517. package/dist/esm/libs/domain.js +33 -33
  518. package/dist/esm/libs/emails.d.ts +8 -8
  519. package/dist/esm/libs/emails.js +146 -146
  520. package/dist/esm/libs/http-error.d.ts +21 -21
  521. package/dist/esm/libs/http-error.js +59 -59
  522. package/dist/esm/libs/http-status-codes.d.ts +58 -58
  523. package/dist/esm/libs/http-status-codes.js +59 -59
  524. package/dist/esm/libs/index.d.ts +19 -19
  525. package/dist/esm/libs/index.js +19 -19
  526. package/dist/esm/libs/numbers.d.ts +1 -1
  527. package/dist/esm/libs/numbers.js +11 -11
  528. package/dist/esm/libs/referrer-parser/index.d.ts +2 -2
  529. package/dist/esm/libs/referrer-parser/index.js +2 -2
  530. package/dist/esm/libs/referrer-parser/referrer-data.d.ts +9 -9
  531. package/dist/esm/libs/referrer-parser/referrer-data.js +3304 -3304
  532. package/dist/esm/libs/referrer-parser/referrer-parser-util.d.ts +20 -20
  533. package/dist/esm/libs/referrer-parser/referrer-parser-util.js +124 -124
  534. package/dist/esm/libs/strings.d.ts +3 -3
  535. package/dist/esm/libs/strings.js +40 -40
  536. package/dist/esm/libs/traits.d.ts +6 -6
  537. package/dist/esm/libs/traits.js +54 -54
  538. package/dist/esm/libs/url.d.ts +1 -1
  539. package/dist/esm/libs/url.js +9 -9
  540. package/dist/esm/services/acuity-api-service.d.ts +9 -9
  541. package/dist/esm/services/acuity-api-service.js +69 -69
  542. package/dist/esm/services/cache/generic-cached-object.d.ts +5 -5
  543. package/dist/esm/services/cache/generic-cached-object.js +1 -1
  544. package/dist/esm/services/cache/index.d.ts +1 -1
  545. package/dist/esm/services/cache/index.js +1 -1
  546. package/dist/esm/services/cache/product-cache-service.d.ts +21 -21
  547. package/dist/esm/services/cache/product-cache-service.js +68 -68
  548. package/dist/esm/services/currency-exchange-rate-lookup-service.d.ts +11 -12
  549. package/dist/esm/services/currency-exchange-rate-lookup-service.js +62 -90
  550. package/dist/esm/services/currency-exchange-rate-lookup-service.js.map +1 -1
  551. package/dist/esm/services/db/accounts-db-service.d.ts +9 -9
  552. package/dist/esm/services/db/accounts-db-service.js +29 -29
  553. package/dist/esm/services/db/api-keys-db-service.d.ts +10 -10
  554. package/dist/esm/services/db/api-keys-db-service.js +32 -32
  555. package/dist/esm/services/db/contact-enrichments-db-service.d.ts +15 -15
  556. package/dist/esm/services/db/contact-enrichments-db-service.js +90 -90
  557. package/dist/esm/services/db/currency-exchange-rates-db-service.d.ts +21 -21
  558. package/dist/esm/services/db/currency-exchange-rates-db-service.js +35 -35
  559. package/dist/esm/services/db/custom-measures-db-service.d.ts +14 -14
  560. package/dist/esm/services/db/custom-measures-db-service.js +44 -44
  561. package/dist/esm/services/db/destinations-db-service.d.ts +13 -13
  562. package/dist/esm/services/db/destinations-db-service.js +70 -70
  563. package/dist/esm/services/db/identity-cache-db-service.d.ts +28 -28
  564. package/dist/esm/services/db/identity-cache-db-service.js +313 -313
  565. package/dist/esm/services/db/identity-cache-dynamodb-service.d.ts +44 -44
  566. package/dist/esm/services/db/identity-cache-dynamodb-service.js +727 -727
  567. package/dist/esm/services/db/index.d.ts +17 -19
  568. package/dist/esm/services/db/index.js +17 -19
  569. package/dist/esm/services/db/index.js.map +1 -1
  570. package/dist/esm/services/db/log-events-db-service.d.ts +11 -11
  571. package/dist/esm/services/db/log-events-db-service.js +177 -177
  572. package/dist/esm/services/db/pixels-db-service.d.ts +8 -8
  573. package/dist/esm/services/db/pixels-db-service.js +31 -31
  574. package/dist/esm/services/db/purchasable-contacts-db-service.d.ts +9 -9
  575. package/dist/esm/services/db/purchasable-contacts-db-service.js +39 -39
  576. package/dist/esm/services/db/purchased-contacts/index.d.ts +2 -2
  577. package/dist/esm/services/db/purchased-contacts/index.js +2 -2
  578. package/dist/esm/services/db/purchased-contacts/purchased-contacts-db-service.d.ts +18 -18
  579. package/dist/esm/services/db/purchased-contacts/purchased-contacts-db-service.js +148 -148
  580. package/dist/esm/services/db/purchased-contacts/types.d.ts +11 -11
  581. package/dist/esm/services/db/purchased-contacts/types.js +1 -1
  582. package/dist/esm/services/db/shopify-app-installs-db-service.d.ts +10 -10
  583. package/dist/esm/services/db/shopify-app-installs-db-service.js +48 -48
  584. package/dist/esm/services/db/shopify-products-cache-db-service.d.ts +16 -16
  585. package/dist/esm/services/db/shopify-products-cache-db-service.js +66 -66
  586. package/dist/esm/services/db/subscriptions-db-service.d.ts +11 -11
  587. package/dist/esm/services/db/subscriptions-db-service.js +34 -34
  588. package/dist/esm/services/db/tracking-events-db-service.d.ts +21 -21
  589. package/dist/esm/services/db/tracking-events-db-service.js +184 -184
  590. package/dist/esm/services/db/user-accounts-db-service.d.ts +7 -7
  591. package/dist/esm/services/db/user-accounts-db-service.js +13 -13
  592. package/dist/esm/services/email-verification/contact-email-verification-service.d.ts +7 -7
  593. package/dist/esm/services/email-verification/contact-email-verification-service.js +97 -97
  594. package/dist/esm/services/email-verification/email-verification-service.d.ts +19 -19
  595. package/dist/esm/services/email-verification/email-verification-service.js +127 -127
  596. package/dist/esm/services/email-verification/index.d.ts +2 -2
  597. package/dist/esm/services/email-verification/index.js +2 -2
  598. package/dist/esm/services/eventbridge-integration-service.d.ts +9 -9
  599. package/dist/esm/services/eventbridge-integration-service.js +24 -24
  600. package/dist/esm/services/events/index.d.ts +3 -3
  601. package/dist/esm/services/events/index.js +3 -3
  602. package/dist/esm/services/events/log-event-service.d.ts +19 -19
  603. package/dist/esm/services/events/log-event-service.js +73 -73
  604. package/dist/esm/services/events/metric-event-service.d.ts +9 -9
  605. package/dist/esm/services/events/metric-event-service.js +45 -45
  606. package/dist/esm/services/events/tracking-event-sqs-service.d.ts +8 -8
  607. package/dist/esm/services/events/tracking-event-sqs-service.js +30 -30
  608. package/dist/esm/services/generic-cache-service.d.ts +7 -7
  609. package/dist/esm/services/generic-cache-service.js +29 -29
  610. package/dist/esm/services/index.d.ts +10 -11
  611. package/dist/esm/services/index.js +10 -11
  612. package/dist/esm/services/index.js.map +1 -1
  613. package/dist/esm/services/ipdata-lookup-service.d.ts +20 -20
  614. package/dist/esm/services/ipdata-lookup-service.js +108 -108
  615. package/dist/esm/services/shopify/index.d.ts +2 -2
  616. package/dist/esm/services/shopify/index.js +2 -2
  617. package/dist/esm/services/shopify/products/index.d.ts +1 -1
  618. package/dist/esm/services/shopify/products/index.js +1 -1
  619. package/dist/esm/services/shopify/products/shopify-products-serviceV2.d.ts +17 -17
  620. package/dist/esm/services/shopify/products/shopify-products-serviceV2.js +108 -108
  621. package/dist/esm/services/shopify/shopify-graphql-transformer.d.ts +8 -8
  622. package/dist/esm/services/shopify/shopify-graphql-transformer.js +138 -138
  623. package/dist/esm/types/acuity-types.d.ts +74 -74
  624. package/dist/esm/types/acuity-types.js +1 -1
  625. package/dist/esm/types/api-response.d.ts +6 -6
  626. package/dist/esm/types/api-response.js +1 -1
  627. package/dist/esm/types/index.d.ts +4 -4
  628. package/dist/esm/types/index.js +4 -4
  629. package/dist/esm/types/internal-events/event-detail-types.d.ts +20 -20
  630. package/dist/esm/types/internal-events/event-detail-types.js +24 -24
  631. package/dist/esm/types/internal-events/index.d.ts +1 -1
  632. package/dist/esm/types/internal-events/index.js +1 -1
  633. package/dist/esm/types/shopify-graphql-types/admin.generated.d.ts +123 -123
  634. package/dist/esm/types/shopify-graphql-types/admin.generated.js +1 -1
  635. package/dist/esm/types/shopify-graphql-types/admin.types.d.ts +26289 -26289
  636. package/dist/esm/types/shopify-graphql-types/admin.types.js +5299 -5299
  637. package/dist/esm/types/shopify-graphql-types/index.d.ts +2 -2
  638. package/dist/esm/types/shopify-graphql-types/index.js +2 -2
  639. package/dist/esm/types/shopify-rest-types.d.ts +767 -767
  640. package/dist/esm/types/shopify-rest-types.js +1 -1
  641. package/dist/esm/utils/compression.d.ts +36 -36
  642. package/dist/esm/utils/compression.js +187 -187
  643. package/dist/esm/utils/custom-measure-formula-utils.d.ts +6 -6
  644. package/dist/esm/utils/custom-measure-formula-utils.js +201 -201
  645. package/dist/esm/utils/index.d.ts +4 -4
  646. package/dist/esm/utils/index.js +4 -4
  647. package/dist/esm/utils/retry-envelope.d.ts +12 -12
  648. package/dist/esm/utils/retry-envelope.js +22 -22
  649. package/dist/esm/utils/size.d.ts +2 -2
  650. package/dist/esm/utils/size.js +44 -44
  651. package/package.json +134 -134
  652. package/dist/cjs/__tests__/db/products-db-service.spec.d.ts +0 -1
  653. package/dist/cjs/__tests__/db/products-db-service.spec.js +0 -90
  654. package/dist/cjs/__tests__/db/products-db-service.spec.js.map +0 -1
  655. package/dist/cjs/__tests__/services/cost/cost-calculation-types.spec.d.ts +0 -1
  656. package/dist/cjs/__tests__/services/cost/cost-calculation-types.spec.js +0 -24
  657. package/dist/cjs/__tests__/services/cost/cost-calculation-types.spec.js.map +0 -1
  658. package/dist/cjs/__tests__/services/cost/cost-calculator-service.spec.d.ts +0 -1
  659. package/dist/cjs/__tests__/services/cost/cost-calculator-service.spec.js +0 -3320
  660. package/dist/cjs/__tests__/services/cost/cost-calculator-service.spec.js.map +0 -1
  661. package/dist/cjs/__tests__/services/cost/cost-currency-service.spec.d.ts +0 -1
  662. package/dist/cjs/__tests__/services/cost/cost-currency-service.spec.js +0 -115
  663. package/dist/cjs/__tests__/services/cost/cost-currency-service.spec.js.map +0 -1
  664. package/dist/cjs/__tests__/services/cost/cost-filter-service.spec.d.ts +0 -1
  665. package/dist/cjs/__tests__/services/cost/cost-filter-service.spec.js +0 -469
  666. package/dist/cjs/__tests__/services/cost/cost-filter-service.spec.js.map +0 -1
  667. package/dist/cjs/__tests__/services/cost/order-cost/order-cost-resolution-service.spec.d.ts +0 -1
  668. package/dist/cjs/__tests__/services/cost/order-cost/order-cost-resolution-service.spec.js +0 -207
  669. package/dist/cjs/__tests__/services/cost/order-cost/order-cost-resolution-service.spec.js.map +0 -1
  670. package/dist/cjs/__tests__/services/currency-exchange-rate-lookup-service.spec.d.ts +0 -1
  671. package/dist/cjs/__tests__/services/currency-exchange-rate-lookup-service.spec.js +0 -35
  672. package/dist/cjs/__tests__/services/currency-exchange-rate-lookup-service.spec.js.map +0 -1
  673. package/dist/cjs/services/cost/cost-calculation-types.d.ts +0 -69
  674. package/dist/cjs/services/cost/cost-calculation-types.js +0 -20
  675. package/dist/cjs/services/cost/cost-calculation-types.js.map +0 -1
  676. package/dist/cjs/services/cost/cost-calculator-service.d.ts +0 -24
  677. package/dist/cjs/services/cost/cost-calculator-service.js +0 -457
  678. package/dist/cjs/services/cost/cost-calculator-service.js.map +0 -1
  679. package/dist/cjs/services/cost/cost-currency-service.d.ts +0 -6
  680. package/dist/cjs/services/cost/cost-currency-service.js +0 -88
  681. package/dist/cjs/services/cost/cost-currency-service.js.map +0 -1
  682. package/dist/cjs/services/cost/cost-filter-service.d.ts +0 -10
  683. package/dist/cjs/services/cost/cost-filter-service.js +0 -122
  684. package/dist/cjs/services/cost/cost-filter-service.js.map +0 -1
  685. package/dist/cjs/services/cost/index.d.ts +0 -5
  686. package/dist/cjs/services/cost/index.js +0 -22
  687. package/dist/cjs/services/cost/index.js.map +0 -1
  688. package/dist/cjs/services/cost/order-cost/index.d.ts +0 -2
  689. package/dist/cjs/services/cost/order-cost/index.js +0 -19
  690. package/dist/cjs/services/cost/order-cost/index.js.map +0 -1
  691. package/dist/cjs/services/cost/order-cost/order-cost-resolution-service.d.ts +0 -23
  692. package/dist/cjs/services/cost/order-cost/order-cost-resolution-service.js +0 -362
  693. package/dist/cjs/services/cost/order-cost/order-cost-resolution-service.js.map +0 -1
  694. package/dist/cjs/services/cost/order-cost/order-cost-resolution-types.d.ts +0 -37
  695. package/dist/cjs/services/cost/order-cost/order-cost-resolution-types.js +0 -3
  696. package/dist/cjs/services/cost/order-cost/order-cost-resolution-types.js.map +0 -1
  697. package/dist/cjs/services/db/products-db-service-types.d.ts +0 -10
  698. package/dist/cjs/services/db/products-db-service-types.js +0 -3
  699. package/dist/cjs/services/db/products-db-service-types.js.map +0 -1
  700. package/dist/cjs/services/db/products-db-service.d.ts +0 -19
  701. package/dist/cjs/services/db/products-db-service.js +0 -282
  702. package/dist/cjs/services/db/products-db-service.js.map +0 -1
  703. package/dist/esm/__tests__/db/products-db-service.spec.d.ts +0 -1
  704. package/dist/esm/__tests__/db/products-db-service.spec.js +0 -88
  705. package/dist/esm/__tests__/db/products-db-service.spec.js.map +0 -1
  706. package/dist/esm/__tests__/services/cost/cost-calculation-types.spec.d.ts +0 -1
  707. package/dist/esm/__tests__/services/cost/cost-calculation-types.spec.js +0 -22
  708. package/dist/esm/__tests__/services/cost/cost-calculation-types.spec.js.map +0 -1
  709. package/dist/esm/__tests__/services/cost/cost-calculator-service.spec.d.ts +0 -1
  710. package/dist/esm/__tests__/services/cost/cost-calculator-service.spec.js +0 -3318
  711. package/dist/esm/__tests__/services/cost/cost-calculator-service.spec.js.map +0 -1
  712. package/dist/esm/__tests__/services/cost/cost-currency-service.spec.d.ts +0 -1
  713. package/dist/esm/__tests__/services/cost/cost-currency-service.spec.js +0 -113
  714. package/dist/esm/__tests__/services/cost/cost-currency-service.spec.js.map +0 -1
  715. package/dist/esm/__tests__/services/cost/cost-filter-service.spec.d.ts +0 -1
  716. package/dist/esm/__tests__/services/cost/cost-filter-service.spec.js +0 -467
  717. package/dist/esm/__tests__/services/cost/cost-filter-service.spec.js.map +0 -1
  718. package/dist/esm/__tests__/services/cost/order-cost/order-cost-resolution-service.spec.d.ts +0 -1
  719. package/dist/esm/__tests__/services/cost/order-cost/order-cost-resolution-service.spec.js +0 -205
  720. package/dist/esm/__tests__/services/cost/order-cost/order-cost-resolution-service.spec.js.map +0 -1
  721. package/dist/esm/__tests__/services/currency-exchange-rate-lookup-service.spec.d.ts +0 -1
  722. package/dist/esm/__tests__/services/currency-exchange-rate-lookup-service.spec.js +0 -33
  723. package/dist/esm/__tests__/services/currency-exchange-rate-lookup-service.spec.js.map +0 -1
  724. package/dist/esm/services/cost/cost-calculation-types.d.ts +0 -69
  725. package/dist/esm/services/cost/cost-calculation-types.js +0 -16
  726. package/dist/esm/services/cost/cost-calculation-types.js.map +0 -1
  727. package/dist/esm/services/cost/cost-calculator-service.d.ts +0 -24
  728. package/dist/esm/services/cost/cost-calculator-service.js +0 -451
  729. package/dist/esm/services/cost/cost-calculator-service.js.map +0 -1
  730. package/dist/esm/services/cost/cost-currency-service.d.ts +0 -6
  731. package/dist/esm/services/cost/cost-currency-service.js +0 -85
  732. package/dist/esm/services/cost/cost-currency-service.js.map +0 -1
  733. package/dist/esm/services/cost/cost-filter-service.d.ts +0 -10
  734. package/dist/esm/services/cost/cost-filter-service.js +0 -119
  735. package/dist/esm/services/cost/cost-filter-service.js.map +0 -1
  736. package/dist/esm/services/cost/index.d.ts +0 -5
  737. package/dist/esm/services/cost/index.js +0 -6
  738. package/dist/esm/services/cost/index.js.map +0 -1
  739. package/dist/esm/services/cost/order-cost/index.d.ts +0 -2
  740. package/dist/esm/services/cost/order-cost/index.js +0 -3
  741. package/dist/esm/services/cost/order-cost/index.js.map +0 -1
  742. package/dist/esm/services/cost/order-cost/order-cost-resolution-service.d.ts +0 -23
  743. package/dist/esm/services/cost/order-cost/order-cost-resolution-service.js +0 -356
  744. package/dist/esm/services/cost/order-cost/order-cost-resolution-service.js.map +0 -1
  745. package/dist/esm/services/cost/order-cost/order-cost-resolution-types.d.ts +0 -37
  746. package/dist/esm/services/cost/order-cost/order-cost-resolution-types.js +0 -2
  747. package/dist/esm/services/cost/order-cost/order-cost-resolution-types.js.map +0 -1
  748. package/dist/esm/services/db/products-db-service-types.d.ts +0 -10
  749. package/dist/esm/services/db/products-db-service-types.js +0 -2
  750. package/dist/esm/services/db/products-db-service-types.js.map +0 -1
  751. package/dist/esm/services/db/products-db-service.d.ts +0 -19
  752. package/dist/esm/services/db/products-db-service.js +0 -278
  753. package/dist/esm/services/db/products-db-service.js.map +0 -1
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,67 +1,67 @@
1
- import { CONTACT_ACQUISITION_SOURCE, CONTACT_ENRICHMENT_LOOKUP_TYPE, CONTACT_SOURCE_ID, } from '@adtrackify/at-tracking-event-types';
2
- import { DynamoDbClient } from '../../clients/generic/dynamodb-client';
3
- import { ContactEnrichmentsDbService } from '../../services/db/contact-enrichments-db-service';
4
- const STAGE = 'dev2';
5
- const service = new ContactEnrichmentsDbService('dev2-at-contact-enrichments', 'id', STAGE);
6
- const enrichmentInput = {
7
- email: 'a@x.com',
8
- md5: 'm',
9
- sha2: 's',
10
- source: CONTACT_ACQUISITION_SOURCE.AUDIENCE_ACUITY,
11
- sourceId: CONTACT_SOURCE_ID.AUDIENCE_ACUITY,
12
- lookupType: CONTACT_ENRICHMENT_LOOKUP_TYPE.EMAIL,
13
- contacts: [],
14
- deliverableContacts: [],
15
- };
16
- describe('ContactEnrichmentsDbService', () => {
17
- afterEach(() => {
18
- jest.restoreAllMocks();
19
- });
20
- it('builds index names from the stage', () => {
21
- expect(service.EMAIL_INDEX_NAME).toBe('dev2-contact-enrichments-gsi-email');
22
- expect(service.MD5_INDEX_NAME).toBe('dev2-contact-enrichments-gsi-md5');
23
- expect(service.SHA2_INDEX_NAME).toBe('dev2-contact-enrichments-gsi-sha2');
24
- });
25
- it('stamps a fresh id + matching timestamps on build', () => {
26
- const built = service.buildContactEnrichment(enrichmentInput);
27
- expect(built.id).toEqual(expect.any(String));
28
- expect(built.id.length).toBeGreaterThan(0);
29
- expect(built.createdAt).toBe(built.updatedAt);
30
- expect(built).toMatchObject(enrichmentInput);
31
- });
32
- it('puts the record via safePut and returns it', async () => {
33
- const safePut = jest.spyOn(DynamoDbClient, 'safePut').mockResolvedValue(undefined);
34
- const record = service.buildContactEnrichment(enrichmentInput);
35
- const result = await service.putContactEnrichment(record);
36
- expect(safePut).toHaveBeenCalledWith('dev2-at-contact-enrichments', record);
37
- expect(result).toBe(record);
38
- });
39
- it('gets by id (primary key) and returns null when absent', async () => {
40
- const record = service.buildContactEnrichment(enrichmentInput);
41
- const safeGet = jest.spyOn(DynamoDbClient, 'safeGet').mockResolvedValueOnce(record).mockResolvedValueOnce(null);
42
- expect(await service.getContactEnrichment('id-1')).toEqual(record);
43
- expect(safeGet).toHaveBeenCalledWith('dev2-at-contact-enrichments', 'id', 'id-1');
44
- expect(await service.getContactEnrichment('missing')).toBeNull();
45
- });
46
- it('queries the email / md5 / sha2 GSIs with the right index + key condition', async () => {
47
- const queryAll = jest.spyOn(DynamoDbClient, 'queryAll').mockResolvedValue([enrichmentInput]);
48
- await service.getContactEnrichmentsByEmail('a@x.com');
49
- expect(queryAll).toHaveBeenLastCalledWith(expect.objectContaining({
50
- IndexName: 'dev2-contact-enrichments-gsi-email',
51
- KeyConditionExpression: 'email = :email',
52
- ExpressionAttributeValues: { ':email': 'a@x.com' },
53
- }));
54
- await service.getContactEnrichmentsByMd5('m');
55
- expect(queryAll).toHaveBeenLastCalledWith(expect.objectContaining({ IndexName: 'dev2-contact-enrichments-gsi-md5', KeyConditionExpression: 'md5 = :md5' }));
56
- await service.getContactEnrichmentsBySha2('s');
57
- expect(queryAll).toHaveBeenLastCalledWith(expect.objectContaining({
58
- IndexName: 'dev2-contact-enrichments-gsi-sha2',
59
- KeyConditionExpression: 'sha2 = :sha2',
60
- }));
61
- });
62
- it('returns [] when a GSI query throws (fail-safe lookup)', async () => {
63
- jest.spyOn(DynamoDbClient, 'queryAll').mockRejectedValue(new Error('dynamo boom'));
64
- expect(await service.getContactEnrichmentsByEmail('a@x.com')).toEqual([]);
65
- });
66
- });
1
+ import { CONTACT_ACQUISITION_SOURCE, CONTACT_ENRICHMENT_LOOKUP_TYPE, CONTACT_SOURCE_ID, } from '@adtrackify/at-tracking-event-types';
2
+ import { DynamoDbClient } from '../../clients/generic/dynamodb-client';
3
+ import { ContactEnrichmentsDbService } from '../../services/db/contact-enrichments-db-service';
4
+ const STAGE = 'dev2';
5
+ const service = new ContactEnrichmentsDbService('dev2-at-contact-enrichments', 'id', STAGE);
6
+ const enrichmentInput = {
7
+ email: 'a@x.com',
8
+ md5: 'm',
9
+ sha2: 's',
10
+ source: CONTACT_ACQUISITION_SOURCE.AUDIENCE_ACUITY,
11
+ sourceId: CONTACT_SOURCE_ID.AUDIENCE_ACUITY,
12
+ lookupType: CONTACT_ENRICHMENT_LOOKUP_TYPE.EMAIL,
13
+ contacts: [],
14
+ deliverableContacts: [],
15
+ };
16
+ describe('ContactEnrichmentsDbService', () => {
17
+ afterEach(() => {
18
+ jest.restoreAllMocks();
19
+ });
20
+ it('builds index names from the stage', () => {
21
+ expect(service.EMAIL_INDEX_NAME).toBe('dev2-contact-enrichments-gsi-email');
22
+ expect(service.MD5_INDEX_NAME).toBe('dev2-contact-enrichments-gsi-md5');
23
+ expect(service.SHA2_INDEX_NAME).toBe('dev2-contact-enrichments-gsi-sha2');
24
+ });
25
+ it('stamps a fresh id + matching timestamps on build', () => {
26
+ const built = service.buildContactEnrichment(enrichmentInput);
27
+ expect(built.id).toEqual(expect.any(String));
28
+ expect(built.id.length).toBeGreaterThan(0);
29
+ expect(built.createdAt).toBe(built.updatedAt);
30
+ expect(built).toMatchObject(enrichmentInput);
31
+ });
32
+ it('puts the record via safePut and returns it', async () => {
33
+ const safePut = jest.spyOn(DynamoDbClient, 'safePut').mockResolvedValue(undefined);
34
+ const record = service.buildContactEnrichment(enrichmentInput);
35
+ const result = await service.putContactEnrichment(record);
36
+ expect(safePut).toHaveBeenCalledWith('dev2-at-contact-enrichments', record);
37
+ expect(result).toBe(record);
38
+ });
39
+ it('gets by id (primary key) and returns null when absent', async () => {
40
+ const record = service.buildContactEnrichment(enrichmentInput);
41
+ const safeGet = jest.spyOn(DynamoDbClient, 'safeGet').mockResolvedValueOnce(record).mockResolvedValueOnce(null);
42
+ expect(await service.getContactEnrichment('id-1')).toEqual(record);
43
+ expect(safeGet).toHaveBeenCalledWith('dev2-at-contact-enrichments', 'id', 'id-1');
44
+ expect(await service.getContactEnrichment('missing')).toBeNull();
45
+ });
46
+ it('queries the email / md5 / sha2 GSIs with the right index + key condition', async () => {
47
+ const queryAll = jest.spyOn(DynamoDbClient, 'queryAll').mockResolvedValue([enrichmentInput]);
48
+ await service.getContactEnrichmentsByEmail('a@x.com');
49
+ expect(queryAll).toHaveBeenLastCalledWith(expect.objectContaining({
50
+ IndexName: 'dev2-contact-enrichments-gsi-email',
51
+ KeyConditionExpression: 'email = :email',
52
+ ExpressionAttributeValues: { ':email': 'a@x.com' },
53
+ }));
54
+ await service.getContactEnrichmentsByMd5('m');
55
+ expect(queryAll).toHaveBeenLastCalledWith(expect.objectContaining({ IndexName: 'dev2-contact-enrichments-gsi-md5', KeyConditionExpression: 'md5 = :md5' }));
56
+ await service.getContactEnrichmentsBySha2('s');
57
+ expect(queryAll).toHaveBeenLastCalledWith(expect.objectContaining({
58
+ IndexName: 'dev2-contact-enrichments-gsi-sha2',
59
+ KeyConditionExpression: 'sha2 = :sha2',
60
+ }));
61
+ });
62
+ it('returns [] when a GSI query throws (fail-safe lookup)', async () => {
63
+ jest.spyOn(DynamoDbClient, 'queryAll').mockRejectedValue(new Error('dynamo boom'));
64
+ expect(await service.getContactEnrichmentsByEmail('a@x.com')).toEqual([]);
65
+ });
66
+ });
67
67
  //# sourceMappingURL=contact-enrichments-db-service.spec.js.map
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,124 +1,124 @@
1
- jest.mock('../../clients/index.js', () => ({
2
- DynamoDbClient: {
3
- safeGet: jest.fn(),
4
- queryAll: jest.fn(),
5
- safeBatchGet: jest.fn(),
6
- safeBatchQueryByGSI: jest.fn(),
7
- },
8
- }));
9
- import { DynamoDbClient } from '../../clients/index.js';
10
- import { DestinationsDbService } from '../../services/db/destinations-db-service.js';
11
- const mockSafeBatchGet = DynamoDbClient.safeBatchGet;
12
- const mockSafeBatchQueryByGSI = DynamoDbClient.safeBatchQueryByGSI;
13
- const mockQueryAll = DynamoDbClient.queryAll;
14
- const mockSafeGet = DynamoDbClient.safeGet;
15
- describe('DestinationsDbService', () => {
16
- const TABLE_NAME = 'test-destinations-table';
17
- const service = new DestinationsDbService(TABLE_NAME);
18
- beforeEach(() => {
19
- jest.clearAllMocks();
20
- });
21
- afterEach(() => {
22
- jest.restoreAllMocks();
23
- });
24
- describe('batchGetByPixelIds', () => {
25
- const INDEX_NAME = 'GSI_PIXEL_ID';
26
- it('returns empty array for empty pixelIds input', async () => {
27
- mockSafeBatchQueryByGSI.mockResolvedValueOnce([]);
28
- const result = await service.batchGetByPixelIds(INDEX_NAME, []);
29
- expect(result).toEqual([]);
30
- expect(mockSafeBatchQueryByGSI).toHaveBeenCalledWith(TABLE_NAME, INDEX_NAME, 'pixelId', [], 10);
31
- });
32
- it('returns destinations for single pixelId', async () => {
33
- const mockDestination = {
34
- id: 'dest-1',
35
- pixelId: 'px-1',
36
- destination: 'facebook',
37
- destinationType: 'marketing',
38
- };
39
- mockSafeBatchQueryByGSI.mockResolvedValueOnce([mockDestination]);
40
- const result = await service.batchGetByPixelIds(INDEX_NAME, ['px-1']);
41
- expect(result).toEqual([mockDestination]);
42
- expect(mockSafeBatchQueryByGSI).toHaveBeenCalledWith(TABLE_NAME, INDEX_NAME, 'pixelId', ['px-1'], 10);
43
- });
44
- it('returns destinations for multiple pixelIds', async () => {
45
- const mockDestinations = [
46
- { id: 'dest-1', pixelId: 'px-1', destination: 'facebook' },
47
- { id: 'dest-2', pixelId: 'px-1', destination: 'tiktok' },
48
- { id: 'dest-3', pixelId: 'px-2', destination: 'klaviyo' },
49
- ];
50
- mockSafeBatchQueryByGSI.mockResolvedValueOnce(mockDestinations);
51
- const result = await service.batchGetByPixelIds(INDEX_NAME, ['px-1', 'px-2']);
52
- expect(result).toEqual(mockDestinations);
53
- expect(mockSafeBatchQueryByGSI).toHaveBeenCalledWith(TABLE_NAME, INDEX_NAME, 'pixelId', ['px-1', 'px-2'], 10);
54
- });
55
- it('uses custom concurrency parameter', async () => {
56
- mockSafeBatchQueryByGSI.mockResolvedValueOnce([]);
57
- await service.batchGetByPixelIds(INDEX_NAME, ['px-1'], 5);
58
- expect(mockSafeBatchQueryByGSI).toHaveBeenCalledWith(TABLE_NAME, INDEX_NAME, 'pixelId', ['px-1'], 5);
59
- });
60
- it('calls safeBatchQueryByGSI with correct table name from constructor', async () => {
61
- const customService = new DestinationsDbService('custom-table');
62
- mockSafeBatchQueryByGSI.mockResolvedValueOnce([]);
63
- await customService.batchGetByPixelIds(INDEX_NAME, ['px-1']);
64
- expect(mockSafeBatchQueryByGSI).toHaveBeenCalledWith('custom-table', INDEX_NAME, 'pixelId', ['px-1'], 10);
65
- });
66
- });
67
- describe('batchGetDestinationsById', () => {
68
- it('returns empty array for empty ids input', async () => {
69
- mockSafeBatchGet.mockResolvedValueOnce([]);
70
- const result = await service.batchGetDestinationsById([]);
71
- expect(result).toEqual([]);
72
- expect(mockSafeBatchGet).toHaveBeenCalledWith(TABLE_NAME, []);
73
- });
74
- it('returns destinations for multiple ids', async () => {
75
- const mockDestinations = [
76
- { id: 'dest-1', destination: 'facebook' },
77
- { id: 'dest-2', destination: 'tiktok' },
78
- ];
79
- mockSafeBatchGet.mockResolvedValueOnce(mockDestinations);
80
- const result = await service.batchGetDestinationsById(['dest-1', 'dest-2']);
81
- expect(result).toEqual(mockDestinations);
82
- expect(mockSafeBatchGet).toHaveBeenCalledWith(TABLE_NAME, [
83
- { id: 'dest-1' },
84
- { id: 'dest-2' },
85
- ]);
86
- });
87
- it('returns empty array when safeBatchGet returns null', async () => {
88
- mockSafeBatchGet.mockResolvedValueOnce(null);
89
- const result = await service.batchGetDestinationsById(['dest-1']);
90
- expect(result).toEqual([]);
91
- });
92
- });
93
- describe('getDestinationById', () => {
94
- it('returns destination when found', async () => {
95
- const mockDestination = { id: 'dest-1', destination: 'facebook' };
96
- mockSafeGet.mockResolvedValueOnce(mockDestination);
97
- const result = await service.getDestinationById('dest-1');
98
- expect(result).toEqual(mockDestination);
99
- expect(mockSafeGet).toHaveBeenCalledWith(TABLE_NAME, 'id', 'dest-1');
100
- });
101
- it('returns null when not found', async () => {
102
- mockSafeGet.mockResolvedValueOnce(null);
103
- const result = await service.getDestinationById('nonexistent');
104
- expect(result).toBeNull();
105
- });
106
- });
107
- describe('getDestinationsByPixel', () => {
108
- it('returns destinations for pixelId', async () => {
109
- const mockDestinations = [
110
- { id: 'dest-1', pixelId: 'px-1' },
111
- { id: 'dest-2', pixelId: 'px-1' },
112
- ];
113
- mockQueryAll.mockResolvedValueOnce(mockDestinations);
114
- const result = await service.getDestinationsByPixel('GSI_PIXEL', 'px-1');
115
- expect(result).toEqual(mockDestinations);
116
- });
117
- it('returns empty array when no destinations found', async () => {
118
- mockQueryAll.mockResolvedValueOnce(null);
119
- const result = await service.getDestinationsByPixel('GSI_PIXEL', 'px-1');
120
- expect(result).toEqual([]);
121
- });
122
- });
123
- });
1
+ jest.mock('../../clients/index.js', () => ({
2
+ DynamoDbClient: {
3
+ safeGet: jest.fn(),
4
+ queryAll: jest.fn(),
5
+ safeBatchGet: jest.fn(),
6
+ safeBatchQueryByGSI: jest.fn(),
7
+ },
8
+ }));
9
+ import { DynamoDbClient } from '../../clients/index.js';
10
+ import { DestinationsDbService } from '../../services/db/destinations-db-service.js';
11
+ const mockSafeBatchGet = DynamoDbClient.safeBatchGet;
12
+ const mockSafeBatchQueryByGSI = DynamoDbClient.safeBatchQueryByGSI;
13
+ const mockQueryAll = DynamoDbClient.queryAll;
14
+ const mockSafeGet = DynamoDbClient.safeGet;
15
+ describe('DestinationsDbService', () => {
16
+ const TABLE_NAME = 'test-destinations-table';
17
+ const service = new DestinationsDbService(TABLE_NAME);
18
+ beforeEach(() => {
19
+ jest.clearAllMocks();
20
+ });
21
+ afterEach(() => {
22
+ jest.restoreAllMocks();
23
+ });
24
+ describe('batchGetByPixelIds', () => {
25
+ const INDEX_NAME = 'GSI_PIXEL_ID';
26
+ it('returns empty array for empty pixelIds input', async () => {
27
+ mockSafeBatchQueryByGSI.mockResolvedValueOnce([]);
28
+ const result = await service.batchGetByPixelIds(INDEX_NAME, []);
29
+ expect(result).toEqual([]);
30
+ expect(mockSafeBatchQueryByGSI).toHaveBeenCalledWith(TABLE_NAME, INDEX_NAME, 'pixelId', [], 10);
31
+ });
32
+ it('returns destinations for single pixelId', async () => {
33
+ const mockDestination = {
34
+ id: 'dest-1',
35
+ pixelId: 'px-1',
36
+ destination: 'facebook',
37
+ destinationType: 'marketing',
38
+ };
39
+ mockSafeBatchQueryByGSI.mockResolvedValueOnce([mockDestination]);
40
+ const result = await service.batchGetByPixelIds(INDEX_NAME, ['px-1']);
41
+ expect(result).toEqual([mockDestination]);
42
+ expect(mockSafeBatchQueryByGSI).toHaveBeenCalledWith(TABLE_NAME, INDEX_NAME, 'pixelId', ['px-1'], 10);
43
+ });
44
+ it('returns destinations for multiple pixelIds', async () => {
45
+ const mockDestinations = [
46
+ { id: 'dest-1', pixelId: 'px-1', destination: 'facebook' },
47
+ { id: 'dest-2', pixelId: 'px-1', destination: 'tiktok' },
48
+ { id: 'dest-3', pixelId: 'px-2', destination: 'klaviyo' },
49
+ ];
50
+ mockSafeBatchQueryByGSI.mockResolvedValueOnce(mockDestinations);
51
+ const result = await service.batchGetByPixelIds(INDEX_NAME, ['px-1', 'px-2']);
52
+ expect(result).toEqual(mockDestinations);
53
+ expect(mockSafeBatchQueryByGSI).toHaveBeenCalledWith(TABLE_NAME, INDEX_NAME, 'pixelId', ['px-1', 'px-2'], 10);
54
+ });
55
+ it('uses custom concurrency parameter', async () => {
56
+ mockSafeBatchQueryByGSI.mockResolvedValueOnce([]);
57
+ await service.batchGetByPixelIds(INDEX_NAME, ['px-1'], 5);
58
+ expect(mockSafeBatchQueryByGSI).toHaveBeenCalledWith(TABLE_NAME, INDEX_NAME, 'pixelId', ['px-1'], 5);
59
+ });
60
+ it('calls safeBatchQueryByGSI with correct table name from constructor', async () => {
61
+ const customService = new DestinationsDbService('custom-table');
62
+ mockSafeBatchQueryByGSI.mockResolvedValueOnce([]);
63
+ await customService.batchGetByPixelIds(INDEX_NAME, ['px-1']);
64
+ expect(mockSafeBatchQueryByGSI).toHaveBeenCalledWith('custom-table', INDEX_NAME, 'pixelId', ['px-1'], 10);
65
+ });
66
+ });
67
+ describe('batchGetDestinationsById', () => {
68
+ it('returns empty array for empty ids input', async () => {
69
+ mockSafeBatchGet.mockResolvedValueOnce([]);
70
+ const result = await service.batchGetDestinationsById([]);
71
+ expect(result).toEqual([]);
72
+ expect(mockSafeBatchGet).toHaveBeenCalledWith(TABLE_NAME, []);
73
+ });
74
+ it('returns destinations for multiple ids', async () => {
75
+ const mockDestinations = [
76
+ { id: 'dest-1', destination: 'facebook' },
77
+ { id: 'dest-2', destination: 'tiktok' },
78
+ ];
79
+ mockSafeBatchGet.mockResolvedValueOnce(mockDestinations);
80
+ const result = await service.batchGetDestinationsById(['dest-1', 'dest-2']);
81
+ expect(result).toEqual(mockDestinations);
82
+ expect(mockSafeBatchGet).toHaveBeenCalledWith(TABLE_NAME, [
83
+ { id: 'dest-1' },
84
+ { id: 'dest-2' },
85
+ ]);
86
+ });
87
+ it('returns empty array when safeBatchGet returns null', async () => {
88
+ mockSafeBatchGet.mockResolvedValueOnce(null);
89
+ const result = await service.batchGetDestinationsById(['dest-1']);
90
+ expect(result).toEqual([]);
91
+ });
92
+ });
93
+ describe('getDestinationById', () => {
94
+ it('returns destination when found', async () => {
95
+ const mockDestination = { id: 'dest-1', destination: 'facebook' };
96
+ mockSafeGet.mockResolvedValueOnce(mockDestination);
97
+ const result = await service.getDestinationById('dest-1');
98
+ expect(result).toEqual(mockDestination);
99
+ expect(mockSafeGet).toHaveBeenCalledWith(TABLE_NAME, 'id', 'dest-1');
100
+ });
101
+ it('returns null when not found', async () => {
102
+ mockSafeGet.mockResolvedValueOnce(null);
103
+ const result = await service.getDestinationById('nonexistent');
104
+ expect(result).toBeNull();
105
+ });
106
+ });
107
+ describe('getDestinationsByPixel', () => {
108
+ it('returns destinations for pixelId', async () => {
109
+ const mockDestinations = [
110
+ { id: 'dest-1', pixelId: 'px-1' },
111
+ { id: 'dest-2', pixelId: 'px-1' },
112
+ ];
113
+ mockQueryAll.mockResolvedValueOnce(mockDestinations);
114
+ const result = await service.getDestinationsByPixel('GSI_PIXEL', 'px-1');
115
+ expect(result).toEqual(mockDestinations);
116
+ });
117
+ it('returns empty array when no destinations found', async () => {
118
+ mockQueryAll.mockResolvedValueOnce(null);
119
+ const result = await service.getDestinationsByPixel('GSI_PIXEL', 'px-1');
120
+ expect(result).toEqual([]);
121
+ });
122
+ });
123
+ });
124
124
  //# sourceMappingURL=destinations-db-service.spec.js.map
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,88 +1,88 @@
1
- import { ACCOUNT_STATUS, ACCOUNT_SUBSCRIPTION_TYPE, } from '@adtrackify/at-tracking-event-types';
2
- import { DynamoDbClient } from '../../clients/generic/dynamodb-client';
3
- import { AccountsDbService } from '../../services/db/accounts-db-service';
4
- import { ShopifyAppInstallsDbService } from '../../services/db/shopify-app-installs-db-service';
5
- import { SubscriptionsDbService } from '../../services/db/subscriptions-db-service';
6
- describe('shared read-only DB services', () => {
7
- afterEach(() => {
8
- jest.restoreAllMocks();
9
- });
10
- describe('AccountsDbService', () => {
11
- it('reads account by configured table key', async () => {
12
- const account = {
13
- id: 'acct-123',
14
- accountName: 'Test Account',
15
- accountStatus: ACCOUNT_STATUS.ACTIVE,
16
- primaryEmail: 'test@example.com',
17
- accountSubscriptionType: ACCOUNT_SUBSCRIPTION_TYPE.PLATFORM,
18
- isPlatformMigrated: true,
19
- createdAt: '2026-01-01T00:00:00.000Z',
20
- updatedAt: '2026-01-01T00:00:00.000Z',
21
- };
22
- const safeGet = jest.spyOn(DynamoDbClient, 'safeGet').mockResolvedValue(account);
23
- const service = new AccountsDbService('accounts-table', 'id');
24
- const result = await service.getAccountById('acct-123');
25
- expect(safeGet).toHaveBeenCalledWith('accounts-table', 'id', 'acct-123');
26
- expect(result).toEqual(account);
27
- });
28
- it('normalizes legacy accounts without subscription type', async () => {
29
- const account = {
30
- id: 'acct-legacy',
31
- accountName: 'Legacy Account',
32
- accountStatus: ACCOUNT_STATUS.ACTIVE,
33
- primaryEmail: 'legacy@example.com',
34
- createdAt: '2026-01-01T00:00:00.000Z',
35
- updatedAt: '2026-01-01T00:00:00.000Z',
36
- };
37
- jest.spyOn(DynamoDbClient, 'safeGet').mockResolvedValue(account);
38
- const service = new AccountsDbService('accounts-table');
39
- const result = await service.getAccountById('acct-legacy');
40
- expect(result?.accountSubscriptionType).toBe(ACCOUNT_SUBSCRIPTION_TYPE.SHOPIFY);
41
- expect(result?.isPlatformMigrated).toBe(false);
42
- });
43
- });
44
- describe('SubscriptionsDbService', () => {
45
- it('reads subscription by id', async () => {
46
- const subscription = {
47
- id: 'sub-123',
48
- accountId: 'acct-123',
49
- createdAt: '2026-01-01T00:00:00.000Z',
50
- updatedAt: '2026-01-01T00:00:00.000Z',
51
- };
52
- const safeGet = jest.spyOn(DynamoDbClient, 'safeGet').mockResolvedValue(subscription);
53
- const service = new SubscriptionsDbService('subscriptions-table', 'id');
54
- const result = await service.getSubscriptionById('sub-123');
55
- expect(safeGet).toHaveBeenCalledWith('subscriptions-table', 'id', 'sub-123');
56
- expect(result).toEqual(subscription);
57
- });
58
- it('reads first subscription by account id GSI', async () => {
59
- const subscription = {
60
- id: 'sub-123',
61
- accountId: 'acct-123',
62
- createdAt: '2026-01-01T00:00:00.000Z',
63
- updatedAt: '2026-01-01T00:00:00.000Z',
64
- };
65
- const safeQueryByGSI = jest.spyOn(DynamoDbClient, 'safeQueryByGSI').mockResolvedValue([subscription]);
66
- const service = new SubscriptionsDbService('subscriptions-table');
67
- const result = await service.getSubscriptionByAccountId('gsi-account-id', 'accountId', 'acct-123');
68
- expect(safeQueryByGSI).toHaveBeenCalledWith('subscriptions-table', 'gsi-account-id', 'accountId', 'acct-123');
69
- expect(result).toEqual(subscription);
70
- });
71
- });
72
- describe('ShopifyAppInstallsDbService', () => {
73
- it('reads Shopify app install by id', async () => {
74
- const shopifyAppInstall = {
75
- shopifyAppInstallId: 'sai-123',
76
- shop: 'test.myshopify.com',
77
- createdAt: '2026-01-01T00:00:00.000Z',
78
- updatedAt: '2026-01-01T00:00:00.000Z',
79
- };
80
- const safeGet = jest.spyOn(DynamoDbClient, 'safeGet').mockResolvedValue(shopifyAppInstall);
81
- const service = new ShopifyAppInstallsDbService('shopify-app-installs-table');
82
- const result = await service.getShopifyAppInstallById('shopifyAppInstallId', 'sai-123');
83
- expect(safeGet).toHaveBeenCalledWith('shopify-app-installs-table', 'shopifyAppInstallId', 'sai-123');
84
- expect(result).toEqual(shopifyAppInstall);
85
- });
86
- });
87
- });
1
+ import { ACCOUNT_STATUS, ACCOUNT_SUBSCRIPTION_TYPE, } from '@adtrackify/at-tracking-event-types';
2
+ import { DynamoDbClient } from '../../clients/generic/dynamodb-client';
3
+ import { AccountsDbService } from '../../services/db/accounts-db-service';
4
+ import { ShopifyAppInstallsDbService } from '../../services/db/shopify-app-installs-db-service';
5
+ import { SubscriptionsDbService } from '../../services/db/subscriptions-db-service';
6
+ describe('shared read-only DB services', () => {
7
+ afterEach(() => {
8
+ jest.restoreAllMocks();
9
+ });
10
+ describe('AccountsDbService', () => {
11
+ it('reads account by configured table key', async () => {
12
+ const account = {
13
+ id: 'acct-123',
14
+ accountName: 'Test Account',
15
+ accountStatus: ACCOUNT_STATUS.ACTIVE,
16
+ primaryEmail: 'test@example.com',
17
+ accountSubscriptionType: ACCOUNT_SUBSCRIPTION_TYPE.PLATFORM,
18
+ isPlatformMigrated: true,
19
+ createdAt: '2026-01-01T00:00:00.000Z',
20
+ updatedAt: '2026-01-01T00:00:00.000Z',
21
+ };
22
+ const safeGet = jest.spyOn(DynamoDbClient, 'safeGet').mockResolvedValue(account);
23
+ const service = new AccountsDbService('accounts-table', 'id');
24
+ const result = await service.getAccountById('acct-123');
25
+ expect(safeGet).toHaveBeenCalledWith('accounts-table', 'id', 'acct-123');
26
+ expect(result).toEqual(account);
27
+ });
28
+ it('normalizes legacy accounts without subscription type', async () => {
29
+ const account = {
30
+ id: 'acct-legacy',
31
+ accountName: 'Legacy Account',
32
+ accountStatus: ACCOUNT_STATUS.ACTIVE,
33
+ primaryEmail: 'legacy@example.com',
34
+ createdAt: '2026-01-01T00:00:00.000Z',
35
+ updatedAt: '2026-01-01T00:00:00.000Z',
36
+ };
37
+ jest.spyOn(DynamoDbClient, 'safeGet').mockResolvedValue(account);
38
+ const service = new AccountsDbService('accounts-table');
39
+ const result = await service.getAccountById('acct-legacy');
40
+ expect(result?.accountSubscriptionType).toBe(ACCOUNT_SUBSCRIPTION_TYPE.SHOPIFY);
41
+ expect(result?.isPlatformMigrated).toBe(false);
42
+ });
43
+ });
44
+ describe('SubscriptionsDbService', () => {
45
+ it('reads subscription by id', async () => {
46
+ const subscription = {
47
+ id: 'sub-123',
48
+ accountId: 'acct-123',
49
+ createdAt: '2026-01-01T00:00:00.000Z',
50
+ updatedAt: '2026-01-01T00:00:00.000Z',
51
+ };
52
+ const safeGet = jest.spyOn(DynamoDbClient, 'safeGet').mockResolvedValue(subscription);
53
+ const service = new SubscriptionsDbService('subscriptions-table', 'id');
54
+ const result = await service.getSubscriptionById('sub-123');
55
+ expect(safeGet).toHaveBeenCalledWith('subscriptions-table', 'id', 'sub-123');
56
+ expect(result).toEqual(subscription);
57
+ });
58
+ it('reads first subscription by account id GSI', async () => {
59
+ const subscription = {
60
+ id: 'sub-123',
61
+ accountId: 'acct-123',
62
+ createdAt: '2026-01-01T00:00:00.000Z',
63
+ updatedAt: '2026-01-01T00:00:00.000Z',
64
+ };
65
+ const safeQueryByGSI = jest.spyOn(DynamoDbClient, 'safeQueryByGSI').mockResolvedValue([subscription]);
66
+ const service = new SubscriptionsDbService('subscriptions-table');
67
+ const result = await service.getSubscriptionByAccountId('gsi-account-id', 'accountId', 'acct-123');
68
+ expect(safeQueryByGSI).toHaveBeenCalledWith('subscriptions-table', 'gsi-account-id', 'accountId', 'acct-123');
69
+ expect(result).toEqual(subscription);
70
+ });
71
+ });
72
+ describe('ShopifyAppInstallsDbService', () => {
73
+ it('reads Shopify app install by id', async () => {
74
+ const shopifyAppInstall = {
75
+ shopifyAppInstallId: 'sai-123',
76
+ shop: 'test.myshopify.com',
77
+ createdAt: '2026-01-01T00:00:00.000Z',
78
+ updatedAt: '2026-01-01T00:00:00.000Z',
79
+ };
80
+ const safeGet = jest.spyOn(DynamoDbClient, 'safeGet').mockResolvedValue(shopifyAppInstall);
81
+ const service = new ShopifyAppInstallsDbService('shopify-app-installs-table');
82
+ const result = await service.getShopifyAppInstallById('shopifyAppInstallId', 'sai-123');
83
+ expect(safeGet).toHaveBeenCalledWith('shopify-app-installs-table', 'shopifyAppInstallId', 'sai-123');
84
+ expect(result).toEqual(shopifyAppInstall);
85
+ });
86
+ });
87
+ });
88
88
  //# sourceMappingURL=shared-read-db-services.spec.js.map
@@ -1 +1 @@
1
- export {};
1
+ export {};