@adtrackify/at-service-common 4.0.4 → 4.0.5

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 (715) 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 -1
  20. package/dist/cjs/__tests__/db/products-db-service.spec.js +89 -89
  21. package/dist/cjs/__tests__/db/shared-read-db-services.spec.d.ts +1 -1
  22. package/dist/cjs/__tests__/db/shared-read-db-services.spec.js +89 -89
  23. package/dist/cjs/__tests__/db/shopify-app-installs-db-service.spec.d.ts +1 -1
  24. package/dist/cjs/__tests__/db/shopify-app-installs-db-service.spec.js +104 -104
  25. package/dist/cjs/__tests__/db/subscriptions-db-service.spec.d.ts +1 -1
  26. package/dist/cjs/__tests__/db/subscriptions-db-service.spec.js +95 -95
  27. package/dist/cjs/__tests__/db/user-accounts-db-service.spec.d.ts +1 -1
  28. package/dist/cjs/__tests__/db/user-accounts-db-service.spec.js +76 -76
  29. package/dist/cjs/__tests__/helpers/account-users-helper.spec.d.ts +1 -1
  30. package/dist/cjs/__tests__/helpers/account-users-helper.spec.js +220 -220
  31. package/dist/cjs/__tests__/helpers/acuity-helper.spec.d.ts +1 -1
  32. package/dist/cjs/__tests__/helpers/acuity-helper.spec.js +69 -69
  33. package/dist/cjs/__tests__/helpers/api-key-auth-helper.spec.d.ts +1 -1
  34. package/dist/cjs/__tests__/helpers/api-key-auth-helper.spec.js +82 -82
  35. package/dist/cjs/__tests__/identity-cache/identity-cache-db-service.spec.d.ts +1 -1
  36. package/dist/cjs/__tests__/identity-cache/identity-cache-db-service.spec.js +676 -676
  37. package/dist/cjs/__tests__/identity-cache/identity-cache-dynamodb-service.spec.d.ts +1 -1
  38. package/dist/cjs/__tests__/identity-cache/identity-cache-dynamodb-service.spec.js +1140 -1140
  39. package/dist/cjs/__tests__/identity-cache/identity-cache-tier-routing.spec.d.ts +1 -1
  40. package/dist/cjs/__tests__/identity-cache/identity-cache-tier-routing.spec.js +851 -851
  41. package/dist/cjs/__tests__/identity-cache/trait-merging-and-staleness.spec.d.ts +1 -1
  42. package/dist/cjs/__tests__/identity-cache/trait-merging-and-staleness.spec.js +1060 -1060
  43. package/dist/cjs/__tests__/identity-cache/volatile-traits-optimization.spec.d.ts +1 -1
  44. package/dist/cjs/__tests__/identity-cache/volatile-traits-optimization.spec.js +818 -818
  45. package/dist/cjs/__tests__/integration/sqs-bundling-roundtrip.spec.d.ts +1 -1
  46. package/dist/cjs/__tests__/integration/sqs-bundling-roundtrip.spec.js +584 -584
  47. package/dist/cjs/__tests__/libs/compress-decompress.spec.d.ts +1 -1
  48. package/dist/cjs/__tests__/libs/compress-decompress.spec.js +16 -16
  49. package/dist/cjs/__tests__/libs/contacts.spec.d.ts +1 -1
  50. package/dist/cjs/__tests__/libs/contacts.spec.js +294 -294
  51. package/dist/cjs/__tests__/libs/currency.spec.d.ts +1 -1
  52. package/dist/cjs/__tests__/libs/currency.spec.js +220 -220
  53. package/dist/cjs/__tests__/libs/dates.spec.d.ts +1 -1
  54. package/dist/cjs/__tests__/libs/dates.spec.js +130 -130
  55. package/dist/cjs/__tests__/libs/domain.spec.d.ts +1 -1
  56. package/dist/cjs/__tests__/libs/domain.spec.js +107 -107
  57. package/dist/cjs/__tests__/libs/numbers.spec.d.ts +1 -1
  58. package/dist/cjs/__tests__/libs/numbers.spec.js +261 -261
  59. package/dist/cjs/__tests__/s3-client/s3-client.spec.d.ts +1 -1
  60. package/dist/cjs/__tests__/s3-client/s3-client.spec.js +33 -33
  61. package/dist/cjs/__tests__/services/acuity-api-service.spec.d.ts +1 -1
  62. package/dist/cjs/__tests__/services/acuity-api-service.spec.js +71 -71
  63. package/dist/cjs/__tests__/services/cost/cost-calculation-types.spec.d.ts +1 -1
  64. package/dist/cjs/__tests__/services/cost/cost-calculation-types.spec.js +23 -23
  65. package/dist/cjs/__tests__/services/cost/cost-calculator-service.spec.d.ts +1 -1
  66. package/dist/cjs/__tests__/services/cost/cost-calculator-service.spec.js +3319 -3319
  67. package/dist/cjs/__tests__/services/cost/cost-currency-service.spec.d.ts +1 -1
  68. package/dist/cjs/__tests__/services/cost/cost-currency-service.spec.js +114 -114
  69. package/dist/cjs/__tests__/services/cost/cost-filter-service.spec.d.ts +1 -1
  70. package/dist/cjs/__tests__/services/cost/cost-filter-service.spec.js +468 -468
  71. package/dist/cjs/__tests__/services/cost/order-cost/order-cost-resolution-service.spec.d.ts +1 -1
  72. package/dist/cjs/__tests__/services/cost/order-cost/order-cost-resolution-service.spec.js +206 -206
  73. package/dist/cjs/__tests__/services/currency-exchange-rate-lookup-service.spec.d.ts +1 -1
  74. package/dist/cjs/__tests__/services/currency-exchange-rate-lookup-service.spec.js +34 -34
  75. package/dist/cjs/__tests__/services/email-verification/contact-email-verification-service.spec.d.ts +1 -1
  76. package/dist/cjs/__tests__/services/email-verification/contact-email-verification-service.spec.js +93 -93
  77. package/dist/cjs/__tests__/services/email-verification/email-verification-service.spec.d.ts +1 -1
  78. package/dist/cjs/__tests__/services/email-verification/email-verification-service.spec.js +57 -57
  79. package/dist/cjs/__tests__/shopify/shopify-graphql-transformer.spec.d.ts +1 -1
  80. package/dist/cjs/__tests__/shopify/shopify-graphql-transformer.spec.js +35 -35
  81. package/dist/cjs/__tests__/unit/libs/api-router/public-api-router.spec.d.ts +1 -1
  82. package/dist/cjs/__tests__/unit/libs/api-router/public-api-router.spec.js +181 -181
  83. package/dist/cjs/__tests__/unit/libs/api-router/route-matcher.spec.d.ts +1 -1
  84. package/dist/cjs/__tests__/unit/libs/api-router/route-matcher.spec.js +69 -69
  85. package/dist/cjs/__tests__/utils/custom-measure-formula-utils.spec.d.ts +1 -1
  86. package/dist/cjs/__tests__/utils/custom-measure-formula-utils.spec.js +139 -139
  87. package/dist/cjs/clients/generic/cognito-client.d.ts +23 -23
  88. package/dist/cjs/clients/generic/cognito-client.js +209 -209
  89. package/dist/cjs/clients/generic/dynamodb-client.d.ts +20 -20
  90. package/dist/cjs/clients/generic/dynamodb-client.js +235 -235
  91. package/dist/cjs/clients/generic/eventbridge-client.d.ts +14 -14
  92. package/dist/cjs/clients/generic/eventbridge-client.js +51 -51
  93. package/dist/cjs/clients/generic/http-client.d.ts +14 -14
  94. package/dist/cjs/clients/generic/http-client.js +61 -61
  95. package/dist/cjs/clients/generic/index.d.ts +13 -13
  96. package/dist/cjs/clients/generic/index.js +29 -29
  97. package/dist/cjs/clients/generic/lambda-invoke-client.d.ts +10 -10
  98. package/dist/cjs/clients/generic/lambda-invoke-client.js +39 -39
  99. package/dist/cjs/clients/generic/location-client.d.ts +8 -8
  100. package/dist/cjs/clients/generic/location-client.js +31 -31
  101. package/dist/cjs/clients/generic/redis-client.d.ts +33 -33
  102. package/dist/cjs/clients/generic/redis-client.js +191 -191
  103. package/dist/cjs/clients/generic/s3-client.d.ts +23 -23
  104. package/dist/cjs/clients/generic/s3-client.js +216 -216
  105. package/dist/cjs/clients/generic/singlestore-db-client.d.ts +14 -14
  106. package/dist/cjs/clients/generic/singlestore-db-client.js +67 -67
  107. package/dist/cjs/clients/generic/sqs-bundled-client.d.ts +15 -15
  108. package/dist/cjs/clients/generic/sqs-bundled-client.js +311 -311
  109. package/dist/cjs/clients/generic/sqs-bundled-client.types.d.ts +53 -53
  110. package/dist/cjs/clients/generic/sqs-bundled-client.types.js +17 -17
  111. package/dist/cjs/clients/generic/sqs-client.d.ts +53 -53
  112. package/dist/cjs/clients/generic/sqs-client.js +285 -285
  113. package/dist/cjs/clients/generic/sqs-unbundle.d.ts +32 -32
  114. package/dist/cjs/clients/generic/sqs-unbundle.js +144 -144
  115. package/dist/cjs/clients/index.d.ts +3 -3
  116. package/dist/cjs/clients/index.js +19 -19
  117. package/dist/cjs/clients/internal-api/accounts-client.d.ts +91 -91
  118. package/dist/cjs/clients/internal-api/accounts-client.js +129 -129
  119. package/dist/cjs/clients/internal-api/cache-lambda-client.d.ts +26 -26
  120. package/dist/cjs/clients/internal-api/cache-lambda-client.js +89 -89
  121. package/dist/cjs/clients/internal-api/db-management-client.d.ts +18 -18
  122. package/dist/cjs/clients/internal-api/db-management-client.js +36 -36
  123. package/dist/cjs/clients/internal-api/destinations-client.d.ts +34 -34
  124. package/dist/cjs/clients/internal-api/destinations-client.js +79 -79
  125. package/dist/cjs/clients/internal-api/event-collector-client.d.ts +20 -20
  126. package/dist/cjs/clients/internal-api/event-collector-client.js +36 -36
  127. package/dist/cjs/clients/internal-api/identity-client.d.ts +31 -31
  128. package/dist/cjs/clients/internal-api/identity-client.js +91 -91
  129. package/dist/cjs/clients/internal-api/index.d.ts +9 -9
  130. package/dist/cjs/clients/internal-api/index.js +25 -25
  131. package/dist/cjs/clients/internal-api/shopify-app-install-client.d.ts +37 -37
  132. package/dist/cjs/clients/internal-api/shopify-app-install-client.js +81 -81
  133. package/dist/cjs/clients/internal-api/subscriptions-client.d.ts +26 -26
  134. package/dist/cjs/clients/internal-api/subscriptions-client.js +77 -77
  135. package/dist/cjs/clients/internal-api/users-auth-client.d.ts +35 -35
  136. package/dist/cjs/clients/internal-api/users-auth-client.js +110 -110
  137. package/dist/cjs/clients/third-party/acuity-client.d.ts +10 -10
  138. package/dist/cjs/clients/third-party/acuity-client.js +40 -40
  139. package/dist/cjs/clients/third-party/emailable-client.d.ts +7 -7
  140. package/dist/cjs/clients/third-party/emailable-client.js +25 -25
  141. package/dist/cjs/clients/third-party/exchange-rate-api-client.d.ts +17 -17
  142. package/dist/cjs/clients/third-party/exchange-rate-api-client.js +19 -19
  143. package/dist/cjs/clients/third-party/index.d.ts +5 -5
  144. package/dist/cjs/clients/third-party/index.js +21 -21
  145. package/dist/cjs/clients/third-party/loops-client.d.ts +10 -10
  146. package/dist/cjs/clients/third-party/loops-client.js +30 -30
  147. package/dist/cjs/clients/third-party/shopify/graphql-order-queries.d.ts +25 -25
  148. package/dist/cjs/clients/third-party/shopify/graphql-order-queries.js +4 -4
  149. package/dist/cjs/clients/third-party/shopify/graphql-product-queries.d.ts +2 -2
  150. package/dist/cjs/clients/third-party/shopify/graphql-product-queries.js +5 -5
  151. package/dist/cjs/clients/third-party/shopify/shopify-graphql-client.d.ts +10 -10
  152. package/dist/cjs/clients/third-party/shopify/shopify-graphql-client.js +161 -161
  153. package/dist/cjs/clients/third-party/shopify-client.d.ts +29 -29
  154. package/dist/cjs/clients/third-party/shopify-client.js +146 -146
  155. package/dist/cjs/constants/index.d.ts +1 -1
  156. package/dist/cjs/constants/index.js +17 -17
  157. package/dist/cjs/constants/sqs.d.ts +20 -20
  158. package/dist/cjs/constants/sqs.js +26 -26
  159. package/dist/cjs/helpers/account-users-helper.d.ts +2 -2
  160. package/dist/cjs/helpers/account-users-helper.js +22 -22
  161. package/dist/cjs/helpers/acuity-helper.d.ts +4 -4
  162. package/dist/cjs/helpers/acuity-helper.js +56 -56
  163. package/dist/cjs/helpers/api-key-auth-helper.d.ts +9 -9
  164. package/dist/cjs/helpers/api-key-auth-helper.js +40 -40
  165. package/dist/cjs/helpers/api-key-authorizer-helper.d.ts +36 -36
  166. package/dist/cjs/helpers/api-key-authorizer-helper.js +87 -87
  167. package/dist/cjs/helpers/identity-cache-helper.d.ts +30 -30
  168. package/dist/cjs/helpers/identity-cache-helper.js +253 -253
  169. package/dist/cjs/helpers/index.d.ts +10 -10
  170. package/dist/cjs/helpers/index.js +26 -26
  171. package/dist/cjs/helpers/input-validation-helper.d.ts +3 -3
  172. package/dist/cjs/helpers/input-validation-helper.js +22 -22
  173. package/dist/cjs/helpers/logging-helper.d.ts +16 -16
  174. package/dist/cjs/helpers/logging-helper.js +84 -84
  175. package/dist/cjs/helpers/response-helper.d.ts +18 -18
  176. package/dist/cjs/helpers/response-helper.js +43 -43
  177. package/dist/cjs/helpers/shopify-helper.d.ts +9 -9
  178. package/dist/cjs/helpers/shopify-helper.js +26 -26
  179. package/dist/cjs/helpers/sqs-utils.d.ts +6 -6
  180. package/dist/cjs/helpers/sqs-utils.js +14 -14
  181. package/dist/cjs/index.d.ts +7 -7
  182. package/dist/cjs/index.js +23 -23
  183. package/dist/cjs/libs/api-router/index.d.ts +2 -2
  184. package/dist/cjs/libs/api-router/index.js +18 -18
  185. package/dist/cjs/libs/api-router/public-api-router.d.ts +3 -3
  186. package/dist/cjs/libs/api-router/public-api-router.js +36 -36
  187. package/dist/cjs/libs/api-router/route-matcher.d.ts +21 -21
  188. package/dist/cjs/libs/api-router/route-matcher.js +36 -36
  189. package/dist/cjs/libs/click-id-parser.d.ts +23 -23
  190. package/dist/cjs/libs/click-id-parser.js +49 -49
  191. package/dist/cjs/libs/compression.d.ts +2 -2
  192. package/dist/cjs/libs/compression.js +33 -33
  193. package/dist/cjs/libs/contacts.d.ts +7 -7
  194. package/dist/cjs/libs/contacts.js +152 -152
  195. package/dist/cjs/libs/cookie.d.ts +17 -17
  196. package/dist/cjs/libs/cookie.js +76 -76
  197. package/dist/cjs/libs/crypto.d.ts +4 -4
  198. package/dist/cjs/libs/crypto.js +25 -25
  199. package/dist/cjs/libs/csv.d.ts +2 -2
  200. package/dist/cjs/libs/csv.js +35 -35
  201. package/dist/cjs/libs/currency.d.ts +1 -1
  202. package/dist/cjs/libs/currency.js +29 -29
  203. package/dist/cjs/libs/dates.d.ts +12 -12
  204. package/dist/cjs/libs/dates.js +96 -96
  205. package/dist/cjs/libs/domain.d.ts +2 -2
  206. package/dist/cjs/libs/domain.js +38 -38
  207. package/dist/cjs/libs/emails.d.ts +8 -8
  208. package/dist/cjs/libs/emails.js +154 -154
  209. package/dist/cjs/libs/http-error.d.ts +21 -21
  210. package/dist/cjs/libs/http-error.js +63 -63
  211. package/dist/cjs/libs/http-status-codes.d.ts +58 -58
  212. package/dist/cjs/libs/http-status-codes.js +62 -62
  213. package/dist/cjs/libs/index.d.ts +19 -19
  214. package/dist/cjs/libs/index.js +35 -35
  215. package/dist/cjs/libs/numbers.d.ts +1 -1
  216. package/dist/cjs/libs/numbers.js +15 -15
  217. package/dist/cjs/libs/referrer-parser/index.d.ts +2 -2
  218. package/dist/cjs/libs/referrer-parser/index.js +18 -18
  219. package/dist/cjs/libs/referrer-parser/referrer-data.d.ts +9 -9
  220. package/dist/cjs/libs/referrer-parser/referrer-data.js +3307 -3307
  221. package/dist/cjs/libs/referrer-parser/referrer-parser-util.d.ts +20 -20
  222. package/dist/cjs/libs/referrer-parser/referrer-parser-util.js +131 -131
  223. package/dist/cjs/libs/strings.d.ts +3 -3
  224. package/dist/cjs/libs/strings.js +46 -46
  225. package/dist/cjs/libs/traits.d.ts +6 -6
  226. package/dist/cjs/libs/traits.js +65 -65
  227. package/dist/cjs/libs/url.d.ts +1 -1
  228. package/dist/cjs/libs/url.js +13 -13
  229. package/dist/cjs/services/acuity-api-service.d.ts +9 -9
  230. package/dist/cjs/services/acuity-api-service.js +73 -73
  231. package/dist/cjs/services/cache/generic-cached-object.d.ts +5 -5
  232. package/dist/cjs/services/cache/generic-cached-object.js +2 -2
  233. package/dist/cjs/services/cache/index.d.ts +1 -1
  234. package/dist/cjs/services/cache/index.js +17 -17
  235. package/dist/cjs/services/cache/product-cache-service.d.ts +21 -21
  236. package/dist/cjs/services/cache/product-cache-service.js +76 -76
  237. package/dist/cjs/services/cost/cost-calculation-types.d.ts +69 -69
  238. package/dist/cjs/services/cost/cost-calculation-types.js +19 -19
  239. package/dist/cjs/services/cost/cost-calculator-service.d.ts +24 -24
  240. package/dist/cjs/services/cost/cost-calculator-service.js +456 -456
  241. package/dist/cjs/services/cost/cost-currency-service.d.ts +6 -6
  242. package/dist/cjs/services/cost/cost-currency-service.js +87 -87
  243. package/dist/cjs/services/cost/cost-filter-service.d.ts +10 -10
  244. package/dist/cjs/services/cost/cost-filter-service.js +121 -121
  245. package/dist/cjs/services/cost/index.d.ts +5 -5
  246. package/dist/cjs/services/cost/index.js +21 -21
  247. package/dist/cjs/services/cost/order-cost/index.d.ts +2 -2
  248. package/dist/cjs/services/cost/order-cost/index.js +18 -18
  249. package/dist/cjs/services/cost/order-cost/order-cost-resolution-service.d.ts +23 -23
  250. package/dist/cjs/services/cost/order-cost/order-cost-resolution-service.js +361 -361
  251. package/dist/cjs/services/cost/order-cost/order-cost-resolution-types.d.ts +37 -37
  252. package/dist/cjs/services/cost/order-cost/order-cost-resolution-types.js +2 -2
  253. package/dist/cjs/services/currency-exchange-rate-lookup-service.d.ts +12 -12
  254. package/dist/cjs/services/currency-exchange-rate-lookup-service.js +94 -94
  255. package/dist/cjs/services/db/accounts-db-service.d.ts +9 -9
  256. package/dist/cjs/services/db/accounts-db-service.js +33 -33
  257. package/dist/cjs/services/db/api-keys-db-service.d.ts +10 -10
  258. package/dist/cjs/services/db/api-keys-db-service.js +36 -36
  259. package/dist/cjs/services/db/contact-enrichments-db-service.d.ts +15 -15
  260. package/dist/cjs/services/db/contact-enrichments-db-service.js +94 -94
  261. package/dist/cjs/services/db/currency-exchange-rates-db-service.d.ts +21 -21
  262. package/dist/cjs/services/db/currency-exchange-rates-db-service.js +39 -39
  263. package/dist/cjs/services/db/custom-measures-db-service.d.ts +14 -14
  264. package/dist/cjs/services/db/custom-measures-db-service.js +48 -48
  265. package/dist/cjs/services/db/destinations-db-service.d.ts +13 -13
  266. package/dist/cjs/services/db/destinations-db-service.js +74 -74
  267. package/dist/cjs/services/db/identity-cache-db-service.d.ts +28 -28
  268. package/dist/cjs/services/db/identity-cache-db-service.js +320 -320
  269. package/dist/cjs/services/db/identity-cache-dynamodb-service.d.ts +44 -44
  270. package/dist/cjs/services/db/identity-cache-dynamodb-service.js +734 -734
  271. package/dist/cjs/services/db/identity-cache-dynamodb-service.js.map +1 -1
  272. package/dist/cjs/services/db/index.d.ts +19 -19
  273. package/dist/cjs/services/db/index.js +35 -35
  274. package/dist/cjs/services/db/log-events-db-service.d.ts +11 -11
  275. package/dist/cjs/services/db/log-events-db-service.js +181 -181
  276. package/dist/cjs/services/db/pixels-db-service.d.ts +8 -8
  277. package/dist/cjs/services/db/pixels-db-service.js +35 -35
  278. package/dist/cjs/services/db/products-db-service-types.d.ts +10 -10
  279. package/dist/cjs/services/db/products-db-service-types.js +2 -2
  280. package/dist/cjs/services/db/products-db-service.d.ts +19 -19
  281. package/dist/cjs/services/db/products-db-service.js +281 -281
  282. package/dist/cjs/services/db/purchasable-contacts-db-service.d.ts +9 -9
  283. package/dist/cjs/services/db/purchasable-contacts-db-service.js +43 -43
  284. package/dist/cjs/services/db/purchased-contacts/index.d.ts +2 -2
  285. package/dist/cjs/services/db/purchased-contacts/index.js +18 -18
  286. package/dist/cjs/services/db/purchased-contacts/purchased-contacts-db-service.d.ts +18 -18
  287. package/dist/cjs/services/db/purchased-contacts/purchased-contacts-db-service.js +152 -152
  288. package/dist/cjs/services/db/purchased-contacts/types.d.ts +11 -11
  289. package/dist/cjs/services/db/purchased-contacts/types.js +2 -2
  290. package/dist/cjs/services/db/shopify-app-installs-db-service.d.ts +10 -10
  291. package/dist/cjs/services/db/shopify-app-installs-db-service.js +52 -52
  292. package/dist/cjs/services/db/shopify-products-cache-db-service.d.ts +16 -16
  293. package/dist/cjs/services/db/shopify-products-cache-db-service.js +73 -73
  294. package/dist/cjs/services/db/subscriptions-db-service.d.ts +11 -11
  295. package/dist/cjs/services/db/subscriptions-db-service.js +38 -38
  296. package/dist/cjs/services/db/tracking-events-db-service.d.ts +21 -21
  297. package/dist/cjs/services/db/tracking-events-db-service.js +188 -188
  298. package/dist/cjs/services/db/user-accounts-db-service.d.ts +7 -7
  299. package/dist/cjs/services/db/user-accounts-db-service.js +17 -17
  300. package/dist/cjs/services/email-verification/contact-email-verification-service.d.ts +7 -7
  301. package/dist/cjs/services/email-verification/contact-email-verification-service.js +101 -101
  302. package/dist/cjs/services/email-verification/email-verification-service.d.ts +19 -19
  303. package/dist/cjs/services/email-verification/email-verification-service.js +131 -131
  304. package/dist/cjs/services/email-verification/index.d.ts +2 -2
  305. package/dist/cjs/services/email-verification/index.js +18 -18
  306. package/dist/cjs/services/eventbridge-integration-service.d.ts +9 -9
  307. package/dist/cjs/services/eventbridge-integration-service.js +28 -28
  308. package/dist/cjs/services/events/index.d.ts +3 -3
  309. package/dist/cjs/services/events/index.js +19 -19
  310. package/dist/cjs/services/events/log-event-service.d.ts +19 -19
  311. package/dist/cjs/services/events/log-event-service.js +77 -77
  312. package/dist/cjs/services/events/metric-event-service.d.ts +9 -9
  313. package/dist/cjs/services/events/metric-event-service.js +49 -49
  314. package/dist/cjs/services/events/tracking-event-sqs-service.d.ts +8 -8
  315. package/dist/cjs/services/events/tracking-event-sqs-service.js +34 -34
  316. package/dist/cjs/services/generic-cache-service.d.ts +7 -7
  317. package/dist/cjs/services/generic-cache-service.js +33 -33
  318. package/dist/cjs/services/index.d.ts +11 -11
  319. package/dist/cjs/services/index.js +27 -27
  320. package/dist/cjs/services/ipdata-lookup-service.d.ts +20 -20
  321. package/dist/cjs/services/ipdata-lookup-service.js +112 -112
  322. package/dist/cjs/services/shopify/index.d.ts +2 -2
  323. package/dist/cjs/services/shopify/index.js +18 -18
  324. package/dist/cjs/services/shopify/products/index.d.ts +1 -1
  325. package/dist/cjs/services/shopify/products/index.js +17 -17
  326. package/dist/cjs/services/shopify/products/shopify-products-serviceV2.d.ts +17 -17
  327. package/dist/cjs/services/shopify/products/shopify-products-serviceV2.js +112 -112
  328. package/dist/cjs/services/shopify/shopify-graphql-transformer.d.ts +8 -8
  329. package/dist/cjs/services/shopify/shopify-graphql-transformer.js +141 -141
  330. package/dist/cjs/types/acuity-types.d.ts +74 -74
  331. package/dist/cjs/types/acuity-types.js +2 -2
  332. package/dist/cjs/types/api-response.d.ts +6 -6
  333. package/dist/cjs/types/api-response.js +2 -2
  334. package/dist/cjs/types/index.d.ts +4 -4
  335. package/dist/cjs/types/index.js +33 -33
  336. package/dist/cjs/types/internal-events/event-detail-types.d.ts +20 -20
  337. package/dist/cjs/types/internal-events/event-detail-types.js +27 -27
  338. package/dist/cjs/types/internal-events/index.d.ts +1 -1
  339. package/dist/cjs/types/internal-events/index.js +17 -17
  340. package/dist/cjs/types/shopify-graphql-types/admin.generated.d.ts +123 -123
  341. package/dist/cjs/types/shopify-graphql-types/admin.generated.js +2 -2
  342. package/dist/cjs/types/shopify-graphql-types/admin.types.d.ts +26289 -26289
  343. package/dist/cjs/types/shopify-graphql-types/admin.types.js +5311 -5311
  344. package/dist/cjs/types/shopify-graphql-types/index.d.ts +2 -2
  345. package/dist/cjs/types/shopify-graphql-types/index.js +18 -18
  346. package/dist/cjs/types/shopify-rest-types.d.ts +767 -767
  347. package/dist/cjs/types/shopify-rest-types.js +2 -2
  348. package/dist/cjs/utils/compression.d.ts +36 -36
  349. package/dist/cjs/utils/compression.js +198 -198
  350. package/dist/cjs/utils/custom-measure-formula-utils.d.ts +6 -6
  351. package/dist/cjs/utils/custom-measure-formula-utils.js +209 -209
  352. package/dist/cjs/utils/index.d.ts +4 -4
  353. package/dist/cjs/utils/index.js +20 -20
  354. package/dist/cjs/utils/retry-envelope.d.ts +12 -12
  355. package/dist/cjs/utils/retry-envelope.js +28 -28
  356. package/dist/cjs/utils/size.d.ts +2 -2
  357. package/dist/cjs/utils/size.js +49 -49
  358. package/dist/esm/__tests__/clients/acuity-client.spec.d.ts +1 -1
  359. package/dist/esm/__tests__/clients/acuity-client.spec.js +41 -41
  360. package/dist/esm/__tests__/clients/cross-platform-compression.spec.d.ts +1 -1
  361. package/dist/esm/__tests__/clients/cross-platform-compression.spec.js +329 -329
  362. package/dist/esm/__tests__/clients/dynamodb-client.spec.d.ts +1 -1
  363. package/dist/esm/__tests__/clients/dynamodb-client.spec.js +192 -192
  364. package/dist/esm/__tests__/clients/sqs-bundled-client.spec.d.ts +1 -1
  365. package/dist/esm/__tests__/clients/sqs-bundled-client.spec.js +906 -906
  366. package/dist/esm/__tests__/clients/sqs-bundling-contracts.spec.d.ts +1 -1
  367. package/dist/esm/__tests__/clients/sqs-bundling-contracts.spec.js +538 -538
  368. package/dist/esm/__tests__/clients/sqs-client.spec.d.ts +1 -1
  369. package/dist/esm/__tests__/clients/sqs-client.spec.js +189 -189
  370. package/dist/esm/__tests__/clients/sqs-unbundle.spec.d.ts +1 -1
  371. package/dist/esm/__tests__/clients/sqs-unbundle.spec.js +1355 -1355
  372. package/dist/esm/__tests__/db/contact-enrichments-db-service.spec.d.ts +1 -1
  373. package/dist/esm/__tests__/db/contact-enrichments-db-service.spec.js +66 -66
  374. package/dist/esm/__tests__/db/destinations-db-service.spec.d.ts +1 -1
  375. package/dist/esm/__tests__/db/destinations-db-service.spec.js +123 -123
  376. package/dist/esm/__tests__/db/products-db-service.spec.d.ts +1 -1
  377. package/dist/esm/__tests__/db/products-db-service.spec.js +87 -87
  378. package/dist/esm/__tests__/db/shared-read-db-services.spec.d.ts +1 -1
  379. package/dist/esm/__tests__/db/shared-read-db-services.spec.js +87 -87
  380. package/dist/esm/__tests__/db/shopify-app-installs-db-service.spec.d.ts +1 -1
  381. package/dist/esm/__tests__/db/shopify-app-installs-db-service.spec.js +102 -102
  382. package/dist/esm/__tests__/db/subscriptions-db-service.spec.d.ts +1 -1
  383. package/dist/esm/__tests__/db/subscriptions-db-service.spec.js +93 -93
  384. package/dist/esm/__tests__/db/user-accounts-db-service.spec.d.ts +1 -1
  385. package/dist/esm/__tests__/db/user-accounts-db-service.spec.js +74 -74
  386. package/dist/esm/__tests__/helpers/account-users-helper.spec.d.ts +1 -1
  387. package/dist/esm/__tests__/helpers/account-users-helper.spec.js +218 -218
  388. package/dist/esm/__tests__/helpers/acuity-helper.spec.d.ts +1 -1
  389. package/dist/esm/__tests__/helpers/acuity-helper.spec.js +67 -67
  390. package/dist/esm/__tests__/helpers/api-key-auth-helper.spec.d.ts +1 -1
  391. package/dist/esm/__tests__/helpers/api-key-auth-helper.spec.js +80 -80
  392. package/dist/esm/__tests__/identity-cache/identity-cache-db-service.spec.d.ts +1 -1
  393. package/dist/esm/__tests__/identity-cache/identity-cache-db-service.spec.js +674 -674
  394. package/dist/esm/__tests__/identity-cache/identity-cache-dynamodb-service.spec.d.ts +1 -1
  395. package/dist/esm/__tests__/identity-cache/identity-cache-dynamodb-service.spec.js +1138 -1138
  396. package/dist/esm/__tests__/identity-cache/identity-cache-tier-routing.spec.d.ts +1 -1
  397. package/dist/esm/__tests__/identity-cache/identity-cache-tier-routing.spec.js +849 -849
  398. package/dist/esm/__tests__/identity-cache/trait-merging-and-staleness.spec.d.ts +1 -1
  399. package/dist/esm/__tests__/identity-cache/trait-merging-and-staleness.spec.js +1058 -1058
  400. package/dist/esm/__tests__/identity-cache/volatile-traits-optimization.spec.d.ts +1 -1
  401. package/dist/esm/__tests__/identity-cache/volatile-traits-optimization.spec.js +816 -816
  402. package/dist/esm/__tests__/integration/sqs-bundling-roundtrip.spec.d.ts +1 -1
  403. package/dist/esm/__tests__/integration/sqs-bundling-roundtrip.spec.js +582 -582
  404. package/dist/esm/__tests__/libs/compress-decompress.spec.d.ts +1 -1
  405. package/dist/esm/__tests__/libs/compress-decompress.spec.js +14 -14
  406. package/dist/esm/__tests__/libs/contacts.spec.d.ts +1 -1
  407. package/dist/esm/__tests__/libs/contacts.spec.js +292 -292
  408. package/dist/esm/__tests__/libs/currency.spec.d.ts +1 -1
  409. package/dist/esm/__tests__/libs/currency.spec.js +218 -218
  410. package/dist/esm/__tests__/libs/dates.spec.d.ts +1 -1
  411. package/dist/esm/__tests__/libs/dates.spec.js +128 -128
  412. package/dist/esm/__tests__/libs/domain.spec.d.ts +1 -1
  413. package/dist/esm/__tests__/libs/domain.spec.js +105 -105
  414. package/dist/esm/__tests__/libs/numbers.spec.d.ts +1 -1
  415. package/dist/esm/__tests__/libs/numbers.spec.js +259 -259
  416. package/dist/esm/__tests__/s3-client/s3-client.spec.d.ts +1 -1
  417. package/dist/esm/__tests__/s3-client/s3-client.spec.js +31 -31
  418. package/dist/esm/__tests__/services/acuity-api-service.spec.d.ts +1 -1
  419. package/dist/esm/__tests__/services/acuity-api-service.spec.js +69 -69
  420. package/dist/esm/__tests__/services/cost/cost-calculation-types.spec.d.ts +1 -1
  421. package/dist/esm/__tests__/services/cost/cost-calculation-types.spec.js +21 -21
  422. package/dist/esm/__tests__/services/cost/cost-calculator-service.spec.d.ts +1 -1
  423. package/dist/esm/__tests__/services/cost/cost-calculator-service.spec.js +3317 -3317
  424. package/dist/esm/__tests__/services/cost/cost-currency-service.spec.d.ts +1 -1
  425. package/dist/esm/__tests__/services/cost/cost-currency-service.spec.js +112 -112
  426. package/dist/esm/__tests__/services/cost/cost-filter-service.spec.d.ts +1 -1
  427. package/dist/esm/__tests__/services/cost/cost-filter-service.spec.js +466 -466
  428. package/dist/esm/__tests__/services/cost/order-cost/order-cost-resolution-service.spec.d.ts +1 -1
  429. package/dist/esm/__tests__/services/cost/order-cost/order-cost-resolution-service.spec.js +204 -204
  430. package/dist/esm/__tests__/services/currency-exchange-rate-lookup-service.spec.d.ts +1 -1
  431. package/dist/esm/__tests__/services/currency-exchange-rate-lookup-service.spec.js +32 -32
  432. package/dist/esm/__tests__/services/email-verification/contact-email-verification-service.spec.d.ts +1 -1
  433. package/dist/esm/__tests__/services/email-verification/contact-email-verification-service.spec.js +91 -91
  434. package/dist/esm/__tests__/services/email-verification/email-verification-service.spec.d.ts +1 -1
  435. package/dist/esm/__tests__/services/email-verification/email-verification-service.spec.js +55 -55
  436. package/dist/esm/__tests__/shopify/shopify-graphql-transformer.spec.d.ts +1 -1
  437. package/dist/esm/__tests__/shopify/shopify-graphql-transformer.spec.js +33 -33
  438. package/dist/esm/__tests__/unit/libs/api-router/public-api-router.spec.d.ts +1 -1
  439. package/dist/esm/__tests__/unit/libs/api-router/public-api-router.spec.js +156 -156
  440. package/dist/esm/__tests__/unit/libs/api-router/route-matcher.spec.d.ts +1 -1
  441. package/dist/esm/__tests__/unit/libs/api-router/route-matcher.spec.js +67 -67
  442. package/dist/esm/__tests__/utils/custom-measure-formula-utils.spec.d.ts +1 -1
  443. package/dist/esm/__tests__/utils/custom-measure-formula-utils.spec.js +137 -137
  444. package/dist/esm/clients/generic/cognito-client.d.ts +23 -23
  445. package/dist/esm/clients/generic/cognito-client.js +204 -204
  446. package/dist/esm/clients/generic/dynamodb-client.d.ts +20 -20
  447. package/dist/esm/clients/generic/dynamodb-client.js +231 -231
  448. package/dist/esm/clients/generic/eventbridge-client.d.ts +14 -14
  449. package/dist/esm/clients/generic/eventbridge-client.js +47 -47
  450. package/dist/esm/clients/generic/http-client.d.ts +14 -14
  451. package/dist/esm/clients/generic/http-client.js +53 -53
  452. package/dist/esm/clients/generic/index.d.ts +13 -13
  453. package/dist/esm/clients/generic/index.js +13 -13
  454. package/dist/esm/clients/generic/lambda-invoke-client.d.ts +10 -10
  455. package/dist/esm/clients/generic/lambda-invoke-client.js +35 -35
  456. package/dist/esm/clients/generic/location-client.d.ts +8 -8
  457. package/dist/esm/clients/generic/location-client.js +27 -27
  458. package/dist/esm/clients/generic/redis-client.d.ts +33 -33
  459. package/dist/esm/clients/generic/redis-client.js +184 -184
  460. package/dist/esm/clients/generic/s3-client.d.ts +23 -23
  461. package/dist/esm/clients/generic/s3-client.js +209 -209
  462. package/dist/esm/clients/generic/singlestore-db-client.d.ts +14 -14
  463. package/dist/esm/clients/generic/singlestore-db-client.js +40 -40
  464. package/dist/esm/clients/generic/sqs-bundled-client.d.ts +15 -15
  465. package/dist/esm/clients/generic/sqs-bundled-client.js +307 -307
  466. package/dist/esm/clients/generic/sqs-bundled-client.types.d.ts +53 -53
  467. package/dist/esm/clients/generic/sqs-bundled-client.types.js +14 -14
  468. package/dist/esm/clients/generic/sqs-client.d.ts +53 -53
  469. package/dist/esm/clients/generic/sqs-client.js +281 -281
  470. package/dist/esm/clients/generic/sqs-unbundle.d.ts +32 -32
  471. package/dist/esm/clients/generic/sqs-unbundle.js +137 -137
  472. package/dist/esm/clients/index.d.ts +3 -3
  473. package/dist/esm/clients/index.js +3 -3
  474. package/dist/esm/clients/internal-api/accounts-client.d.ts +91 -91
  475. package/dist/esm/clients/internal-api/accounts-client.js +125 -125
  476. package/dist/esm/clients/internal-api/cache-lambda-client.d.ts +26 -26
  477. package/dist/esm/clients/internal-api/cache-lambda-client.js +85 -85
  478. package/dist/esm/clients/internal-api/db-management-client.d.ts +18 -18
  479. package/dist/esm/clients/internal-api/db-management-client.js +32 -32
  480. package/dist/esm/clients/internal-api/destinations-client.d.ts +34 -34
  481. package/dist/esm/clients/internal-api/destinations-client.js +75 -75
  482. package/dist/esm/clients/internal-api/event-collector-client.d.ts +20 -20
  483. package/dist/esm/clients/internal-api/event-collector-client.js +32 -32
  484. package/dist/esm/clients/internal-api/identity-client.d.ts +31 -31
  485. package/dist/esm/clients/internal-api/identity-client.js +87 -87
  486. package/dist/esm/clients/internal-api/index.d.ts +9 -9
  487. package/dist/esm/clients/internal-api/index.js +9 -9
  488. package/dist/esm/clients/internal-api/shopify-app-install-client.d.ts +37 -37
  489. package/dist/esm/clients/internal-api/shopify-app-install-client.js +77 -77
  490. package/dist/esm/clients/internal-api/subscriptions-client.d.ts +26 -26
  491. package/dist/esm/clients/internal-api/subscriptions-client.js +73 -73
  492. package/dist/esm/clients/internal-api/users-auth-client.d.ts +35 -35
  493. package/dist/esm/clients/internal-api/users-auth-client.js +106 -106
  494. package/dist/esm/clients/third-party/acuity-client.d.ts +10 -10
  495. package/dist/esm/clients/third-party/acuity-client.js +36 -36
  496. package/dist/esm/clients/third-party/emailable-client.d.ts +7 -7
  497. package/dist/esm/clients/third-party/emailable-client.js +21 -21
  498. package/dist/esm/clients/third-party/exchange-rate-api-client.d.ts +17 -17
  499. package/dist/esm/clients/third-party/exchange-rate-api-client.js +15 -15
  500. package/dist/esm/clients/third-party/index.d.ts +5 -5
  501. package/dist/esm/clients/third-party/index.js +5 -5
  502. package/dist/esm/clients/third-party/loops-client.d.ts +10 -10
  503. package/dist/esm/clients/third-party/loops-client.js +26 -26
  504. package/dist/esm/clients/third-party/shopify/graphql-order-queries.d.ts +25 -25
  505. package/dist/esm/clients/third-party/shopify/graphql-order-queries.js +1 -1
  506. package/dist/esm/clients/third-party/shopify/graphql-product-queries.d.ts +2 -2
  507. package/dist/esm/clients/third-party/shopify/graphql-product-queries.js +2 -2
  508. package/dist/esm/clients/third-party/shopify/shopify-graphql-client.d.ts +10 -10
  509. package/dist/esm/clients/third-party/shopify/shopify-graphql-client.js +157 -157
  510. package/dist/esm/clients/third-party/shopify-client.d.ts +29 -29
  511. package/dist/esm/clients/third-party/shopify-client.js +142 -142
  512. package/dist/esm/constants/index.d.ts +1 -1
  513. package/dist/esm/constants/index.js +1 -1
  514. package/dist/esm/constants/sqs.d.ts +20 -20
  515. package/dist/esm/constants/sqs.js +22 -22
  516. package/dist/esm/helpers/account-users-helper.d.ts +2 -2
  517. package/dist/esm/helpers/account-users-helper.js +18 -18
  518. package/dist/esm/helpers/acuity-helper.d.ts +4 -4
  519. package/dist/esm/helpers/acuity-helper.js +51 -51
  520. package/dist/esm/helpers/api-key-auth-helper.d.ts +9 -9
  521. package/dist/esm/helpers/api-key-auth-helper.js +35 -35
  522. package/dist/esm/helpers/api-key-authorizer-helper.d.ts +36 -36
  523. package/dist/esm/helpers/api-key-authorizer-helper.js +83 -83
  524. package/dist/esm/helpers/identity-cache-helper.d.ts +30 -30
  525. package/dist/esm/helpers/identity-cache-helper.js +248 -248
  526. package/dist/esm/helpers/index.d.ts +10 -10
  527. package/dist/esm/helpers/index.js +10 -10
  528. package/dist/esm/helpers/input-validation-helper.d.ts +3 -3
  529. package/dist/esm/helpers/input-validation-helper.js +18 -18
  530. package/dist/esm/helpers/logging-helper.d.ts +16 -16
  531. package/dist/esm/helpers/logging-helper.js +56 -56
  532. package/dist/esm/helpers/response-helper.d.ts +18 -18
  533. package/dist/esm/helpers/response-helper.js +37 -37
  534. package/dist/esm/helpers/shopify-helper.d.ts +9 -9
  535. package/dist/esm/helpers/shopify-helper.js +21 -21
  536. package/dist/esm/helpers/sqs-utils.d.ts +6 -6
  537. package/dist/esm/helpers/sqs-utils.js +9 -9
  538. package/dist/esm/index.d.ts +7 -7
  539. package/dist/esm/index.js +7 -7
  540. package/dist/esm/libs/api-router/index.d.ts +2 -2
  541. package/dist/esm/libs/api-router/index.js +2 -2
  542. package/dist/esm/libs/api-router/public-api-router.d.ts +3 -3
  543. package/dist/esm/libs/api-router/public-api-router.js +32 -32
  544. package/dist/esm/libs/api-router/route-matcher.d.ts +21 -21
  545. package/dist/esm/libs/api-router/route-matcher.js +30 -30
  546. package/dist/esm/libs/click-id-parser.d.ts +23 -23
  547. package/dist/esm/libs/click-id-parser.js +45 -45
  548. package/dist/esm/libs/compression.d.ts +2 -2
  549. package/dist/esm/libs/compression.js +25 -25
  550. package/dist/esm/libs/contacts.d.ts +7 -7
  551. package/dist/esm/libs/contacts.js +143 -143
  552. package/dist/esm/libs/cookie.d.ts +17 -17
  553. package/dist/esm/libs/cookie.js +70 -70
  554. package/dist/esm/libs/crypto.d.ts +4 -4
  555. package/dist/esm/libs/crypto.js +15 -15
  556. package/dist/esm/libs/csv.d.ts +2 -2
  557. package/dist/esm/libs/csv.js +30 -30
  558. package/dist/esm/libs/currency.d.ts +1 -1
  559. package/dist/esm/libs/currency.js +22 -22
  560. package/dist/esm/libs/dates.d.ts +12 -12
  561. package/dist/esm/libs/dates.js +83 -83
  562. package/dist/esm/libs/domain.d.ts +2 -2
  563. package/dist/esm/libs/domain.js +33 -33
  564. package/dist/esm/libs/emails.d.ts +8 -8
  565. package/dist/esm/libs/emails.js +146 -146
  566. package/dist/esm/libs/http-error.d.ts +21 -21
  567. package/dist/esm/libs/http-error.js +59 -59
  568. package/dist/esm/libs/http-status-codes.d.ts +58 -58
  569. package/dist/esm/libs/http-status-codes.js +59 -59
  570. package/dist/esm/libs/index.d.ts +19 -19
  571. package/dist/esm/libs/index.js +19 -19
  572. package/dist/esm/libs/numbers.d.ts +1 -1
  573. package/dist/esm/libs/numbers.js +11 -11
  574. package/dist/esm/libs/referrer-parser/index.d.ts +2 -2
  575. package/dist/esm/libs/referrer-parser/index.js +2 -2
  576. package/dist/esm/libs/referrer-parser/referrer-data.d.ts +9 -9
  577. package/dist/esm/libs/referrer-parser/referrer-data.js +3304 -3304
  578. package/dist/esm/libs/referrer-parser/referrer-parser-util.d.ts +20 -20
  579. package/dist/esm/libs/referrer-parser/referrer-parser-util.js +124 -124
  580. package/dist/esm/libs/strings.d.ts +3 -3
  581. package/dist/esm/libs/strings.js +40 -40
  582. package/dist/esm/libs/traits.d.ts +6 -6
  583. package/dist/esm/libs/traits.js +54 -54
  584. package/dist/esm/libs/url.d.ts +1 -1
  585. package/dist/esm/libs/url.js +9 -9
  586. package/dist/esm/services/acuity-api-service.d.ts +9 -9
  587. package/dist/esm/services/acuity-api-service.js +69 -69
  588. package/dist/esm/services/cache/generic-cached-object.d.ts +5 -5
  589. package/dist/esm/services/cache/generic-cached-object.js +1 -1
  590. package/dist/esm/services/cache/index.d.ts +1 -1
  591. package/dist/esm/services/cache/index.js +1 -1
  592. package/dist/esm/services/cache/product-cache-service.d.ts +21 -21
  593. package/dist/esm/services/cache/product-cache-service.js +68 -68
  594. package/dist/esm/services/cost/cost-calculation-types.d.ts +69 -69
  595. package/dist/esm/services/cost/cost-calculation-types.js +15 -15
  596. package/dist/esm/services/cost/cost-calculator-service.d.ts +24 -24
  597. package/dist/esm/services/cost/cost-calculator-service.js +450 -450
  598. package/dist/esm/services/cost/cost-currency-service.d.ts +6 -6
  599. package/dist/esm/services/cost/cost-currency-service.js +84 -84
  600. package/dist/esm/services/cost/cost-filter-service.d.ts +10 -10
  601. package/dist/esm/services/cost/cost-filter-service.js +118 -118
  602. package/dist/esm/services/cost/index.d.ts +5 -5
  603. package/dist/esm/services/cost/index.js +5 -5
  604. package/dist/esm/services/cost/order-cost/index.d.ts +2 -2
  605. package/dist/esm/services/cost/order-cost/index.js +2 -2
  606. package/dist/esm/services/cost/order-cost/order-cost-resolution-service.d.ts +23 -23
  607. package/dist/esm/services/cost/order-cost/order-cost-resolution-service.js +355 -355
  608. package/dist/esm/services/cost/order-cost/order-cost-resolution-types.d.ts +37 -37
  609. package/dist/esm/services/cost/order-cost/order-cost-resolution-types.js +1 -1
  610. package/dist/esm/services/currency-exchange-rate-lookup-service.d.ts +12 -12
  611. package/dist/esm/services/currency-exchange-rate-lookup-service.js +90 -90
  612. package/dist/esm/services/db/accounts-db-service.d.ts +9 -9
  613. package/dist/esm/services/db/accounts-db-service.js +29 -29
  614. package/dist/esm/services/db/api-keys-db-service.d.ts +10 -10
  615. package/dist/esm/services/db/api-keys-db-service.js +32 -32
  616. package/dist/esm/services/db/contact-enrichments-db-service.d.ts +15 -15
  617. package/dist/esm/services/db/contact-enrichments-db-service.js +90 -90
  618. package/dist/esm/services/db/currency-exchange-rates-db-service.d.ts +21 -21
  619. package/dist/esm/services/db/currency-exchange-rates-db-service.js +35 -35
  620. package/dist/esm/services/db/custom-measures-db-service.d.ts +14 -14
  621. package/dist/esm/services/db/custom-measures-db-service.js +44 -44
  622. package/dist/esm/services/db/destinations-db-service.d.ts +13 -13
  623. package/dist/esm/services/db/destinations-db-service.js +70 -70
  624. package/dist/esm/services/db/identity-cache-db-service.d.ts +28 -28
  625. package/dist/esm/services/db/identity-cache-db-service.js +313 -313
  626. package/dist/esm/services/db/identity-cache-dynamodb-service.d.ts +44 -44
  627. package/dist/esm/services/db/identity-cache-dynamodb-service.js +727 -727
  628. package/dist/esm/services/db/identity-cache-dynamodb-service.js.map +1 -1
  629. package/dist/esm/services/db/index.d.ts +19 -19
  630. package/dist/esm/services/db/index.js +19 -19
  631. package/dist/esm/services/db/log-events-db-service.d.ts +11 -11
  632. package/dist/esm/services/db/log-events-db-service.js +177 -177
  633. package/dist/esm/services/db/pixels-db-service.d.ts +8 -8
  634. package/dist/esm/services/db/pixels-db-service.js +31 -31
  635. package/dist/esm/services/db/products-db-service-types.d.ts +10 -10
  636. package/dist/esm/services/db/products-db-service-types.js +1 -1
  637. package/dist/esm/services/db/products-db-service.d.ts +19 -19
  638. package/dist/esm/services/db/products-db-service.js +277 -277
  639. package/dist/esm/services/db/purchasable-contacts-db-service.d.ts +9 -9
  640. package/dist/esm/services/db/purchasable-contacts-db-service.js +39 -39
  641. package/dist/esm/services/db/purchased-contacts/index.d.ts +2 -2
  642. package/dist/esm/services/db/purchased-contacts/index.js +2 -2
  643. package/dist/esm/services/db/purchased-contacts/purchased-contacts-db-service.d.ts +18 -18
  644. package/dist/esm/services/db/purchased-contacts/purchased-contacts-db-service.js +148 -148
  645. package/dist/esm/services/db/purchased-contacts/types.d.ts +11 -11
  646. package/dist/esm/services/db/purchased-contacts/types.js +1 -1
  647. package/dist/esm/services/db/shopify-app-installs-db-service.d.ts +10 -10
  648. package/dist/esm/services/db/shopify-app-installs-db-service.js +48 -48
  649. package/dist/esm/services/db/shopify-products-cache-db-service.d.ts +16 -16
  650. package/dist/esm/services/db/shopify-products-cache-db-service.js +66 -66
  651. package/dist/esm/services/db/subscriptions-db-service.d.ts +11 -11
  652. package/dist/esm/services/db/subscriptions-db-service.js +34 -34
  653. package/dist/esm/services/db/tracking-events-db-service.d.ts +21 -21
  654. package/dist/esm/services/db/tracking-events-db-service.js +184 -184
  655. package/dist/esm/services/db/user-accounts-db-service.d.ts +7 -7
  656. package/dist/esm/services/db/user-accounts-db-service.js +13 -13
  657. package/dist/esm/services/email-verification/contact-email-verification-service.d.ts +7 -7
  658. package/dist/esm/services/email-verification/contact-email-verification-service.js +97 -97
  659. package/dist/esm/services/email-verification/email-verification-service.d.ts +19 -19
  660. package/dist/esm/services/email-verification/email-verification-service.js +127 -127
  661. package/dist/esm/services/email-verification/index.d.ts +2 -2
  662. package/dist/esm/services/email-verification/index.js +2 -2
  663. package/dist/esm/services/eventbridge-integration-service.d.ts +9 -9
  664. package/dist/esm/services/eventbridge-integration-service.js +24 -24
  665. package/dist/esm/services/events/index.d.ts +3 -3
  666. package/dist/esm/services/events/index.js +3 -3
  667. package/dist/esm/services/events/log-event-service.d.ts +19 -19
  668. package/dist/esm/services/events/log-event-service.js +73 -73
  669. package/dist/esm/services/events/metric-event-service.d.ts +9 -9
  670. package/dist/esm/services/events/metric-event-service.js +45 -45
  671. package/dist/esm/services/events/tracking-event-sqs-service.d.ts +8 -8
  672. package/dist/esm/services/events/tracking-event-sqs-service.js +30 -30
  673. package/dist/esm/services/generic-cache-service.d.ts +7 -7
  674. package/dist/esm/services/generic-cache-service.js +29 -29
  675. package/dist/esm/services/index.d.ts +11 -11
  676. package/dist/esm/services/index.js +11 -11
  677. package/dist/esm/services/ipdata-lookup-service.d.ts +20 -20
  678. package/dist/esm/services/ipdata-lookup-service.js +108 -108
  679. package/dist/esm/services/shopify/index.d.ts +2 -2
  680. package/dist/esm/services/shopify/index.js +2 -2
  681. package/dist/esm/services/shopify/products/index.d.ts +1 -1
  682. package/dist/esm/services/shopify/products/index.js +1 -1
  683. package/dist/esm/services/shopify/products/shopify-products-serviceV2.d.ts +17 -17
  684. package/dist/esm/services/shopify/products/shopify-products-serviceV2.js +108 -108
  685. package/dist/esm/services/shopify/shopify-graphql-transformer.d.ts +8 -8
  686. package/dist/esm/services/shopify/shopify-graphql-transformer.js +138 -138
  687. package/dist/esm/types/acuity-types.d.ts +74 -74
  688. package/dist/esm/types/acuity-types.js +1 -1
  689. package/dist/esm/types/api-response.d.ts +6 -6
  690. package/dist/esm/types/api-response.js +1 -1
  691. package/dist/esm/types/index.d.ts +4 -4
  692. package/dist/esm/types/index.js +4 -4
  693. package/dist/esm/types/internal-events/event-detail-types.d.ts +20 -20
  694. package/dist/esm/types/internal-events/event-detail-types.js +24 -24
  695. package/dist/esm/types/internal-events/index.d.ts +1 -1
  696. package/dist/esm/types/internal-events/index.js +1 -1
  697. package/dist/esm/types/shopify-graphql-types/admin.generated.d.ts +123 -123
  698. package/dist/esm/types/shopify-graphql-types/admin.generated.js +1 -1
  699. package/dist/esm/types/shopify-graphql-types/admin.types.d.ts +26289 -26289
  700. package/dist/esm/types/shopify-graphql-types/admin.types.js +5299 -5299
  701. package/dist/esm/types/shopify-graphql-types/index.d.ts +2 -2
  702. package/dist/esm/types/shopify-graphql-types/index.js +2 -2
  703. package/dist/esm/types/shopify-rest-types.d.ts +767 -767
  704. package/dist/esm/types/shopify-rest-types.js +1 -1
  705. package/dist/esm/utils/compression.d.ts +36 -36
  706. package/dist/esm/utils/compression.js +187 -187
  707. package/dist/esm/utils/custom-measure-formula-utils.d.ts +6 -6
  708. package/dist/esm/utils/custom-measure-formula-utils.js +201 -201
  709. package/dist/esm/utils/index.d.ts +4 -4
  710. package/dist/esm/utils/index.js +4 -4
  711. package/dist/esm/utils/retry-envelope.d.ts +12 -12
  712. package/dist/esm/utils/retry-envelope.js +22 -22
  713. package/dist/esm/utils/size.d.ts +2 -2
  714. package/dist/esm/utils/size.js +44 -44
  715. package/package.json +134 -134
@@ -1,143 +1,143 @@
1
- import { axiosHttpService } from '../generic/http-client.js';
2
- import { Logger } from '../../index.js';
3
- export class ShopifyClient {
4
- static _shopify_api_version = process.env.SHOPIFY_API_VERSION;
5
- static client;
6
- static getClient = () => {
7
- this.client = this.client ?? axiosHttpService();
8
- return this.client;
9
- };
10
- static registerApp = async (shop, code, appKey, appSecret) => {
11
- const client = this.getClient();
12
- const url = 'https://' + shop + '/admin/oauth/access_token';
13
- const payload = {
14
- client_id: appKey,
15
- client_secret: appSecret,
16
- code,
17
- };
18
- const res = await client.post(url, payload);
19
- return res;
20
- };
21
- static registerWebhookTopic = async (shop, accessToken, eventBridgeArn, topic) => {
22
- const client = this.getClient();
23
- const url = `https://${shop}/admin/api/${this._shopify_api_version}/webhooks.json`;
24
- const payload = {
25
- webhook: {
26
- topic,
27
- address: eventBridgeArn,
28
- format: 'json',
29
- },
30
- };
31
- const res = await client.post(url, payload, { headers: { 'X-Shopify-Access-Token': accessToken } });
32
- if (res.status >= 400) {
33
- Logger.error('Failed to register Webhook Topic', { res, shop, accessToken, eventBridgeArn, topic, url, payload });
34
- }
35
- Logger.debug('Shopify Client Webhook Registration Response', { registrationResponse: res });
36
- return res;
37
- };
38
- static updateShopifyAppMetafield = async (shop, accessToken, pixelId) => {
39
- const url = `https://${shop}/admin/api/${this._shopify_api_version}/metafields.json`;
40
- const payload = {
41
- metafield: {
42
- namespace: 'adtr',
43
- key: 'adtr.config',
44
- value: pixelId,
45
- type: 'single_line_text_field',
46
- },
47
- };
48
- const res = await this.genericShopifyPost(url, accessToken, payload);
49
- if (res.status >= 400) {
50
- Logger.error('Failed to update Shopify app Metafield ', { shop, accessToken, url, payload });
51
- }
52
- return res;
53
- };
54
- static getShopifyStoreProperties = async (shop, accessToken) => {
55
- const url = `https://${shop}/admin/api/${this._shopify_api_version}/shop.json`;
56
- const res = await this.genericShopifyGet(url, accessToken);
57
- if (res.status >= 400) {
58
- Logger.error('Failed to get Shopify Store Properties', { shop, accessToken, url });
59
- }
60
- return res;
61
- };
62
- static createAppSubscription = async (shop, accessToken, planName, price, returnUrl, trialDays, test) => {
63
- const url = `https://${shop}/admin/api/${this._shopify_api_version}/recurring_application_charges.json`;
64
- const recurring_application_charge = {
65
- name: planName,
66
- price,
67
- return_url: returnUrl,
68
- trial_days: trialDays,
69
- test,
70
- };
71
- const res = await this.genericShopifyPost(url, accessToken, { recurring_application_charge });
72
- if (res.status >= 400) {
73
- Logger.error('Failed to create App Subscription', { shop, accessToken, url });
74
- }
75
- return res;
76
- };
77
- static cancelAppSubscription = async (shop, accessToken, chargeId) => {
78
- const url = `https://${shop}/admin/api/${this._shopify_api_version}/recurring_application_charges/${chargeId}.json`;
79
- const client = this.getClient();
80
- const res = await client.delete(url, { headers: { 'X-Shopify-Access-Token': accessToken } });
81
- if (res.status !== 200) {
82
- Logger.error('Failed to cancel recurring App billing', { shop, accessToken, url });
83
- }
84
- return res;
85
- };
86
- static listAppSubscriptions = async (shop, accessToken) => {
87
- const url = `https://${shop}/admin/api/${this._shopify_api_version}/recurring_application_charges.json`;
88
- const res = await this.genericShopifyGet(url, accessToken);
89
- if (res.status >= 400) {
90
- Logger.error('Failed to get App Subscriptions', { shop, accessToken, url });
91
- }
92
- return res;
93
- };
94
- static getOrder = async (shop, accessToken, orderId, retries = 0, maxRetries = 0, retryDelay = 5000) => {
95
- const url = `https://${shop}/admin/api/${this._shopify_api_version}/orders/${orderId}.json`;
96
- const res = await this.genericShopifyGet(url, accessToken);
97
- if (res.status >= 400) {
98
- Logger.error('Failed to get Order', { res, shop, accessToken, url, orderId });
99
- if (retries < maxRetries) {
100
- await new Promise((resolve) => setTimeout(resolve, retryDelay));
101
- Logger.info('Retrying to get Order', { shop, accessToken, url, orderId, retries, maxRetries, retryDelay });
102
- return await this.getOrder(shop, accessToken, orderId, retries + 1, maxRetries, retryDelay);
103
- }
104
- }
105
- return res;
106
- };
107
- static getProductREST = async (shop, accessToken, productId) => {
108
- const url = `https://${shop}/admin/api/${this._shopify_api_version}/products/${productId}.json`;
109
- const res = await this.genericShopifyGet(url, accessToken);
110
- if (res.status >= 400) {
111
- Logger.error('Failed to get Product', { res, shop, accessToken, url, productId });
112
- }
113
- return res;
114
- };
115
- static genericShopifyPost = async (url, accessToken, payload) => {
116
- const client = this.getClient();
117
- const res = await client.post(url, payload, {
118
- headers: { 'X-Shopify-Access-Token': accessToken, 'Content-Type': 'application/json' },
119
- });
120
- Logger.debug('Shopify Client Response', { res });
121
- return res;
122
- };
123
- static genericShopifyGet = async (url, accessToken) => {
124
- const client = this.getClient();
125
- const res = await client.get(url, { headers: { 'X-Shopify-Access-Token': accessToken } });
126
- Logger.debug('Shopify Client Response', { res });
127
- return res;
128
- };
129
- static genericShopifyPut = async (url, accessToken, payload) => {
130
- const client = this.getClient();
131
- const res = await client.put(url, payload, { headers: { 'X-Shopify-Access-Token': accessToken } });
132
- Logger.debug('Shopify Client Response', { res });
133
- return res;
134
- };
135
- static unregisterWebhook = async (shop, webhookId, accessToken) => {
136
- const client = this.getClient();
137
- const url = `https://${shop}/admin/api/${this._shopify_api_version}/webhooks/${webhookId}.json`;
138
- const res = await client.delete(url, { headers: { 'X-Shopify-Access-Token': accessToken } });
139
- Logger.debug('Shopify Client Response', { res });
140
- return res;
141
- };
142
- }
1
+ import { axiosHttpService } from '../generic/http-client.js';
2
+ import { Logger } from '../../index.js';
3
+ export class ShopifyClient {
4
+ static _shopify_api_version = process.env.SHOPIFY_API_VERSION;
5
+ static client;
6
+ static getClient = () => {
7
+ this.client = this.client ?? axiosHttpService();
8
+ return this.client;
9
+ };
10
+ static registerApp = async (shop, code, appKey, appSecret) => {
11
+ const client = this.getClient();
12
+ const url = 'https://' + shop + '/admin/oauth/access_token';
13
+ const payload = {
14
+ client_id: appKey,
15
+ client_secret: appSecret,
16
+ code,
17
+ };
18
+ const res = await client.post(url, payload);
19
+ return res;
20
+ };
21
+ static registerWebhookTopic = async (shop, accessToken, eventBridgeArn, topic) => {
22
+ const client = this.getClient();
23
+ const url = `https://${shop}/admin/api/${this._shopify_api_version}/webhooks.json`;
24
+ const payload = {
25
+ webhook: {
26
+ topic,
27
+ address: eventBridgeArn,
28
+ format: 'json',
29
+ },
30
+ };
31
+ const res = await client.post(url, payload, { headers: { 'X-Shopify-Access-Token': accessToken } });
32
+ if (res.status >= 400) {
33
+ Logger.error('Failed to register Webhook Topic', { res, shop, accessToken, eventBridgeArn, topic, url, payload });
34
+ }
35
+ Logger.debug('Shopify Client Webhook Registration Response', { registrationResponse: res });
36
+ return res;
37
+ };
38
+ static updateShopifyAppMetafield = async (shop, accessToken, pixelId) => {
39
+ const url = `https://${shop}/admin/api/${this._shopify_api_version}/metafields.json`;
40
+ const payload = {
41
+ metafield: {
42
+ namespace: 'adtr',
43
+ key: 'adtr.config',
44
+ value: pixelId,
45
+ type: 'single_line_text_field',
46
+ },
47
+ };
48
+ const res = await this.genericShopifyPost(url, accessToken, payload);
49
+ if (res.status >= 400) {
50
+ Logger.error('Failed to update Shopify app Metafield ', { shop, accessToken, url, payload });
51
+ }
52
+ return res;
53
+ };
54
+ static getShopifyStoreProperties = async (shop, accessToken) => {
55
+ const url = `https://${shop}/admin/api/${this._shopify_api_version}/shop.json`;
56
+ const res = await this.genericShopifyGet(url, accessToken);
57
+ if (res.status >= 400) {
58
+ Logger.error('Failed to get Shopify Store Properties', { shop, accessToken, url });
59
+ }
60
+ return res;
61
+ };
62
+ static createAppSubscription = async (shop, accessToken, planName, price, returnUrl, trialDays, test) => {
63
+ const url = `https://${shop}/admin/api/${this._shopify_api_version}/recurring_application_charges.json`;
64
+ const recurring_application_charge = {
65
+ name: planName,
66
+ price,
67
+ return_url: returnUrl,
68
+ trial_days: trialDays,
69
+ test,
70
+ };
71
+ const res = await this.genericShopifyPost(url, accessToken, { recurring_application_charge });
72
+ if (res.status >= 400) {
73
+ Logger.error('Failed to create App Subscription', { shop, accessToken, url });
74
+ }
75
+ return res;
76
+ };
77
+ static cancelAppSubscription = async (shop, accessToken, chargeId) => {
78
+ const url = `https://${shop}/admin/api/${this._shopify_api_version}/recurring_application_charges/${chargeId}.json`;
79
+ const client = this.getClient();
80
+ const res = await client.delete(url, { headers: { 'X-Shopify-Access-Token': accessToken } });
81
+ if (res.status !== 200) {
82
+ Logger.error('Failed to cancel recurring App billing', { shop, accessToken, url });
83
+ }
84
+ return res;
85
+ };
86
+ static listAppSubscriptions = async (shop, accessToken) => {
87
+ const url = `https://${shop}/admin/api/${this._shopify_api_version}/recurring_application_charges.json`;
88
+ const res = await this.genericShopifyGet(url, accessToken);
89
+ if (res.status >= 400) {
90
+ Logger.error('Failed to get App Subscriptions', { shop, accessToken, url });
91
+ }
92
+ return res;
93
+ };
94
+ static getOrder = async (shop, accessToken, orderId, retries = 0, maxRetries = 0, retryDelay = 5000) => {
95
+ const url = `https://${shop}/admin/api/${this._shopify_api_version}/orders/${orderId}.json`;
96
+ const res = await this.genericShopifyGet(url, accessToken);
97
+ if (res.status >= 400) {
98
+ Logger.error('Failed to get Order', { res, shop, accessToken, url, orderId });
99
+ if (retries < maxRetries) {
100
+ await new Promise((resolve) => setTimeout(resolve, retryDelay));
101
+ Logger.info('Retrying to get Order', { shop, accessToken, url, orderId, retries, maxRetries, retryDelay });
102
+ return await this.getOrder(shop, accessToken, orderId, retries + 1, maxRetries, retryDelay);
103
+ }
104
+ }
105
+ return res;
106
+ };
107
+ static getProductREST = async (shop, accessToken, productId) => {
108
+ const url = `https://${shop}/admin/api/${this._shopify_api_version}/products/${productId}.json`;
109
+ const res = await this.genericShopifyGet(url, accessToken);
110
+ if (res.status >= 400) {
111
+ Logger.error('Failed to get Product', { res, shop, accessToken, url, productId });
112
+ }
113
+ return res;
114
+ };
115
+ static genericShopifyPost = async (url, accessToken, payload) => {
116
+ const client = this.getClient();
117
+ const res = await client.post(url, payload, {
118
+ headers: { 'X-Shopify-Access-Token': accessToken, 'Content-Type': 'application/json' },
119
+ });
120
+ Logger.debug('Shopify Client Response', { res });
121
+ return res;
122
+ };
123
+ static genericShopifyGet = async (url, accessToken) => {
124
+ const client = this.getClient();
125
+ const res = await client.get(url, { headers: { 'X-Shopify-Access-Token': accessToken } });
126
+ Logger.debug('Shopify Client Response', { res });
127
+ return res;
128
+ };
129
+ static genericShopifyPut = async (url, accessToken, payload) => {
130
+ const client = this.getClient();
131
+ const res = await client.put(url, payload, { headers: { 'X-Shopify-Access-Token': accessToken } });
132
+ Logger.debug('Shopify Client Response', { res });
133
+ return res;
134
+ };
135
+ static unregisterWebhook = async (shop, webhookId, accessToken) => {
136
+ const client = this.getClient();
137
+ const url = `https://${shop}/admin/api/${this._shopify_api_version}/webhooks/${webhookId}.json`;
138
+ const res = await client.delete(url, { headers: { 'X-Shopify-Access-Token': accessToken } });
139
+ Logger.debug('Shopify Client Response', { res });
140
+ return res;
141
+ };
142
+ }
143
143
  //# sourceMappingURL=shopify-client.js.map
@@ -1 +1 @@
1
- export * from './sqs.js';
1
+ export * from './sqs.js';
@@ -1,2 +1,2 @@
1
- export * from './sqs.js';
1
+ export * from './sqs.js';
2
2
  //# sourceMappingURL=index.js.map
@@ -1,20 +1,20 @@
1
- export declare const SQS_256KB = 262144;
2
- export declare const SQS_1MB = 1048576;
3
- export declare const SQS_LIMITS: {
4
- readonly MAX_MESSAGE_SIZE_BYTES: 262144;
5
- readonly MAX_BATCH_SIZE: 10;
6
- readonly MAX_BATCH_PAYLOAD_BYTES: 262144;
7
- readonly BILLING_CHUNK_BYTES: 65536;
8
- readonly SAFETY_MARGIN_PERCENT: 0.05;
9
- };
10
- export declare const SQS_SAFE_LIMITS: {
11
- readonly MAX_MESSAGE_SIZE_BYTES: number;
12
- readonly MAX_BATCH_PAYLOAD_BYTES: number;
13
- };
14
- export interface QueueSizeLimits {
15
- maxMessageSizeBytes: number;
16
- maxBatchPayloadBytes: number;
17
- safeMaxMessageSizeBytes: number;
18
- safeMaxBatchPayloadBytes: number;
19
- }
20
- export declare function createSqsLimits(maxMessageSizeBytes: number): QueueSizeLimits;
1
+ export declare const SQS_256KB = 262144;
2
+ export declare const SQS_1MB = 1048576;
3
+ export declare const SQS_LIMITS: {
4
+ readonly MAX_MESSAGE_SIZE_BYTES: 262144;
5
+ readonly MAX_BATCH_SIZE: 10;
6
+ readonly MAX_BATCH_PAYLOAD_BYTES: 262144;
7
+ readonly BILLING_CHUNK_BYTES: 65536;
8
+ readonly SAFETY_MARGIN_PERCENT: 0.05;
9
+ };
10
+ export declare const SQS_SAFE_LIMITS: {
11
+ readonly MAX_MESSAGE_SIZE_BYTES: number;
12
+ readonly MAX_BATCH_PAYLOAD_BYTES: number;
13
+ };
14
+ export interface QueueSizeLimits {
15
+ maxMessageSizeBytes: number;
16
+ maxBatchPayloadBytes: number;
17
+ safeMaxMessageSizeBytes: number;
18
+ safeMaxBatchPayloadBytes: number;
19
+ }
20
+ export declare function createSqsLimits(maxMessageSizeBytes: number): QueueSizeLimits;
@@ -1,23 +1,23 @@
1
- export const SQS_256KB = 262144;
2
- export const SQS_1MB = 1048576;
3
- export const SQS_LIMITS = {
4
- MAX_MESSAGE_SIZE_BYTES: SQS_256KB,
5
- MAX_BATCH_SIZE: 10,
6
- MAX_BATCH_PAYLOAD_BYTES: SQS_256KB,
7
- BILLING_CHUNK_BYTES: 65536,
8
- SAFETY_MARGIN_PERCENT: 0.05,
9
- };
10
- export const SQS_SAFE_LIMITS = {
11
- MAX_MESSAGE_SIZE_BYTES: Math.floor(SQS_LIMITS.MAX_MESSAGE_SIZE_BYTES * (1 - SQS_LIMITS.SAFETY_MARGIN_PERCENT)),
12
- MAX_BATCH_PAYLOAD_BYTES: Math.floor(SQS_LIMITS.MAX_BATCH_PAYLOAD_BYTES * (1 - SQS_LIMITS.SAFETY_MARGIN_PERCENT)),
13
- };
14
- export function createSqsLimits(maxMessageSizeBytes) {
15
- const safeMultiplier = 1 - SQS_LIMITS.SAFETY_MARGIN_PERCENT;
16
- return {
17
- maxMessageSizeBytes,
18
- maxBatchPayloadBytes: maxMessageSizeBytes,
19
- safeMaxMessageSizeBytes: Math.floor(maxMessageSizeBytes * safeMultiplier),
20
- safeMaxBatchPayloadBytes: Math.floor(maxMessageSizeBytes * safeMultiplier),
21
- };
22
- }
1
+ export const SQS_256KB = 262144;
2
+ export const SQS_1MB = 1048576;
3
+ export const SQS_LIMITS = {
4
+ MAX_MESSAGE_SIZE_BYTES: SQS_256KB,
5
+ MAX_BATCH_SIZE: 10,
6
+ MAX_BATCH_PAYLOAD_BYTES: SQS_256KB,
7
+ BILLING_CHUNK_BYTES: 65536,
8
+ SAFETY_MARGIN_PERCENT: 0.05,
9
+ };
10
+ export const SQS_SAFE_LIMITS = {
11
+ MAX_MESSAGE_SIZE_BYTES: Math.floor(SQS_LIMITS.MAX_MESSAGE_SIZE_BYTES * (1 - SQS_LIMITS.SAFETY_MARGIN_PERCENT)),
12
+ MAX_BATCH_PAYLOAD_BYTES: Math.floor(SQS_LIMITS.MAX_BATCH_PAYLOAD_BYTES * (1 - SQS_LIMITS.SAFETY_MARGIN_PERCENT)),
13
+ };
14
+ export function createSqsLimits(maxMessageSizeBytes) {
15
+ const safeMultiplier = 1 - SQS_LIMITS.SAFETY_MARGIN_PERCENT;
16
+ return {
17
+ maxMessageSizeBytes,
18
+ maxBatchPayloadBytes: maxMessageSizeBytes,
19
+ safeMaxMessageSizeBytes: Math.floor(maxMessageSizeBytes * safeMultiplier),
20
+ safeMaxBatchPayloadBytes: Math.floor(maxMessageSizeBytes * safeMultiplier),
21
+ };
22
+ }
23
23
  //# sourceMappingURL=sqs.js.map
@@ -1,2 +1,2 @@
1
- import { UserAccountRecord } from '@adtrackify/at-tracking-event-types';
2
- export declare const excludeInternalUsers: (users: UserAccountRecord[]) => UserAccountRecord[];
1
+ import { UserAccountRecord } from '@adtrackify/at-tracking-event-types';
2
+ export declare const excludeInternalUsers: (users: UserAccountRecord[]) => UserAccountRecord[];
@@ -1,19 +1,19 @@
1
- import { Logger } from './logging-helper';
2
- const EXCLUDED_USERS = [
3
- 'upstackified.com',
4
- 'caspahcosmetics.com',
5
- 'upstackdata.com',
6
- 'eacapgroup.com',
7
- 'michael.v.alt@gmail.com',
8
- 'lemiguel.narciso14@gmail.com',
9
- ];
10
- export const excludeInternalUsers = (users) => {
11
- try {
12
- return users.filter((user) => !EXCLUDED_USERS.some((excludedPattern) => user?.email?.toLowerCase().includes(excludedPattern.toLowerCase())));
13
- }
14
- catch (error) {
15
- Logger.error('Failed to filter internal users', { error });
16
- return users;
17
- }
18
- };
1
+ import { Logger } from './logging-helper';
2
+ const EXCLUDED_USERS = [
3
+ 'upstackified.com',
4
+ 'caspahcosmetics.com',
5
+ 'upstackdata.com',
6
+ 'eacapgroup.com',
7
+ 'michael.v.alt@gmail.com',
8
+ 'lemiguel.narciso14@gmail.com',
9
+ ];
10
+ export const excludeInternalUsers = (users) => {
11
+ try {
12
+ return users.filter((user) => !EXCLUDED_USERS.some((excludedPattern) => user?.email?.toLowerCase().includes(excludedPattern.toLowerCase())));
13
+ }
14
+ catch (error) {
15
+ Logger.error('Failed to filter internal users', { error });
16
+ return users;
17
+ }
18
+ };
19
19
  //# sourceMappingURL=account-users-helper.js.map
@@ -1,4 +1,4 @@
1
- import { ThirdPartyContact } from '@adtrackify/at-tracking-event-types';
2
- import { AcuityContact } from '../types/acuity-types.js';
3
- export declare const splitMultipleEmailAcuityContacts: (contacts: AcuityContact[]) => AcuityContact[];
4
- export declare const buildThirdPartyAcuityContact: (pixelId: string, identityId: string, sessionId: string, contact: AcuityContact) => ThirdPartyContact | null;
1
+ import { ThirdPartyContact } from '@adtrackify/at-tracking-event-types';
2
+ import { AcuityContact } from '../types/acuity-types.js';
3
+ export declare const splitMultipleEmailAcuityContacts: (contacts: AcuityContact[]) => AcuityContact[];
4
+ export declare const buildThirdPartyAcuityContact: (pixelId: string, identityId: string, sessionId: string, contact: AcuityContact) => ThirdPartyContact | null;
@@ -1,52 +1,52 @@
1
- import { CONTACT_ACQUISITION_SOURCE, CONTACT_SOURCE_ID, } from '@adtrackify/at-tracking-event-types';
2
- import { ulid } from 'ulid';
3
- import { getCurrentTimestamp } from '../libs/dates.js';
4
- import { Logger } from './logging-helper.js';
5
- export const splitMultipleEmailAcuityContacts = (contacts) => {
6
- const splitContacts = [];
7
- for (const contact of contacts) {
8
- const emailsArray = contact?.emails ?? [];
9
- if (emailsArray?.length === 0 && contact?.email) {
10
- splitContacts.push(contact);
11
- continue;
12
- }
13
- for (const emailObj of emailsArray) {
14
- splitContacts.push({
15
- ...contact,
16
- email: emailObj?.email,
17
- emails: undefined,
18
- });
19
- }
20
- }
21
- return splitContacts;
22
- };
23
- export const buildThirdPartyAcuityContact = (pixelId, identityId, sessionId, contact) => {
24
- try {
25
- const now = getCurrentTimestamp();
26
- return {
27
- id: ulid(),
28
- source: CONTACT_ACQUISITION_SOURCE.AUDIENCE_ACUITY,
29
- sourceId: CONTACT_SOURCE_ID.AUDIENCE_ACUITY,
30
- firstName: contact?.firstName,
31
- lastName: contact?.lastName,
32
- address1: contact?.address,
33
- city: contact?.city,
34
- state: contact?.state,
35
- postalCode: contact?.zip,
36
- mobilePhone1: contact?.phones?.[0]?.phone ? String(contact.phones[0].phone) : undefined,
37
- emailAddress: contact?.email,
38
- pixelId,
39
- identityId,
40
- sessionId,
41
- emailVerification: contact?.emailVerification,
42
- emailStatus: contact?.emailVerification?.state,
43
- createdAt: now,
44
- updatedAt: now,
45
- };
46
- }
47
- catch (error) {
48
- Logger.error('Failed to build third party Acuity contact', { error, pixelId, identityId });
49
- return null;
50
- }
51
- };
1
+ import { CONTACT_ACQUISITION_SOURCE, CONTACT_SOURCE_ID, } from '@adtrackify/at-tracking-event-types';
2
+ import { ulid } from 'ulid';
3
+ import { getCurrentTimestamp } from '../libs/dates.js';
4
+ import { Logger } from './logging-helper.js';
5
+ export const splitMultipleEmailAcuityContacts = (contacts) => {
6
+ const splitContacts = [];
7
+ for (const contact of contacts) {
8
+ const emailsArray = contact?.emails ?? [];
9
+ if (emailsArray?.length === 0 && contact?.email) {
10
+ splitContacts.push(contact);
11
+ continue;
12
+ }
13
+ for (const emailObj of emailsArray) {
14
+ splitContacts.push({
15
+ ...contact,
16
+ email: emailObj?.email,
17
+ emails: undefined,
18
+ });
19
+ }
20
+ }
21
+ return splitContacts;
22
+ };
23
+ export const buildThirdPartyAcuityContact = (pixelId, identityId, sessionId, contact) => {
24
+ try {
25
+ const now = getCurrentTimestamp();
26
+ return {
27
+ id: ulid(),
28
+ source: CONTACT_ACQUISITION_SOURCE.AUDIENCE_ACUITY,
29
+ sourceId: CONTACT_SOURCE_ID.AUDIENCE_ACUITY,
30
+ firstName: contact?.firstName,
31
+ lastName: contact?.lastName,
32
+ address1: contact?.address,
33
+ city: contact?.city,
34
+ state: contact?.state,
35
+ postalCode: contact?.zip,
36
+ mobilePhone1: contact?.phones?.[0]?.phone ? String(contact.phones[0].phone) : undefined,
37
+ emailAddress: contact?.email,
38
+ pixelId,
39
+ identityId,
40
+ sessionId,
41
+ emailVerification: contact?.emailVerification,
42
+ emailStatus: contact?.emailVerification?.state,
43
+ createdAt: now,
44
+ updatedAt: now,
45
+ };
46
+ }
47
+ catch (error) {
48
+ Logger.error('Failed to build third party Acuity contact', { error, pixelId, identityId });
49
+ return null;
50
+ }
51
+ };
52
52
  //# sourceMappingURL=acuity-helper.js.map
@@ -1,9 +1,9 @@
1
- import { API_KEY_SCOPE } from '@adtrackify/at-tracking-event-types';
2
- export interface ApiKeyAuthContext {
3
- pixelId: string;
4
- accountId: string;
5
- scopes: string[];
6
- apiKeyPk: string;
7
- }
8
- export declare const extractApiKeyAuth: (event: import("aws-lambda").APIGatewayProxyEvent) => ApiKeyAuthContext;
9
- export declare const requireScope: (scopes: string[], required: API_KEY_SCOPE) => void;
1
+ import { API_KEY_SCOPE } from '@adtrackify/at-tracking-event-types';
2
+ export interface ApiKeyAuthContext {
3
+ pixelId: string;
4
+ accountId: string;
5
+ scopes: string[];
6
+ apiKeyPk: string;
7
+ }
8
+ export declare const extractApiKeyAuth: (event: import("aws-lambda").APIGatewayProxyEvent) => ApiKeyAuthContext;
9
+ export declare const requireScope: (scopes: string[], required: API_KEY_SCOPE) => void;
@@ -1,36 +1,36 @@
1
- import { LEGACY_API_KEY_SCOPE_EXPANSION } from '@adtrackify/at-tracking-event-types';
2
- import { Logger } from './logging-helper.js';
3
- import { HttpError } from '../libs/http-error.js';
4
- const expandLegacyScopes = (rawScopes) => {
5
- const expanded = new Set();
6
- for (const scope of rawScopes) {
7
- const replacement = LEGACY_API_KEY_SCOPE_EXPANSION[scope];
8
- if (replacement) {
9
- for (const modern of replacement)
10
- expanded.add(modern);
11
- }
12
- else {
13
- expanded.add(scope);
14
- }
15
- }
16
- return [...expanded];
17
- };
18
- export const extractApiKeyAuth = (event) => {
19
- const authorizer = event.requestContext.authorizer;
20
- const pixelId = authorizer?.pixelId;
21
- const accountId = authorizer?.accountId;
22
- const apiKeyPk = authorizer?.apiKeyPk;
23
- const rawScopes = (authorizer?.scopes || '').split(',').filter(Boolean);
24
- const scopes = expandLegacyScopes(rawScopes);
25
- if (!pixelId) {
26
- throw HttpError.unauthorized();
27
- }
28
- return { pixelId, accountId, scopes, apiKeyPk };
29
- };
30
- export const requireScope = (scopes, required) => {
31
- if (!scopes.includes(required)) {
32
- Logger.info('requireScope: missing required scope', { scopes, required });
33
- throw HttpError.forbidden(`API key does not have the ${required} scope`);
34
- }
35
- };
1
+ import { LEGACY_API_KEY_SCOPE_EXPANSION } from '@adtrackify/at-tracking-event-types';
2
+ import { Logger } from './logging-helper.js';
3
+ import { HttpError } from '../libs/http-error.js';
4
+ const expandLegacyScopes = (rawScopes) => {
5
+ const expanded = new Set();
6
+ for (const scope of rawScopes) {
7
+ const replacement = LEGACY_API_KEY_SCOPE_EXPANSION[scope];
8
+ if (replacement) {
9
+ for (const modern of replacement)
10
+ expanded.add(modern);
11
+ }
12
+ else {
13
+ expanded.add(scope);
14
+ }
15
+ }
16
+ return [...expanded];
17
+ };
18
+ export const extractApiKeyAuth = (event) => {
19
+ const authorizer = event.requestContext.authorizer;
20
+ const pixelId = authorizer?.pixelId;
21
+ const accountId = authorizer?.accountId;
22
+ const apiKeyPk = authorizer?.apiKeyPk;
23
+ const rawScopes = (authorizer?.scopes || '').split(',').filter(Boolean);
24
+ const scopes = expandLegacyScopes(rawScopes);
25
+ if (!pixelId) {
26
+ throw HttpError.unauthorized();
27
+ }
28
+ return { pixelId, accountId, scopes, apiKeyPk };
29
+ };
30
+ export const requireScope = (scopes, required) => {
31
+ if (!scopes.includes(required)) {
32
+ Logger.info('requireScope: missing required scope', { scopes, required });
33
+ throw HttpError.forbidden(`API key does not have the ${required} scope`);
34
+ }
35
+ };
36
36
  //# sourceMappingURL=api-key-auth-helper.js.map