@adtrackify/at-service-common 3.19.7 → 3.19.9

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 (717) hide show
  1. package/dist/cjs/__tests__/clients/sqs-client.spec.d.ts +1 -1
  2. package/dist/cjs/__tests__/clients/sqs-client.spec.js +119 -191
  3. package/dist/cjs/__tests__/clients/sqs-client.spec.js.map +1 -1
  4. package/dist/cjs/__tests__/helpers/account-users-helper.spec.d.ts +1 -1
  5. package/dist/cjs/__tests__/helpers/account-users-helper.spec.js +220 -220
  6. package/dist/cjs/__tests__/identity-cache/identity-cache-db-service.spec.d.ts +1 -1
  7. package/dist/cjs/__tests__/identity-cache/identity-cache-db-service.spec.js +674 -674
  8. package/dist/cjs/__tests__/identity-cache/trait-merging-and-staleness.spec.d.ts +1 -1
  9. package/dist/cjs/__tests__/identity-cache/trait-merging-and-staleness.spec.js +588 -588
  10. package/dist/cjs/__tests__/libs/compress-decompress.spec.d.ts +1 -1
  11. package/dist/cjs/__tests__/libs/compress-decompress.spec.js +16 -16
  12. package/dist/cjs/__tests__/libs/currency.spec.d.ts +1 -1
  13. package/dist/cjs/__tests__/libs/currency.spec.js +220 -220
  14. package/dist/cjs/__tests__/libs/dates.spec.d.ts +1 -1
  15. package/dist/cjs/__tests__/libs/dates.spec.js +130 -130
  16. package/dist/cjs/__tests__/libs/domain.spec.d.ts +1 -1
  17. package/dist/cjs/__tests__/libs/domain.spec.js +107 -107
  18. package/dist/cjs/__tests__/libs/numbers.spec.d.ts +1 -1
  19. package/dist/cjs/__tests__/libs/numbers.spec.js +261 -261
  20. package/dist/cjs/__tests__/s3-client/s3-client.spec.d.ts +1 -1
  21. package/dist/cjs/__tests__/s3-client/s3-client.spec.js +33 -33
  22. package/dist/cjs/__tests__/shopify/shopify-graphql-transformer.spec.d.ts +1 -1
  23. package/dist/cjs/__tests__/shopify/shopify-graphql-transformer.spec.js +35 -35
  24. package/dist/cjs/clients/generic/cognito-client.d.ts +23 -23
  25. package/dist/cjs/clients/generic/cognito-client.js +209 -209
  26. package/dist/cjs/clients/generic/dynamodb-client.d.ts +19 -18
  27. package/dist/cjs/clients/generic/dynamodb-client.js +210 -172
  28. package/dist/cjs/clients/generic/dynamodb-client.js.map +1 -1
  29. package/dist/cjs/clients/generic/eventbridge-client.d.ts +14 -14
  30. package/dist/cjs/clients/generic/eventbridge-client.js +51 -51
  31. package/dist/cjs/clients/generic/http-client.d.ts +14 -14
  32. package/dist/cjs/clients/generic/http-client.js +61 -61
  33. package/dist/cjs/clients/generic/index.d.ts +10 -13
  34. package/dist/cjs/clients/generic/index.js +26 -29
  35. package/dist/cjs/clients/generic/index.js.map +1 -1
  36. package/dist/cjs/clients/generic/lambda-invoke-client.d.ts +10 -10
  37. package/dist/cjs/clients/generic/lambda-invoke-client.js +39 -39
  38. package/dist/cjs/clients/generic/location-client.d.ts +8 -8
  39. package/dist/cjs/clients/generic/location-client.js +31 -31
  40. package/dist/cjs/clients/generic/redis-client.d.ts +33 -33
  41. package/dist/cjs/clients/generic/redis-client.js +191 -191
  42. package/dist/cjs/clients/generic/s3-client.d.ts +23 -23
  43. package/dist/cjs/clients/generic/s3-client.js +216 -216
  44. package/dist/cjs/clients/generic/singlestore-db-client.d.ts +14 -14
  45. package/dist/cjs/clients/generic/singlestore-db-client.js +67 -67
  46. package/dist/cjs/clients/generic/sqs-client.d.ts +33 -53
  47. package/dist/cjs/clients/generic/sqs-client.js +111 -285
  48. package/dist/cjs/clients/generic/sqs-client.js.map +1 -1
  49. package/dist/cjs/clients/index.d.ts +3 -3
  50. package/dist/cjs/clients/index.js +19 -19
  51. package/dist/cjs/clients/internal-api/accounts-client.d.ts +91 -91
  52. package/dist/cjs/clients/internal-api/accounts-client.js +129 -129
  53. package/dist/cjs/clients/internal-api/cache-lambda-client.d.ts +26 -26
  54. package/dist/cjs/clients/internal-api/cache-lambda-client.js +89 -89
  55. package/dist/cjs/clients/internal-api/db-management-client.d.ts +18 -18
  56. package/dist/cjs/clients/internal-api/db-management-client.js +36 -36
  57. package/dist/cjs/clients/internal-api/destinations-client.d.ts +34 -34
  58. package/dist/cjs/clients/internal-api/destinations-client.js +79 -79
  59. package/dist/cjs/clients/internal-api/event-collector-client.d.ts +20 -20
  60. package/dist/cjs/clients/internal-api/event-collector-client.js +36 -36
  61. package/dist/cjs/clients/internal-api/identity-client.d.ts +31 -31
  62. package/dist/cjs/clients/internal-api/identity-client.js +91 -91
  63. package/dist/cjs/clients/internal-api/index.d.ts +9 -9
  64. package/dist/cjs/clients/internal-api/index.js +25 -25
  65. package/dist/cjs/clients/internal-api/shopify-app-install-client.d.ts +37 -37
  66. package/dist/cjs/clients/internal-api/shopify-app-install-client.js +81 -81
  67. package/dist/cjs/clients/internal-api/shopify-app-install-client.js.map +1 -1
  68. package/dist/cjs/clients/internal-api/subscriptions-client.d.ts +26 -26
  69. package/dist/cjs/clients/internal-api/subscriptions-client.js +77 -77
  70. package/dist/cjs/clients/internal-api/users-auth-client.d.ts +35 -35
  71. package/dist/cjs/clients/internal-api/users-auth-client.js +110 -110
  72. package/dist/cjs/clients/third-party/emailable-client.d.ts +7 -7
  73. package/dist/cjs/clients/third-party/emailable-client.js +25 -25
  74. package/dist/cjs/clients/third-party/exchange-rate-api-client.d.ts +17 -17
  75. package/dist/cjs/clients/third-party/exchange-rate-api-client.js +19 -19
  76. package/dist/cjs/clients/third-party/index.d.ts +4 -5
  77. package/dist/cjs/clients/third-party/index.js +20 -21
  78. package/dist/cjs/clients/third-party/index.js.map +1 -1
  79. package/dist/cjs/clients/third-party/loops-client.d.ts +10 -10
  80. package/dist/cjs/clients/third-party/loops-client.js +30 -30
  81. package/dist/cjs/clients/third-party/shopify/graphql-order-queries.d.ts +25 -25
  82. package/dist/cjs/clients/third-party/shopify/graphql-order-queries.js +4 -4
  83. package/dist/cjs/clients/third-party/shopify/graphql-product-queries.d.ts +2 -2
  84. package/dist/cjs/clients/third-party/shopify/graphql-product-queries.js +5 -5
  85. package/dist/cjs/clients/third-party/shopify/shopify-graphql-client.d.ts +10 -10
  86. package/dist/cjs/clients/third-party/shopify/shopify-graphql-client.js +161 -161
  87. package/dist/cjs/clients/third-party/shopify-client.d.ts +29 -29
  88. package/dist/cjs/clients/third-party/shopify-client.js +146 -146
  89. package/dist/cjs/clients/third-party/shopify-client.js.map +1 -1
  90. package/dist/cjs/helpers/account-users-helper.d.ts +2 -2
  91. package/dist/cjs/helpers/account-users-helper.js +22 -22
  92. package/dist/cjs/helpers/identity-cache-helper.d.ts +21 -21
  93. package/dist/cjs/helpers/identity-cache-helper.js +156 -156
  94. package/dist/cjs/helpers/index.d.ts +7 -10
  95. package/dist/cjs/helpers/index.js +23 -26
  96. package/dist/cjs/helpers/index.js.map +1 -1
  97. package/dist/cjs/helpers/input-validation-helper.d.ts +3 -3
  98. package/dist/cjs/helpers/input-validation-helper.js +22 -22
  99. package/dist/cjs/helpers/logging-helper.d.ts +16 -16
  100. package/dist/cjs/helpers/logging-helper.js +84 -84
  101. package/dist/cjs/helpers/response-helper.d.ts +18 -18
  102. package/dist/cjs/helpers/response-helper.js +43 -43
  103. package/dist/cjs/helpers/shopify-helper.d.ts +9 -9
  104. package/dist/cjs/helpers/shopify-helper.js +26 -26
  105. package/dist/cjs/helpers/sqs-utils.d.ts +6 -6
  106. package/dist/cjs/helpers/sqs-utils.js +14 -14
  107. package/dist/cjs/index.d.ts +5 -7
  108. package/dist/cjs/index.js +21 -23
  109. package/dist/cjs/index.js.map +1 -1
  110. package/dist/cjs/libs/click-id-parser.d.ts +23 -23
  111. package/dist/cjs/libs/click-id-parser.js +49 -49
  112. package/dist/cjs/libs/compression.d.ts +2 -2
  113. package/dist/cjs/libs/compression.js +33 -33
  114. package/dist/cjs/libs/cookie.d.ts +17 -17
  115. package/dist/cjs/libs/cookie.js +76 -76
  116. package/dist/cjs/libs/crypto.d.ts +4 -4
  117. package/dist/cjs/libs/crypto.js +25 -25
  118. package/dist/cjs/libs/csv.d.ts +2 -2
  119. package/dist/cjs/libs/csv.js +35 -35
  120. package/dist/cjs/libs/currency.d.ts +1 -1
  121. package/dist/cjs/libs/currency.js +29 -29
  122. package/dist/cjs/libs/dates.d.ts +12 -12
  123. package/dist/cjs/libs/dates.js +96 -96
  124. package/dist/cjs/libs/domain.d.ts +2 -2
  125. package/dist/cjs/libs/domain.js +38 -38
  126. package/dist/cjs/libs/emails.d.ts +6 -8
  127. package/dist/cjs/libs/emails.js +122 -154
  128. package/dist/cjs/libs/emails.js.map +1 -1
  129. package/dist/cjs/libs/http-error.d.ts +21 -21
  130. package/dist/cjs/libs/http-error.js +63 -63
  131. package/dist/cjs/libs/http-status-codes.d.ts +58 -58
  132. package/dist/cjs/libs/http-status-codes.js +62 -62
  133. package/dist/cjs/libs/index.d.ts +17 -19
  134. package/dist/cjs/libs/index.js +33 -35
  135. package/dist/cjs/libs/index.js.map +1 -1
  136. package/dist/cjs/libs/numbers.d.ts +1 -1
  137. package/dist/cjs/libs/numbers.js +15 -15
  138. package/dist/cjs/libs/referrer-parser/index.d.ts +2 -2
  139. package/dist/cjs/libs/referrer-parser/index.js +18 -18
  140. package/dist/cjs/libs/referrer-parser/referrer-data.d.ts +9 -9
  141. package/dist/cjs/libs/referrer-parser/referrer-data.js +3307 -3307
  142. package/dist/cjs/libs/referrer-parser/referrer-parser-util.d.ts +20 -20
  143. package/dist/cjs/libs/referrer-parser/referrer-parser-util.js +131 -131
  144. package/dist/cjs/libs/strings.d.ts +3 -3
  145. package/dist/cjs/libs/strings.js +46 -46
  146. package/dist/cjs/libs/traits.d.ts +6 -6
  147. package/dist/cjs/libs/traits.js +65 -65
  148. package/dist/cjs/libs/url.d.ts +1 -1
  149. package/dist/cjs/libs/url.js +13 -13
  150. package/dist/cjs/services/cache/generic-cached-object.d.ts +5 -5
  151. package/dist/cjs/services/cache/generic-cached-object.js +2 -2
  152. package/dist/cjs/services/cache/index.d.ts +1 -1
  153. package/dist/cjs/services/cache/index.js +17 -17
  154. package/dist/cjs/services/cache/product-cache-service.d.ts +21 -21
  155. package/dist/cjs/services/cache/product-cache-service.js +76 -76
  156. package/dist/cjs/services/currency-exchange-rate-lookup-service.d.ts +11 -11
  157. package/dist/cjs/services/currency-exchange-rate-lookup-service.js +66 -66
  158. package/dist/cjs/services/db/currency-exchange-rates-db-service.d.ts +21 -21
  159. package/dist/cjs/services/db/currency-exchange-rates-db-service.js +39 -39
  160. package/dist/cjs/services/db/destinations-db-service.d.ts +12 -12
  161. package/dist/cjs/services/db/destinations-db-service.js +76 -76
  162. package/dist/cjs/services/db/identity-cache-db-service.d.ts +28 -28
  163. package/dist/cjs/services/db/identity-cache-db-service.js +320 -320
  164. package/dist/cjs/services/db/identity-cache-dynamodb-service.d.ts +50 -0
  165. package/dist/cjs/services/db/identity-cache-dynamodb-service.js +426 -0
  166. package/dist/cjs/services/db/identity-cache-dynamodb-service.js.map +1 -0
  167. package/dist/cjs/services/db/index.d.ts +11 -14
  168. package/dist/cjs/services/db/index.js +27 -30
  169. package/dist/cjs/services/db/index.js.map +1 -1
  170. package/dist/cjs/services/db/log-events-db-service.d.ts +11 -11
  171. package/dist/cjs/services/db/log-events-db-service.js +181 -181
  172. package/dist/cjs/services/db/pixels-db-service.d.ts +8 -8
  173. package/dist/cjs/services/db/pixels-db-service.js +35 -35
  174. package/dist/cjs/services/db/pixels-db-service.js.map +1 -1
  175. package/dist/cjs/services/db/purchasable-contacts-db-service.d.ts +9 -9
  176. package/dist/cjs/services/db/purchasable-contacts-db-service.js +43 -43
  177. package/dist/cjs/services/db/purchased-contacts-db-service.d.ts +17 -17
  178. package/dist/cjs/services/db/purchased-contacts-db-service.js +143 -143
  179. package/dist/cjs/services/db/shopify-app-installs-db-service.d.ts +7 -8
  180. package/dist/cjs/services/db/shopify-app-installs-db-service.js +47 -51
  181. package/dist/cjs/services/db/shopify-app-installs-db-service.js.map +1 -1
  182. package/dist/cjs/services/db/shopify-products-cache-db-service.d.ts +16 -16
  183. package/dist/cjs/services/db/shopify-products-cache-db-service.js +73 -73
  184. package/dist/cjs/services/db/tracking-events-db-service.d.ts +20 -20
  185. package/dist/cjs/services/db/tracking-events-db-service.js +165 -165
  186. package/dist/cjs/services/eventbridge-integration-service.d.ts +9 -9
  187. package/dist/cjs/services/eventbridge-integration-service.js +28 -28
  188. package/dist/cjs/services/events/index.d.ts +3 -3
  189. package/dist/cjs/services/events/index.js +19 -19
  190. package/dist/cjs/services/events/log-event-service.d.ts +9 -19
  191. package/dist/cjs/services/events/log-event-service.js +56 -77
  192. package/dist/cjs/services/events/log-event-service.js.map +1 -1
  193. package/dist/cjs/services/events/metric-event-service.d.ts +9 -9
  194. package/dist/cjs/services/events/metric-event-service.js +49 -49
  195. package/dist/cjs/services/events/tracking-event-sqs-service.d.ts +8 -8
  196. package/dist/cjs/services/events/tracking-event-sqs-service.js +34 -34
  197. package/dist/cjs/services/generic-cache-service.d.ts +7 -7
  198. package/dist/cjs/services/generic-cache-service.js +33 -33
  199. package/dist/cjs/services/index.d.ts +8 -10
  200. package/dist/cjs/services/index.js +24 -26
  201. package/dist/cjs/services/index.js.map +1 -1
  202. package/dist/cjs/services/ipdata-lookup-service.d.ts +20 -20
  203. package/dist/cjs/services/ipdata-lookup-service.js +112 -112
  204. package/dist/cjs/services/shopify/index.d.ts +2 -2
  205. package/dist/cjs/services/shopify/index.js +18 -18
  206. package/dist/cjs/services/shopify/products/index.d.ts +1 -1
  207. package/dist/cjs/services/shopify/products/index.js +17 -17
  208. package/dist/cjs/services/shopify/products/shopify-products-serviceV2.d.ts +17 -17
  209. package/dist/cjs/services/shopify/products/shopify-products-serviceV2.js +112 -112
  210. package/dist/cjs/services/shopify/shopify-graphql-transformer.d.ts +8 -8
  211. package/dist/cjs/services/shopify/shopify-graphql-transformer.js +141 -141
  212. package/dist/cjs/types/api-response.d.ts +6 -6
  213. package/dist/cjs/types/api-response.js +2 -2
  214. package/dist/cjs/types/index.d.ts +1 -4
  215. package/dist/cjs/types/index.js +17 -33
  216. package/dist/cjs/types/index.js.map +1 -1
  217. package/dist/cjs/types/internal-events/event-detail-types.d.ts +20 -20
  218. package/dist/cjs/types/internal-events/event-detail-types.js +27 -27
  219. package/dist/cjs/types/internal-events/index.d.ts +1 -1
  220. package/dist/cjs/types/internal-events/index.js +17 -17
  221. package/dist/cjs/types/shopify-graphql-types/admin.generated.d.ts +123 -123
  222. package/dist/cjs/types/shopify-graphql-types/admin.generated.js +2 -2
  223. package/dist/cjs/types/shopify-graphql-types/admin.types.d.ts +26289 -26289
  224. package/dist/cjs/types/shopify-graphql-types/admin.types.js +5311 -5311
  225. package/dist/cjs/types/shopify-graphql-types/index.d.ts +2 -2
  226. package/dist/cjs/types/shopify-graphql-types/index.js +18 -18
  227. package/dist/esm/__tests__/clients/sqs-client.spec.d.ts +1 -1
  228. package/dist/esm/__tests__/clients/sqs-client.spec.js +117 -189
  229. package/dist/esm/__tests__/clients/sqs-client.spec.js.map +1 -1
  230. package/dist/esm/__tests__/helpers/account-users-helper.spec.d.ts +1 -1
  231. package/dist/esm/__tests__/helpers/account-users-helper.spec.js +218 -218
  232. package/dist/esm/__tests__/identity-cache/identity-cache-db-service.spec.d.ts +1 -1
  233. package/dist/esm/__tests__/identity-cache/identity-cache-db-service.spec.js +672 -672
  234. package/dist/esm/__tests__/identity-cache/trait-merging-and-staleness.spec.d.ts +1 -1
  235. package/dist/esm/__tests__/identity-cache/trait-merging-and-staleness.spec.js +586 -586
  236. package/dist/esm/__tests__/libs/compress-decompress.spec.d.ts +1 -1
  237. package/dist/esm/__tests__/libs/compress-decompress.spec.js +14 -14
  238. package/dist/esm/__tests__/libs/currency.spec.d.ts +1 -1
  239. package/dist/esm/__tests__/libs/currency.spec.js +218 -218
  240. package/dist/esm/__tests__/libs/dates.spec.d.ts +1 -1
  241. package/dist/esm/__tests__/libs/dates.spec.js +128 -128
  242. package/dist/esm/__tests__/libs/domain.spec.d.ts +1 -1
  243. package/dist/esm/__tests__/libs/domain.spec.js +105 -105
  244. package/dist/esm/__tests__/libs/numbers.spec.d.ts +1 -1
  245. package/dist/esm/__tests__/libs/numbers.spec.js +259 -259
  246. package/dist/esm/__tests__/s3-client/s3-client.spec.d.ts +1 -1
  247. package/dist/esm/__tests__/s3-client/s3-client.spec.js +31 -31
  248. package/dist/esm/__tests__/shopify/shopify-graphql-transformer.spec.d.ts +1 -1
  249. package/dist/esm/__tests__/shopify/shopify-graphql-transformer.spec.js +33 -33
  250. package/dist/esm/clients/generic/cognito-client.d.ts +23 -23
  251. package/dist/esm/clients/generic/cognito-client.js +204 -204
  252. package/dist/esm/clients/generic/dynamodb-client.d.ts +19 -18
  253. package/dist/esm/clients/generic/dynamodb-client.js +206 -168
  254. package/dist/esm/clients/generic/dynamodb-client.js.map +1 -1
  255. package/dist/esm/clients/generic/eventbridge-client.d.ts +14 -14
  256. package/dist/esm/clients/generic/eventbridge-client.js +47 -47
  257. package/dist/esm/clients/generic/http-client.d.ts +14 -14
  258. package/dist/esm/clients/generic/http-client.js +53 -53
  259. package/dist/esm/clients/generic/index.d.ts +10 -13
  260. package/dist/esm/clients/generic/index.js +10 -13
  261. package/dist/esm/clients/generic/index.js.map +1 -1
  262. package/dist/esm/clients/generic/lambda-invoke-client.d.ts +10 -10
  263. package/dist/esm/clients/generic/lambda-invoke-client.js +35 -35
  264. package/dist/esm/clients/generic/location-client.d.ts +8 -8
  265. package/dist/esm/clients/generic/location-client.js +27 -27
  266. package/dist/esm/clients/generic/redis-client.d.ts +33 -33
  267. package/dist/esm/clients/generic/redis-client.js +184 -184
  268. package/dist/esm/clients/generic/s3-client.d.ts +23 -23
  269. package/dist/esm/clients/generic/s3-client.js +209 -209
  270. package/dist/esm/clients/generic/singlestore-db-client.d.ts +14 -14
  271. package/dist/esm/clients/generic/singlestore-db-client.js +40 -40
  272. package/dist/esm/clients/generic/sqs-client.d.ts +33 -53
  273. package/dist/esm/clients/generic/sqs-client.js +107 -281
  274. package/dist/esm/clients/generic/sqs-client.js.map +1 -1
  275. package/dist/esm/clients/index.d.ts +3 -3
  276. package/dist/esm/clients/index.js +3 -3
  277. package/dist/esm/clients/internal-api/accounts-client.d.ts +91 -91
  278. package/dist/esm/clients/internal-api/accounts-client.js +125 -125
  279. package/dist/esm/clients/internal-api/cache-lambda-client.d.ts +26 -26
  280. package/dist/esm/clients/internal-api/cache-lambda-client.js +85 -85
  281. package/dist/esm/clients/internal-api/db-management-client.d.ts +18 -18
  282. package/dist/esm/clients/internal-api/db-management-client.js +32 -32
  283. package/dist/esm/clients/internal-api/destinations-client.d.ts +34 -34
  284. package/dist/esm/clients/internal-api/destinations-client.js +75 -75
  285. package/dist/esm/clients/internal-api/event-collector-client.d.ts +20 -20
  286. package/dist/esm/clients/internal-api/event-collector-client.js +32 -32
  287. package/dist/esm/clients/internal-api/identity-client.d.ts +31 -31
  288. package/dist/esm/clients/internal-api/identity-client.js +87 -87
  289. package/dist/esm/clients/internal-api/index.d.ts +9 -9
  290. package/dist/esm/clients/internal-api/index.js +9 -9
  291. package/dist/esm/clients/internal-api/shopify-app-install-client.d.ts +37 -37
  292. package/dist/esm/clients/internal-api/shopify-app-install-client.js +77 -77
  293. package/dist/esm/clients/internal-api/shopify-app-install-client.js.map +1 -1
  294. package/dist/esm/clients/internal-api/subscriptions-client.d.ts +26 -26
  295. package/dist/esm/clients/internal-api/subscriptions-client.js +73 -73
  296. package/dist/esm/clients/internal-api/users-auth-client.d.ts +35 -35
  297. package/dist/esm/clients/internal-api/users-auth-client.js +106 -106
  298. package/dist/esm/clients/third-party/emailable-client.d.ts +7 -7
  299. package/dist/esm/clients/third-party/emailable-client.js +21 -21
  300. package/dist/esm/clients/third-party/exchange-rate-api-client.d.ts +17 -17
  301. package/dist/esm/clients/third-party/exchange-rate-api-client.js +15 -15
  302. package/dist/esm/clients/third-party/index.d.ts +4 -5
  303. package/dist/esm/clients/third-party/index.js +4 -5
  304. package/dist/esm/clients/third-party/index.js.map +1 -1
  305. package/dist/esm/clients/third-party/loops-client.d.ts +10 -10
  306. package/dist/esm/clients/third-party/loops-client.js +26 -26
  307. package/dist/esm/clients/third-party/shopify/graphql-order-queries.d.ts +25 -25
  308. package/dist/esm/clients/third-party/shopify/graphql-order-queries.js +1 -1
  309. package/dist/esm/clients/third-party/shopify/graphql-product-queries.d.ts +2 -2
  310. package/dist/esm/clients/third-party/shopify/graphql-product-queries.js +2 -2
  311. package/dist/esm/clients/third-party/shopify/shopify-graphql-client.d.ts +10 -10
  312. package/dist/esm/clients/third-party/shopify/shopify-graphql-client.js +157 -157
  313. package/dist/esm/clients/third-party/shopify-client.d.ts +29 -29
  314. package/dist/esm/clients/third-party/shopify-client.js +142 -142
  315. package/dist/esm/clients/third-party/shopify-client.js.map +1 -1
  316. package/dist/esm/helpers/account-users-helper.d.ts +2 -2
  317. package/dist/esm/helpers/account-users-helper.js +18 -18
  318. package/dist/esm/helpers/identity-cache-helper.d.ts +21 -21
  319. package/dist/esm/helpers/identity-cache-helper.js +151 -151
  320. package/dist/esm/helpers/index.d.ts +7 -10
  321. package/dist/esm/helpers/index.js +7 -10
  322. package/dist/esm/helpers/index.js.map +1 -1
  323. package/dist/esm/helpers/input-validation-helper.d.ts +3 -3
  324. package/dist/esm/helpers/input-validation-helper.js +18 -18
  325. package/dist/esm/helpers/logging-helper.d.ts +16 -16
  326. package/dist/esm/helpers/logging-helper.js +56 -56
  327. package/dist/esm/helpers/response-helper.d.ts +18 -18
  328. package/dist/esm/helpers/response-helper.js +37 -37
  329. package/dist/esm/helpers/shopify-helper.d.ts +9 -9
  330. package/dist/esm/helpers/shopify-helper.js +21 -21
  331. package/dist/esm/helpers/sqs-utils.d.ts +6 -6
  332. package/dist/esm/helpers/sqs-utils.js +9 -9
  333. package/dist/esm/index.d.ts +5 -7
  334. package/dist/esm/index.js +5 -7
  335. package/dist/esm/index.js.map +1 -1
  336. package/dist/esm/libs/click-id-parser.d.ts +23 -23
  337. package/dist/esm/libs/click-id-parser.js +45 -45
  338. package/dist/esm/libs/compression.d.ts +2 -2
  339. package/dist/esm/libs/compression.js +25 -25
  340. package/dist/esm/libs/cookie.d.ts +17 -17
  341. package/dist/esm/libs/cookie.js +70 -70
  342. package/dist/esm/libs/crypto.d.ts +4 -4
  343. package/dist/esm/libs/crypto.js +15 -15
  344. package/dist/esm/libs/csv.d.ts +2 -2
  345. package/dist/esm/libs/csv.js +30 -30
  346. package/dist/esm/libs/currency.d.ts +1 -1
  347. package/dist/esm/libs/currency.js +22 -22
  348. package/dist/esm/libs/dates.d.ts +12 -12
  349. package/dist/esm/libs/dates.js +83 -83
  350. package/dist/esm/libs/domain.d.ts +2 -2
  351. package/dist/esm/libs/domain.js +33 -33
  352. package/dist/esm/libs/emails.d.ts +6 -8
  353. package/dist/esm/libs/emails.js +115 -146
  354. package/dist/esm/libs/emails.js.map +1 -1
  355. package/dist/esm/libs/http-error.d.ts +21 -21
  356. package/dist/esm/libs/http-error.js +59 -59
  357. package/dist/esm/libs/http-status-codes.d.ts +58 -58
  358. package/dist/esm/libs/http-status-codes.js +59 -59
  359. package/dist/esm/libs/index.d.ts +17 -19
  360. package/dist/esm/libs/index.js +17 -19
  361. package/dist/esm/libs/index.js.map +1 -1
  362. package/dist/esm/libs/numbers.d.ts +1 -1
  363. package/dist/esm/libs/numbers.js +11 -11
  364. package/dist/esm/libs/referrer-parser/index.d.ts +2 -2
  365. package/dist/esm/libs/referrer-parser/index.js +2 -2
  366. package/dist/esm/libs/referrer-parser/referrer-data.d.ts +9 -9
  367. package/dist/esm/libs/referrer-parser/referrer-data.js +3304 -3304
  368. package/dist/esm/libs/referrer-parser/referrer-parser-util.d.ts +20 -20
  369. package/dist/esm/libs/referrer-parser/referrer-parser-util.js +124 -124
  370. package/dist/esm/libs/strings.d.ts +3 -3
  371. package/dist/esm/libs/strings.js +40 -40
  372. package/dist/esm/libs/traits.d.ts +6 -6
  373. package/dist/esm/libs/traits.js +54 -54
  374. package/dist/esm/libs/url.d.ts +1 -1
  375. package/dist/esm/libs/url.js +9 -9
  376. package/dist/esm/services/cache/generic-cached-object.d.ts +5 -5
  377. package/dist/esm/services/cache/generic-cached-object.js +1 -1
  378. package/dist/esm/services/cache/index.d.ts +1 -1
  379. package/dist/esm/services/cache/index.js +1 -1
  380. package/dist/esm/services/cache/product-cache-service.d.ts +21 -21
  381. package/dist/esm/services/cache/product-cache-service.js +68 -68
  382. package/dist/esm/services/currency-exchange-rate-lookup-service.d.ts +11 -11
  383. package/dist/esm/services/currency-exchange-rate-lookup-service.js +62 -62
  384. package/dist/esm/services/db/currency-exchange-rates-db-service.d.ts +21 -21
  385. package/dist/esm/services/db/currency-exchange-rates-db-service.js +35 -35
  386. package/dist/esm/services/db/destinations-db-service.d.ts +12 -12
  387. package/dist/esm/services/db/destinations-db-service.js +72 -72
  388. package/dist/esm/services/db/identity-cache-db-service.d.ts +28 -28
  389. package/dist/esm/services/db/identity-cache-db-service.js +313 -313
  390. package/dist/esm/services/db/identity-cache-dynamodb-service.d.ts +50 -0
  391. package/dist/esm/services/db/identity-cache-dynamodb-service.js +419 -0
  392. package/dist/esm/services/db/identity-cache-dynamodb-service.js.map +1 -0
  393. package/dist/esm/services/db/index.d.ts +11 -14
  394. package/dist/esm/services/db/index.js +11 -14
  395. package/dist/esm/services/db/index.js.map +1 -1
  396. package/dist/esm/services/db/log-events-db-service.d.ts +11 -11
  397. package/dist/esm/services/db/log-events-db-service.js +177 -177
  398. package/dist/esm/services/db/pixels-db-service.d.ts +8 -8
  399. package/dist/esm/services/db/pixels-db-service.js +31 -31
  400. package/dist/esm/services/db/pixels-db-service.js.map +1 -1
  401. package/dist/esm/services/db/purchasable-contacts-db-service.d.ts +9 -9
  402. package/dist/esm/services/db/purchasable-contacts-db-service.js +39 -39
  403. package/dist/esm/services/db/purchased-contacts-db-service.d.ts +17 -17
  404. package/dist/esm/services/db/purchased-contacts-db-service.js +139 -139
  405. package/dist/esm/services/db/shopify-app-installs-db-service.d.ts +7 -8
  406. package/dist/esm/services/db/shopify-app-installs-db-service.js +43 -47
  407. package/dist/esm/services/db/shopify-app-installs-db-service.js.map +1 -1
  408. package/dist/esm/services/db/shopify-products-cache-db-service.d.ts +16 -16
  409. package/dist/esm/services/db/shopify-products-cache-db-service.js +66 -66
  410. package/dist/esm/services/db/tracking-events-db-service.d.ts +20 -20
  411. package/dist/esm/services/db/tracking-events-db-service.js +161 -161
  412. package/dist/esm/services/eventbridge-integration-service.d.ts +9 -9
  413. package/dist/esm/services/eventbridge-integration-service.js +24 -24
  414. package/dist/esm/services/events/index.d.ts +3 -3
  415. package/dist/esm/services/events/index.js +3 -3
  416. package/dist/esm/services/events/log-event-service.d.ts +9 -19
  417. package/dist/esm/services/events/log-event-service.js +52 -73
  418. package/dist/esm/services/events/log-event-service.js.map +1 -1
  419. package/dist/esm/services/events/metric-event-service.d.ts +9 -9
  420. package/dist/esm/services/events/metric-event-service.js +45 -45
  421. package/dist/esm/services/events/tracking-event-sqs-service.d.ts +8 -8
  422. package/dist/esm/services/events/tracking-event-sqs-service.js +30 -30
  423. package/dist/esm/services/generic-cache-service.d.ts +7 -7
  424. package/dist/esm/services/generic-cache-service.js +29 -29
  425. package/dist/esm/services/index.d.ts +8 -10
  426. package/dist/esm/services/index.js +8 -10
  427. package/dist/esm/services/index.js.map +1 -1
  428. package/dist/esm/services/ipdata-lookup-service.d.ts +20 -20
  429. package/dist/esm/services/ipdata-lookup-service.js +108 -108
  430. package/dist/esm/services/shopify/index.d.ts +2 -2
  431. package/dist/esm/services/shopify/index.js +2 -2
  432. package/dist/esm/services/shopify/products/index.d.ts +1 -1
  433. package/dist/esm/services/shopify/products/index.js +1 -1
  434. package/dist/esm/services/shopify/products/shopify-products-serviceV2.d.ts +17 -17
  435. package/dist/esm/services/shopify/products/shopify-products-serviceV2.js +108 -108
  436. package/dist/esm/services/shopify/shopify-graphql-transformer.d.ts +8 -8
  437. package/dist/esm/services/shopify/shopify-graphql-transformer.js +138 -138
  438. package/dist/esm/types/api-response.d.ts +6 -6
  439. package/dist/esm/types/api-response.js +1 -1
  440. package/dist/esm/types/index.d.ts +1 -4
  441. package/dist/esm/types/index.js +1 -4
  442. package/dist/esm/types/index.js.map +1 -1
  443. package/dist/esm/types/internal-events/event-detail-types.d.ts +20 -20
  444. package/dist/esm/types/internal-events/event-detail-types.js +24 -24
  445. package/dist/esm/types/internal-events/index.d.ts +1 -1
  446. package/dist/esm/types/internal-events/index.js +1 -1
  447. package/dist/esm/types/shopify-graphql-types/admin.generated.d.ts +123 -123
  448. package/dist/esm/types/shopify-graphql-types/admin.generated.js +1 -1
  449. package/dist/esm/types/shopify-graphql-types/admin.types.d.ts +26289 -26289
  450. package/dist/esm/types/shopify-graphql-types/admin.types.js +5299 -5299
  451. package/dist/esm/types/shopify-graphql-types/index.d.ts +2 -2
  452. package/dist/esm/types/shopify-graphql-types/index.js +2 -2
  453. package/package.json +136 -134
  454. package/dist/cjs/__tests__/clients/acuity-client.spec.d.ts +0 -1
  455. package/dist/cjs/__tests__/clients/acuity-client.spec.js +0 -34
  456. package/dist/cjs/__tests__/clients/acuity-client.spec.js.map +0 -1
  457. package/dist/cjs/__tests__/clients/cross-platform-compression.spec.d.ts +0 -1
  458. package/dist/cjs/__tests__/clients/cross-platform-compression.spec.js +0 -355
  459. package/dist/cjs/__tests__/clients/cross-platform-compression.spec.js.map +0 -1
  460. package/dist/cjs/__tests__/clients/sqs-bundled-client.spec.d.ts +0 -1
  461. package/dist/cjs/__tests__/clients/sqs-bundled-client.spec.js +0 -932
  462. package/dist/cjs/__tests__/clients/sqs-bundled-client.spec.js.map +0 -1
  463. package/dist/cjs/__tests__/clients/sqs-bundling-contracts.spec.d.ts +0 -1
  464. package/dist/cjs/__tests__/clients/sqs-bundling-contracts.spec.js +0 -576
  465. package/dist/cjs/__tests__/clients/sqs-bundling-contracts.spec.js.map +0 -1
  466. package/dist/cjs/__tests__/clients/sqs-unbundle.spec.d.ts +0 -1
  467. package/dist/cjs/__tests__/clients/sqs-unbundle.spec.js +0 -1358
  468. package/dist/cjs/__tests__/clients/sqs-unbundle.spec.js.map +0 -1
  469. package/dist/cjs/__tests__/db/shared-read-db-services.spec.d.ts +0 -1
  470. package/dist/cjs/__tests__/db/shared-read-db-services.spec.js +0 -90
  471. package/dist/cjs/__tests__/db/shared-read-db-services.spec.js.map +0 -1
  472. package/dist/cjs/__tests__/helpers/acuity-helper.spec.d.ts +0 -1
  473. package/dist/cjs/__tests__/helpers/acuity-helper.spec.js +0 -70
  474. package/dist/cjs/__tests__/helpers/acuity-helper.spec.js.map +0 -1
  475. package/dist/cjs/__tests__/helpers/api-key-auth-helper.spec.d.ts +0 -1
  476. package/dist/cjs/__tests__/helpers/api-key-auth-helper.spec.js +0 -83
  477. package/dist/cjs/__tests__/helpers/api-key-auth-helper.spec.js.map +0 -1
  478. package/dist/cjs/__tests__/integration/sqs-bundling-roundtrip.spec.d.ts +0 -1
  479. package/dist/cjs/__tests__/integration/sqs-bundling-roundtrip.spec.js +0 -585
  480. package/dist/cjs/__tests__/integration/sqs-bundling-roundtrip.spec.js.map +0 -1
  481. package/dist/cjs/__tests__/libs/contacts.spec.d.ts +0 -1
  482. package/dist/cjs/__tests__/libs/contacts.spec.js +0 -295
  483. package/dist/cjs/__tests__/libs/contacts.spec.js.map +0 -1
  484. package/dist/cjs/__tests__/services/acuity-api-service.spec.d.ts +0 -1
  485. package/dist/cjs/__tests__/services/acuity-api-service.spec.js +0 -52
  486. package/dist/cjs/__tests__/services/acuity-api-service.spec.js.map +0 -1
  487. package/dist/cjs/__tests__/services/email-verification/contact-email-verification-service.spec.d.ts +0 -1
  488. package/dist/cjs/__tests__/services/email-verification/contact-email-verification-service.spec.js +0 -94
  489. package/dist/cjs/__tests__/services/email-verification/contact-email-verification-service.spec.js.map +0 -1
  490. package/dist/cjs/__tests__/services/email-verification/email-verification-service.spec.d.ts +0 -1
  491. package/dist/cjs/__tests__/services/email-verification/email-verification-service.spec.js +0 -58
  492. package/dist/cjs/__tests__/services/email-verification/email-verification-service.spec.js.map +0 -1
  493. package/dist/cjs/__tests__/unit/libs/api-router/public-api-router.spec.d.ts +0 -1
  494. package/dist/cjs/__tests__/unit/libs/api-router/public-api-router.spec.js +0 -182
  495. package/dist/cjs/__tests__/unit/libs/api-router/public-api-router.spec.js.map +0 -1
  496. package/dist/cjs/__tests__/unit/libs/api-router/route-matcher.spec.d.ts +0 -1
  497. package/dist/cjs/__tests__/unit/libs/api-router/route-matcher.spec.js +0 -70
  498. package/dist/cjs/__tests__/unit/libs/api-router/route-matcher.spec.js.map +0 -1
  499. package/dist/cjs/__tests__/utils/custom-measure-formula-utils.spec.d.ts +0 -1
  500. package/dist/cjs/__tests__/utils/custom-measure-formula-utils.spec.js +0 -140
  501. package/dist/cjs/__tests__/utils/custom-measure-formula-utils.spec.js.map +0 -1
  502. package/dist/cjs/clients/generic/sqs-bundled-client.d.ts +0 -15
  503. package/dist/cjs/clients/generic/sqs-bundled-client.js +0 -312
  504. package/dist/cjs/clients/generic/sqs-bundled-client.js.map +0 -1
  505. package/dist/cjs/clients/generic/sqs-bundled-client.types.d.ts +0 -53
  506. package/dist/cjs/clients/generic/sqs-bundled-client.types.js +0 -18
  507. package/dist/cjs/clients/generic/sqs-bundled-client.types.js.map +0 -1
  508. package/dist/cjs/clients/generic/sqs-unbundle.d.ts +0 -32
  509. package/dist/cjs/clients/generic/sqs-unbundle.js +0 -145
  510. package/dist/cjs/clients/generic/sqs-unbundle.js.map +0 -1
  511. package/dist/cjs/clients/third-party/acuity-client.d.ts +0 -9
  512. package/dist/cjs/clients/third-party/acuity-client.js +0 -35
  513. package/dist/cjs/clients/third-party/acuity-client.js.map +0 -1
  514. package/dist/cjs/constants/index.d.ts +0 -1
  515. package/dist/cjs/constants/index.js +0 -18
  516. package/dist/cjs/constants/index.js.map +0 -1
  517. package/dist/cjs/constants/sqs.d.ts +0 -20
  518. package/dist/cjs/constants/sqs.js +0 -27
  519. package/dist/cjs/constants/sqs.js.map +0 -1
  520. package/dist/cjs/helpers/acuity-helper.d.ts +0 -4
  521. package/dist/cjs/helpers/acuity-helper.js +0 -57
  522. package/dist/cjs/helpers/acuity-helper.js.map +0 -1
  523. package/dist/cjs/helpers/api-key-auth-helper.d.ts +0 -9
  524. package/dist/cjs/helpers/api-key-auth-helper.js +0 -41
  525. package/dist/cjs/helpers/api-key-auth-helper.js.map +0 -1
  526. package/dist/cjs/helpers/api-key-authorizer-helper.d.ts +0 -36
  527. package/dist/cjs/helpers/api-key-authorizer-helper.js +0 -88
  528. package/dist/cjs/helpers/api-key-authorizer-helper.js.map +0 -1
  529. package/dist/cjs/libs/api-router/index.d.ts +0 -2
  530. package/dist/cjs/libs/api-router/index.js +0 -19
  531. package/dist/cjs/libs/api-router/index.js.map +0 -1
  532. package/dist/cjs/libs/api-router/public-api-router.d.ts +0 -3
  533. package/dist/cjs/libs/api-router/public-api-router.js +0 -37
  534. package/dist/cjs/libs/api-router/public-api-router.js.map +0 -1
  535. package/dist/cjs/libs/api-router/route-matcher.d.ts +0 -21
  536. package/dist/cjs/libs/api-router/route-matcher.js +0 -37
  537. package/dist/cjs/libs/api-router/route-matcher.js.map +0 -1
  538. package/dist/cjs/libs/contacts.d.ts +0 -7
  539. package/dist/cjs/libs/contacts.js +0 -153
  540. package/dist/cjs/libs/contacts.js.map +0 -1
  541. package/dist/cjs/services/acuity-api-service.d.ts +0 -8
  542. package/dist/cjs/services/acuity-api-service.js +0 -55
  543. package/dist/cjs/services/acuity-api-service.js.map +0 -1
  544. package/dist/cjs/services/db/accounts-db-service.d.ts +0 -9
  545. package/dist/cjs/services/db/accounts-db-service.js +0 -34
  546. package/dist/cjs/services/db/accounts-db-service.js.map +0 -1
  547. package/dist/cjs/services/db/api-keys-db-service.d.ts +0 -10
  548. package/dist/cjs/services/db/api-keys-db-service.js +0 -37
  549. package/dist/cjs/services/db/api-keys-db-service.js.map +0 -1
  550. package/dist/cjs/services/db/custom-measures-db-service.d.ts +0 -14
  551. package/dist/cjs/services/db/custom-measures-db-service.js +0 -49
  552. package/dist/cjs/services/db/custom-measures-db-service.js.map +0 -1
  553. package/dist/cjs/services/db/subscriptions-db-service.d.ts +0 -10
  554. package/dist/cjs/services/db/subscriptions-db-service.js +0 -35
  555. package/dist/cjs/services/db/subscriptions-db-service.js.map +0 -1
  556. package/dist/cjs/services/email-verification/contact-email-verification-service.d.ts +0 -7
  557. package/dist/cjs/services/email-verification/contact-email-verification-service.js +0 -102
  558. package/dist/cjs/services/email-verification/contact-email-verification-service.js.map +0 -1
  559. package/dist/cjs/services/email-verification/email-verification-service.d.ts +0 -19
  560. package/dist/cjs/services/email-verification/email-verification-service.js +0 -132
  561. package/dist/cjs/services/email-verification/email-verification-service.js.map +0 -1
  562. package/dist/cjs/services/email-verification/index.d.ts +0 -2
  563. package/dist/cjs/services/email-verification/index.js +0 -19
  564. package/dist/cjs/services/email-verification/index.js.map +0 -1
  565. package/dist/cjs/types/acuity-types.d.ts +0 -74
  566. package/dist/cjs/types/acuity-types.js +0 -3
  567. package/dist/cjs/types/acuity-types.js.map +0 -1
  568. package/dist/cjs/types/shopify-rest-types.d.ts +0 -767
  569. package/dist/cjs/types/shopify-rest-types.js +0 -3
  570. package/dist/cjs/types/shopify-rest-types.js.map +0 -1
  571. package/dist/cjs/utils/compression.d.ts +0 -36
  572. package/dist/cjs/utils/compression.js +0 -199
  573. package/dist/cjs/utils/compression.js.map +0 -1
  574. package/dist/cjs/utils/custom-measure-formula-utils.d.ts +0 -6
  575. package/dist/cjs/utils/custom-measure-formula-utils.js +0 -210
  576. package/dist/cjs/utils/custom-measure-formula-utils.js.map +0 -1
  577. package/dist/cjs/utils/index.d.ts +0 -4
  578. package/dist/cjs/utils/index.js +0 -21
  579. package/dist/cjs/utils/index.js.map +0 -1
  580. package/dist/cjs/utils/retry-envelope.d.ts +0 -12
  581. package/dist/cjs/utils/retry-envelope.js +0 -29
  582. package/dist/cjs/utils/retry-envelope.js.map +0 -1
  583. package/dist/cjs/utils/size.d.ts +0 -2
  584. package/dist/cjs/utils/size.js +0 -50
  585. package/dist/cjs/utils/size.js.map +0 -1
  586. package/dist/esm/__tests__/clients/acuity-client.spec.d.ts +0 -1
  587. package/dist/esm/__tests__/clients/acuity-client.spec.js +0 -32
  588. package/dist/esm/__tests__/clients/acuity-client.spec.js.map +0 -1
  589. package/dist/esm/__tests__/clients/cross-platform-compression.spec.d.ts +0 -1
  590. package/dist/esm/__tests__/clients/cross-platform-compression.spec.js +0 -330
  591. package/dist/esm/__tests__/clients/cross-platform-compression.spec.js.map +0 -1
  592. package/dist/esm/__tests__/clients/sqs-bundled-client.spec.d.ts +0 -1
  593. package/dist/esm/__tests__/clients/sqs-bundled-client.spec.js +0 -907
  594. package/dist/esm/__tests__/clients/sqs-bundled-client.spec.js.map +0 -1
  595. package/dist/esm/__tests__/clients/sqs-bundling-contracts.spec.d.ts +0 -1
  596. package/dist/esm/__tests__/clients/sqs-bundling-contracts.spec.js +0 -551
  597. package/dist/esm/__tests__/clients/sqs-bundling-contracts.spec.js.map +0 -1
  598. package/dist/esm/__tests__/clients/sqs-unbundle.spec.d.ts +0 -1
  599. package/dist/esm/__tests__/clients/sqs-unbundle.spec.js +0 -1356
  600. package/dist/esm/__tests__/clients/sqs-unbundle.spec.js.map +0 -1
  601. package/dist/esm/__tests__/db/shared-read-db-services.spec.d.ts +0 -1
  602. package/dist/esm/__tests__/db/shared-read-db-services.spec.js +0 -88
  603. package/dist/esm/__tests__/db/shared-read-db-services.spec.js.map +0 -1
  604. package/dist/esm/__tests__/helpers/acuity-helper.spec.d.ts +0 -1
  605. package/dist/esm/__tests__/helpers/acuity-helper.spec.js +0 -68
  606. package/dist/esm/__tests__/helpers/acuity-helper.spec.js.map +0 -1
  607. package/dist/esm/__tests__/helpers/api-key-auth-helper.spec.d.ts +0 -1
  608. package/dist/esm/__tests__/helpers/api-key-auth-helper.spec.js +0 -81
  609. package/dist/esm/__tests__/helpers/api-key-auth-helper.spec.js.map +0 -1
  610. package/dist/esm/__tests__/integration/sqs-bundling-roundtrip.spec.d.ts +0 -1
  611. package/dist/esm/__tests__/integration/sqs-bundling-roundtrip.spec.js +0 -583
  612. package/dist/esm/__tests__/integration/sqs-bundling-roundtrip.spec.js.map +0 -1
  613. package/dist/esm/__tests__/libs/contacts.spec.d.ts +0 -1
  614. package/dist/esm/__tests__/libs/contacts.spec.js +0 -293
  615. package/dist/esm/__tests__/libs/contacts.spec.js.map +0 -1
  616. package/dist/esm/__tests__/services/acuity-api-service.spec.d.ts +0 -1
  617. package/dist/esm/__tests__/services/acuity-api-service.spec.js +0 -50
  618. package/dist/esm/__tests__/services/acuity-api-service.spec.js.map +0 -1
  619. package/dist/esm/__tests__/services/email-verification/contact-email-verification-service.spec.d.ts +0 -1
  620. package/dist/esm/__tests__/services/email-verification/contact-email-verification-service.spec.js +0 -92
  621. package/dist/esm/__tests__/services/email-verification/contact-email-verification-service.spec.js.map +0 -1
  622. package/dist/esm/__tests__/services/email-verification/email-verification-service.spec.d.ts +0 -1
  623. package/dist/esm/__tests__/services/email-verification/email-verification-service.spec.js +0 -56
  624. package/dist/esm/__tests__/services/email-verification/email-verification-service.spec.js.map +0 -1
  625. package/dist/esm/__tests__/unit/libs/api-router/public-api-router.spec.d.ts +0 -1
  626. package/dist/esm/__tests__/unit/libs/api-router/public-api-router.spec.js +0 -157
  627. package/dist/esm/__tests__/unit/libs/api-router/public-api-router.spec.js.map +0 -1
  628. package/dist/esm/__tests__/unit/libs/api-router/route-matcher.spec.d.ts +0 -1
  629. package/dist/esm/__tests__/unit/libs/api-router/route-matcher.spec.js +0 -68
  630. package/dist/esm/__tests__/unit/libs/api-router/route-matcher.spec.js.map +0 -1
  631. package/dist/esm/__tests__/utils/custom-measure-formula-utils.spec.d.ts +0 -1
  632. package/dist/esm/__tests__/utils/custom-measure-formula-utils.spec.js +0 -138
  633. package/dist/esm/__tests__/utils/custom-measure-formula-utils.spec.js.map +0 -1
  634. package/dist/esm/clients/generic/sqs-bundled-client.d.ts +0 -15
  635. package/dist/esm/clients/generic/sqs-bundled-client.js +0 -308
  636. package/dist/esm/clients/generic/sqs-bundled-client.js.map +0 -1
  637. package/dist/esm/clients/generic/sqs-bundled-client.types.d.ts +0 -53
  638. package/dist/esm/clients/generic/sqs-bundled-client.types.js +0 -15
  639. package/dist/esm/clients/generic/sqs-bundled-client.types.js.map +0 -1
  640. package/dist/esm/clients/generic/sqs-unbundle.d.ts +0 -32
  641. package/dist/esm/clients/generic/sqs-unbundle.js +0 -138
  642. package/dist/esm/clients/generic/sqs-unbundle.js.map +0 -1
  643. package/dist/esm/clients/third-party/acuity-client.d.ts +0 -9
  644. package/dist/esm/clients/third-party/acuity-client.js +0 -31
  645. package/dist/esm/clients/third-party/acuity-client.js.map +0 -1
  646. package/dist/esm/constants/index.d.ts +0 -1
  647. package/dist/esm/constants/index.js +0 -2
  648. package/dist/esm/constants/index.js.map +0 -1
  649. package/dist/esm/constants/sqs.d.ts +0 -20
  650. package/dist/esm/constants/sqs.js +0 -23
  651. package/dist/esm/constants/sqs.js.map +0 -1
  652. package/dist/esm/helpers/acuity-helper.d.ts +0 -4
  653. package/dist/esm/helpers/acuity-helper.js +0 -52
  654. package/dist/esm/helpers/acuity-helper.js.map +0 -1
  655. package/dist/esm/helpers/api-key-auth-helper.d.ts +0 -9
  656. package/dist/esm/helpers/api-key-auth-helper.js +0 -36
  657. package/dist/esm/helpers/api-key-auth-helper.js.map +0 -1
  658. package/dist/esm/helpers/api-key-authorizer-helper.d.ts +0 -36
  659. package/dist/esm/helpers/api-key-authorizer-helper.js +0 -84
  660. package/dist/esm/helpers/api-key-authorizer-helper.js.map +0 -1
  661. package/dist/esm/libs/api-router/index.d.ts +0 -2
  662. package/dist/esm/libs/api-router/index.js +0 -3
  663. package/dist/esm/libs/api-router/index.js.map +0 -1
  664. package/dist/esm/libs/api-router/public-api-router.d.ts +0 -3
  665. package/dist/esm/libs/api-router/public-api-router.js +0 -33
  666. package/dist/esm/libs/api-router/public-api-router.js.map +0 -1
  667. package/dist/esm/libs/api-router/route-matcher.d.ts +0 -21
  668. package/dist/esm/libs/api-router/route-matcher.js +0 -31
  669. package/dist/esm/libs/api-router/route-matcher.js.map +0 -1
  670. package/dist/esm/libs/contacts.d.ts +0 -7
  671. package/dist/esm/libs/contacts.js +0 -144
  672. package/dist/esm/libs/contacts.js.map +0 -1
  673. package/dist/esm/services/acuity-api-service.d.ts +0 -8
  674. package/dist/esm/services/acuity-api-service.js +0 -51
  675. package/dist/esm/services/acuity-api-service.js.map +0 -1
  676. package/dist/esm/services/db/accounts-db-service.d.ts +0 -9
  677. package/dist/esm/services/db/accounts-db-service.js +0 -30
  678. package/dist/esm/services/db/accounts-db-service.js.map +0 -1
  679. package/dist/esm/services/db/api-keys-db-service.d.ts +0 -10
  680. package/dist/esm/services/db/api-keys-db-service.js +0 -33
  681. package/dist/esm/services/db/api-keys-db-service.js.map +0 -1
  682. package/dist/esm/services/db/custom-measures-db-service.d.ts +0 -14
  683. package/dist/esm/services/db/custom-measures-db-service.js +0 -45
  684. package/dist/esm/services/db/custom-measures-db-service.js.map +0 -1
  685. package/dist/esm/services/db/subscriptions-db-service.d.ts +0 -10
  686. package/dist/esm/services/db/subscriptions-db-service.js +0 -31
  687. package/dist/esm/services/db/subscriptions-db-service.js.map +0 -1
  688. package/dist/esm/services/email-verification/contact-email-verification-service.d.ts +0 -7
  689. package/dist/esm/services/email-verification/contact-email-verification-service.js +0 -98
  690. package/dist/esm/services/email-verification/contact-email-verification-service.js.map +0 -1
  691. package/dist/esm/services/email-verification/email-verification-service.d.ts +0 -19
  692. package/dist/esm/services/email-verification/email-verification-service.js +0 -128
  693. package/dist/esm/services/email-verification/email-verification-service.js.map +0 -1
  694. package/dist/esm/services/email-verification/index.d.ts +0 -2
  695. package/dist/esm/services/email-verification/index.js +0 -3
  696. package/dist/esm/services/email-verification/index.js.map +0 -1
  697. package/dist/esm/types/acuity-types.d.ts +0 -74
  698. package/dist/esm/types/acuity-types.js +0 -2
  699. package/dist/esm/types/acuity-types.js.map +0 -1
  700. package/dist/esm/types/shopify-rest-types.d.ts +0 -767
  701. package/dist/esm/types/shopify-rest-types.js +0 -2
  702. package/dist/esm/types/shopify-rest-types.js.map +0 -1
  703. package/dist/esm/utils/compression.d.ts +0 -36
  704. package/dist/esm/utils/compression.js +0 -188
  705. package/dist/esm/utils/compression.js.map +0 -1
  706. package/dist/esm/utils/custom-measure-formula-utils.d.ts +0 -6
  707. package/dist/esm/utils/custom-measure-formula-utils.js +0 -202
  708. package/dist/esm/utils/custom-measure-formula-utils.js.map +0 -1
  709. package/dist/esm/utils/index.d.ts +0 -4
  710. package/dist/esm/utils/index.js +0 -5
  711. package/dist/esm/utils/index.js.map +0 -1
  712. package/dist/esm/utils/retry-envelope.d.ts +0 -12
  713. package/dist/esm/utils/retry-envelope.js +0 -23
  714. package/dist/esm/utils/retry-envelope.js.map +0 -1
  715. package/dist/esm/utils/size.d.ts +0 -2
  716. package/dist/esm/utils/size.js +0 -45
  717. package/dist/esm/utils/size.js.map +0 -1
@@ -1,109 +1,109 @@
1
- import { Logger } from '../../../helpers/index.js';
2
- import { ProductCacheService } from '../../cache/product-cache-service.js';
3
- import { ShopifyGraphQLTransformer } from '../shopify-graphql-transformer.js';
4
- import { ShopifyGraphQLClient } from '../../../clients/third-party/shopify/shopify-graphql-client.js';
5
- import { ShopifyProductsCacheDbService } from '../../db/shopify-products-cache-db-service.js';
6
- export class ShopifyProductsServiceV2 {
7
- productCacheService;
8
- shopifyProductsCacheDbService;
9
- TABLE_NAME;
10
- TABLE_KEY;
11
- redisCacheTtlInSeconds;
12
- dynamoDbCacheTtlInSeconds;
13
- constructor(cacheLambdaFunctionArn, tableName, tableKey, redisCacheTtlInSeconds, dynamoDbCacheTtlInSeconds) {
14
- this.TABLE_NAME = tableName;
15
- this.TABLE_KEY = tableKey;
16
- this.redisCacheTtlInSeconds = redisCacheTtlInSeconds;
17
- this.dynamoDbCacheTtlInSeconds = dynamoDbCacheTtlInSeconds;
18
- this.productCacheService = new ProductCacheService(cacheLambdaFunctionArn, this.redisCacheTtlInSeconds);
19
- this.shopifyProductsCacheDbService = new ShopifyProductsCacheDbService(this.TABLE_NAME, this.TABLE_KEY, this.dynamoDbCacheTtlInSeconds);
20
- }
21
- getShopifyProduct = async (pixelId, shop, accessToken, productId, useCache = true, updateCache = true) => {
22
- try {
23
- let getShopifyProductResponse = {};
24
- if (useCache) {
25
- let product = await this.productCacheService.getProductFromCache(pixelId, productId);
26
- if (product) {
27
- Logger.debug('getShopifyProduct: Product found in cache', { pixelId, shop, productId, product });
28
- getShopifyProductResponse.transformedProduct = product;
29
- return getShopifyProductResponse;
30
- }
31
- product = await this.shopifyProductsCacheDbService.getProductFromDynamoDBCache(pixelId, productId);
32
- if (product) {
33
- Logger.debug('getShopifyProduct: Product found in dynamoDB cache', { pixelId, shop, productId, product });
34
- getShopifyProductResponse.transformedProduct = product;
35
- return getShopifyProductResponse;
36
- }
37
- }
38
- getShopifyProductResponse = await this.getShopifyProductFromAPI(pixelId, shop, accessToken, productId, true);
39
- if (getShopifyProductResponse?.transformedProduct && updateCache) {
40
- const product = getShopifyProductResponse.transformedProduct;
41
- Logger.debug('getShopifyProduct: Product found in ShopifyAPI, putting in cache', {
42
- pixelId,
43
- productId,
44
- product,
45
- });
46
- await this.productCacheService.putProductInCache(pixelId, productId, product);
47
- await this.shopifyProductsCacheDbService.putProductInDynamoDBCache(pixelId, productId, product);
48
- }
49
- Logger.debug('getShopifyProduct: Returning product', {
50
- pixelId,
51
- shop,
52
- productId,
53
- product: getShopifyProductResponse?.transformedProduct,
54
- });
55
- return getShopifyProductResponse;
56
- }
57
- catch (error) {
58
- Logger.error('getShopifyProduct: Failed getShopifyProductWithCachingGraphQL', { error });
59
- return null;
60
- }
61
- };
62
- getShopifyProductFromAPI = async (pixelId, shop, accessToken, productId, useTransformer = true) => {
63
- try {
64
- const response = await ShopifyGraphQLClient.getProductWithVariantsGraphQL(shop, accessToken, productId, 100);
65
- const getShopifyProductResponse = response;
66
- if (response?.data?.product) {
67
- const product = response.data.product;
68
- Logger.debug('getShopifyProductFromAPI: Product found in ShopifyAPI', { pixelId, shop, productId, product });
69
- if (useTransformer) {
70
- const transformedProduct = ShopifyGraphQLTransformer.transformToInternalProduct(product);
71
- getShopifyProductResponse.transformedProduct = transformedProduct;
72
- Logger.debug('getShopifyProductFromAPI: Product transformed', {
73
- pixelId,
74
- shop,
75
- productId,
76
- transformedProduct: getShopifyProductResponse.transformedProduct,
77
- errors: response?.errors,
78
- error: response?.errors?.message,
79
- });
80
- }
81
- return getShopifyProductResponse;
82
- }
83
- else {
84
- Logger.warn('getShopifyProductFromAPI: Product ShopifyAPI error', {
85
- pixelId,
86
- shop,
87
- productId,
88
- responseData: response?.data,
89
- errors: response?.errors,
90
- errorMessage: response?.errors?.message,
91
- });
92
- return getShopifyProductResponse;
93
- }
94
- }
95
- catch (error) {
96
- Logger.error('getShopifyProductFromAPI: Failed getShopifyProductFromAPI', {
97
- e: error,
98
- pixelId,
99
- shop,
100
- accessToken,
101
- productId,
102
- useTransformer,
103
- error: error,
104
- });
105
- return null;
106
- }
107
- };
108
- }
1
+ import { Logger } from '../../../helpers/index.js';
2
+ import { ProductCacheService } from '../../cache/product-cache-service.js';
3
+ import { ShopifyGraphQLTransformer } from '../shopify-graphql-transformer.js';
4
+ import { ShopifyGraphQLClient } from '../../../clients/third-party/shopify/shopify-graphql-client.js';
5
+ import { ShopifyProductsCacheDbService } from '../../db/shopify-products-cache-db-service.js';
6
+ export class ShopifyProductsServiceV2 {
7
+ productCacheService;
8
+ shopifyProductsCacheDbService;
9
+ TABLE_NAME;
10
+ TABLE_KEY;
11
+ redisCacheTtlInSeconds;
12
+ dynamoDbCacheTtlInSeconds;
13
+ constructor(cacheLambdaFunctionArn, tableName, tableKey, redisCacheTtlInSeconds, dynamoDbCacheTtlInSeconds) {
14
+ this.TABLE_NAME = tableName;
15
+ this.TABLE_KEY = tableKey;
16
+ this.redisCacheTtlInSeconds = redisCacheTtlInSeconds;
17
+ this.dynamoDbCacheTtlInSeconds = dynamoDbCacheTtlInSeconds;
18
+ this.productCacheService = new ProductCacheService(cacheLambdaFunctionArn, this.redisCacheTtlInSeconds);
19
+ this.shopifyProductsCacheDbService = new ShopifyProductsCacheDbService(this.TABLE_NAME, this.TABLE_KEY, this.dynamoDbCacheTtlInSeconds);
20
+ }
21
+ getShopifyProduct = async (pixelId, shop, accessToken, productId, useCache = true, updateCache = true) => {
22
+ try {
23
+ let getShopifyProductResponse = {};
24
+ if (useCache) {
25
+ let product = await this.productCacheService.getProductFromCache(pixelId, productId);
26
+ if (product) {
27
+ Logger.debug('getShopifyProduct: Product found in cache', { pixelId, shop, productId, product });
28
+ getShopifyProductResponse.transformedProduct = product;
29
+ return getShopifyProductResponse;
30
+ }
31
+ product = await this.shopifyProductsCacheDbService.getProductFromDynamoDBCache(pixelId, productId);
32
+ if (product) {
33
+ Logger.debug('getShopifyProduct: Product found in dynamoDB cache', { pixelId, shop, productId, product });
34
+ getShopifyProductResponse.transformedProduct = product;
35
+ return getShopifyProductResponse;
36
+ }
37
+ }
38
+ getShopifyProductResponse = await this.getShopifyProductFromAPI(pixelId, shop, accessToken, productId, true);
39
+ if (getShopifyProductResponse?.transformedProduct && updateCache) {
40
+ const product = getShopifyProductResponse.transformedProduct;
41
+ Logger.debug('getShopifyProduct: Product found in ShopifyAPI, putting in cache', {
42
+ pixelId,
43
+ productId,
44
+ product,
45
+ });
46
+ await this.productCacheService.putProductInCache(pixelId, productId, product);
47
+ await this.shopifyProductsCacheDbService.putProductInDynamoDBCache(pixelId, productId, product);
48
+ }
49
+ Logger.debug('getShopifyProduct: Returning product', {
50
+ pixelId,
51
+ shop,
52
+ productId,
53
+ product: getShopifyProductResponse?.transformedProduct,
54
+ });
55
+ return getShopifyProductResponse;
56
+ }
57
+ catch (error) {
58
+ Logger.error('getShopifyProduct: Failed getShopifyProductWithCachingGraphQL', { error });
59
+ return null;
60
+ }
61
+ };
62
+ getShopifyProductFromAPI = async (pixelId, shop, accessToken, productId, useTransformer = true) => {
63
+ try {
64
+ const response = await ShopifyGraphQLClient.getProductWithVariantsGraphQL(shop, accessToken, productId, 100);
65
+ const getShopifyProductResponse = response;
66
+ if (response?.data?.product) {
67
+ const product = response.data.product;
68
+ Logger.debug('getShopifyProductFromAPI: Product found in ShopifyAPI', { pixelId, shop, productId, product });
69
+ if (useTransformer) {
70
+ const transformedProduct = ShopifyGraphQLTransformer.transformToInternalProduct(product);
71
+ getShopifyProductResponse.transformedProduct = transformedProduct;
72
+ Logger.debug('getShopifyProductFromAPI: Product transformed', {
73
+ pixelId,
74
+ shop,
75
+ productId,
76
+ transformedProduct: getShopifyProductResponse.transformedProduct,
77
+ errors: response?.errors,
78
+ error: response?.errors?.message,
79
+ });
80
+ }
81
+ return getShopifyProductResponse;
82
+ }
83
+ else {
84
+ Logger.warn('getShopifyProductFromAPI: Product ShopifyAPI error', {
85
+ pixelId,
86
+ shop,
87
+ productId,
88
+ responseData: response?.data,
89
+ errors: response?.errors,
90
+ errorMessage: response?.errors?.message,
91
+ });
92
+ return getShopifyProductResponse;
93
+ }
94
+ }
95
+ catch (error) {
96
+ Logger.error('getShopifyProductFromAPI: Failed getShopifyProductFromAPI', {
97
+ e: error,
98
+ pixelId,
99
+ shop,
100
+ accessToken,
101
+ productId,
102
+ useTransformer,
103
+ error: error,
104
+ });
105
+ return null;
106
+ }
107
+ };
108
+ }
109
109
  //# sourceMappingURL=shopify-products-serviceV2.js.map
@@ -1,8 +1,8 @@
1
- import { type InternalInventoryItem, type InternalProduct, type InternalProductVariant } from '@adtrackify/at-tracking-event-types';
2
- import { InventoryItem, Product, ProductVariant } from '../../types/shopify-graphql-types/admin.types.js';
3
- export declare const ShopifyGraphQLTransformer: {
4
- transformToInternalProduct: (product: Partial<Product>) => InternalProduct | undefined;
5
- transformToInternalProductVariant: (variant: Partial<ProductVariant>) => InternalProductVariant | undefined;
6
- transformToInternalInventoryItem: (inventoryItem: Partial<InventoryItem>) => InternalInventoryItem | undefined;
7
- buildUnitCost: (inventoryItem: Partial<InventoryItem>) => number | undefined;
8
- };
1
+ import { type InternalInventoryItem, type InternalProduct, type InternalProductVariant } from '@adtrackify/at-tracking-event-types';
2
+ import { InventoryItem, Product, ProductVariant } from '../../types/shopify-graphql-types/admin.types.js';
3
+ export declare const ShopifyGraphQLTransformer: {
4
+ transformToInternalProduct: (product: Partial<Product>) => InternalProduct | undefined;
5
+ transformToInternalProductVariant: (variant: Partial<ProductVariant>) => InternalProductVariant | undefined;
6
+ transformToInternalInventoryItem: (inventoryItem: Partial<InventoryItem>) => InternalInventoryItem | undefined;
7
+ buildUnitCost: (inventoryItem: Partial<InventoryItem>) => number | undefined;
8
+ };
@@ -1,139 +1,139 @@
1
- export const ShopifyGraphQLTransformer = {
2
- transformToInternalProduct: (product) => {
3
- if (!product)
4
- return undefined;
5
- const internalProduct = {
6
- id: product?.id,
7
- legacyResourceId: Number(product.legacyResourceId),
8
- title: product.title,
9
- description: product.description,
10
- handle: product?.handle,
11
- productType: product?.productType,
12
- vendor: product.vendor,
13
- status: product.status,
14
- createdAt: product.createdAt,
15
- updatedAt: product.updatedAt,
16
- publishedAt: product.publishedAt,
17
- hasOnlyDefaultVariant: product?.hasOnlyDefaultVariant ?? false,
18
- hasOutOfStockVariants: product?.hasOutOfStockVariants ?? false,
19
- hasVariantsThatRequiresComponents: product?.hasVariantsThatRequiresComponents ?? false,
20
- isGiftCard: product?.isGiftCard ?? false,
21
- onlineStoreUrl: product.onlineStoreUrl,
22
- onlineStorePreviewUrl: product.onlineStorePreviewUrl,
23
- tags: product.tags || [],
24
- totalInventory: product.totalInventory || 0,
25
- tracksInventory: product.tracksInventory || false,
26
- featuredImageUrl: product.featuredMedia?.preview?.image?.url,
27
- images: product.media?.nodes?.map((image) => image.preview?.image?.url) || [],
28
- variantsCount: product?.variantsCount?.count,
29
- maxVariantCompareAtPrice: Number(product.compareAtPriceRange?.maxVariantCompareAtPrice?.amount || 0),
30
- minVariantCompareAtPrice: Number(product.compareAtPriceRange?.minVariantCompareAtPrice?.amount || 0),
31
- maxVariantPrice: Number(product.priceRangeV2?.maxVariantPrice?.amount || 0),
32
- minVariantPrice: Number(product.priceRangeV2?.minVariantPrice?.amount || 0),
33
- currency: product.priceRangeV2?.minVariantPrice?.currencyCode || product.priceRangeV2?.maxVariantPrice?.currencyCode,
34
- media: product?.media?.nodes?.map((media) => ({
35
- id: media.id,
36
- mediaContentType: media.mediaContentType,
37
- status: media.status,
38
- previewImageUrl: media.preview?.image?.url,
39
- })) || [],
40
- variants: product?.variants?.nodes
41
- ?.map((variant) => ShopifyGraphQLTransformer.transformToInternalProductVariant(variant))
42
- .filter((variant) => variant !== undefined) || [],
43
- collections: product.collections?.nodes?.map((collection) => ({
44
- id: collection.id,
45
- legacyResourceId: Number(collection.legacyResourceId),
46
- title: collection.title,
47
- handle: collection.handle,
48
- imageUrl: collection.image?.url,
49
- productsCount: collection.productsCount,
50
- })) || [],
51
- category: product.category
52
- ? {
53
- id: product.category.id,
54
- name: product.category.name,
55
- fullName: product.category.fullName,
56
- ancestorIds: product.category.ancestorIds,
57
- childrenIds: product.category.childrenIds,
58
- }
59
- : undefined,
60
- seoTitle: product.seo?.title,
61
- seoDescription: product.seo?.description,
62
- };
63
- return internalProduct;
64
- },
65
- transformToInternalProductVariant: (variant) => {
66
- if (!variant)
67
- return undefined;
68
- const internalVariant = {
69
- availableForSale: variant.availableForSale || false,
70
- id: variant.id,
71
- legacyResourceId: variant?.legacyResourceId,
72
- title: variant.title,
73
- displayName: variant.displayName,
74
- sku: variant?.sku,
75
- barcode: variant?.barcode,
76
- price: variant.price,
77
- amount: Number(variant.price || 0),
78
- compareAtPrice: variant.compareAtPrice,
79
- createdAt: variant.createdAt,
80
- updatedAt: variant.updatedAt,
81
- position: variant.position || 0,
82
- inventoryItem: variant?.inventoryItem
83
- ? ShopifyGraphQLTransformer.transformToInternalInventoryItem(variant.inventoryItem)
84
- : undefined,
85
- inventoryPolicy: variant?.inventoryPolicy,
86
- inventoryQuantity: variant?.inventoryQuantity,
87
- sellableOnlineQuantity: variant.sellableOnlineQuantity || 0,
88
- taxable: variant.taxable || false,
89
- taxCode: variant?.taxCode,
90
- productId: variant.product?.id || '',
91
- legacyProductResourceId: Number(variant.product?.legacyResourceId || 0),
92
- featuredImageUrl: variant.image?.url,
93
- selectedOptions: variant.selectedOptions?.map((option) => ({
94
- name: option.name,
95
- value: option.value,
96
- })) || [],
97
- };
98
- return internalVariant;
99
- },
100
- transformToInternalInventoryItem: (inventoryItem) => {
101
- if (!inventoryItem)
102
- return undefined;
103
- const internalInventoryItem = {
104
- createdAt: inventoryItem.createdAt,
105
- id: inventoryItem.id,
106
- legacyResourceId: inventoryItem.legacyResourceId,
107
- requiresShipping: inventoryItem.requiresShipping,
108
- sku: inventoryItem.sku,
109
- tracked: inventoryItem.tracked,
110
- unitCost: ShopifyGraphQLTransformer.buildUnitCost(inventoryItem),
111
- unitCostCurrency: inventoryItem.unitCost?.currencyCode,
112
- updatedAt: inventoryItem.updatedAt,
113
- };
114
- return internalInventoryItem;
115
- },
116
- buildUnitCost: (inventoryItem) => {
117
- try {
118
- const unitCost = inventoryItem.unitCost?.amount;
119
- if (typeof unitCost === 'number') {
120
- return unitCost;
121
- }
122
- else if (typeof unitCost === 'string') {
123
- const parsedValue = Number(unitCost);
124
- if (isNaN(parsedValue) || !isFinite(parsedValue)) {
125
- return undefined;
126
- }
127
- if (parsedValue > Number.MAX_SAFE_INTEGER || parsedValue < Number.MIN_SAFE_INTEGER) {
128
- return undefined;
129
- }
130
- return parsedValue;
131
- }
132
- return undefined;
133
- }
134
- catch (error) {
135
- return undefined;
136
- }
137
- },
138
- };
1
+ export const ShopifyGraphQLTransformer = {
2
+ transformToInternalProduct: (product) => {
3
+ if (!product)
4
+ return undefined;
5
+ const internalProduct = {
6
+ id: product?.id,
7
+ legacyResourceId: Number(product.legacyResourceId),
8
+ title: product.title,
9
+ description: product.description,
10
+ handle: product?.handle,
11
+ productType: product?.productType,
12
+ vendor: product.vendor,
13
+ status: product.status,
14
+ createdAt: product.createdAt,
15
+ updatedAt: product.updatedAt,
16
+ publishedAt: product.publishedAt,
17
+ hasOnlyDefaultVariant: product?.hasOnlyDefaultVariant ?? false,
18
+ hasOutOfStockVariants: product?.hasOutOfStockVariants ?? false,
19
+ hasVariantsThatRequiresComponents: product?.hasVariantsThatRequiresComponents ?? false,
20
+ isGiftCard: product?.isGiftCard ?? false,
21
+ onlineStoreUrl: product.onlineStoreUrl,
22
+ onlineStorePreviewUrl: product.onlineStorePreviewUrl,
23
+ tags: product.tags || [],
24
+ totalInventory: product.totalInventory || 0,
25
+ tracksInventory: product.tracksInventory || false,
26
+ featuredImageUrl: product.featuredMedia?.preview?.image?.url,
27
+ images: product.media?.nodes?.map((image) => image.preview?.image?.url) || [],
28
+ variantsCount: product?.variantsCount?.count,
29
+ maxVariantCompareAtPrice: Number(product.compareAtPriceRange?.maxVariantCompareAtPrice?.amount || 0),
30
+ minVariantCompareAtPrice: Number(product.compareAtPriceRange?.minVariantCompareAtPrice?.amount || 0),
31
+ maxVariantPrice: Number(product.priceRangeV2?.maxVariantPrice?.amount || 0),
32
+ minVariantPrice: Number(product.priceRangeV2?.minVariantPrice?.amount || 0),
33
+ currency: product.priceRangeV2?.minVariantPrice?.currencyCode || product.priceRangeV2?.maxVariantPrice?.currencyCode,
34
+ media: product?.media?.nodes?.map((media) => ({
35
+ id: media.id,
36
+ mediaContentType: media.mediaContentType,
37
+ status: media.status,
38
+ previewImageUrl: media.preview?.image?.url,
39
+ })) || [],
40
+ variants: product?.variants?.nodes
41
+ ?.map((variant) => ShopifyGraphQLTransformer.transformToInternalProductVariant(variant))
42
+ .filter((variant) => variant !== undefined) || [],
43
+ collections: product.collections?.nodes?.map((collection) => ({
44
+ id: collection.id,
45
+ legacyResourceId: Number(collection.legacyResourceId),
46
+ title: collection.title,
47
+ handle: collection.handle,
48
+ imageUrl: collection.image?.url,
49
+ productsCount: collection.productsCount,
50
+ })) || [],
51
+ category: product.category
52
+ ? {
53
+ id: product.category.id,
54
+ name: product.category.name,
55
+ fullName: product.category.fullName,
56
+ ancestorIds: product.category.ancestorIds,
57
+ childrenIds: product.category.childrenIds,
58
+ }
59
+ : undefined,
60
+ seoTitle: product.seo?.title,
61
+ seoDescription: product.seo?.description,
62
+ };
63
+ return internalProduct;
64
+ },
65
+ transformToInternalProductVariant: (variant) => {
66
+ if (!variant)
67
+ return undefined;
68
+ const internalVariant = {
69
+ availableForSale: variant.availableForSale || false,
70
+ id: variant.id,
71
+ legacyResourceId: variant?.legacyResourceId,
72
+ title: variant.title,
73
+ displayName: variant.displayName,
74
+ sku: variant?.sku,
75
+ barcode: variant?.barcode,
76
+ price: variant.price,
77
+ amount: Number(variant.price || 0),
78
+ compareAtPrice: variant.compareAtPrice,
79
+ createdAt: variant.createdAt,
80
+ updatedAt: variant.updatedAt,
81
+ position: variant.position || 0,
82
+ inventoryItem: variant?.inventoryItem
83
+ ? ShopifyGraphQLTransformer.transformToInternalInventoryItem(variant.inventoryItem)
84
+ : undefined,
85
+ inventoryPolicy: variant?.inventoryPolicy,
86
+ inventoryQuantity: variant?.inventoryQuantity,
87
+ sellableOnlineQuantity: variant.sellableOnlineQuantity || 0,
88
+ taxable: variant.taxable || false,
89
+ taxCode: variant?.taxCode,
90
+ productId: variant.product?.id || '',
91
+ legacyProductResourceId: Number(variant.product?.legacyResourceId || 0),
92
+ featuredImageUrl: variant.image?.url,
93
+ selectedOptions: variant.selectedOptions?.map((option) => ({
94
+ name: option.name,
95
+ value: option.value,
96
+ })) || [],
97
+ };
98
+ return internalVariant;
99
+ },
100
+ transformToInternalInventoryItem: (inventoryItem) => {
101
+ if (!inventoryItem)
102
+ return undefined;
103
+ const internalInventoryItem = {
104
+ createdAt: inventoryItem.createdAt,
105
+ id: inventoryItem.id,
106
+ legacyResourceId: inventoryItem.legacyResourceId,
107
+ requiresShipping: inventoryItem.requiresShipping,
108
+ sku: inventoryItem.sku,
109
+ tracked: inventoryItem.tracked,
110
+ unitCost: ShopifyGraphQLTransformer.buildUnitCost(inventoryItem),
111
+ unitCostCurrency: inventoryItem.unitCost?.currencyCode,
112
+ updatedAt: inventoryItem.updatedAt,
113
+ };
114
+ return internalInventoryItem;
115
+ },
116
+ buildUnitCost: (inventoryItem) => {
117
+ try {
118
+ const unitCost = inventoryItem.unitCost?.amount;
119
+ if (typeof unitCost === 'number') {
120
+ return unitCost;
121
+ }
122
+ else if (typeof unitCost === 'string') {
123
+ const parsedValue = Number(unitCost);
124
+ if (isNaN(parsedValue) || !isFinite(parsedValue)) {
125
+ return undefined;
126
+ }
127
+ if (parsedValue > Number.MAX_SAFE_INTEGER || parsedValue < Number.MIN_SAFE_INTEGER) {
128
+ return undefined;
129
+ }
130
+ return parsedValue;
131
+ }
132
+ return undefined;
133
+ }
134
+ catch (error) {
135
+ return undefined;
136
+ }
137
+ },
138
+ };
139
139
  //# sourceMappingURL=shopify-graphql-transformer.js.map
@@ -1,6 +1,6 @@
1
- import { AxiosResponseHeaders } from 'axios';
2
- export interface ApiResponse<T> {
3
- data: T;
4
- status: number;
5
- headers?: AxiosResponseHeaders;
6
- }
1
+ import { AxiosResponseHeaders } from 'axios';
2
+ export interface ApiResponse<T> {
3
+ data: T;
4
+ status: number;
5
+ headers?: AxiosResponseHeaders;
6
+ }
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=api-response.js.map
@@ -1,4 +1 @@
1
- export * from './internal-events/index.js';
2
- export * from './acuity-types.js';
3
- import * as ShopifyRest from './shopify-rest-types.js';
4
- export { ShopifyRest };
1
+ export * from './internal-events/index.js';
@@ -1,5 +1,2 @@
1
- export * from './internal-events/index.js';
2
- export * from './acuity-types.js';
3
- import * as ShopifyRest from './shopify-rest-types.js';
4
- export { ShopifyRest };
1
+ export * from './internal-events/index.js';
5
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAGlC,OAAO,KAAK,WAAW,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
@@ -1,20 +1,20 @@
1
- export declare enum ADTRACKIFY_EVENT_TYPES {
2
- NOTIFY_SHOPIFY_SUBSCRIPTION_CREATED = "shopifySubscriptionCreated",
3
- NOTIFY_SUBSCRIPTION_SIGNUP_COMPLETED = "subscription.signupCompleted",
4
- REQUEST_SET_ACCOUNT_OWNER = "setAccountOwner",
5
- REQUEST_SET_ACCOUNT_SUBSCRIPTION_ID = "setAccountSubscriptionId"
6
- }
7
- export declare enum ADTRACKIFY_EVENT_SOURCES {
8
- SUBSCRIPTIONS = "subscriptions"
9
- }
10
- export declare const enum PostmarkRequestType {
11
- SINGLE_EMAIL = "single_email",
12
- TEMPLATE_EMAIL = "template_email"
13
- }
14
- export declare enum ADTRACKIFY_EVENT_BRIDGE_EVENTS {
15
- SEND_POSTMARK_EMAIL = "integration.sendPostmarkEmail",
16
- NOTIFY_SHOPIFY_SUBSCRIPTION_CREATED = "shopifySubscriptionCreated",
17
- NOTIFY_SUBSCRIPTION_SIGNUP_COMPLETED = "subscription.signupCompleted",
18
- REQUEST_SET_ACCOUNT_OWNER = "setAccountOwner",
19
- REQUEST_SET_ACCOUNT_SUBSCRIPTION_ID = "setAccountSubscriptionId"
20
- }
1
+ export declare enum ADTRACKIFY_EVENT_TYPES {
2
+ NOTIFY_SHOPIFY_SUBSCRIPTION_CREATED = "shopifySubscriptionCreated",
3
+ NOTIFY_SUBSCRIPTION_SIGNUP_COMPLETED = "subscription.signupCompleted",
4
+ REQUEST_SET_ACCOUNT_OWNER = "setAccountOwner",
5
+ REQUEST_SET_ACCOUNT_SUBSCRIPTION_ID = "setAccountSubscriptionId"
6
+ }
7
+ export declare enum ADTRACKIFY_EVENT_SOURCES {
8
+ SUBSCRIPTIONS = "subscriptions"
9
+ }
10
+ export declare const enum PostmarkRequestType {
11
+ SINGLE_EMAIL = "single_email",
12
+ TEMPLATE_EMAIL = "template_email"
13
+ }
14
+ export declare enum ADTRACKIFY_EVENT_BRIDGE_EVENTS {
15
+ SEND_POSTMARK_EMAIL = "integration.sendPostmarkEmail",
16
+ NOTIFY_SHOPIFY_SUBSCRIPTION_CREATED = "shopifySubscriptionCreated",
17
+ NOTIFY_SUBSCRIPTION_SIGNUP_COMPLETED = "subscription.signupCompleted",
18
+ REQUEST_SET_ACCOUNT_OWNER = "setAccountOwner",
19
+ REQUEST_SET_ACCOUNT_SUBSCRIPTION_ID = "setAccountSubscriptionId"
20
+ }